diff --git a/products/containerregistry/README.md b/products/containerregistry/README.md index 465d565..5f4cf36 100644 --- a/products/containerregistry/README.md +++ b/products/containerregistry/README.md @@ -1,6 +1,21 @@ # Go API client for containerregistry -Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. +## Overview +Container Registry service enables IONOS clients to manage docker and OCI +compliant registries for use by their managed Kubernetes clusters. Use a +Container Registry to ensure you have a privately accessed registry to +efficiently support image pulls. +## Changelog +### 1.1.0 + - Added new endpoints for Repositories + - Added new endpoints for Artifacts + - Added new endpoints for Vulnerabilities + - Added registry vulnerabilityScanning feature +### 1.2.0 + - Added registry `apiSubnetAllowList` +### 1.2.1 + - Amended `apiSubnetAllowList` Regex + ## Overview The IONOS Cloud SDK for GO provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. @@ -34,7 +49,7 @@ go get github.com/ionos-cloud/sdk-go-bundle/products/containerregistry@latest | `IONOS_PASSWORD` | Specify the password used to login, to authenticate against the IONOS Cloud API | | `IONOS_TOKEN` | Specify the token used to login, if a token is being used instead of username and password | | `IONOS_API_URL` | Specify the API URL. It will overwrite the API endpoint default value `api.ionos.com`. Note: the host URL does not contain the `/cloudapi/v6` path, so it should _not_ be included in the `IONOS_API_URL` environment variable | -| `IONOS_LOGLEVEL` | Specify the Log Level used to log messages. Possible values: Off, Debug, Trace | +| `IONOS_LOG_LEVEL` | Specify the Log Level used to log messages. Possible values: Off, Debug, Trace | | `IONOS_PINNED_CERT` | Specify the SHA-256 public fingerprint here, enables certificate pinning | ⚠️ **_Note: To overwrite the api endpoint - `api.ionos.com`, the environment variable `$IONOS_API_URL` can be set, and used with `NewConfigurationFromEnv()` function._** @@ -156,9 +171,9 @@ requestProperties.SetURL("https://api.ionos.com/cloudapi/v6") ## Debugging -You can now inject any logger that implements Printf as a logger +You can inject any logger that implements Printf as a logger instead of using the default sdk logger. -There are now Loglevels that you can set: `Off`, `Debug` and `Trace`. +There are log levels that you can set: `Off`, `Debug` and `Trace`. `Off` - does not show any logs `Debug` - regular logs, no sensitive information `Trace` - we recommend you only set this field for debugging purposes. Disable it in your production environments because it can log sensitive data. @@ -179,9 +194,9 @@ func main() { // if you have set your env variables as explained above cfg := shared.NewConfiguration("username", "password", "token", "hostUrl") // enable request and response logging. this is the most verbose loglevel - cfg.LogLevel = Trace + shared.SdkLogLevel = Trace // inject your own logger that implements Printf - cfg.Logger = logrus.New() + shared.SdkLogger = logrus.New() // create you api client with the configuration apiClient := containerregistry.NewAPIClient(cfg) } @@ -196,6 +211,10 @@ All URIs are relative to *https://api.ionos.com/containerregistries* Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- +ArtifactsApi | [**RegistriesArtifactsGet**](docs/api/ArtifactsApi.md#registriesartifactsget) | **Get** /registries/{registryId}/artifacts | Retrieve all Artifacts by Registry +ArtifactsApi | [**RegistriesRepositoriesArtifactsFindByDigest**](docs/api/ArtifactsApi.md#registriesrepositoriesartifactsfindbydigest) | **Get** /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest} | Retrieve Artifact +ArtifactsApi | [**RegistriesRepositoriesArtifactsGet**](docs/api/ArtifactsApi.md#registriesrepositoriesartifactsget) | **Get** /registries/{registryId}/repositories/{repositoryName}/artifacts | Retrieve all Artifacts by Repository +ArtifactsApi | [**RegistriesRepositoriesArtifactsVulnerabilitiesGet**](docs/api/ArtifactsApi.md#registriesrepositoriesartifactsvulnerabilitiesget) | **Get** /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest}/vulnerabilities | Retrieve all Vulnerabilities LocationsApi | [**LocationsGet**](docs/api/LocationsApi.md#locationsget) | **Get** /locations | Get container registry locations NamesApi | [**NamesCheckUsage**](docs/api/NamesApi.md#namescheckusage) | **Head** /names/{name} | Get container registry name availability RegistriesApi | [**RegistriesDelete**](docs/api/RegistriesApi.md#registriesdelete) | **Delete** /registries/{registryId} | Delete registry @@ -204,13 +223,16 @@ RegistriesApi | [**RegistriesGet**](docs/api/RegistriesApi.md#registriesget) | * RegistriesApi | [**RegistriesPatch**](docs/api/RegistriesApi.md#registriespatch) | **Patch** /registries/{registryId} | Update the properties of a registry RegistriesApi | [**RegistriesPost**](docs/api/RegistriesApi.md#registriespost) | **Post** /registries | Create container registry RegistriesApi | [**RegistriesPut**](docs/api/RegistriesApi.md#registriesput) | **Put** /registries/{registryId} | Create or replace a container registry -RepositoriesApi | [**RegistriesRepositoriesDelete**](docs/api/RepositoriesApi.md#registriesrepositoriesdelete) | **Delete** /registries/{registryId}/repositories/{name} | Delete repository +RepositoriesApi | [**RegistriesRepositoriesDelete**](docs/api/RepositoriesApi.md#registriesrepositoriesdelete) | **Delete** /registries/{registryId}/repositories/{repositoryName} | Delete repository +RepositoriesApi | [**RegistriesRepositoriesFindByName**](docs/api/RepositoriesApi.md#registriesrepositoriesfindbyname) | **Get** /registries/{registryId}/repositories/{repositoryName} | Retrieve Repository +RepositoriesApi | [**RegistriesRepositoriesGet**](docs/api/RepositoriesApi.md#registriesrepositoriesget) | **Get** /registries/{registryId}/repositories | Retrieve all Repositories TokensApi | [**RegistriesTokensDelete**](docs/api/TokensApi.md#registriestokensdelete) | **Delete** /registries/{registryId}/tokens/{tokenId} | Delete token TokensApi | [**RegistriesTokensFindById**](docs/api/TokensApi.md#registriestokensfindbyid) | **Get** /registries/{registryId}/tokens/{tokenId} | Get token information TokensApi | [**RegistriesTokensGet**](docs/api/TokensApi.md#registriestokensget) | **Get** /registries/{registryId}/tokens | List all tokens for the container registry TokensApi | [**RegistriesTokensPatch**](docs/api/TokensApi.md#registriestokenspatch) | **Patch** /registries/{registryId}/tokens/{tokenId} | Update token TokensApi | [**RegistriesTokensPost**](docs/api/TokensApi.md#registriestokenspost) | **Post** /registries/{registryId}/tokens | Create token TokensApi | [**RegistriesTokensPut**](docs/api/TokensApi.md#registriestokensput) | **Put** /registries/{registryId}/tokens/{tokenId} | Create or replace token +VulnerabilitiesApi | [**VulnerabilitiesFindByID**](docs/api/VulnerabilitiesApi.md#vulnerabilitiesfindbyid) | **Get** /vulnerabilities/{vulnerabilityId} | Retrieve Vulnerability @@ -223,10 +245,22 @@ All URIs are relative to *https://api.ionos.com/containerregistries* - [ApiErrorMessage](docs/models/ApiErrorMessage) - [ApiErrorResponse](docs/models/ApiErrorResponse) - [ApiResourceMetadata](docs/models/ApiResourceMetadata) + - [Artifact](docs/models/Artifact) + - [ArtifactMetadata](docs/models/ArtifactMetadata) + - [ArtifactMetadataAllOf](docs/models/ArtifactMetadataAllOf) + - [ArtifactRead](docs/models/ArtifactRead) + - [ArtifactReadList](docs/models/ArtifactReadList) + - [ArtifactVulnerabilityReadList](docs/models/ArtifactVulnerabilityReadList) - [Credentials](docs/models/Credentials) - [Day](docs/models/Day) + - [Error](docs/models/Error) + - [ErrorMessages](docs/models/ErrorMessages) + - [Feature](docs/models/Feature) + - [FeatureVulnerabilityScanning](docs/models/FeatureVulnerabilityScanning) + - [Links](docs/models/Links) - [Location](docs/models/Location) - [LocationsResponse](docs/models/LocationsResponse) + - [Metadata](docs/models/Metadata) - [Pagination](docs/models/Pagination) - [PaginationLinks](docs/models/PaginationLinks) - [PatchRegistryInput](docs/models/PatchRegistryInput) @@ -237,18 +271,32 @@ All URIs are relative to *https://api.ionos.com/containerregistries* - [PostTokenInput](docs/models/PostTokenInput) - [PostTokenOutput](docs/models/PostTokenOutput) - [PostTokenProperties](docs/models/PostTokenProperties) + - [Purl](docs/models/Purl) - [PutRegistryInput](docs/models/PutRegistryInput) - [PutRegistryOutput](docs/models/PutRegistryOutput) - [PutTokenInput](docs/models/PutTokenInput) - [PutTokenOutput](docs/models/PutTokenOutput) - [RegistriesResponse](docs/models/RegistriesResponse) + - [RegistryArtifactsReadList](docs/models/RegistryArtifactsReadList) + - [RegistryFeatures](docs/models/RegistryFeatures) + - [RegistryPagination](docs/models/RegistryPagination) - [RegistryProperties](docs/models/RegistryProperties) - [RegistryResponse](docs/models/RegistryResponse) + - [Repository](docs/models/Repository) + - [RepositoryMetadata](docs/models/RepositoryMetadata) + - [RepositoryMetadataAllOf](docs/models/RepositoryMetadataAllOf) + - [RepositoryRead](docs/models/RepositoryRead) + - [RepositoryReadList](docs/models/RepositoryReadList) - [Scope](docs/models/Scope) - [StorageUsage](docs/models/StorageUsage) - [TokenProperties](docs/models/TokenProperties) - [TokenResponse](docs/models/TokenResponse) - [TokensResponse](docs/models/TokensResponse) + - [Vulnerability](docs/models/Vulnerability) + - [VulnerabilityDataSource](docs/models/VulnerabilityDataSource) + - [VulnerabilityMetadata](docs/models/VulnerabilityMetadata) + - [VulnerabilityRead](docs/models/VulnerabilityRead) + - [VulnerabilityReadList](docs/models/VulnerabilityReadList) - [WeeklySchedule](docs/models/WeeklySchedule) diff --git a/products/containerregistry/api_artifacts.go b/products/containerregistry/api_artifacts.go new file mode 100644 index 0000000..3fa19c8 --- /dev/null +++ b/products/containerregistry/api_artifacts.go @@ -0,0 +1,946 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + _context "context" + "fmt" + "github.com/ionos-cloud/sdk-go-bundle/shared" + "io" + _nethttp "net/http" + _neturl "net/url" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +// ArtifactsApiService ArtifactsApi service +type ArtifactsApiService service + +type ApiRegistriesArtifactsGetRequest struct { + ctx _context.Context + ApiService *ArtifactsApiService + registryId string + offset *int32 + limit *int32 + filterVulnerabilityId *string + orderBy *string +} + +func (r ApiRegistriesArtifactsGetRequest) Offset(offset int32) ApiRegistriesArtifactsGetRequest { + r.offset = &offset + return r +} +func (r ApiRegistriesArtifactsGetRequest) Limit(limit int32) ApiRegistriesArtifactsGetRequest { + r.limit = &limit + return r +} +func (r ApiRegistriesArtifactsGetRequest) FilterVulnerabilityId(filterVulnerabilityId string) ApiRegistriesArtifactsGetRequest { + r.filterVulnerabilityId = &filterVulnerabilityId + return r +} +func (r ApiRegistriesArtifactsGetRequest) OrderBy(orderBy string) ApiRegistriesArtifactsGetRequest { + r.orderBy = &orderBy + return r +} + +func (r ApiRegistriesArtifactsGetRequest) Execute() (RegistryArtifactsReadList, *shared.APIResponse, error) { + return r.ApiService.RegistriesArtifactsGetExecute(r) +} + +/* + - RegistriesArtifactsGet Retrieve all Artifacts by Registry + - This endpoint enables retrieving all Artifacts using + +pagination and optional filters. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryId The ID (UUID) of the Registry. + - @return ApiRegistriesArtifactsGetRequest +*/ +func (a *ArtifactsApiService) RegistriesArtifactsGet(ctx _context.Context, registryId string) ApiRegistriesArtifactsGetRequest { + return ApiRegistriesArtifactsGetRequest{ + ApiService: a, + ctx: ctx, + registryId: registryId, + } +} + +/* + * Execute executes the request + * @return RegistryArtifactsReadList + */ +func (a *ArtifactsApiService) RegistriesArtifactsGetExecute(r ApiRegistriesArtifactsGetRequest) (RegistryArtifactsReadList, *shared.APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue RegistryArtifactsReadList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsApiService.RegistriesArtifactsGet") + if err != nil { + gerr := shared.GenericOpenAPIError{} + gerr.SetError(err.Error()) + return localVarReturnValue, nil, gerr + } + + localVarPath := localBasePath + "/registries/{registryId}/artifacts" + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.filterVulnerabilityId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter.vulnerabilityId", r.filterVulnerabilityId, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok { + if apiKey, ok := auth["tokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &shared.APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestTime: httpRequestTime, + RequestURL: localVarPath, + Operation: "RegistriesArtifactsGet", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody))) + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 429 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 503 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiRegistriesRepositoriesArtifactsFindByDigestRequest struct { + ctx _context.Context + ApiService *ArtifactsApiService + registryId string + repositoryName string + digest string +} + +func (r ApiRegistriesRepositoriesArtifactsFindByDigestRequest) Execute() (ArtifactRead, *shared.APIResponse, error) { + return r.ApiService.RegistriesRepositoriesArtifactsFindByDigestExecute(r) +} + +/* + * RegistriesRepositoriesArtifactsFindByDigest Retrieve Artifact + * Returns the Artifact by Digest. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryId The ID (UUID) of the Registry. + * @param repositoryName The Name of the Repository. + * @param digest The Digest of the Artifact. + * @return ApiRegistriesRepositoriesArtifactsFindByDigestRequest + */ +func (a *ArtifactsApiService) RegistriesRepositoriesArtifactsFindByDigest(ctx _context.Context, registryId string, repositoryName string, digest string) ApiRegistriesRepositoriesArtifactsFindByDigestRequest { + return ApiRegistriesRepositoriesArtifactsFindByDigestRequest{ + ApiService: a, + ctx: ctx, + registryId: registryId, + repositoryName: repositoryName, + digest: digest, + } +} + +/* + * Execute executes the request + * @return ArtifactRead + */ +func (a *ArtifactsApiService) RegistriesRepositoriesArtifactsFindByDigestExecute(r ApiRegistriesRepositoriesArtifactsFindByDigestRequest) (ArtifactRead, *shared.APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ArtifactRead + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsApiService.RegistriesRepositoriesArtifactsFindByDigest") + if err != nil { + gerr := shared.GenericOpenAPIError{} + gerr.SetError(err.Error()) + return localVarReturnValue, nil, gerr + } + + localVarPath := localBasePath + "/registries/{registryId}/repositories/{repositoryName}/artifacts/{digest}" + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repositoryName"+"}", _neturl.PathEscape(parameterValueToString(r.repositoryName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"digest"+"}", _neturl.PathEscape(parameterValueToString(r.digest, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if shared.Strlen(r.repositoryName) > 256 { + return localVarReturnValue, nil, reportError("repositoryName must have less than 256 elements") + } + if shared.Strlen(r.digest) > 128 { + return localVarReturnValue, nil, reportError("digest must have less than 128 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok { + if apiKey, ok := auth["tokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &shared.APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestTime: httpRequestTime, + RequestURL: localVarPath, + Operation: "RegistriesRepositoriesArtifactsFindByDigest", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody))) + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 429 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 503 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiRegistriesRepositoriesArtifactsGetRequest struct { + ctx _context.Context + ApiService *ArtifactsApiService + registryId string + repositoryName string + offset *int32 + limit *int32 + orderBy *string +} + +func (r ApiRegistriesRepositoriesArtifactsGetRequest) Offset(offset int32) ApiRegistriesRepositoriesArtifactsGetRequest { + r.offset = &offset + return r +} +func (r ApiRegistriesRepositoriesArtifactsGetRequest) Limit(limit int32) ApiRegistriesRepositoriesArtifactsGetRequest { + r.limit = &limit + return r +} +func (r ApiRegistriesRepositoriesArtifactsGetRequest) OrderBy(orderBy string) ApiRegistriesRepositoriesArtifactsGetRequest { + r.orderBy = &orderBy + return r +} + +func (r ApiRegistriesRepositoriesArtifactsGetRequest) Execute() (ArtifactReadList, *shared.APIResponse, error) { + return r.ApiService.RegistriesRepositoriesArtifactsGetExecute(r) +} + +/* + - RegistriesRepositoriesArtifactsGet Retrieve all Artifacts by Repository + - This endpoint enables retrieving all Artifacts using + +pagination and optional filters. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryId The ID (UUID) of the Registry. + - @param repositoryName The Name of the Repository. + - @return ApiRegistriesRepositoriesArtifactsGetRequest +*/ +func (a *ArtifactsApiService) RegistriesRepositoriesArtifactsGet(ctx _context.Context, registryId string, repositoryName string) ApiRegistriesRepositoriesArtifactsGetRequest { + return ApiRegistriesRepositoriesArtifactsGetRequest{ + ApiService: a, + ctx: ctx, + registryId: registryId, + repositoryName: repositoryName, + } +} + +/* + * Execute executes the request + * @return ArtifactReadList + */ +func (a *ArtifactsApiService) RegistriesRepositoriesArtifactsGetExecute(r ApiRegistriesRepositoriesArtifactsGetRequest) (ArtifactReadList, *shared.APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ArtifactReadList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsApiService.RegistriesRepositoriesArtifactsGet") + if err != nil { + gerr := shared.GenericOpenAPIError{} + gerr.SetError(err.Error()) + return localVarReturnValue, nil, gerr + } + + localVarPath := localBasePath + "/registries/{registryId}/repositories/{repositoryName}/artifacts" + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repositoryName"+"}", _neturl.PathEscape(parameterValueToString(r.repositoryName, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if shared.Strlen(r.repositoryName) > 256 { + return localVarReturnValue, nil, reportError("repositoryName must have less than 256 elements") + } + + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok { + if apiKey, ok := auth["tokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &shared.APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestTime: httpRequestTime, + RequestURL: localVarPath, + Operation: "RegistriesRepositoriesArtifactsGet", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody))) + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 429 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 503 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest struct { + ctx _context.Context + ApiService *ArtifactsApiService + registryId string + repositoryName string + digest string + offset *int32 + limit *int32 + filterSeverity *string + filterFixable *bool + orderBy *string +} + +func (r ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest) Offset(offset int32) ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest { + r.offset = &offset + return r +} +func (r ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest) Limit(limit int32) ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest { + r.limit = &limit + return r +} +func (r ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest) FilterSeverity(filterSeverity string) ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest { + r.filterSeverity = &filterSeverity + return r +} +func (r ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest) FilterFixable(filterFixable bool) ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest { + r.filterFixable = &filterFixable + return r +} +func (r ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest) OrderBy(orderBy string) ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest { + r.orderBy = &orderBy + return r +} + +func (r ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest) Execute() (ArtifactVulnerabilityReadList, *shared.APIResponse, error) { + return r.ApiService.RegistriesRepositoriesArtifactsVulnerabilitiesGetExecute(r) +} + +/* + - RegistriesRepositoriesArtifactsVulnerabilitiesGet Retrieve all Vulnerabilities + - This endpoint enables retrieving all Vulnerabilities using + +pagination and optional filters. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryId The ID (UUID) of the Registry. + - @param repositoryName The Name of the Repository. + - @param digest The Digest of the Artifact. + - @return ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest +*/ +func (a *ArtifactsApiService) RegistriesRepositoriesArtifactsVulnerabilitiesGet(ctx _context.Context, registryId string, repositoryName string, digest string) ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest { + return ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest{ + ApiService: a, + ctx: ctx, + registryId: registryId, + repositoryName: repositoryName, + digest: digest, + } +} + +/* + * Execute executes the request + * @return ArtifactVulnerabilityReadList + */ +func (a *ArtifactsApiService) RegistriesRepositoriesArtifactsVulnerabilitiesGetExecute(r ApiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest) (ArtifactVulnerabilityReadList, *shared.APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ArtifactVulnerabilityReadList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsApiService.RegistriesRepositoriesArtifactsVulnerabilitiesGet") + if err != nil { + gerr := shared.GenericOpenAPIError{} + gerr.SetError(err.Error()) + return localVarReturnValue, nil, gerr + } + + localVarPath := localBasePath + "/registries/{registryId}/repositories/{repositoryName}/artifacts/{digest}/vulnerabilities" + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repositoryName"+"}", _neturl.PathEscape(parameterValueToString(r.repositoryName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"digest"+"}", _neturl.PathEscape(parameterValueToString(r.digest, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if shared.Strlen(r.repositoryName) > 256 { + return localVarReturnValue, nil, reportError("repositoryName must have less than 256 elements") + } + if shared.Strlen(r.digest) > 128 { + return localVarReturnValue, nil, reportError("digest must have less than 128 elements") + } + + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.filterSeverity != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter.severity", r.filterSeverity, "") + } + if r.filterFixable != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter.fixable", r.filterFixable, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok { + if apiKey, ok := auth["tokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &shared.APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestTime: httpRequestTime, + RequestURL: localVarPath, + Operation: "RegistriesRepositoriesArtifactsVulnerabilitiesGet", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody))) + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 429 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 503 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} diff --git a/products/containerregistry/api_locations.go b/products/containerregistry/api_locations.go index 7542677..0b06d72 100644 --- a/products/containerregistry/api_locations.go +++ b/products/containerregistry/api_locations.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,7 +15,7 @@ import ( _context "context" "fmt" "github.com/ionos-cloud/sdk-go-bundle/shared" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" ) @@ -39,6 +39,7 @@ func (r ApiLocationsGetRequest) Execute() (LocationsResponse, *shared.APIRespons /* * LocationsGet Get container registry locations + * * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiLocationsGetRequest */ @@ -126,7 +127,7 @@ func (a *LocationsApiService) LocationsGetExecute(r ApiLocationsGetRequest) (Loc return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/products/containerregistry/api_names.go b/products/containerregistry/api_names.go index f17fae7..e20fc3f 100644 --- a/products/containerregistry/api_names.go +++ b/products/containerregistry/api_names.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,7 +15,7 @@ import ( _context "context" "fmt" "github.com/ionos-cloud/sdk-go-bundle/shared" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -79,7 +79,7 @@ func (a *NamesApiService) NamesCheckUsageExecute(r ApiNamesCheckUsageRequest) (* } localVarPath := localBasePath + "/names/{name}" - localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", _neturl.PathEscape(parameterToString(r.name, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", _neturl.PathEscape(parameterValueToString(r.name, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -135,7 +135,7 @@ func (a *NamesApiService) NamesCheckUsageExecute(r ApiNamesCheckUsageRequest) (* return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/products/containerregistry/api_registries.go b/products/containerregistry/api_registries.go index a607d0c..ed0fa47 100644 --- a/products/containerregistry/api_registries.go +++ b/products/containerregistry/api_registries.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,7 +15,7 @@ import ( _context "context" "fmt" "github.com/ionos-cloud/sdk-go-bundle/shared" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -41,6 +41,7 @@ func (r ApiRegistriesDeleteRequest) Execute() (*shared.APIResponse, error) { /* * RegistriesDelete Delete registry + * * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param registryId The unique ID of the registry * @return ApiRegistriesDeleteRequest @@ -73,7 +74,7 @@ func (a *RegistriesApiService) RegistriesDeleteExecute(r ApiRegistriesDeleteRequ } localVarPath := localBasePath + "/registries/{registryId}" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -129,7 +130,7 @@ func (a *RegistriesApiService) RegistriesDeleteExecute(r ApiRegistriesDeleteRequ return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -203,7 +204,7 @@ func (a *RegistriesApiService) RegistriesFindByIdExecute(r ApiRegistriesFindById } localVarPath := localBasePath + "/registries/{registryId}" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -259,7 +260,7 @@ func (a *RegistriesApiService) RegistriesFindByIdExecute(r ApiRegistriesFindById return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -370,13 +371,13 @@ func (a *RegistriesApiService) RegistriesGetExecute(r ApiRegistriesGetRequest) ( localVarFormParams := _neturl.Values{} if r.filterName != nil { - localVarQueryParams.Add("filter.name", parameterToString(*r.filterName, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "filter.name", r.filterName, "") } if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") } if r.paginationToken != nil { - localVarQueryParams.Add("pagination.token", parameterToString(*r.paginationToken, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "pagination.token", r.paginationToken, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -428,7 +429,7 @@ func (a *RegistriesApiService) RegistriesGetExecute(r ApiRegistriesGetRequest) ( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -519,7 +520,7 @@ func (a *RegistriesApiService) RegistriesPatchExecute(r ApiRegistriesPatchReques } localVarPath := localBasePath + "/registries/{registryId}" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -580,7 +581,7 @@ func (a *RegistriesApiService) RegistriesPatchExecute(r ApiRegistriesPatchReques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -638,6 +639,7 @@ func (r ApiRegistriesPostRequest) Execute() (PostRegistryOutput, *shared.APIResp - "name" must have passed validation - "location" must be one of the available location IDs - "garbageCollectionSchedule" time and days of the week for runs +- "features": "vulnerabilityScanning" default is enabled - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRegistriesPostRequest */ @@ -730,7 +732,7 @@ func (a *RegistriesApiService) RegistriesPostExecute(r ApiRegistriesPostRequest) return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -787,15 +789,12 @@ func (r ApiRegistriesPutRequest) Execute() (PutRegistryOutput, *shared.APIRespon - Create/replace a registry to hold container images or OCI compliant artifacts - **On create** - "name" must have passed validation - "location" must be one of the available location IDs - **On update** - "name" cannot be changed - "location" cannot be changed - **On create or update** - "garbageCollectionSchedule": time and days of the week for runs @@ -833,7 +832,7 @@ func (a *RegistriesApiService) RegistriesPutExecute(r ApiRegistriesPutRequest) ( } localVarPath := localBasePath + "/registries/{registryId}" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -894,7 +893,7 @@ func (a *RegistriesApiService) RegistriesPutExecute(r ApiRegistriesPutRequest) ( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/products/containerregistry/api_repositories.go b/products/containerregistry/api_repositories.go index ec8f892..099bbc5 100644 --- a/products/containerregistry/api_repositories.go +++ b/products/containerregistry/api_repositories.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,7 +15,7 @@ import ( _context "context" "fmt" "github.com/ionos-cloud/sdk-go-bundle/shared" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -30,10 +30,10 @@ var ( type RepositoriesApiService service type ApiRegistriesRepositoriesDeleteRequest struct { - ctx _context.Context - ApiService *RepositoriesApiService - registryId string - name string + ctx _context.Context + ApiService *RepositoriesApiService + registryId string + repositoryName string } func (r ApiRegistriesRepositoriesDeleteRequest) Execute() (*shared.APIResponse, error) { @@ -52,16 +52,16 @@ func (r ApiRegistriesRepositoriesDeleteRequest) Execute() (*shared.APIResponse, - @param registryId The unique ID of the registry - - @param name The name of the repository + - @param repositoryName The name of the repository - @return ApiRegistriesRepositoriesDeleteRequest */ -func (a *RepositoriesApiService) RegistriesRepositoriesDelete(ctx _context.Context, registryId string, name string) ApiRegistriesRepositoriesDeleteRequest { +func (a *RepositoriesApiService) RegistriesRepositoriesDelete(ctx _context.Context, registryId string, repositoryName string) ApiRegistriesRepositoriesDeleteRequest { return ApiRegistriesRepositoriesDeleteRequest{ - ApiService: a, - ctx: ctx, - registryId: registryId, - name: name, + ApiService: a, + ctx: ctx, + registryId: registryId, + repositoryName: repositoryName, } } @@ -84,9 +84,9 @@ func (a *RepositoriesApiService) RegistriesRepositoriesDeleteExecute(r ApiRegist return nil, gerr } - localVarPath := localBasePath + "/registries/{registryId}/repositories/{name}" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", _neturl.PathEscape(parameterToString(r.name, "")), -1) + localVarPath := localBasePath + "/registries/{registryId}/repositories/{repositoryName}" + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repositoryName"+"}", _neturl.PathEscape(parameterValueToString(r.repositoryName, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -142,7 +142,7 @@ func (a *RepositoriesApiService) RegistriesRepositoriesDeleteExecute(r ApiRegist return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -159,3 +159,445 @@ func (a *RepositoriesApiService) RegistriesRepositoriesDeleteExecute(r ApiRegist return localVarAPIResponse, nil } + +type ApiRegistriesRepositoriesFindByNameRequest struct { + ctx _context.Context + ApiService *RepositoriesApiService + registryId string + repositoryName string +} + +func (r ApiRegistriesRepositoriesFindByNameRequest) Execute() (RepositoryRead, *shared.APIResponse, error) { + return r.ApiService.RegistriesRepositoriesFindByNameExecute(r) +} + +/* + * RegistriesRepositoriesFindByName Retrieve Repository + * Returns the Repository by Name. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registryId The ID (UUID) of the Registry. + * @param repositoryName The Name of the Repository. + * @return ApiRegistriesRepositoriesFindByNameRequest + */ +func (a *RepositoriesApiService) RegistriesRepositoriesFindByName(ctx _context.Context, registryId string, repositoryName string) ApiRegistriesRepositoriesFindByNameRequest { + return ApiRegistriesRepositoriesFindByNameRequest{ + ApiService: a, + ctx: ctx, + registryId: registryId, + repositoryName: repositoryName, + } +} + +/* + * Execute executes the request + * @return RepositoryRead + */ +func (a *RepositoriesApiService) RegistriesRepositoriesFindByNameExecute(r ApiRegistriesRepositoriesFindByNameRequest) (RepositoryRead, *shared.APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue RepositoryRead + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesApiService.RegistriesRepositoriesFindByName") + if err != nil { + gerr := shared.GenericOpenAPIError{} + gerr.SetError(err.Error()) + return localVarReturnValue, nil, gerr + } + + localVarPath := localBasePath + "/registries/{registryId}/repositories/{repositoryName}" + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repositoryName"+"}", _neturl.PathEscape(parameterValueToString(r.repositoryName, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if shared.Strlen(r.repositoryName) > 256 { + return localVarReturnValue, nil, reportError("repositoryName must have less than 256 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok { + if apiKey, ok := auth["tokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &shared.APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestTime: httpRequestTime, + RequestURL: localVarPath, + Operation: "RegistriesRepositoriesFindByName", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody))) + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 429 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 503 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiRegistriesRepositoriesGetRequest struct { + ctx _context.Context + ApiService *RepositoriesApiService + registryId string + offset *int32 + limit *int32 + filterName *string + filterVulnerabilitySeverity *string + orderBy *string +} + +func (r ApiRegistriesRepositoriesGetRequest) Offset(offset int32) ApiRegistriesRepositoriesGetRequest { + r.offset = &offset + return r +} +func (r ApiRegistriesRepositoriesGetRequest) Limit(limit int32) ApiRegistriesRepositoriesGetRequest { + r.limit = &limit + return r +} +func (r ApiRegistriesRepositoriesGetRequest) FilterName(filterName string) ApiRegistriesRepositoriesGetRequest { + r.filterName = &filterName + return r +} +func (r ApiRegistriesRepositoriesGetRequest) FilterVulnerabilitySeverity(filterVulnerabilitySeverity string) ApiRegistriesRepositoriesGetRequest { + r.filterVulnerabilitySeverity = &filterVulnerabilitySeverity + return r +} +func (r ApiRegistriesRepositoriesGetRequest) OrderBy(orderBy string) ApiRegistriesRepositoriesGetRequest { + r.orderBy = &orderBy + return r +} + +func (r ApiRegistriesRepositoriesGetRequest) Execute() (RepositoryReadList, *shared.APIResponse, error) { + return r.ApiService.RegistriesRepositoriesGetExecute(r) +} + +/* + - RegistriesRepositoriesGet Retrieve all Repositories + - This endpoint enables retrieving all Repositories using + +pagination and optional filters. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param registryId The ID (UUID) of the Registry. + - @return ApiRegistriesRepositoriesGetRequest +*/ +func (a *RepositoriesApiService) RegistriesRepositoriesGet(ctx _context.Context, registryId string) ApiRegistriesRepositoriesGetRequest { + return ApiRegistriesRepositoriesGetRequest{ + ApiService: a, + ctx: ctx, + registryId: registryId, + } +} + +/* + * Execute executes the request + * @return RepositoryReadList + */ +func (a *RepositoriesApiService) RegistriesRepositoriesGetExecute(r ApiRegistriesRepositoriesGetRequest) (RepositoryReadList, *shared.APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue RepositoryReadList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesApiService.RegistriesRepositoriesGet") + if err != nil { + gerr := shared.GenericOpenAPIError{} + gerr.SetError(err.Error()) + return localVarReturnValue, nil, gerr + } + + localVarPath := localBasePath + "/registries/{registryId}/repositories" + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.filterName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter.name", r.filterName, "") + } + if r.filterVulnerabilitySeverity != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter.vulnerabilitySeverity", r.filterVulnerabilitySeverity, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok { + if apiKey, ok := auth["tokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &shared.APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestTime: httpRequestTime, + RequestURL: localVarPath, + Operation: "RegistriesRepositoriesGet", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody))) + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 429 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 503 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} diff --git a/products/containerregistry/api_tokens.go b/products/containerregistry/api_tokens.go index 11a8376..6222a27 100644 --- a/products/containerregistry/api_tokens.go +++ b/products/containerregistry/api_tokens.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,7 +15,7 @@ import ( _context "context" "fmt" "github.com/ionos-cloud/sdk-go-bundle/shared" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -42,6 +42,7 @@ func (r ApiRegistriesTokensDeleteRequest) Execute() (*shared.APIResponse, error) /* * RegistriesTokensDelete Delete token + * * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param registryId The unique ID of the registry * @param tokenId The unique ID of the token @@ -76,8 +77,8 @@ func (a *TokensApiService) RegistriesTokensDeleteExecute(r ApiRegistriesTokensDe } localVarPath := localBasePath + "/registries/{registryId}/tokens/{tokenId}" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"tokenId"+"}", _neturl.PathEscape(parameterToString(r.tokenId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tokenId"+"}", _neturl.PathEscape(parameterValueToString(r.tokenId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -133,7 +134,7 @@ func (a *TokensApiService) RegistriesTokensDeleteExecute(r ApiRegistriesTokensDe return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -210,8 +211,8 @@ func (a *TokensApiService) RegistriesTokensFindByIdExecute(r ApiRegistriesTokens } localVarPath := localBasePath + "/registries/{registryId}/tokens/{tokenId}" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"tokenId"+"}", _neturl.PathEscape(parameterToString(r.tokenId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tokenId"+"}", _neturl.PathEscape(parameterValueToString(r.tokenId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -267,7 +268,7 @@ func (a *TokensApiService) RegistriesTokensFindByIdExecute(r ApiRegistriesTokens return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -335,6 +336,7 @@ func (r ApiRegistriesTokensGetRequest) Execute() (TokensResponse, *shared.APIRes /* * RegistriesTokensGet List all tokens for the container registry + * * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param registryId The unique ID of the registry * @return ApiRegistriesTokensGetRequest @@ -369,17 +371,17 @@ func (a *TokensApiService) RegistriesTokensGetExecute(r ApiRegistriesTokensGetRe } localVarPath := localBasePath + "/registries/{registryId}/tokens" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.offset != nil { - localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") } if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -431,7 +433,7 @@ func (a *TokensApiService) RegistriesTokensGetExecute(r ApiRegistriesTokensGetRe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -526,8 +528,8 @@ func (a *TokensApiService) RegistriesTokensPatchExecute(r ApiRegistriesTokensPat } localVarPath := localBasePath + "/registries/{registryId}/tokens/{tokenId}" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"tokenId"+"}", _neturl.PathEscape(parameterToString(r.tokenId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tokenId"+"}", _neturl.PathEscape(parameterValueToString(r.tokenId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -588,7 +590,7 @@ func (a *TokensApiService) RegistriesTokensPatchExecute(r ApiRegistriesTokensPat return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -679,7 +681,7 @@ func (a *TokensApiService) RegistriesTokensPostExecute(r ApiRegistriesTokensPost } localVarPath := localBasePath + "/registries/{registryId}/tokens" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -740,7 +742,7 @@ func (a *TokensApiService) RegistriesTokensPostExecute(r ApiRegistriesTokensPost return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -844,8 +846,8 @@ func (a *TokensApiService) RegistriesTokensPutExecute(r ApiRegistriesTokensPutRe } localVarPath := localBasePath + "/registries/{registryId}/tokens/{tokenId}" - localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterToString(r.registryId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"tokenId"+"}", _neturl.PathEscape(parameterToString(r.tokenId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registryId"+"}", _neturl.PathEscape(parameterValueToString(r.registryId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tokenId"+"}", _neturl.PathEscape(parameterValueToString(r.tokenId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -906,7 +908,7 @@ func (a *TokensApiService) RegistriesTokensPutExecute(r ApiRegistriesTokensPutRe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/products/containerregistry/api_vulnerabilities.go b/products/containerregistry/api_vulnerabilities.go new file mode 100644 index 0000000..75b4381 --- /dev/null +++ b/products/containerregistry/api_vulnerabilities.go @@ -0,0 +1,233 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + _context "context" + "fmt" + "github.com/ionos-cloud/sdk-go-bundle/shared" + "io" + _nethttp "net/http" + _neturl "net/url" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +// VulnerabilitiesApiService VulnerabilitiesApi service +type VulnerabilitiesApiService service + +type ApiVulnerabilitiesFindByIDRequest struct { + ctx _context.Context + ApiService *VulnerabilitiesApiService + vulnerabilityId string +} + +func (r ApiVulnerabilitiesFindByIDRequest) Execute() (VulnerabilityRead, *shared.APIResponse, error) { + return r.ApiService.VulnerabilitiesFindByIDExecute(r) +} + +/* + * VulnerabilitiesFindByID Retrieve Vulnerability + * Returns the Vulnerability by ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param vulnerabilityId The ID of the Vulnerability. + * @return ApiVulnerabilitiesFindByIDRequest + */ +func (a *VulnerabilitiesApiService) VulnerabilitiesFindByID(ctx _context.Context, vulnerabilityId string) ApiVulnerabilitiesFindByIDRequest { + return ApiVulnerabilitiesFindByIDRequest{ + ApiService: a, + ctx: ctx, + vulnerabilityId: vulnerabilityId, + } +} + +/* + * Execute executes the request + * @return VulnerabilityRead + */ +func (a *VulnerabilitiesApiService) VulnerabilitiesFindByIDExecute(r ApiVulnerabilitiesFindByIDRequest) (VulnerabilityRead, *shared.APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue VulnerabilityRead + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VulnerabilitiesApiService.VulnerabilitiesFindByID") + if err != nil { + gerr := shared.GenericOpenAPIError{} + gerr.SetError(err.Error()) + return localVarReturnValue, nil, gerr + } + + localVarPath := localBasePath + "/vulnerabilities/{vulnerabilityId}" + localVarPath = strings.Replace(localVarPath, "{"+"vulnerabilityId"+"}", _neturl.PathEscape(parameterValueToString(r.vulnerabilityId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if shared.Strlen(r.vulnerabilityId) > 64 { + return localVarReturnValue, nil, reportError("vulnerabilityId must have less than 64 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok { + if apiKey, ok := auth["tokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &shared.APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestTime: httpRequestTime, + RequestURL: localVarPath, + Operation: "VulnerabilitiesFindByID", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody))) + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 429 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + if localVarHTTPResponse.StatusCode == 503 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.SetModel(v) + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := shared.GenericOpenAPIError{} + newErr.SetStatusCode(localVarHTTPResponse.StatusCode) + newErr.SetBody(localVarBody) + newErr.SetError(err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} diff --git a/products/containerregistry/client.go b/products/containerregistry/client.go index 918ac21..df410a1 100644 --- a/products/containerregistry/client.go +++ b/products/containerregistry/client.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -41,8 +41,10 @@ import ( ) var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)\/(?:vnd\.[^;]+|problem\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)\/(?:vnd\.[^;]+|problem\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) const ( @@ -51,10 +53,10 @@ const ( RequestStatusFailed = "FAILED" RequestStatusDone = "DONE" - Version = "products/containerregistry/v0.1.0" + Version = "products/containerregistry/v2.0.1" ) -// APIClient manages communication with the Container Registry service API v1.0 +// APIClient manages communication with the Container Registry service API v1.2.1 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *shared.Configuration @@ -62,6 +64,8 @@ type APIClient struct { // API Services + ArtifactsApi *ArtifactsApiService + LocationsApi *LocationsApiService NamesApi *NamesApiService @@ -71,6 +75,8 @@ type APIClient struct { RepositoriesApi *RepositoriesApiService TokensApi *TokensApiService + + VulnerabilitiesApi *VulnerabilitiesApiService } type service struct { @@ -105,11 +111,13 @@ func NewAPIClient(cfg *shared.Configuration) *APIClient { c.common.client = c // API Services + c.ArtifactsApi = (*ArtifactsApiService)(&c.common) c.LocationsApi = (*LocationsApiService)(&c.common) c.NamesApi = (*NamesApiService)(&c.common) c.RegistriesApi = (*RegistriesApiService)(&c.common) c.RepositoriesApi = (*RepositoriesApiService)(&c.common) c.TokensApi = (*TokensApiService)(&c.common) + c.VulnerabilitiesApi = (*VulnerabilitiesApiService)(&c.common) return c } @@ -256,6 +264,103 @@ func parameterToJson(obj interface{}) (string, error) { return string(jsonBuf), err } +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + } + return + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + } + return + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + return + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + // callAPI do the request. func (c *APIClient) callAPI(request *http.Request) (*http.Response, time.Duration, error) { retryCount := 0 @@ -310,6 +415,9 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, time.Duratio case http.StatusServiceUnavailable, http.StatusGatewayTimeout, http.StatusBadGateway: + if request.Method == http.MethodPost { + return resp, httpRequestTime, err + } backoffTime = c.GetConfig().WaitTime case http.StatusTooManyRequests: @@ -333,21 +441,30 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, time.Duratio } break } else { - c.backOff(backoffTime) + c.backOff(request.Context(), backoffTime) } } return resp, httpRequestTime, err } -func (c *APIClient) backOff(t time.Duration) { +func (c *APIClient) backOff(ctx context.Context, t time.Duration) { if t > c.GetConfig().MaxWaitTime { t = c.GetConfig().MaxWaitTime } if shared.SdkLogLevel.Satisfies(shared.Debug) { shared.SdkLogger.Printf(" Sleeping %s before retrying request\n", t.String()) } - time.Sleep(t) + if t <= 0 { + return + } + timer := time.NewTimer(t) + defer timer.Stop() + + select { + case <-ctx.Done(): + case <-timer.C: + } } // Allow modification of underlying config for alternate implementations and testing @@ -466,7 +583,11 @@ func (c *APIClient) prepareRequest( } // Encode the parameters. - url.RawQuery = query.Encode() + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) // Generate a new request if body != nil { diff --git a/products/containerregistry/docs/api/ArtifactsApi.md b/products/containerregistry/docs/api/ArtifactsApi.md new file mode 100644 index 0000000..61e7ec9 --- /dev/null +++ b/products/containerregistry/docs/api/ArtifactsApi.md @@ -0,0 +1,326 @@ +# \ArtifactsApi + +All URIs are relative to *https://api.ionos.com/containerregistries* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**RegistriesArtifactsGet**](ArtifactsApi.md#RegistriesArtifactsGet) | **Get** /registries/{registryId}/artifacts | Retrieve all Artifacts by Registry| +|[**RegistriesRepositoriesArtifactsFindByDigest**](ArtifactsApi.md#RegistriesRepositoriesArtifactsFindByDigest) | **Get** /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest} | Retrieve Artifact| +|[**RegistriesRepositoriesArtifactsGet**](ArtifactsApi.md#RegistriesRepositoriesArtifactsGet) | **Get** /registries/{registryId}/repositories/{repositoryName}/artifacts | Retrieve all Artifacts by Repository| +|[**RegistriesRepositoriesArtifactsVulnerabilitiesGet**](ArtifactsApi.md#RegistriesRepositoriesArtifactsVulnerabilitiesGet) | **Get** /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest}/vulnerabilities | Retrieve all Vulnerabilities| + + + +## RegistriesArtifactsGet + +```go +var result RegistryArtifactsReadList = RegistriesArtifactsGet(ctx, registryId) + .Offset(offset) + .Limit(limit) + .FilterVulnerabilityId(filterVulnerabilityId) + .OrderBy(orderBy) + .Execute() +``` + +Retrieve all Artifacts by Registry + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry" + "github.com/ionos-cloud/sdk-go-bundle/shared" +) + +func main() { + registryId := "1e41a73c-59d0-5507-86dd-fa2fc2501cfd" // string | The ID (UUID) of the Registry. + offset := int32(0) // int32 | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. (optional) (default to 0) + limit := int32(100) // int32 | The maximum number of elements to return. Use together with offset for pagination. (optional) (default to 100) + filterVulnerabilityId := "filterVulnerabilityId_example" // string | Filter resources by vulnerabilityId. (optional) + orderBy := "orderBy_example" // string | The field to order the results by. If not provided, the results will be ordered by the default field. (optional) (default to "-pullCount") + + configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") + apiClient := containerregistry.NewAPIClient(configuration) + resource, resp, err := apiClient.ArtifactsApi.RegistriesArtifactsGet(context.Background(), registryId).Offset(offset).Limit(limit).FilterVulnerabilityId(filterVulnerabilityId).OrderBy(orderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsApi.RegistriesArtifactsGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) + } + // response from `RegistriesArtifactsGet`: RegistryArtifactsReadList + fmt.Fprintf(os.Stdout, "Response from `ArtifactsApi.RegistriesArtifactsGet`: %v\n", resource) +} +``` + +### Path Parameters + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +|**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| +|**registryId** | **string** | The ID (UUID) of the Registry. | | + +### Other Parameters + +Other parameters are passed through a pointer to an apiRegistriesArtifactsGetRequest struct via the builder pattern + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **offset** | **int32** | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. | [default to 0]| +| **limit** | **int32** | The maximum number of elements to return. Use together with offset for pagination. | [default to 100]| +| **filterVulnerabilityId** | **string** | Filter resources by vulnerabilityId. | | +| **orderBy** | **string** | The field to order the results by. If not provided, the results will be ordered by the default field. | [default to "-pullCount"]| + +### Return type + +[**RegistryArtifactsReadList**](../models/RegistryArtifactsReadList.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + + +## RegistriesRepositoriesArtifactsFindByDigest + +```go +var result ArtifactRead = RegistriesRepositoriesArtifactsFindByDigest(ctx, registryId, repositoryName, digest) + .Execute() +``` + +Retrieve Artifact + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry" + "github.com/ionos-cloud/sdk-go-bundle/shared" +) + +func main() { + registryId := "1e41a73c-59d0-5507-86dd-fa2fc2501cfd" // string | The ID (UUID) of the Registry. + repositoryName := "my-service" // string | The Name of the Repository. + digest := "sha256:12345678901234567890123456789012" // string | The Digest of the Artifact. + + configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") + apiClient := containerregistry.NewAPIClient(configuration) + resource, resp, err := apiClient.ArtifactsApi.RegistriesRepositoriesArtifactsFindByDigest(context.Background(), registryId, repositoryName, digest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsApi.RegistriesRepositoriesArtifactsFindByDigest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) + } + // response from `RegistriesRepositoriesArtifactsFindByDigest`: ArtifactRead + fmt.Fprintf(os.Stdout, "Response from `ArtifactsApi.RegistriesRepositoriesArtifactsFindByDigest`: %v\n", resource) +} +``` + +### Path Parameters + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +|**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| +|**registryId** | **string** | The ID (UUID) of the Registry. | | +|**repositoryName** | **string** | The Name of the Repository. | | +|**digest** | **string** | The Digest of the Artifact. | | + +### Other Parameters + +Other parameters are passed through a pointer to an apiRegistriesRepositoriesArtifactsFindByDigestRequest struct via the builder pattern + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| + +### Return type + +[**ArtifactRead**](../models/ArtifactRead.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + + +## RegistriesRepositoriesArtifactsGet + +```go +var result ArtifactReadList = RegistriesRepositoriesArtifactsGet(ctx, registryId, repositoryName) + .Offset(offset) + .Limit(limit) + .OrderBy(orderBy) + .Execute() +``` + +Retrieve all Artifacts by Repository + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry" + "github.com/ionos-cloud/sdk-go-bundle/shared" +) + +func main() { + registryId := "1e41a73c-59d0-5507-86dd-fa2fc2501cfd" // string | The ID (UUID) of the Registry. + repositoryName := "my-service" // string | The Name of the Repository. + offset := int32(0) // int32 | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. (optional) (default to 0) + limit := int32(100) // int32 | The maximum number of elements to return. Use together with offset for pagination. (optional) (default to 100) + orderBy := "orderBy_example" // string | The field to order the results by. If not provided, the results will be ordered by the default field. (optional) (default to "-lastPush") + + configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") + apiClient := containerregistry.NewAPIClient(configuration) + resource, resp, err := apiClient.ArtifactsApi.RegistriesRepositoriesArtifactsGet(context.Background(), registryId, repositoryName).Offset(offset).Limit(limit).OrderBy(orderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsApi.RegistriesRepositoriesArtifactsGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) + } + // response from `RegistriesRepositoriesArtifactsGet`: ArtifactReadList + fmt.Fprintf(os.Stdout, "Response from `ArtifactsApi.RegistriesRepositoriesArtifactsGet`: %v\n", resource) +} +``` + +### Path Parameters + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +|**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| +|**registryId** | **string** | The ID (UUID) of the Registry. | | +|**repositoryName** | **string** | The Name of the Repository. | | + +### Other Parameters + +Other parameters are passed through a pointer to an apiRegistriesRepositoriesArtifactsGetRequest struct via the builder pattern + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **offset** | **int32** | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. | [default to 0]| +| **limit** | **int32** | The maximum number of elements to return. Use together with offset for pagination. | [default to 100]| +| **orderBy** | **string** | The field to order the results by. If not provided, the results will be ordered by the default field. | [default to "-lastPush"]| + +### Return type + +[**ArtifactReadList**](../models/ArtifactReadList.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + + +## RegistriesRepositoriesArtifactsVulnerabilitiesGet + +```go +var result ArtifactVulnerabilityReadList = RegistriesRepositoriesArtifactsVulnerabilitiesGet(ctx, registryId, repositoryName, digest) + .Offset(offset) + .Limit(limit) + .FilterSeverity(filterSeverity) + .FilterFixable(filterFixable) + .OrderBy(orderBy) + .Execute() +``` + +Retrieve all Vulnerabilities + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry" + "github.com/ionos-cloud/sdk-go-bundle/shared" +) + +func main() { + registryId := "1e41a73c-59d0-5507-86dd-fa2fc2501cfd" // string | The ID (UUID) of the Registry. + repositoryName := "my-service" // string | The Name of the Repository. + digest := "sha256:12345678901234567890123456789012" // string | The Digest of the Artifact. + offset := int32(0) // int32 | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. (optional) (default to 0) + limit := int32(100) // int32 | The maximum number of elements to return. Use together with offset for pagination. (optional) (default to 100) + filterSeverity := "filterSeverity_example" // string | Filter resources by vulnerability severity. (optional) + filterFixable := true // bool | Filter resources by fixable (i.e. remediation action is available) (optional) + orderBy := "orderBy_example" // string | The field to order the results by. If not provided, the results will be ordered by the default field. (optional) (default to "-score") + + configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") + apiClient := containerregistry.NewAPIClient(configuration) + resource, resp, err := apiClient.ArtifactsApi.RegistriesRepositoriesArtifactsVulnerabilitiesGet(context.Background(), registryId, repositoryName, digest).Offset(offset).Limit(limit).FilterSeverity(filterSeverity).FilterFixable(filterFixable).OrderBy(orderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsApi.RegistriesRepositoriesArtifactsVulnerabilitiesGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) + } + // response from `RegistriesRepositoriesArtifactsVulnerabilitiesGet`: ArtifactVulnerabilityReadList + fmt.Fprintf(os.Stdout, "Response from `ArtifactsApi.RegistriesRepositoriesArtifactsVulnerabilitiesGet`: %v\n", resource) +} +``` + +### Path Parameters + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +|**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| +|**registryId** | **string** | The ID (UUID) of the Registry. | | +|**repositoryName** | **string** | The Name of the Repository. | | +|**digest** | **string** | The Digest of the Artifact. | | + +### Other Parameters + +Other parameters are passed through a pointer to an apiRegistriesRepositoriesArtifactsVulnerabilitiesGetRequest struct via the builder pattern + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **offset** | **int32** | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. | [default to 0]| +| **limit** | **int32** | The maximum number of elements to return. Use together with offset for pagination. | [default to 100]| +| **filterSeverity** | **string** | Filter resources by vulnerability severity. | | +| **filterFixable** | **bool** | Filter resources by fixable (i.e. remediation action is available) | | +| **orderBy** | **string** | The field to order the results by. If not provided, the results will be ordered by the default field. | [default to "-score"]| + +### Return type + +[**ArtifactVulnerabilityReadList**](../models/ArtifactVulnerabilityReadList.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + diff --git a/products/containerregistry/docs/api/LocationsApi.md b/products/containerregistry/docs/api/LocationsApi.md index b2183d9..45646d0 100644 --- a/products/containerregistry/docs/api/LocationsApi.md +++ b/products/containerregistry/docs/api/LocationsApi.md @@ -17,6 +17,8 @@ var result LocationsResponse = LocationsGet(ctx) Get container registry locations + + ### Example ```go diff --git a/products/containerregistry/docs/api/RegistriesApi.md b/products/containerregistry/docs/api/RegistriesApi.md index 5b1b5da..c426a5a 100644 --- a/products/containerregistry/docs/api/RegistriesApi.md +++ b/products/containerregistry/docs/api/RegistriesApi.md @@ -22,6 +22,8 @@ var result = RegistriesDelete(ctx, registryId) Delete registry + + ### Example ```go @@ -37,11 +39,11 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := containerregistry.NewAPIClient(configuration) - resource, resp, err := apiClient.RegistriesApi.RegistriesDelete(context.Background(), registryId).Execute() + resp, err := apiClient.RegistriesApi.RegistriesDelete(context.Background(), registryId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RegistriesApi.RegistriesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -55,7 +57,7 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | +|**registryId** | **string** | The unique ID of the registry | | ### Other Parameters @@ -102,7 +104,7 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := containerregistry.NewAPIClient(configuration) @@ -122,7 +124,7 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | +|**registryId** | **string** | The unique ID of the registry | | ### Other Parameters @@ -241,7 +243,7 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry patchRegistryInput := *openapiclient.NewPatchRegistryInput() // PatchRegistryInput | configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") @@ -262,7 +264,7 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | +|**registryId** | **string** | The unique ID of the registry | | ### Other Parameters @@ -376,7 +378,7 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry putRegistryInput := *openapiclient.NewPutRegistryInput(*openapiclient.NewPostRegistryProperties("de/txl", "my-registry")) // PutRegistryInput | configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") @@ -397,7 +399,7 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | +|**registryId** | **string** | The unique ID of the registry | | ### Other Parameters diff --git a/products/containerregistry/docs/api/RepositoriesApi.md b/products/containerregistry/docs/api/RepositoriesApi.md index 569708a..ac47e8a 100644 --- a/products/containerregistry/docs/api/RepositoriesApi.md +++ b/products/containerregistry/docs/api/RepositoriesApi.md @@ -4,14 +4,16 @@ All URIs are relative to *https://api.ionos.com/containerregistries* |Method | HTTP request | Description| |------------- | ------------- | -------------| -|[**RegistriesRepositoriesDelete**](RepositoriesApi.md#RegistriesRepositoriesDelete) | **Delete** /registries/{registryId}/repositories/{name} | Delete repository| +|[**RegistriesRepositoriesDelete**](RepositoriesApi.md#RegistriesRepositoriesDelete) | **Delete** /registries/{registryId}/repositories/{repositoryName} | Delete repository| +|[**RegistriesRepositoriesFindByName**](RepositoriesApi.md#RegistriesRepositoriesFindByName) | **Get** /registries/{registryId}/repositories/{repositoryName} | Retrieve Repository| +|[**RegistriesRepositoriesGet**](RepositoriesApi.md#RegistriesRepositoriesGet) | **Get** /registries/{registryId}/repositories | Retrieve all Repositories| ## RegistriesRepositoriesDelete ```go -var result = RegistriesRepositoriesDelete(ctx, registryId, name) +var result = RegistriesRepositoriesDelete(ctx, registryId, repositoryName) .Execute() ``` @@ -34,12 +36,12 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry - name := "ubuntu" // string | The name of the repository + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry + repositoryName := "my-service" // string | The name of the repository configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := containerregistry.NewAPIClient(configuration) - resource, resp, err := apiClient.RepositoriesApi.RegistriesRepositoriesDelete(context.Background(), registryId, name).Execute() + resp, err := apiClient.RepositoriesApi.RegistriesRepositoriesDelete(context.Background(), registryId, repositoryName).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RepositoriesApi.RegistriesRepositoriesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -53,8 +55,8 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | -|**name** | **string** | The name of the repository | | +|**registryId** | **string** | The unique ID of the registry | | +|**repositoryName** | **string** | The name of the repository | | ### Other Parameters @@ -74,3 +76,154 @@ Other parameters are passed through a pointer to an apiRegistriesRepositoriesDel - **Accept**: Not defined + +## RegistriesRepositoriesFindByName + +```go +var result RepositoryRead = RegistriesRepositoriesFindByName(ctx, registryId, repositoryName) + .Execute() +``` + +Retrieve Repository + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry" + "github.com/ionos-cloud/sdk-go-bundle/shared" +) + +func main() { + registryId := "1e41a73c-59d0-5507-86dd-fa2fc2501cfd" // string | The ID (UUID) of the Registry. + repositoryName := "my-service" // string | The Name of the Repository. + + configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") + apiClient := containerregistry.NewAPIClient(configuration) + resource, resp, err := apiClient.RepositoriesApi.RegistriesRepositoriesFindByName(context.Background(), registryId, repositoryName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositoriesApi.RegistriesRepositoriesFindByName``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) + } + // response from `RegistriesRepositoriesFindByName`: RepositoryRead + fmt.Fprintf(os.Stdout, "Response from `RepositoriesApi.RegistriesRepositoriesFindByName`: %v\n", resource) +} +``` + +### Path Parameters + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +|**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| +|**registryId** | **string** | The ID (UUID) of the Registry. | | +|**repositoryName** | **string** | The Name of the Repository. | | + +### Other Parameters + +Other parameters are passed through a pointer to an apiRegistriesRepositoriesFindByNameRequest struct via the builder pattern + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| + +### Return type + +[**RepositoryRead**](../models/RepositoryRead.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + + +## RegistriesRepositoriesGet + +```go +var result RepositoryReadList = RegistriesRepositoriesGet(ctx, registryId) + .Offset(offset) + .Limit(limit) + .FilterName(filterName) + .FilterVulnerabilitySeverity(filterVulnerabilitySeverity) + .OrderBy(orderBy) + .Execute() +``` + +Retrieve all Repositories + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry" + "github.com/ionos-cloud/sdk-go-bundle/shared" +) + +func main() { + registryId := "1e41a73c-59d0-5507-86dd-fa2fc2501cfd" // string | The ID (UUID) of the Registry. + offset := int32(0) // int32 | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. (optional) (default to 0) + limit := int32(100) // int32 | The maximum number of elements to return. Use together with offset for pagination. (optional) (default to 100) + filterName := "filterName_example" // string | Filter resources by name. (optional) + filterVulnerabilitySeverity := "filterVulnerabilitySeverity_example" // string | Filter resources by vulnerability severity. (optional) + orderBy := "orderBy_example" // string | The field to order the results by. If not provided, the results will be ordered by the default field. (optional) (default to "-lastPush") + + configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") + apiClient := containerregistry.NewAPIClient(configuration) + resource, resp, err := apiClient.RepositoriesApi.RegistriesRepositoriesGet(context.Background(), registryId).Offset(offset).Limit(limit).FilterName(filterName).FilterVulnerabilitySeverity(filterVulnerabilitySeverity).OrderBy(orderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositoriesApi.RegistriesRepositoriesGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) + } + // response from `RegistriesRepositoriesGet`: RepositoryReadList + fmt.Fprintf(os.Stdout, "Response from `RepositoriesApi.RegistriesRepositoriesGet`: %v\n", resource) +} +``` + +### Path Parameters + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +|**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| +|**registryId** | **string** | The ID (UUID) of the Registry. | | + +### Other Parameters + +Other parameters are passed through a pointer to an apiRegistriesRepositoriesGetRequest struct via the builder pattern + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **offset** | **int32** | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. | [default to 0]| +| **limit** | **int32** | The maximum number of elements to return. Use together with offset for pagination. | [default to 100]| +| **filterName** | **string** | Filter resources by name. | | +| **filterVulnerabilitySeverity** | **string** | Filter resources by vulnerability severity. | | +| **orderBy** | **string** | The field to order the results by. If not provided, the results will be ordered by the default field. | [default to "-lastPush"]| + +### Return type + +[**RepositoryReadList**](../models/RepositoryReadList.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + diff --git a/products/containerregistry/docs/api/TokensApi.md b/products/containerregistry/docs/api/TokensApi.md index e2c78e7..79f502f 100644 --- a/products/containerregistry/docs/api/TokensApi.md +++ b/products/containerregistry/docs/api/TokensApi.md @@ -22,6 +22,8 @@ var result = RegistriesTokensDelete(ctx, registryId, tokenId) Delete token + + ### Example ```go @@ -37,12 +39,12 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry - tokenId := TODO // string | The unique ID of the token + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry + tokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the token configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := containerregistry.NewAPIClient(configuration) - resource, resp, err := apiClient.TokensApi.RegistriesTokensDelete(context.Background(), registryId, tokenId).Execute() + resp, err := apiClient.TokensApi.RegistriesTokensDelete(context.Background(), registryId, tokenId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TokensApi.RegistriesTokensDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -56,8 +58,8 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | -|**tokenId** | [**string**](../models/.md) | The unique ID of the token | | +|**registryId** | **string** | The unique ID of the registry | | +|**tokenId** | **string** | The unique ID of the token | | ### Other Parameters @@ -104,8 +106,8 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry - tokenId := TODO // string | The unique ID of the token + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry + tokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the token configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := containerregistry.NewAPIClient(configuration) @@ -125,8 +127,8 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | -|**tokenId** | [**string**](../models/.md) | The unique ID of the token | | +|**registryId** | **string** | The unique ID of the registry | | +|**tokenId** | **string** | The unique ID of the token | | ### Other Parameters @@ -158,6 +160,8 @@ var result TokensResponse = RegistriesTokensGet(ctx, registryId) List all tokens for the container registry + + ### Example ```go @@ -173,7 +177,7 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry offset := "offset_example" // string | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination) (optional) (default to "0") limit := "limit_example" // string | The maximum number of elements to return (used together with offset for pagination) (optional) (default to "100") @@ -195,7 +199,7 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | +|**registryId** | **string** | The unique ID of the registry | | ### Other Parameters @@ -245,8 +249,8 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry - tokenId := TODO // string | The unique ID of the token + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry + tokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the token patchTokenInput := *openapiclient.NewPatchTokenInput() // PatchTokenInput | configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") @@ -267,8 +271,8 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | -|**tokenId** | [**string**](../models/.md) | The unique ID of the token | | +|**registryId** | **string** | The unique ID of the registry | | +|**tokenId** | **string** | The unique ID of the token | | ### Other Parameters @@ -317,7 +321,7 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry postTokenInput := *openapiclient.NewPostTokenInput(*openapiclient.NewPostTokenProperties("push-token")) // PostTokenInput | configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") @@ -338,7 +342,7 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | +|**registryId** | **string** | The unique ID of the registry | | ### Other Parameters @@ -387,7 +391,7 @@ import ( ) func main() { - registryId := TODO // string | The unique ID of the registry + registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry tokenId := "tokenId_example" // string | The unique ID of the token putTokenInput := *openapiclient.NewPutTokenInput(*openapiclient.NewPostTokenProperties("push-token")) // PutTokenInput | @@ -409,7 +413,7 @@ func main() { |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| -|**registryId** | [**string**](../models/.md) | The unique ID of the registry | | +|**registryId** | **string** | The unique ID of the registry | | |**tokenId** | **string** | The unique ID of the token | | ### Other Parameters diff --git a/products/containerregistry/docs/api/VulnerabilitiesApi.md b/products/containerregistry/docs/api/VulnerabilitiesApi.md new file mode 100644 index 0000000..a03a626 --- /dev/null +++ b/products/containerregistry/docs/api/VulnerabilitiesApi.md @@ -0,0 +1,76 @@ +# \VulnerabilitiesApi + +All URIs are relative to *https://api.ionos.com/containerregistries* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**VulnerabilitiesFindByID**](VulnerabilitiesApi.md#VulnerabilitiesFindByID) | **Get** /vulnerabilities/{vulnerabilityId} | Retrieve Vulnerability| + + + +## VulnerabilitiesFindByID + +```go +var result VulnerabilityRead = VulnerabilitiesFindByID(ctx, vulnerabilityId) + .Execute() +``` + +Retrieve Vulnerability + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + + containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry" + "github.com/ionos-cloud/sdk-go-bundle/shared" +) + +func main() { + vulnerabilityId := "CVE-2019-1234" // string | The ID of the Vulnerability. + + configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") + apiClient := containerregistry.NewAPIClient(configuration) + resource, resp, err := apiClient.VulnerabilitiesApi.VulnerabilitiesFindByID(context.Background(), vulnerabilityId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VulnerabilitiesApi.VulnerabilitiesFindByID``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) + } + // response from `VulnerabilitiesFindByID`: VulnerabilityRead + fmt.Fprintf(os.Stdout, "Response from `VulnerabilitiesApi.VulnerabilitiesFindByID`: %v\n", resource) +} +``` + +### Path Parameters + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +|**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| +|**vulnerabilityId** | **string** | The ID of the Vulnerability. | | + +### Other Parameters + +Other parameters are passed through a pointer to an apiVulnerabilitiesFindByIDRequest struct via the builder pattern + + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| + +### Return type + +[**VulnerabilityRead**](../models/VulnerabilityRead.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + diff --git a/products/containerregistry/docs/models/ApiErrorResponse.md b/products/containerregistry/docs/models/ApiErrorResponse.md index 7c674a9..9970945 100644 --- a/products/containerregistry/docs/models/ApiErrorResponse.md +++ b/products/containerregistry/docs/models/ApiErrorResponse.md @@ -66,14 +66,4 @@ and a boolean to check if the value has been set. SetMessages sets Messages field to given value. -### SetMessagesNil - -`func (o *ApiErrorResponse) SetMessagesNil(b bool)` - - SetMessagesNil sets the value for Messages to be an explicit nil - -### UnsetMessages -`func (o *ApiErrorResponse) UnsetMessages()` - -UnsetMessages ensures that no value is present for Messages, not even an explicit nil diff --git a/products/containerregistry/docs/models/ApiResourceMetadata.md b/products/containerregistry/docs/models/ApiResourceMetadata.md index 3770c1d..9754558 100644 --- a/products/containerregistry/docs/models/ApiResourceMetadata.md +++ b/products/containerregistry/docs/models/ApiResourceMetadata.md @@ -9,7 +9,7 @@ |**CreatedDate** | [**time.Time**](time.Time.md) | | | |**LastModifiedBy** | Pointer to **string** | | [optional] | |**LastModifiedByUserId** | Pointer to **string** | | [optional] | -|**LastModifiedDate** | Pointer to [**NullableTime**](time.Time.md) | | [optional] | +|**LastModifiedDate** | Pointer to [**time.Time**](time.Time.md) | | [optional] | |**State** | **string** | | | ## Methods @@ -166,16 +166,6 @@ SetLastModifiedDate sets LastModifiedDate field to given value. HasLastModifiedDate returns a boolean if a field has been set. -### SetLastModifiedDateNil - -`func (o *ApiResourceMetadata) SetLastModifiedDateNil(b bool)` - - SetLastModifiedDateNil sets the value for LastModifiedDate to be an explicit nil - -### UnsetLastModifiedDate -`func (o *ApiResourceMetadata) UnsetLastModifiedDate()` - -UnsetLastModifiedDate ensures that no value is present for LastModifiedDate, not even an explicit nil ### GetState `func (o *ApiResourceMetadata) GetState() string` diff --git a/products/containerregistry/docs/models/Artifact.md b/products/containerregistry/docs/models/Artifact.md new file mode 100644 index 0000000..56ca934 --- /dev/null +++ b/products/containerregistry/docs/models/Artifact.md @@ -0,0 +1,116 @@ +# Artifact + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**RepositoryName** | **string** | | | +|**Digest** | **string** | The digest of the artifact | | +|**Tags** | Pointer to **[]string** | The tags of an artifact | [optional] | +|**MediaType** | **string** | The media type of the artifact | | + +## Methods + +### NewArtifact + +`func NewArtifact(repositoryName string, digest string, mediaType string, ) *Artifact` + +NewArtifact instantiates a new Artifact object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArtifactWithDefaults + +`func NewArtifactWithDefaults() *Artifact` + +NewArtifactWithDefaults instantiates a new Artifact object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRepositoryName + +`func (o *Artifact) GetRepositoryName() string` + +GetRepositoryName returns the RepositoryName field if non-nil, zero value otherwise. + +### GetRepositoryNameOk + +`func (o *Artifact) GetRepositoryNameOk() (*string, bool)` + +GetRepositoryNameOk returns a tuple with the RepositoryName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepositoryName + +`func (o *Artifact) SetRepositoryName(v string)` + +SetRepositoryName sets RepositoryName field to given value. + + +### GetDigest + +`func (o *Artifact) GetDigest() string` + +GetDigest returns the Digest field if non-nil, zero value otherwise. + +### GetDigestOk + +`func (o *Artifact) GetDigestOk() (*string, bool)` + +GetDigestOk returns a tuple with the Digest field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDigest + +`func (o *Artifact) SetDigest(v string)` + +SetDigest sets Digest field to given value. + + +### GetTags + +`func (o *Artifact) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Artifact) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *Artifact) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *Artifact) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetMediaType + +`func (o *Artifact) GetMediaType() string` + +GetMediaType returns the MediaType field if non-nil, zero value otherwise. + +### GetMediaTypeOk + +`func (o *Artifact) GetMediaTypeOk() (*string, bool)` + +GetMediaTypeOk returns a tuple with the MediaType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMediaType + +`func (o *Artifact) SetMediaType(v string)` + +SetMediaType sets MediaType field to given value. + + + diff --git a/products/containerregistry/docs/models/ArtifactMetadata.md b/products/containerregistry/docs/models/ArtifactMetadata.md new file mode 100644 index 0000000..cb84705 --- /dev/null +++ b/products/containerregistry/docs/models/ArtifactMetadata.md @@ -0,0 +1,428 @@ +# ArtifactMetadata + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 creation timestamp. | [optional] [readonly] | +|**CreatedBy** | Pointer to **string** | Unique name of the identity that created the resource. | [optional] [readonly] | +|**CreatedByUserId** | Pointer to **string** | Unique id of the identity that created the resource. | [optional] [readonly] | +|**LastModifiedDate** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 modified timestamp. | [optional] [readonly] | +|**LastModifiedBy** | Pointer to **string** | Unique name of the identity that last modified the resource. | [optional] [readonly] | +|**LastModifiedByUserId** | Pointer to **string** | Unique id of the identity that last modified the resource. | [optional] [readonly] | +|**ResourceURN** | Pointer to **string** | Unique name of the resource. | [optional] [readonly] | +|**LastPushedAt** | [**time.Time**](time.Time.md) | The date and time the artifact was last pushed | | +|**LastPulledAt** | Pointer to [**time.Time**](time.Time.md) | The date and time the artifact was last pulled | [optional] | +|**LastScannedAt** | Pointer to [**time.Time**](time.Time.md) | The date and time the artifact was last scanned | [optional] | +|**PushCount** | **int64** | The number of times the artifact was pushed | | +|**PullCount** | **int64** | The number of times the artifact was pulled | | +|**VulnMaxSeverity** | Pointer to **string** | The CVSS vulnerability severity rating | [optional] | +|**VulnTotalScore** | Pointer to **float32** | The total CVSS score of all vulnerabilities of the artifact | [optional] | +|**VulnTotalCount** | Pointer to **int64** | The total number of vulnerabilities of the artifact | [optional] | +|**VulnFixableCount** | Pointer to **int64** | The number of fixable vulnerabilities of the artifact | [optional] | + +## Methods + +### NewArtifactMetadata + +`func NewArtifactMetadata(lastPushedAt time.Time, pushCount int64, pullCount int64, ) *ArtifactMetadata` + +NewArtifactMetadata instantiates a new ArtifactMetadata object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArtifactMetadataWithDefaults + +`func NewArtifactMetadataWithDefaults() *ArtifactMetadata` + +NewArtifactMetadataWithDefaults instantiates a new ArtifactMetadata object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreatedDate + +`func (o *ArtifactMetadata) GetCreatedDate() time.Time` + +GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. + +### GetCreatedDateOk + +`func (o *ArtifactMetadata) GetCreatedDateOk() (*time.Time, bool)` + +GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedDate + +`func (o *ArtifactMetadata) SetCreatedDate(v time.Time)` + +SetCreatedDate sets CreatedDate field to given value. + +### HasCreatedDate + +`func (o *ArtifactMetadata) HasCreatedDate() bool` + +HasCreatedDate returns a boolean if a field has been set. + +### GetCreatedBy + +`func (o *ArtifactMetadata) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *ArtifactMetadata) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *ArtifactMetadata) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + +### HasCreatedBy + +`func (o *ArtifactMetadata) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### GetCreatedByUserId + +`func (o *ArtifactMetadata) GetCreatedByUserId() string` + +GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. + +### GetCreatedByUserIdOk + +`func (o *ArtifactMetadata) GetCreatedByUserIdOk() (*string, bool)` + +GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByUserId + +`func (o *ArtifactMetadata) SetCreatedByUserId(v string)` + +SetCreatedByUserId sets CreatedByUserId field to given value. + +### HasCreatedByUserId + +`func (o *ArtifactMetadata) HasCreatedByUserId() bool` + +HasCreatedByUserId returns a boolean if a field has been set. + +### GetLastModifiedDate + +`func (o *ArtifactMetadata) GetLastModifiedDate() time.Time` + +GetLastModifiedDate returns the LastModifiedDate field if non-nil, zero value otherwise. + +### GetLastModifiedDateOk + +`func (o *ArtifactMetadata) GetLastModifiedDateOk() (*time.Time, bool)` + +GetLastModifiedDateOk returns a tuple with the LastModifiedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedDate + +`func (o *ArtifactMetadata) SetLastModifiedDate(v time.Time)` + +SetLastModifiedDate sets LastModifiedDate field to given value. + +### HasLastModifiedDate + +`func (o *ArtifactMetadata) HasLastModifiedDate() bool` + +HasLastModifiedDate returns a boolean if a field has been set. + +### GetLastModifiedBy + +`func (o *ArtifactMetadata) GetLastModifiedBy() string` + +GetLastModifiedBy returns the LastModifiedBy field if non-nil, zero value otherwise. + +### GetLastModifiedByOk + +`func (o *ArtifactMetadata) GetLastModifiedByOk() (*string, bool)` + +GetLastModifiedByOk returns a tuple with the LastModifiedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedBy + +`func (o *ArtifactMetadata) SetLastModifiedBy(v string)` + +SetLastModifiedBy sets LastModifiedBy field to given value. + +### HasLastModifiedBy + +`func (o *ArtifactMetadata) HasLastModifiedBy() bool` + +HasLastModifiedBy returns a boolean if a field has been set. + +### GetLastModifiedByUserId + +`func (o *ArtifactMetadata) GetLastModifiedByUserId() string` + +GetLastModifiedByUserId returns the LastModifiedByUserId field if non-nil, zero value otherwise. + +### GetLastModifiedByUserIdOk + +`func (o *ArtifactMetadata) GetLastModifiedByUserIdOk() (*string, bool)` + +GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedByUserId + +`func (o *ArtifactMetadata) SetLastModifiedByUserId(v string)` + +SetLastModifiedByUserId sets LastModifiedByUserId field to given value. + +### HasLastModifiedByUserId + +`func (o *ArtifactMetadata) HasLastModifiedByUserId() bool` + +HasLastModifiedByUserId returns a boolean if a field has been set. + +### GetResourceURN + +`func (o *ArtifactMetadata) GetResourceURN() string` + +GetResourceURN returns the ResourceURN field if non-nil, zero value otherwise. + +### GetResourceURNOk + +`func (o *ArtifactMetadata) GetResourceURNOk() (*string, bool)` + +GetResourceURNOk returns a tuple with the ResourceURN field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceURN + +`func (o *ArtifactMetadata) SetResourceURN(v string)` + +SetResourceURN sets ResourceURN field to given value. + +### HasResourceURN + +`func (o *ArtifactMetadata) HasResourceURN() bool` + +HasResourceURN returns a boolean if a field has been set. + +### GetLastPushedAt + +`func (o *ArtifactMetadata) GetLastPushedAt() time.Time` + +GetLastPushedAt returns the LastPushedAt field if non-nil, zero value otherwise. + +### GetLastPushedAtOk + +`func (o *ArtifactMetadata) GetLastPushedAtOk() (*time.Time, bool)` + +GetLastPushedAtOk returns a tuple with the LastPushedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastPushedAt + +`func (o *ArtifactMetadata) SetLastPushedAt(v time.Time)` + +SetLastPushedAt sets LastPushedAt field to given value. + + +### GetLastPulledAt + +`func (o *ArtifactMetadata) GetLastPulledAt() time.Time` + +GetLastPulledAt returns the LastPulledAt field if non-nil, zero value otherwise. + +### GetLastPulledAtOk + +`func (o *ArtifactMetadata) GetLastPulledAtOk() (*time.Time, bool)` + +GetLastPulledAtOk returns a tuple with the LastPulledAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastPulledAt + +`func (o *ArtifactMetadata) SetLastPulledAt(v time.Time)` + +SetLastPulledAt sets LastPulledAt field to given value. + +### HasLastPulledAt + +`func (o *ArtifactMetadata) HasLastPulledAt() bool` + +HasLastPulledAt returns a boolean if a field has been set. + +### GetLastScannedAt + +`func (o *ArtifactMetadata) GetLastScannedAt() time.Time` + +GetLastScannedAt returns the LastScannedAt field if non-nil, zero value otherwise. + +### GetLastScannedAtOk + +`func (o *ArtifactMetadata) GetLastScannedAtOk() (*time.Time, bool)` + +GetLastScannedAtOk returns a tuple with the LastScannedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastScannedAt + +`func (o *ArtifactMetadata) SetLastScannedAt(v time.Time)` + +SetLastScannedAt sets LastScannedAt field to given value. + +### HasLastScannedAt + +`func (o *ArtifactMetadata) HasLastScannedAt() bool` + +HasLastScannedAt returns a boolean if a field has been set. + +### GetPushCount + +`func (o *ArtifactMetadata) GetPushCount() int64` + +GetPushCount returns the PushCount field if non-nil, zero value otherwise. + +### GetPushCountOk + +`func (o *ArtifactMetadata) GetPushCountOk() (*int64, bool)` + +GetPushCountOk returns a tuple with the PushCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPushCount + +`func (o *ArtifactMetadata) SetPushCount(v int64)` + +SetPushCount sets PushCount field to given value. + + +### GetPullCount + +`func (o *ArtifactMetadata) GetPullCount() int64` + +GetPullCount returns the PullCount field if non-nil, zero value otherwise. + +### GetPullCountOk + +`func (o *ArtifactMetadata) GetPullCountOk() (*int64, bool)` + +GetPullCountOk returns a tuple with the PullCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPullCount + +`func (o *ArtifactMetadata) SetPullCount(v int64)` + +SetPullCount sets PullCount field to given value. + + +### GetVulnMaxSeverity + +`func (o *ArtifactMetadata) GetVulnMaxSeverity() string` + +GetVulnMaxSeverity returns the VulnMaxSeverity field if non-nil, zero value otherwise. + +### GetVulnMaxSeverityOk + +`func (o *ArtifactMetadata) GetVulnMaxSeverityOk() (*string, bool)` + +GetVulnMaxSeverityOk returns a tuple with the VulnMaxSeverity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnMaxSeverity + +`func (o *ArtifactMetadata) SetVulnMaxSeverity(v string)` + +SetVulnMaxSeverity sets VulnMaxSeverity field to given value. + +### HasVulnMaxSeverity + +`func (o *ArtifactMetadata) HasVulnMaxSeverity() bool` + +HasVulnMaxSeverity returns a boolean if a field has been set. + +### GetVulnTotalScore + +`func (o *ArtifactMetadata) GetVulnTotalScore() float32` + +GetVulnTotalScore returns the VulnTotalScore field if non-nil, zero value otherwise. + +### GetVulnTotalScoreOk + +`func (o *ArtifactMetadata) GetVulnTotalScoreOk() (*float32, bool)` + +GetVulnTotalScoreOk returns a tuple with the VulnTotalScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnTotalScore + +`func (o *ArtifactMetadata) SetVulnTotalScore(v float32)` + +SetVulnTotalScore sets VulnTotalScore field to given value. + +### HasVulnTotalScore + +`func (o *ArtifactMetadata) HasVulnTotalScore() bool` + +HasVulnTotalScore returns a boolean if a field has been set. + +### GetVulnTotalCount + +`func (o *ArtifactMetadata) GetVulnTotalCount() int64` + +GetVulnTotalCount returns the VulnTotalCount field if non-nil, zero value otherwise. + +### GetVulnTotalCountOk + +`func (o *ArtifactMetadata) GetVulnTotalCountOk() (*int64, bool)` + +GetVulnTotalCountOk returns a tuple with the VulnTotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnTotalCount + +`func (o *ArtifactMetadata) SetVulnTotalCount(v int64)` + +SetVulnTotalCount sets VulnTotalCount field to given value. + +### HasVulnTotalCount + +`func (o *ArtifactMetadata) HasVulnTotalCount() bool` + +HasVulnTotalCount returns a boolean if a field has been set. + +### GetVulnFixableCount + +`func (o *ArtifactMetadata) GetVulnFixableCount() int64` + +GetVulnFixableCount returns the VulnFixableCount field if non-nil, zero value otherwise. + +### GetVulnFixableCountOk + +`func (o *ArtifactMetadata) GetVulnFixableCountOk() (*int64, bool)` + +GetVulnFixableCountOk returns a tuple with the VulnFixableCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnFixableCount + +`func (o *ArtifactMetadata) SetVulnFixableCount(v int64)` + +SetVulnFixableCount sets VulnFixableCount field to given value. + +### HasVulnFixableCount + +`func (o *ArtifactMetadata) HasVulnFixableCount() bool` + +HasVulnFixableCount returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/ArtifactMetadataAllOf.md b/products/containerregistry/docs/models/ArtifactMetadataAllOf.md new file mode 100644 index 0000000..50ac79a --- /dev/null +++ b/products/containerregistry/docs/models/ArtifactMetadataAllOf.md @@ -0,0 +1,246 @@ +# ArtifactMetadataAllOf + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**LastPushedAt** | [**time.Time**](time.Time.md) | The date and time the artifact was last pushed | | +|**LastPulledAt** | Pointer to [**time.Time**](time.Time.md) | The date and time the artifact was last pulled | [optional] | +|**LastScannedAt** | Pointer to [**time.Time**](time.Time.md) | The date and time the artifact was last scanned | [optional] | +|**PushCount** | **int64** | The number of times the artifact was pushed | | +|**PullCount** | **int64** | The number of times the artifact was pulled | | +|**VulnMaxSeverity** | Pointer to **string** | The CVSS vulnerability severity rating | [optional] | +|**VulnTotalScore** | Pointer to **float32** | The total CVSS score of all vulnerabilities of the artifact | [optional] | +|**VulnTotalCount** | Pointer to **int64** | The total number of vulnerabilities of the artifact | [optional] | +|**VulnFixableCount** | Pointer to **int64** | The number of fixable vulnerabilities of the artifact | [optional] | + +## Methods + +### NewArtifactMetadataAllOf + +`func NewArtifactMetadataAllOf(lastPushedAt time.Time, pushCount int64, pullCount int64, ) *ArtifactMetadataAllOf` + +NewArtifactMetadataAllOf instantiates a new ArtifactMetadataAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArtifactMetadataAllOfWithDefaults + +`func NewArtifactMetadataAllOfWithDefaults() *ArtifactMetadataAllOf` + +NewArtifactMetadataAllOfWithDefaults instantiates a new ArtifactMetadataAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLastPushedAt + +`func (o *ArtifactMetadataAllOf) GetLastPushedAt() time.Time` + +GetLastPushedAt returns the LastPushedAt field if non-nil, zero value otherwise. + +### GetLastPushedAtOk + +`func (o *ArtifactMetadataAllOf) GetLastPushedAtOk() (*time.Time, bool)` + +GetLastPushedAtOk returns a tuple with the LastPushedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastPushedAt + +`func (o *ArtifactMetadataAllOf) SetLastPushedAt(v time.Time)` + +SetLastPushedAt sets LastPushedAt field to given value. + + +### GetLastPulledAt + +`func (o *ArtifactMetadataAllOf) GetLastPulledAt() time.Time` + +GetLastPulledAt returns the LastPulledAt field if non-nil, zero value otherwise. + +### GetLastPulledAtOk + +`func (o *ArtifactMetadataAllOf) GetLastPulledAtOk() (*time.Time, bool)` + +GetLastPulledAtOk returns a tuple with the LastPulledAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastPulledAt + +`func (o *ArtifactMetadataAllOf) SetLastPulledAt(v time.Time)` + +SetLastPulledAt sets LastPulledAt field to given value. + +### HasLastPulledAt + +`func (o *ArtifactMetadataAllOf) HasLastPulledAt() bool` + +HasLastPulledAt returns a boolean if a field has been set. + +### GetLastScannedAt + +`func (o *ArtifactMetadataAllOf) GetLastScannedAt() time.Time` + +GetLastScannedAt returns the LastScannedAt field if non-nil, zero value otherwise. + +### GetLastScannedAtOk + +`func (o *ArtifactMetadataAllOf) GetLastScannedAtOk() (*time.Time, bool)` + +GetLastScannedAtOk returns a tuple with the LastScannedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastScannedAt + +`func (o *ArtifactMetadataAllOf) SetLastScannedAt(v time.Time)` + +SetLastScannedAt sets LastScannedAt field to given value. + +### HasLastScannedAt + +`func (o *ArtifactMetadataAllOf) HasLastScannedAt() bool` + +HasLastScannedAt returns a boolean if a field has been set. + +### GetPushCount + +`func (o *ArtifactMetadataAllOf) GetPushCount() int64` + +GetPushCount returns the PushCount field if non-nil, zero value otherwise. + +### GetPushCountOk + +`func (o *ArtifactMetadataAllOf) GetPushCountOk() (*int64, bool)` + +GetPushCountOk returns a tuple with the PushCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPushCount + +`func (o *ArtifactMetadataAllOf) SetPushCount(v int64)` + +SetPushCount sets PushCount field to given value. + + +### GetPullCount + +`func (o *ArtifactMetadataAllOf) GetPullCount() int64` + +GetPullCount returns the PullCount field if non-nil, zero value otherwise. + +### GetPullCountOk + +`func (o *ArtifactMetadataAllOf) GetPullCountOk() (*int64, bool)` + +GetPullCountOk returns a tuple with the PullCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPullCount + +`func (o *ArtifactMetadataAllOf) SetPullCount(v int64)` + +SetPullCount sets PullCount field to given value. + + +### GetVulnMaxSeverity + +`func (o *ArtifactMetadataAllOf) GetVulnMaxSeverity() string` + +GetVulnMaxSeverity returns the VulnMaxSeverity field if non-nil, zero value otherwise. + +### GetVulnMaxSeverityOk + +`func (o *ArtifactMetadataAllOf) GetVulnMaxSeverityOk() (*string, bool)` + +GetVulnMaxSeverityOk returns a tuple with the VulnMaxSeverity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnMaxSeverity + +`func (o *ArtifactMetadataAllOf) SetVulnMaxSeverity(v string)` + +SetVulnMaxSeverity sets VulnMaxSeverity field to given value. + +### HasVulnMaxSeverity + +`func (o *ArtifactMetadataAllOf) HasVulnMaxSeverity() bool` + +HasVulnMaxSeverity returns a boolean if a field has been set. + +### GetVulnTotalScore + +`func (o *ArtifactMetadataAllOf) GetVulnTotalScore() float32` + +GetVulnTotalScore returns the VulnTotalScore field if non-nil, zero value otherwise. + +### GetVulnTotalScoreOk + +`func (o *ArtifactMetadataAllOf) GetVulnTotalScoreOk() (*float32, bool)` + +GetVulnTotalScoreOk returns a tuple with the VulnTotalScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnTotalScore + +`func (o *ArtifactMetadataAllOf) SetVulnTotalScore(v float32)` + +SetVulnTotalScore sets VulnTotalScore field to given value. + +### HasVulnTotalScore + +`func (o *ArtifactMetadataAllOf) HasVulnTotalScore() bool` + +HasVulnTotalScore returns a boolean if a field has been set. + +### GetVulnTotalCount + +`func (o *ArtifactMetadataAllOf) GetVulnTotalCount() int64` + +GetVulnTotalCount returns the VulnTotalCount field if non-nil, zero value otherwise. + +### GetVulnTotalCountOk + +`func (o *ArtifactMetadataAllOf) GetVulnTotalCountOk() (*int64, bool)` + +GetVulnTotalCountOk returns a tuple with the VulnTotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnTotalCount + +`func (o *ArtifactMetadataAllOf) SetVulnTotalCount(v int64)` + +SetVulnTotalCount sets VulnTotalCount field to given value. + +### HasVulnTotalCount + +`func (o *ArtifactMetadataAllOf) HasVulnTotalCount() bool` + +HasVulnTotalCount returns a boolean if a field has been set. + +### GetVulnFixableCount + +`func (o *ArtifactMetadataAllOf) GetVulnFixableCount() int64` + +GetVulnFixableCount returns the VulnFixableCount field if non-nil, zero value otherwise. + +### GetVulnFixableCountOk + +`func (o *ArtifactMetadataAllOf) GetVulnFixableCountOk() (*int64, bool)` + +GetVulnFixableCountOk returns a tuple with the VulnFixableCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnFixableCount + +`func (o *ArtifactMetadataAllOf) SetVulnFixableCount(v int64)` + +SetVulnFixableCount sets VulnFixableCount field to given value. + +### HasVulnFixableCount + +`func (o *ArtifactMetadataAllOf) HasVulnFixableCount() bool` + +HasVulnFixableCount returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/ArtifactRead.md b/products/containerregistry/docs/models/ArtifactRead.md new file mode 100644 index 0000000..b3494e7 --- /dev/null +++ b/products/containerregistry/docs/models/ArtifactRead.md @@ -0,0 +1,132 @@ +# ArtifactRead + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Id** | **string** | The digest of the artifact | | +|**Type** | **string** | | | +|**Href** | **string** | | | +|**Metadata** | [**ArtifactMetadata**](ArtifactMetadata.md) | | | +|**Properties** | [**Artifact**](Artifact.md) | | | + +## Methods + +### NewArtifactRead + +`func NewArtifactRead(id string, type_ string, href string, metadata ArtifactMetadata, properties Artifact, ) *ArtifactRead` + +NewArtifactRead instantiates a new ArtifactRead object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArtifactReadWithDefaults + +`func NewArtifactReadWithDefaults() *ArtifactRead` + +NewArtifactReadWithDefaults instantiates a new ArtifactRead object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ArtifactRead) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ArtifactRead) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ArtifactRead) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *ArtifactRead) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ArtifactRead) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ArtifactRead) SetType(v string)` + +SetType sets Type field to given value. + + +### GetHref + +`func (o *ArtifactRead) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *ArtifactRead) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *ArtifactRead) SetHref(v string)` + +SetHref sets Href field to given value. + + +### GetMetadata + +`func (o *ArtifactRead) GetMetadata() ArtifactMetadata` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *ArtifactRead) GetMetadataOk() (*ArtifactMetadata, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *ArtifactRead) SetMetadata(v ArtifactMetadata)` + +SetMetadata sets Metadata field to given value. + + +### GetProperties + +`func (o *ArtifactRead) GetProperties() Artifact` + +GetProperties returns the Properties field if non-nil, zero value otherwise. + +### GetPropertiesOk + +`func (o *ArtifactRead) GetPropertiesOk() (*Artifact, bool)` + +GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProperties + +`func (o *ArtifactRead) SetProperties(v Artifact)` + +SetProperties sets Properties field to given value. + + + diff --git a/products/containerregistry/docs/models/ArtifactReadList.md b/products/containerregistry/docs/models/ArtifactReadList.md new file mode 100644 index 0000000..fcd6b37 --- /dev/null +++ b/products/containerregistry/docs/models/ArtifactReadList.md @@ -0,0 +1,179 @@ +# ArtifactReadList + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Id** | **string** | | | +|**Type** | **string** | | | +|**Href** | **string** | | | +|**Items** | Pointer to [**[]ArtifactRead**](ArtifactRead.md) | | [optional] | +|**Offset** | **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [readonly] | +|**Limit** | **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit). | [readonly] | +|**Links** | [**Links**](Links.md) | | | + +## Methods + +### NewArtifactReadList + +`func NewArtifactReadList(id string, type_ string, href string, offset int32, limit int32, links Links, ) *ArtifactReadList` + +NewArtifactReadList instantiates a new ArtifactReadList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArtifactReadListWithDefaults + +`func NewArtifactReadListWithDefaults() *ArtifactReadList` + +NewArtifactReadListWithDefaults instantiates a new ArtifactReadList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ArtifactReadList) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ArtifactReadList) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ArtifactReadList) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *ArtifactReadList) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ArtifactReadList) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ArtifactReadList) SetType(v string)` + +SetType sets Type field to given value. + + +### GetHref + +`func (o *ArtifactReadList) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *ArtifactReadList) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *ArtifactReadList) SetHref(v string)` + +SetHref sets Href field to given value. + + +### GetItems + +`func (o *ArtifactReadList) GetItems() []ArtifactRead` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *ArtifactReadList) GetItemsOk() (*[]ArtifactRead, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *ArtifactReadList) SetItems(v []ArtifactRead)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *ArtifactReadList) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### GetOffset + +`func (o *ArtifactReadList) GetOffset() int32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *ArtifactReadList) GetOffsetOk() (*int32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *ArtifactReadList) SetOffset(v int32)` + +SetOffset sets Offset field to given value. + + +### GetLimit + +`func (o *ArtifactReadList) GetLimit() int32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *ArtifactReadList) GetLimitOk() (*int32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *ArtifactReadList) SetLimit(v int32)` + +SetLimit sets Limit field to given value. + + +### GetLinks + +`func (o *ArtifactReadList) GetLinks() Links` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *ArtifactReadList) GetLinksOk() (*Links, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *ArtifactReadList) SetLinks(v Links)` + +SetLinks sets Links field to given value. + + + diff --git a/products/containerregistry/docs/models/ArtifactVulnerabilityReadList.md b/products/containerregistry/docs/models/ArtifactVulnerabilityReadList.md new file mode 100644 index 0000000..89e53a5 --- /dev/null +++ b/products/containerregistry/docs/models/ArtifactVulnerabilityReadList.md @@ -0,0 +1,179 @@ +# ArtifactVulnerabilityReadList + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Id** | **string** | | | +|**Type** | **string** | | | +|**Href** | **string** | | | +|**Items** | Pointer to [**[]VulnerabilityRead**](VulnerabilityRead.md) | | [optional] | +|**Offset** | **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [readonly] | +|**Limit** | **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit). | [readonly] | +|**Links** | [**Links**](Links.md) | | | + +## Methods + +### NewArtifactVulnerabilityReadList + +`func NewArtifactVulnerabilityReadList(id string, type_ string, href string, offset int32, limit int32, links Links, ) *ArtifactVulnerabilityReadList` + +NewArtifactVulnerabilityReadList instantiates a new ArtifactVulnerabilityReadList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArtifactVulnerabilityReadListWithDefaults + +`func NewArtifactVulnerabilityReadListWithDefaults() *ArtifactVulnerabilityReadList` + +NewArtifactVulnerabilityReadListWithDefaults instantiates a new ArtifactVulnerabilityReadList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ArtifactVulnerabilityReadList) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ArtifactVulnerabilityReadList) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ArtifactVulnerabilityReadList) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *ArtifactVulnerabilityReadList) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ArtifactVulnerabilityReadList) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ArtifactVulnerabilityReadList) SetType(v string)` + +SetType sets Type field to given value. + + +### GetHref + +`func (o *ArtifactVulnerabilityReadList) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *ArtifactVulnerabilityReadList) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *ArtifactVulnerabilityReadList) SetHref(v string)` + +SetHref sets Href field to given value. + + +### GetItems + +`func (o *ArtifactVulnerabilityReadList) GetItems() []VulnerabilityRead` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *ArtifactVulnerabilityReadList) GetItemsOk() (*[]VulnerabilityRead, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *ArtifactVulnerabilityReadList) SetItems(v []VulnerabilityRead)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *ArtifactVulnerabilityReadList) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### GetOffset + +`func (o *ArtifactVulnerabilityReadList) GetOffset() int32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *ArtifactVulnerabilityReadList) GetOffsetOk() (*int32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *ArtifactVulnerabilityReadList) SetOffset(v int32)` + +SetOffset sets Offset field to given value. + + +### GetLimit + +`func (o *ArtifactVulnerabilityReadList) GetLimit() int32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *ArtifactVulnerabilityReadList) GetLimitOk() (*int32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *ArtifactVulnerabilityReadList) SetLimit(v int32)` + +SetLimit sets Limit field to given value. + + +### GetLinks + +`func (o *ArtifactVulnerabilityReadList) GetLinks() Links` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *ArtifactVulnerabilityReadList) GetLinksOk() (*Links, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *ArtifactVulnerabilityReadList) SetLinks(v Links)` + +SetLinks sets Links field to given value. + + + diff --git a/products/containerregistry/docs/models/Error.md b/products/containerregistry/docs/models/Error.md new file mode 100644 index 0000000..717a950 --- /dev/null +++ b/products/containerregistry/docs/models/Error.md @@ -0,0 +1,79 @@ +# Error + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**HttpStatus** | Pointer to **int32** | The HTTP status code of the operation. | [optional] | +|**Messages** | Pointer to [**[]ErrorMessages**](ErrorMessages.md) | A list of error messages. | [optional] | + +## Methods + +### NewError + +`func NewError() *Error` + +NewError instantiates a new Error object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorWithDefaults + +`func NewErrorWithDefaults() *Error` + +NewErrorWithDefaults instantiates a new Error object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetHttpStatus + +`func (o *Error) GetHttpStatus() int32` + +GetHttpStatus returns the HttpStatus field if non-nil, zero value otherwise. + +### GetHttpStatusOk + +`func (o *Error) GetHttpStatusOk() (*int32, bool)` + +GetHttpStatusOk returns a tuple with the HttpStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpStatus + +`func (o *Error) SetHttpStatus(v int32)` + +SetHttpStatus sets HttpStatus field to given value. + +### HasHttpStatus + +`func (o *Error) HasHttpStatus() bool` + +HasHttpStatus returns a boolean if a field has been set. + +### GetMessages + +`func (o *Error) GetMessages() []ErrorMessages` + +GetMessages returns the Messages field if non-nil, zero value otherwise. + +### GetMessagesOk + +`func (o *Error) GetMessagesOk() (*[]ErrorMessages, bool)` + +GetMessagesOk returns a tuple with the Messages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessages + +`func (o *Error) SetMessages(v []ErrorMessages)` + +SetMessages sets Messages field to given value. + +### HasMessages + +`func (o *Error) HasMessages() bool` + +HasMessages returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/ErrorMessages.md b/products/containerregistry/docs/models/ErrorMessages.md new file mode 100644 index 0000000..de55058 --- /dev/null +++ b/products/containerregistry/docs/models/ErrorMessages.md @@ -0,0 +1,79 @@ +# ErrorMessages + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**ErrorCode** | Pointer to **string** | Application internal error code | [optional] | +|**Message** | Pointer to **string** | A human readable explanation specific to this occurrence of the problem. | [optional] | + +## Methods + +### NewErrorMessages + +`func NewErrorMessages() *ErrorMessages` + +NewErrorMessages instantiates a new ErrorMessages object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorMessagesWithDefaults + +`func NewErrorMessagesWithDefaults() *ErrorMessages` + +NewErrorMessagesWithDefaults instantiates a new ErrorMessages object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetErrorCode + +`func (o *ErrorMessages) GetErrorCode() string` + +GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. + +### GetErrorCodeOk + +`func (o *ErrorMessages) GetErrorCodeOk() (*string, bool)` + +GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorCode + +`func (o *ErrorMessages) SetErrorCode(v string)` + +SetErrorCode sets ErrorCode field to given value. + +### HasErrorCode + +`func (o *ErrorMessages) HasErrorCode() bool` + +HasErrorCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *ErrorMessages) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ErrorMessages) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ErrorMessages) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ErrorMessages) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/Feature.md b/products/containerregistry/docs/models/Feature.md new file mode 100644 index 0000000..6385425 --- /dev/null +++ b/products/containerregistry/docs/models/Feature.md @@ -0,0 +1,74 @@ +# Feature + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Enabled** | **bool** | | [default to true]| +|**Properties** | Pointer to **map[string]interface{}** | | [optional] | + +## Methods + +### NewFeature + +`func NewFeature(enabled bool, ) *Feature` + +NewFeature instantiates a new Feature object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeatureWithDefaults + +`func NewFeatureWithDefaults() *Feature` + +NewFeatureWithDefaults instantiates a new Feature object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *Feature) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *Feature) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *Feature) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetProperties + +`func (o *Feature) GetProperties() map[string]interface{}` + +GetProperties returns the Properties field if non-nil, zero value otherwise. + +### GetPropertiesOk + +`func (o *Feature) GetPropertiesOk() (*map[string]interface{}, bool)` + +GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProperties + +`func (o *Feature) SetProperties(v map[string]interface{})` + +SetProperties sets Properties field to given value. + +### HasProperties + +`func (o *Feature) HasProperties() bool` + +HasProperties returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/FeatureVulnerabilityScanning.md b/products/containerregistry/docs/models/FeatureVulnerabilityScanning.md new file mode 100644 index 0000000..ecb7516 --- /dev/null +++ b/products/containerregistry/docs/models/FeatureVulnerabilityScanning.md @@ -0,0 +1,74 @@ +# FeatureVulnerabilityScanning + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Enabled** | **bool** | | [default to true]| +|**Properties** | Pointer to **map[string]interface{}** | | [optional] | + +## Methods + +### NewFeatureVulnerabilityScanning + +`func NewFeatureVulnerabilityScanning(enabled bool, ) *FeatureVulnerabilityScanning` + +NewFeatureVulnerabilityScanning instantiates a new FeatureVulnerabilityScanning object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeatureVulnerabilityScanningWithDefaults + +`func NewFeatureVulnerabilityScanningWithDefaults() *FeatureVulnerabilityScanning` + +NewFeatureVulnerabilityScanningWithDefaults instantiates a new FeatureVulnerabilityScanning object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *FeatureVulnerabilityScanning) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *FeatureVulnerabilityScanning) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *FeatureVulnerabilityScanning) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetProperties + +`func (o *FeatureVulnerabilityScanning) GetProperties() map[string]interface{}` + +GetProperties returns the Properties field if non-nil, zero value otherwise. + +### GetPropertiesOk + +`func (o *FeatureVulnerabilityScanning) GetPropertiesOk() (*map[string]interface{}, bool)` + +GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProperties + +`func (o *FeatureVulnerabilityScanning) SetProperties(v map[string]interface{})` + +SetProperties sets Properties field to given value. + +### HasProperties + +`func (o *FeatureVulnerabilityScanning) HasProperties() bool` + +HasProperties returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/Links.md b/products/containerregistry/docs/models/Links.md new file mode 100644 index 0000000..eabda45 --- /dev/null +++ b/products/containerregistry/docs/models/Links.md @@ -0,0 +1,105 @@ +# Links + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Prev** | Pointer to **string** | URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0. | [optional] [readonly] | +|**Self** | Pointer to **string** | URL (with offset and limit parameters) of the current page. | [optional] [readonly] | +|**Next** | Pointer to **string** | URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements. | [optional] [readonly] | + +## Methods + +### NewLinks + +`func NewLinks() *Links` + +NewLinks instantiates a new Links object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLinksWithDefaults + +`func NewLinksWithDefaults() *Links` + +NewLinksWithDefaults instantiates a new Links object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPrev + +`func (o *Links) GetPrev() string` + +GetPrev returns the Prev field if non-nil, zero value otherwise. + +### GetPrevOk + +`func (o *Links) GetPrevOk() (*string, bool)` + +GetPrevOk returns a tuple with the Prev field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrev + +`func (o *Links) SetPrev(v string)` + +SetPrev sets Prev field to given value. + +### HasPrev + +`func (o *Links) HasPrev() bool` + +HasPrev returns a boolean if a field has been set. + +### GetSelf + +`func (o *Links) GetSelf() string` + +GetSelf returns the Self field if non-nil, zero value otherwise. + +### GetSelfOk + +`func (o *Links) GetSelfOk() (*string, bool)` + +GetSelfOk returns a tuple with the Self field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSelf + +`func (o *Links) SetSelf(v string)` + +SetSelf sets Self field to given value. + +### HasSelf + +`func (o *Links) HasSelf() bool` + +HasSelf returns a boolean if a field has been set. + +### GetNext + +`func (o *Links) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *Links) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *Links) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *Links) HasNext() bool` + +HasNext returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/LocationsResponse.md b/products/containerregistry/docs/models/LocationsResponse.md index 40abdb5..1de8081 100644 --- a/products/containerregistry/docs/models/LocationsResponse.md +++ b/products/containerregistry/docs/models/LocationsResponse.md @@ -103,16 +103,6 @@ SetItems sets Items field to given value. HasItems returns a boolean if a field has been set. -### SetItemsNil - -`func (o *LocationsResponse) SetItemsNil(b bool)` - - SetItemsNil sets the value for Items to be an explicit nil - -### UnsetItems -`func (o *LocationsResponse) UnsetItems()` - -UnsetItems ensures that no value is present for Items, not even an explicit nil ### GetType `func (o *LocationsResponse) GetType() string` diff --git a/products/containerregistry/docs/models/Metadata.md b/products/containerregistry/docs/models/Metadata.md new file mode 100644 index 0000000..65bcfab --- /dev/null +++ b/products/containerregistry/docs/models/Metadata.md @@ -0,0 +1,209 @@ +# Metadata + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 creation timestamp. | [optional] [readonly] | +|**CreatedBy** | Pointer to **string** | Unique name of the identity that created the resource. | [optional] [readonly] | +|**CreatedByUserId** | Pointer to **string** | Unique id of the identity that created the resource. | [optional] [readonly] | +|**LastModifiedDate** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 modified timestamp. | [optional] [readonly] | +|**LastModifiedBy** | Pointer to **string** | Unique name of the identity that last modified the resource. | [optional] [readonly] | +|**LastModifiedByUserId** | Pointer to **string** | Unique id of the identity that last modified the resource. | [optional] [readonly] | +|**ResourceURN** | Pointer to **string** | Unique name of the resource. | [optional] [readonly] | + +## Methods + +### NewMetadata + +`func NewMetadata() *Metadata` + +NewMetadata instantiates a new Metadata object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMetadataWithDefaults + +`func NewMetadataWithDefaults() *Metadata` + +NewMetadataWithDefaults instantiates a new Metadata object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreatedDate + +`func (o *Metadata) GetCreatedDate() time.Time` + +GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. + +### GetCreatedDateOk + +`func (o *Metadata) GetCreatedDateOk() (*time.Time, bool)` + +GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedDate + +`func (o *Metadata) SetCreatedDate(v time.Time)` + +SetCreatedDate sets CreatedDate field to given value. + +### HasCreatedDate + +`func (o *Metadata) HasCreatedDate() bool` + +HasCreatedDate returns a boolean if a field has been set. + +### GetCreatedBy + +`func (o *Metadata) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *Metadata) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *Metadata) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + +### HasCreatedBy + +`func (o *Metadata) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### GetCreatedByUserId + +`func (o *Metadata) GetCreatedByUserId() string` + +GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. + +### GetCreatedByUserIdOk + +`func (o *Metadata) GetCreatedByUserIdOk() (*string, bool)` + +GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByUserId + +`func (o *Metadata) SetCreatedByUserId(v string)` + +SetCreatedByUserId sets CreatedByUserId field to given value. + +### HasCreatedByUserId + +`func (o *Metadata) HasCreatedByUserId() bool` + +HasCreatedByUserId returns a boolean if a field has been set. + +### GetLastModifiedDate + +`func (o *Metadata) GetLastModifiedDate() time.Time` + +GetLastModifiedDate returns the LastModifiedDate field if non-nil, zero value otherwise. + +### GetLastModifiedDateOk + +`func (o *Metadata) GetLastModifiedDateOk() (*time.Time, bool)` + +GetLastModifiedDateOk returns a tuple with the LastModifiedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedDate + +`func (o *Metadata) SetLastModifiedDate(v time.Time)` + +SetLastModifiedDate sets LastModifiedDate field to given value. + +### HasLastModifiedDate + +`func (o *Metadata) HasLastModifiedDate() bool` + +HasLastModifiedDate returns a boolean if a field has been set. + +### GetLastModifiedBy + +`func (o *Metadata) GetLastModifiedBy() string` + +GetLastModifiedBy returns the LastModifiedBy field if non-nil, zero value otherwise. + +### GetLastModifiedByOk + +`func (o *Metadata) GetLastModifiedByOk() (*string, bool)` + +GetLastModifiedByOk returns a tuple with the LastModifiedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedBy + +`func (o *Metadata) SetLastModifiedBy(v string)` + +SetLastModifiedBy sets LastModifiedBy field to given value. + +### HasLastModifiedBy + +`func (o *Metadata) HasLastModifiedBy() bool` + +HasLastModifiedBy returns a boolean if a field has been set. + +### GetLastModifiedByUserId + +`func (o *Metadata) GetLastModifiedByUserId() string` + +GetLastModifiedByUserId returns the LastModifiedByUserId field if non-nil, zero value otherwise. + +### GetLastModifiedByUserIdOk + +`func (o *Metadata) GetLastModifiedByUserIdOk() (*string, bool)` + +GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedByUserId + +`func (o *Metadata) SetLastModifiedByUserId(v string)` + +SetLastModifiedByUserId sets LastModifiedByUserId field to given value. + +### HasLastModifiedByUserId + +`func (o *Metadata) HasLastModifiedByUserId() bool` + +HasLastModifiedByUserId returns a boolean if a field has been set. + +### GetResourceURN + +`func (o *Metadata) GetResourceURN() string` + +GetResourceURN returns the ResourceURN field if non-nil, zero value otherwise. + +### GetResourceURNOk + +`func (o *Metadata) GetResourceURNOk() (*string, bool)` + +GetResourceURNOk returns a tuple with the ResourceURN field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceURN + +`func (o *Metadata) SetResourceURN(v string)` + +SetResourceURN sets ResourceURN field to given value. + +### HasResourceURN + +`func (o *Metadata) HasResourceURN() bool` + +HasResourceURN returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/Pagination.md b/products/containerregistry/docs/models/Pagination.md index dcbdac2..eaf53d8 100644 --- a/products/containerregistry/docs/models/Pagination.md +++ b/products/containerregistry/docs/models/Pagination.md @@ -4,14 +4,15 @@ |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| -|**Limit** | **int32** | The maximum number of elements to return (used together with pagination.token for pagination) | | -|**Token** | **string** | An opaque token used to iterate the set of results (used together with limit for pagination) | | +|**Offset** | **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [readonly] | +|**Limit** | **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit). | [readonly] | +|**Links** | [**Links**](Links.md) | | | ## Methods ### NewPagination -`func NewPagination(limit int32, token string, ) *Pagination` +`func NewPagination(offset int32, limit int32, links Links, ) *Pagination` NewPagination instantiates a new Pagination object This constructor will assign default values to properties that have it defined, @@ -26,6 +27,26 @@ NewPaginationWithDefaults instantiates a new Pagination object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetOffset + +`func (o *Pagination) GetOffset() int32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *Pagination) GetOffsetOk() (*int32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *Pagination) SetOffset(v int32)` + +SetOffset sets Offset field to given value. + + ### GetLimit `func (o *Pagination) GetLimit() int32` @@ -46,24 +67,24 @@ and a boolean to check if the value has been set. SetLimit sets Limit field to given value. -### GetToken +### GetLinks -`func (o *Pagination) GetToken() string` +`func (o *Pagination) GetLinks() Links` -GetToken returns the Token field if non-nil, zero value otherwise. +GetLinks returns the Links field if non-nil, zero value otherwise. -### GetTokenOk +### GetLinksOk -`func (o *Pagination) GetTokenOk() (*string, bool)` +`func (o *Pagination) GetLinksOk() (*Links, bool)` -GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetToken +### SetLinks -`func (o *Pagination) SetToken(v string)` +`func (o *Pagination) SetLinks(v Links)` -SetToken sets Token field to given value. +SetLinks sets Links field to given value. diff --git a/products/containerregistry/docs/models/PatchRegistryInput.md b/products/containerregistry/docs/models/PatchRegistryInput.md index 4a6143f..6c0195c 100644 --- a/products/containerregistry/docs/models/PatchRegistryInput.md +++ b/products/containerregistry/docs/models/PatchRegistryInput.md @@ -4,7 +4,9 @@ |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| -|**GarbageCollectionSchedule** | Pointer to [**NullableWeeklySchedule**](WeeklySchedule.md) | | [optional] | +|**GarbageCollectionSchedule** | Pointer to [**WeeklySchedule**](WeeklySchedule.md) | | [optional] | +|**Features** | Pointer to [**RegistryFeatures**](RegistryFeatures.md) | | [optional] | +|**ApiSubnetAllowList** | Pointer to **[]string** | Subnets and IPs that are allowed to access the registry API, supports IPv4 and IPv6. Maximum of 25 items may be specified. If no CIDR is given /32 and /128 are assumed for IPv4 and IPv6 respectively. 0.0.0.0/0 can be used to deny all traffic. __Note__: If this list is empty or not set, there are no restrictions. | [optional] | ## Methods @@ -50,14 +52,54 @@ SetGarbageCollectionSchedule sets GarbageCollectionSchedule field to given value HasGarbageCollectionSchedule returns a boolean if a field has been set. -### SetGarbageCollectionScheduleNil +### GetFeatures -`func (o *PatchRegistryInput) SetGarbageCollectionScheduleNil(b bool)` +`func (o *PatchRegistryInput) GetFeatures() RegistryFeatures` - SetGarbageCollectionScheduleNil sets the value for GarbageCollectionSchedule to be an explicit nil +GetFeatures returns the Features field if non-nil, zero value otherwise. -### UnsetGarbageCollectionSchedule -`func (o *PatchRegistryInput) UnsetGarbageCollectionSchedule()` +### GetFeaturesOk + +`func (o *PatchRegistryInput) GetFeaturesOk() (*RegistryFeatures, bool)` + +GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatures + +`func (o *PatchRegistryInput) SetFeatures(v RegistryFeatures)` + +SetFeatures sets Features field to given value. + +### HasFeatures + +`func (o *PatchRegistryInput) HasFeatures() bool` + +HasFeatures returns a boolean if a field has been set. + +### GetApiSubnetAllowList + +`func (o *PatchRegistryInput) GetApiSubnetAllowList() []string` + +GetApiSubnetAllowList returns the ApiSubnetAllowList field if non-nil, zero value otherwise. + +### GetApiSubnetAllowListOk + +`func (o *PatchRegistryInput) GetApiSubnetAllowListOk() (*[]string, bool)` + +GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiSubnetAllowList + +`func (o *PatchRegistryInput) SetApiSubnetAllowList(v []string)` + +SetApiSubnetAllowList sets ApiSubnetAllowList field to given value. + +### HasApiSubnetAllowList + +`func (o *PatchRegistryInput) HasApiSubnetAllowList() bool` + +HasApiSubnetAllowList returns a boolean if a field has been set. -UnsetGarbageCollectionSchedule ensures that no value is present for GarbageCollectionSchedule, not even an explicit nil diff --git a/products/containerregistry/docs/models/PatchTokenInput.md b/products/containerregistry/docs/models/PatchTokenInput.md index 14f8abf..aaae5b1 100644 --- a/products/containerregistry/docs/models/PatchTokenInput.md +++ b/products/containerregistry/docs/models/PatchTokenInput.md @@ -4,7 +4,7 @@ |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| -|**ExpiryDate** | Pointer to [**NullableTime**](time.Time.md) | | [optional] | +|**ExpiryDate** | Pointer to [**time.Time**](time.Time.md) | | [optional] | |**Scopes** | Pointer to [**[]Scope**](Scope.md) | | [optional] | |**Status** | Pointer to **string** | | [optional] | @@ -52,16 +52,6 @@ SetExpiryDate sets ExpiryDate field to given value. HasExpiryDate returns a boolean if a field has been set. -### SetExpiryDateNil - -`func (o *PatchTokenInput) SetExpiryDateNil(b bool)` - - SetExpiryDateNil sets the value for ExpiryDate to be an explicit nil - -### UnsetExpiryDate -`func (o *PatchTokenInput) UnsetExpiryDate()` - -UnsetExpiryDate ensures that no value is present for ExpiryDate, not even an explicit nil ### GetScopes `func (o *PatchTokenInput) GetScopes() []Scope` @@ -87,16 +77,6 @@ SetScopes sets Scopes field to given value. HasScopes returns a boolean if a field has been set. -### SetScopesNil - -`func (o *PatchTokenInput) SetScopesNil(b bool)` - - SetScopesNil sets the value for Scopes to be an explicit nil - -### UnsetScopes -`func (o *PatchTokenInput) UnsetScopes()` - -UnsetScopes ensures that no value is present for Scopes, not even an explicit nil ### GetStatus `func (o *PatchTokenInput) GetStatus() string` diff --git a/products/containerregistry/docs/models/PostRegistryOutput.md b/products/containerregistry/docs/models/PostRegistryOutput.md index 8c2a4f4..2c1df8c 100644 --- a/products/containerregistry/docs/models/PostRegistryOutput.md +++ b/products/containerregistry/docs/models/PostRegistryOutput.md @@ -6,15 +6,15 @@ |------------ | ------------- | ------------- | -------------| |**Href** | Pointer to **string** | | [optional] | |**Id** | Pointer to **string** | | [optional] | -|**Metadata** | [**NullableApiResourceMetadata**](ApiResourceMetadata.md) | | | -|**Properties** | [**NullableRegistryProperties**](RegistryProperties.md) | | | +|**Metadata** | [**ApiResourceMetadata**](ApiResourceMetadata.md) | | | +|**Properties** | [**RegistryProperties**](RegistryProperties.md) | | | |**Type** | Pointer to **string** | | [optional] | ## Methods ### NewPostRegistryOutput -`func NewPostRegistryOutput(metadata NullableApiResourceMetadata, properties NullableRegistryProperties, ) *PostRegistryOutput` +`func NewPostRegistryOutput(metadata ApiResourceMetadata, properties RegistryProperties, ) *PostRegistryOutput` NewPostRegistryOutput instantiates a new PostRegistryOutput object This constructor will assign default values to properties that have it defined, @@ -99,16 +99,6 @@ and a boolean to check if the value has been set. SetMetadata sets Metadata field to given value. -### SetMetadataNil - -`func (o *PostRegistryOutput) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *PostRegistryOutput) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil ### GetProperties `func (o *PostRegistryOutput) GetProperties() RegistryProperties` @@ -129,16 +119,6 @@ and a boolean to check if the value has been set. SetProperties sets Properties field to given value. -### SetPropertiesNil - -`func (o *PostRegistryOutput) SetPropertiesNil(b bool)` - - SetPropertiesNil sets the value for Properties to be an explicit nil - -### UnsetProperties -`func (o *PostRegistryOutput) UnsetProperties()` - -UnsetProperties ensures that no value is present for Properties, not even an explicit nil ### GetType `func (o *PostRegistryOutput) GetType() string` diff --git a/products/containerregistry/docs/models/PostRegistryProperties.md b/products/containerregistry/docs/models/PostRegistryProperties.md index 024de49..f7c93ba 100644 --- a/products/containerregistry/docs/models/PostRegistryProperties.md +++ b/products/containerregistry/docs/models/PostRegistryProperties.md @@ -4,9 +4,11 @@ |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| -|**GarbageCollectionSchedule** | Pointer to [**NullableWeeklySchedule**](WeeklySchedule.md) | | [optional] | +|**GarbageCollectionSchedule** | Pointer to [**WeeklySchedule**](WeeklySchedule.md) | | [optional] | |**Location** | **string** | | | |**Name** | **string** | | | +|**Features** | Pointer to [**RegistryFeatures**](RegistryFeatures.md) | | [optional] | +|**ApiSubnetAllowList** | Pointer to **[]string** | Subnets and IPs that are allowed to access the registry API, supports IPv4 and IPv6. Maximum of 25 items may be specified. If no CIDR is given /32 and /128 are assumed for IPv4 and IPv6 respectively. 0.0.0.0/0 can be used to deny all traffic. __Note__: If this list is empty or not set, there are no restrictions. | [optional] | ## Methods @@ -52,16 +54,6 @@ SetGarbageCollectionSchedule sets GarbageCollectionSchedule field to given value HasGarbageCollectionSchedule returns a boolean if a field has been set. -### SetGarbageCollectionScheduleNil - -`func (o *PostRegistryProperties) SetGarbageCollectionScheduleNil(b bool)` - - SetGarbageCollectionScheduleNil sets the value for GarbageCollectionSchedule to be an explicit nil - -### UnsetGarbageCollectionSchedule -`func (o *PostRegistryProperties) UnsetGarbageCollectionSchedule()` - -UnsetGarbageCollectionSchedule ensures that no value is present for GarbageCollectionSchedule, not even an explicit nil ### GetLocation `func (o *PostRegistryProperties) GetLocation() string` @@ -102,4 +94,54 @@ and a boolean to check if the value has been set. SetName sets Name field to given value. +### GetFeatures + +`func (o *PostRegistryProperties) GetFeatures() RegistryFeatures` + +GetFeatures returns the Features field if non-nil, zero value otherwise. + +### GetFeaturesOk + +`func (o *PostRegistryProperties) GetFeaturesOk() (*RegistryFeatures, bool)` + +GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatures + +`func (o *PostRegistryProperties) SetFeatures(v RegistryFeatures)` + +SetFeatures sets Features field to given value. + +### HasFeatures + +`func (o *PostRegistryProperties) HasFeatures() bool` + +HasFeatures returns a boolean if a field has been set. + +### GetApiSubnetAllowList + +`func (o *PostRegistryProperties) GetApiSubnetAllowList() []string` + +GetApiSubnetAllowList returns the ApiSubnetAllowList field if non-nil, zero value otherwise. + +### GetApiSubnetAllowListOk + +`func (o *PostRegistryProperties) GetApiSubnetAllowListOk() (*[]string, bool)` + +GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiSubnetAllowList + +`func (o *PostRegistryProperties) SetApiSubnetAllowList(v []string)` + +SetApiSubnetAllowList sets ApiSubnetAllowList field to given value. + +### HasApiSubnetAllowList + +`func (o *PostRegistryProperties) HasApiSubnetAllowList() bool` + +HasApiSubnetAllowList returns a boolean if a field has been set. + diff --git a/products/containerregistry/docs/models/PostTokenOutput.md b/products/containerregistry/docs/models/PostTokenOutput.md index 8024bf0..2daf37e 100644 --- a/products/containerregistry/docs/models/PostTokenOutput.md +++ b/products/containerregistry/docs/models/PostTokenOutput.md @@ -6,15 +6,15 @@ |------------ | ------------- | ------------- | -------------| |**Href** | Pointer to **string** | | [optional] | |**Id** | Pointer to **string** | | [optional] | -|**Metadata** | [**NullableApiResourceMetadata**](ApiResourceMetadata.md) | | | -|**Properties** | [**NullableTokenProperties**](TokenProperties.md) | | | +|**Metadata** | [**ApiResourceMetadata**](ApiResourceMetadata.md) | | | +|**Properties** | [**TokenProperties**](TokenProperties.md) | | | |**Type** | Pointer to **string** | | [optional] | ## Methods ### NewPostTokenOutput -`func NewPostTokenOutput(metadata NullableApiResourceMetadata, properties NullableTokenProperties, ) *PostTokenOutput` +`func NewPostTokenOutput(metadata ApiResourceMetadata, properties TokenProperties, ) *PostTokenOutput` NewPostTokenOutput instantiates a new PostTokenOutput object This constructor will assign default values to properties that have it defined, @@ -99,16 +99,6 @@ and a boolean to check if the value has been set. SetMetadata sets Metadata field to given value. -### SetMetadataNil - -`func (o *PostTokenOutput) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *PostTokenOutput) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil ### GetProperties `func (o *PostTokenOutput) GetProperties() TokenProperties` @@ -129,16 +119,6 @@ and a boolean to check if the value has been set. SetProperties sets Properties field to given value. -### SetPropertiesNil - -`func (o *PostTokenOutput) SetPropertiesNil(b bool)` - - SetPropertiesNil sets the value for Properties to be an explicit nil - -### UnsetProperties -`func (o *PostTokenOutput) UnsetProperties()` - -UnsetProperties ensures that no value is present for Properties, not even an explicit nil ### GetType `func (o *PostTokenOutput) GetType() string` diff --git a/products/containerregistry/docs/models/PostTokenProperties.md b/products/containerregistry/docs/models/PostTokenProperties.md index 38066eb..d973756 100644 --- a/products/containerregistry/docs/models/PostTokenProperties.md +++ b/products/containerregistry/docs/models/PostTokenProperties.md @@ -4,7 +4,7 @@ |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| -|**ExpiryDate** | Pointer to [**NullableTime**](time.Time.md) | | [optional] | +|**ExpiryDate** | Pointer to [**time.Time**](time.Time.md) | | [optional] | |**Name** | **string** | | | |**Scopes** | Pointer to [**[]Scope**](Scope.md) | | [optional] | |**Status** | Pointer to **string** | | [optional] | @@ -53,16 +53,6 @@ SetExpiryDate sets ExpiryDate field to given value. HasExpiryDate returns a boolean if a field has been set. -### SetExpiryDateNil - -`func (o *PostTokenProperties) SetExpiryDateNil(b bool)` - - SetExpiryDateNil sets the value for ExpiryDate to be an explicit nil - -### UnsetExpiryDate -`func (o *PostTokenProperties) UnsetExpiryDate()` - -UnsetExpiryDate ensures that no value is present for ExpiryDate, not even an explicit nil ### GetName `func (o *PostTokenProperties) GetName() string` @@ -108,16 +98,6 @@ SetScopes sets Scopes field to given value. HasScopes returns a boolean if a field has been set. -### SetScopesNil - -`func (o *PostTokenProperties) SetScopesNil(b bool)` - - SetScopesNil sets the value for Scopes to be an explicit nil - -### UnsetScopes -`func (o *PostTokenProperties) UnsetScopes()` - -UnsetScopes ensures that no value is present for Scopes, not even an explicit nil ### GetStatus `func (o *PostTokenProperties) GetStatus() string` diff --git a/products/containerregistry/docs/models/Purl.md b/products/containerregistry/docs/models/Purl.md new file mode 100644 index 0000000..0b9cd01 --- /dev/null +++ b/products/containerregistry/docs/models/Purl.md @@ -0,0 +1,90 @@ +# Purl + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Type** | **string** | The affected package type | | +|**Name** | **string** | The affected package name | | +|**Version** | **string** | The affected package version | | + +## Methods + +### NewPurl + +`func NewPurl(type_ string, name string, version string, ) *Purl` + +NewPurl instantiates a new Purl object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPurlWithDefaults + +`func NewPurlWithDefaults() *Purl` + +NewPurlWithDefaults instantiates a new Purl object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *Purl) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Purl) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Purl) SetType(v string)` + +SetType sets Type field to given value. + + +### GetName + +`func (o *Purl) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Purl) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Purl) SetName(v string)` + +SetName sets Name field to given value. + + +### GetVersion + +`func (o *Purl) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *Purl) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *Purl) SetVersion(v string)` + +SetVersion sets Version field to given value. + + + diff --git a/products/containerregistry/docs/models/PutRegistryOutput.md b/products/containerregistry/docs/models/PutRegistryOutput.md index ee0a67f..52fb3fa 100644 --- a/products/containerregistry/docs/models/PutRegistryOutput.md +++ b/products/containerregistry/docs/models/PutRegistryOutput.md @@ -6,15 +6,15 @@ |------------ | ------------- | ------------- | -------------| |**Href** | Pointer to **string** | | [optional] | |**Id** | Pointer to **string** | | [optional] | -|**Metadata** | [**NullableApiResourceMetadata**](ApiResourceMetadata.md) | | | -|**Properties** | [**NullableRegistryProperties**](RegistryProperties.md) | | | +|**Metadata** | [**ApiResourceMetadata**](ApiResourceMetadata.md) | | | +|**Properties** | [**RegistryProperties**](RegistryProperties.md) | | | |**Type** | Pointer to **string** | | [optional] | ## Methods ### NewPutRegistryOutput -`func NewPutRegistryOutput(metadata NullableApiResourceMetadata, properties NullableRegistryProperties, ) *PutRegistryOutput` +`func NewPutRegistryOutput(metadata ApiResourceMetadata, properties RegistryProperties, ) *PutRegistryOutput` NewPutRegistryOutput instantiates a new PutRegistryOutput object This constructor will assign default values to properties that have it defined, @@ -99,16 +99,6 @@ and a boolean to check if the value has been set. SetMetadata sets Metadata field to given value. -### SetMetadataNil - -`func (o *PutRegistryOutput) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *PutRegistryOutput) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil ### GetProperties `func (o *PutRegistryOutput) GetProperties() RegistryProperties` @@ -129,16 +119,6 @@ and a boolean to check if the value has been set. SetProperties sets Properties field to given value. -### SetPropertiesNil - -`func (o *PutRegistryOutput) SetPropertiesNil(b bool)` - - SetPropertiesNil sets the value for Properties to be an explicit nil - -### UnsetProperties -`func (o *PutRegistryOutput) UnsetProperties()` - -UnsetProperties ensures that no value is present for Properties, not even an explicit nil ### GetType `func (o *PutRegistryOutput) GetType() string` diff --git a/products/containerregistry/docs/models/PutTokenOutput.md b/products/containerregistry/docs/models/PutTokenOutput.md index c35eca5..5574863 100644 --- a/products/containerregistry/docs/models/PutTokenOutput.md +++ b/products/containerregistry/docs/models/PutTokenOutput.md @@ -6,15 +6,15 @@ |------------ | ------------- | ------------- | -------------| |**Href** | Pointer to **string** | | [optional] | |**Id** | Pointer to **string** | | [optional] | -|**Metadata** | [**NullableApiResourceMetadata**](ApiResourceMetadata.md) | | | -|**Properties** | [**NullableTokenProperties**](TokenProperties.md) | | | +|**Metadata** | [**ApiResourceMetadata**](ApiResourceMetadata.md) | | | +|**Properties** | [**TokenProperties**](TokenProperties.md) | | | |**Type** | Pointer to **string** | | [optional] | ## Methods ### NewPutTokenOutput -`func NewPutTokenOutput(metadata NullableApiResourceMetadata, properties NullableTokenProperties, ) *PutTokenOutput` +`func NewPutTokenOutput(metadata ApiResourceMetadata, properties TokenProperties, ) *PutTokenOutput` NewPutTokenOutput instantiates a new PutTokenOutput object This constructor will assign default values to properties that have it defined, @@ -99,16 +99,6 @@ and a boolean to check if the value has been set. SetMetadata sets Metadata field to given value. -### SetMetadataNil - -`func (o *PutTokenOutput) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *PutTokenOutput) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil ### GetProperties `func (o *PutTokenOutput) GetProperties() TokenProperties` @@ -129,16 +119,6 @@ and a boolean to check if the value has been set. SetProperties sets Properties field to given value. -### SetPropertiesNil - -`func (o *PutTokenOutput) SetPropertiesNil(b bool)` - - SetPropertiesNil sets the value for Properties to be an explicit nil - -### UnsetProperties -`func (o *PutTokenOutput) UnsetProperties()` - -UnsetProperties ensures that no value is present for Properties, not even an explicit nil ### GetType `func (o *PutTokenOutput) GetType() string` diff --git a/products/containerregistry/docs/models/RegistriesResponse.md b/products/containerregistry/docs/models/RegistriesResponse.md index 28f184e..107950f 100644 --- a/products/containerregistry/docs/models/RegistriesResponse.md +++ b/products/containerregistry/docs/models/RegistriesResponse.md @@ -8,14 +8,14 @@ |**Href** | Pointer to **string** | | [optional] | |**Id** | Pointer to **string** | | [optional] | |**Items** | Pointer to [**[]RegistryResponse**](RegistryResponse.md) | | [optional] | -|**Pagination** | [**Pagination**](Pagination.md) | | | +|**Pagination** | [**RegistryPagination**](RegistryPagination.md) | | | |**Type** | Pointer to **string** | | [optional] | ## Methods ### NewRegistriesResponse -`func NewRegistriesResponse(links PaginationLinks, pagination Pagination, ) *RegistriesResponse` +`func NewRegistriesResponse(links PaginationLinks, pagination RegistryPagination, ) *RegistriesResponse` NewRegistriesResponse instantiates a new RegistriesResponse object This constructor will assign default values to properties that have it defined, @@ -125,32 +125,22 @@ SetItems sets Items field to given value. HasItems returns a boolean if a field has been set. -### SetItemsNil - -`func (o *RegistriesResponse) SetItemsNil(b bool)` - - SetItemsNil sets the value for Items to be an explicit nil - -### UnsetItems -`func (o *RegistriesResponse) UnsetItems()` - -UnsetItems ensures that no value is present for Items, not even an explicit nil ### GetPagination -`func (o *RegistriesResponse) GetPagination() Pagination` +`func (o *RegistriesResponse) GetPagination() RegistryPagination` GetPagination returns the Pagination field if non-nil, zero value otherwise. ### GetPaginationOk -`func (o *RegistriesResponse) GetPaginationOk() (*Pagination, bool)` +`func (o *RegistriesResponse) GetPaginationOk() (*RegistryPagination, bool)` GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPagination -`func (o *RegistriesResponse) SetPagination(v Pagination)` +`func (o *RegistriesResponse) SetPagination(v RegistryPagination)` SetPagination sets Pagination field to given value. diff --git a/products/containerregistry/docs/models/RegistryArtifactsReadList.md b/products/containerregistry/docs/models/RegistryArtifactsReadList.md new file mode 100644 index 0000000..c9bda55 --- /dev/null +++ b/products/containerregistry/docs/models/RegistryArtifactsReadList.md @@ -0,0 +1,179 @@ +# RegistryArtifactsReadList + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Id** | **string** | | | +|**Type** | **string** | | | +|**Href** | **string** | | | +|**Items** | Pointer to [**[]ArtifactRead**](ArtifactRead.md) | | [optional] | +|**Offset** | **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [readonly] | +|**Limit** | **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit). | [readonly] | +|**Links** | [**Links**](Links.md) | | | + +## Methods + +### NewRegistryArtifactsReadList + +`func NewRegistryArtifactsReadList(id string, type_ string, href string, offset int32, limit int32, links Links, ) *RegistryArtifactsReadList` + +NewRegistryArtifactsReadList instantiates a new RegistryArtifactsReadList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRegistryArtifactsReadListWithDefaults + +`func NewRegistryArtifactsReadListWithDefaults() *RegistryArtifactsReadList` + +NewRegistryArtifactsReadListWithDefaults instantiates a new RegistryArtifactsReadList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RegistryArtifactsReadList) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RegistryArtifactsReadList) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RegistryArtifactsReadList) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *RegistryArtifactsReadList) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RegistryArtifactsReadList) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RegistryArtifactsReadList) SetType(v string)` + +SetType sets Type field to given value. + + +### GetHref + +`func (o *RegistryArtifactsReadList) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *RegistryArtifactsReadList) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *RegistryArtifactsReadList) SetHref(v string)` + +SetHref sets Href field to given value. + + +### GetItems + +`func (o *RegistryArtifactsReadList) GetItems() []ArtifactRead` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *RegistryArtifactsReadList) GetItemsOk() (*[]ArtifactRead, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *RegistryArtifactsReadList) SetItems(v []ArtifactRead)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *RegistryArtifactsReadList) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### GetOffset + +`func (o *RegistryArtifactsReadList) GetOffset() int32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *RegistryArtifactsReadList) GetOffsetOk() (*int32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *RegistryArtifactsReadList) SetOffset(v int32)` + +SetOffset sets Offset field to given value. + + +### GetLimit + +`func (o *RegistryArtifactsReadList) GetLimit() int32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *RegistryArtifactsReadList) GetLimitOk() (*int32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *RegistryArtifactsReadList) SetLimit(v int32)` + +SetLimit sets Limit field to given value. + + +### GetLinks + +`func (o *RegistryArtifactsReadList) GetLinks() Links` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *RegistryArtifactsReadList) GetLinksOk() (*Links, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *RegistryArtifactsReadList) SetLinks(v Links)` + +SetLinks sets Links field to given value. + + + diff --git a/products/containerregistry/docs/models/RegistryFeatures.md b/products/containerregistry/docs/models/RegistryFeatures.md new file mode 100644 index 0000000..c49182c --- /dev/null +++ b/products/containerregistry/docs/models/RegistryFeatures.md @@ -0,0 +1,53 @@ +# RegistryFeatures + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**VulnerabilityScanning** | Pointer to [**FeatureVulnerabilityScanning**](FeatureVulnerabilityScanning.md) | | [optional] | + +## Methods + +### NewRegistryFeatures + +`func NewRegistryFeatures() *RegistryFeatures` + +NewRegistryFeatures instantiates a new RegistryFeatures object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRegistryFeaturesWithDefaults + +`func NewRegistryFeaturesWithDefaults() *RegistryFeatures` + +NewRegistryFeaturesWithDefaults instantiates a new RegistryFeatures object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVulnerabilityScanning + +`func (o *RegistryFeatures) GetVulnerabilityScanning() FeatureVulnerabilityScanning` + +GetVulnerabilityScanning returns the VulnerabilityScanning field if non-nil, zero value otherwise. + +### GetVulnerabilityScanningOk + +`func (o *RegistryFeatures) GetVulnerabilityScanningOk() (*FeatureVulnerabilityScanning, bool)` + +GetVulnerabilityScanningOk returns a tuple with the VulnerabilityScanning field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVulnerabilityScanning + +`func (o *RegistryFeatures) SetVulnerabilityScanning(v FeatureVulnerabilityScanning)` + +SetVulnerabilityScanning sets VulnerabilityScanning field to given value. + +### HasVulnerabilityScanning + +`func (o *RegistryFeatures) HasVulnerabilityScanning() bool` + +HasVulnerabilityScanning returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/RegistryPagination.md b/products/containerregistry/docs/models/RegistryPagination.md new file mode 100644 index 0000000..87f2ded --- /dev/null +++ b/products/containerregistry/docs/models/RegistryPagination.md @@ -0,0 +1,69 @@ +# RegistryPagination + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Limit** | **int32** | The maximum number of elements to return (used together with pagination.token for pagination) | | +|**Token** | **string** | An opaque token used to iterate the set of results (used together with limit for pagination) | | + +## Methods + +### NewRegistryPagination + +`func NewRegistryPagination(limit int32, token string, ) *RegistryPagination` + +NewRegistryPagination instantiates a new RegistryPagination object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRegistryPaginationWithDefaults + +`func NewRegistryPaginationWithDefaults() *RegistryPagination` + +NewRegistryPaginationWithDefaults instantiates a new RegistryPagination object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLimit + +`func (o *RegistryPagination) GetLimit() int32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *RegistryPagination) GetLimitOk() (*int32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *RegistryPagination) SetLimit(v int32)` + +SetLimit sets Limit field to given value. + + +### GetToken + +`func (o *RegistryPagination) GetToken() string` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *RegistryPagination) GetTokenOk() (*string, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *RegistryPagination) SetToken(v string)` + +SetToken sets Token field to given value. + + + diff --git a/products/containerregistry/docs/models/RegistryProperties.md b/products/containerregistry/docs/models/RegistryProperties.md index 6113027..268bbae 100644 --- a/products/containerregistry/docs/models/RegistryProperties.md +++ b/products/containerregistry/docs/models/RegistryProperties.md @@ -4,11 +4,13 @@ |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| -|**GarbageCollectionSchedule** | Pointer to [**NullableWeeklySchedule**](WeeklySchedule.md) | | [optional] | +|**GarbageCollectionSchedule** | Pointer to [**WeeklySchedule**](WeeklySchedule.md) | | [optional] | |**Hostname** | Pointer to **string** | | [optional] | |**Location** | **string** | | | |**Name** | **string** | | | -|**StorageUsage** | Pointer to [**NullableStorageUsage**](StorageUsage.md) | | [optional] | +|**StorageUsage** | Pointer to [**StorageUsage**](StorageUsage.md) | | [optional] | +|**Features** | Pointer to [**RegistryFeatures**](RegistryFeatures.md) | | [optional] | +|**ApiSubnetAllowList** | Pointer to **[]string** | Subnets and IPs that are allowed to access the registry API, supports IPv4 and IPv6. Maximum of 25 items may be specified. If no CIDR is given /32 and /128 are assumed for IPv4 and IPv6 respectively. 0.0.0.0/0 can be used to deny all traffic. __Note__: If this list is empty or not set, there are no restrictions. | [optional] | ## Methods @@ -54,16 +56,6 @@ SetGarbageCollectionSchedule sets GarbageCollectionSchedule field to given value HasGarbageCollectionSchedule returns a boolean if a field has been set. -### SetGarbageCollectionScheduleNil - -`func (o *RegistryProperties) SetGarbageCollectionScheduleNil(b bool)` - - SetGarbageCollectionScheduleNil sets the value for GarbageCollectionSchedule to be an explicit nil - -### UnsetGarbageCollectionSchedule -`func (o *RegistryProperties) UnsetGarbageCollectionSchedule()` - -UnsetGarbageCollectionSchedule ensures that no value is present for GarbageCollectionSchedule, not even an explicit nil ### GetHostname `func (o *RegistryProperties) GetHostname() string` @@ -154,14 +146,54 @@ SetStorageUsage sets StorageUsage field to given value. HasStorageUsage returns a boolean if a field has been set. -### SetStorageUsageNil +### GetFeatures + +`func (o *RegistryProperties) GetFeatures() RegistryFeatures` + +GetFeatures returns the Features field if non-nil, zero value otherwise. + +### GetFeaturesOk + +`func (o *RegistryProperties) GetFeaturesOk() (*RegistryFeatures, bool)` + +GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatures + +`func (o *RegistryProperties) SetFeatures(v RegistryFeatures)` + +SetFeatures sets Features field to given value. + +### HasFeatures + +`func (o *RegistryProperties) HasFeatures() bool` + +HasFeatures returns a boolean if a field has been set. + +### GetApiSubnetAllowList + +`func (o *RegistryProperties) GetApiSubnetAllowList() []string` + +GetApiSubnetAllowList returns the ApiSubnetAllowList field if non-nil, zero value otherwise. + +### GetApiSubnetAllowListOk + +`func (o *RegistryProperties) GetApiSubnetAllowListOk() (*[]string, bool)` + +GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiSubnetAllowList + +`func (o *RegistryProperties) SetApiSubnetAllowList(v []string)` + +SetApiSubnetAllowList sets ApiSubnetAllowList field to given value. -`func (o *RegistryProperties) SetStorageUsageNil(b bool)` +### HasApiSubnetAllowList - SetStorageUsageNil sets the value for StorageUsage to be an explicit nil +`func (o *RegistryProperties) HasApiSubnetAllowList() bool` -### UnsetStorageUsage -`func (o *RegistryProperties) UnsetStorageUsage()` +HasApiSubnetAllowList returns a boolean if a field has been set. -UnsetStorageUsage ensures that no value is present for StorageUsage, not even an explicit nil diff --git a/products/containerregistry/docs/models/RegistryResponse.md b/products/containerregistry/docs/models/RegistryResponse.md index d97ce9c..22faac5 100644 --- a/products/containerregistry/docs/models/RegistryResponse.md +++ b/products/containerregistry/docs/models/RegistryResponse.md @@ -6,15 +6,15 @@ |------------ | ------------- | ------------- | -------------| |**Href** | Pointer to **string** | | [optional] | |**Id** | Pointer to **string** | | [optional] | -|**Metadata** | [**NullableApiResourceMetadata**](ApiResourceMetadata.md) | | | -|**Properties** | [**NullableRegistryProperties**](RegistryProperties.md) | | | +|**Metadata** | [**ApiResourceMetadata**](ApiResourceMetadata.md) | | | +|**Properties** | [**RegistryProperties**](RegistryProperties.md) | | | |**Type** | Pointer to **string** | | [optional] | ## Methods ### NewRegistryResponse -`func NewRegistryResponse(metadata NullableApiResourceMetadata, properties NullableRegistryProperties, ) *RegistryResponse` +`func NewRegistryResponse(metadata ApiResourceMetadata, properties RegistryProperties, ) *RegistryResponse` NewRegistryResponse instantiates a new RegistryResponse object This constructor will assign default values to properties that have it defined, @@ -99,16 +99,6 @@ and a boolean to check if the value has been set. SetMetadata sets Metadata field to given value. -### SetMetadataNil - -`func (o *RegistryResponse) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *RegistryResponse) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil ### GetProperties `func (o *RegistryResponse) GetProperties() RegistryProperties` @@ -129,16 +119,6 @@ and a boolean to check if the value has been set. SetProperties sets Properties field to given value. -### SetPropertiesNil - -`func (o *RegistryResponse) SetPropertiesNil(b bool)` - - SetPropertiesNil sets the value for Properties to be an explicit nil - -### UnsetProperties -`func (o *RegistryResponse) UnsetProperties()` - -UnsetProperties ensures that no value is present for Properties, not even an explicit nil ### GetType `func (o *RegistryResponse) GetType() string` diff --git a/products/containerregistry/docs/models/Repository.md b/products/containerregistry/docs/models/Repository.md new file mode 100644 index 0000000..985a705 --- /dev/null +++ b/products/containerregistry/docs/models/Repository.md @@ -0,0 +1,48 @@ +# Repository + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Name** | **string** | | | + +## Methods + +### NewRepository + +`func NewRepository(name string, ) *Repository` + +NewRepository instantiates a new Repository object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryWithDefaults + +`func NewRepositoryWithDefaults() *Repository` + +NewRepositoryWithDefaults instantiates a new Repository object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Repository) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Repository) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Repository) SetName(v string)` + +SetName sets Name field to given value. + + + diff --git a/products/containerregistry/docs/models/RepositoryMetadata.md b/products/containerregistry/docs/models/RepositoryMetadata.md new file mode 100644 index 0000000..9db92a5 --- /dev/null +++ b/products/containerregistry/docs/models/RepositoryMetadata.md @@ -0,0 +1,350 @@ +# RepositoryMetadata + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 creation timestamp. | [optional] [readonly] | +|**CreatedBy** | Pointer to **string** | Unique name of the identity that created the resource. | [optional] [readonly] | +|**CreatedByUserId** | Pointer to **string** | Unique id of the identity that created the resource. | [optional] [readonly] | +|**LastModifiedDate** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 modified timestamp. | [optional] [readonly] | +|**LastModifiedBy** | Pointer to **string** | Unique name of the identity that last modified the resource. | [optional] [readonly] | +|**LastModifiedByUserId** | Pointer to **string** | Unique id of the identity that last modified the resource. | [optional] [readonly] | +|**ResourceURN** | Pointer to **string** | Unique name of the resource. | [optional] [readonly] | +|**ArtifactCount** | **int64** | | | +|**PullCount** | **int64** | | | +|**PushCount** | **int64** | | | +|**LastPulledAt** | Pointer to [**time.Time**](time.Time.md) | | [optional] | +|**LastPushedAt** | Pointer to [**time.Time**](time.Time.md) | | [optional] | +|**LastSeverity** | Pointer to **string** | The CVSS vulnerability severity rating | [optional] | + +## Methods + +### NewRepositoryMetadata + +`func NewRepositoryMetadata(artifactCount int64, pullCount int64, pushCount int64, ) *RepositoryMetadata` + +NewRepositoryMetadata instantiates a new RepositoryMetadata object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryMetadataWithDefaults + +`func NewRepositoryMetadataWithDefaults() *RepositoryMetadata` + +NewRepositoryMetadataWithDefaults instantiates a new RepositoryMetadata object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreatedDate + +`func (o *RepositoryMetadata) GetCreatedDate() time.Time` + +GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. + +### GetCreatedDateOk + +`func (o *RepositoryMetadata) GetCreatedDateOk() (*time.Time, bool)` + +GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedDate + +`func (o *RepositoryMetadata) SetCreatedDate(v time.Time)` + +SetCreatedDate sets CreatedDate field to given value. + +### HasCreatedDate + +`func (o *RepositoryMetadata) HasCreatedDate() bool` + +HasCreatedDate returns a boolean if a field has been set. + +### GetCreatedBy + +`func (o *RepositoryMetadata) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *RepositoryMetadata) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *RepositoryMetadata) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + +### HasCreatedBy + +`func (o *RepositoryMetadata) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### GetCreatedByUserId + +`func (o *RepositoryMetadata) GetCreatedByUserId() string` + +GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. + +### GetCreatedByUserIdOk + +`func (o *RepositoryMetadata) GetCreatedByUserIdOk() (*string, bool)` + +GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByUserId + +`func (o *RepositoryMetadata) SetCreatedByUserId(v string)` + +SetCreatedByUserId sets CreatedByUserId field to given value. + +### HasCreatedByUserId + +`func (o *RepositoryMetadata) HasCreatedByUserId() bool` + +HasCreatedByUserId returns a boolean if a field has been set. + +### GetLastModifiedDate + +`func (o *RepositoryMetadata) GetLastModifiedDate() time.Time` + +GetLastModifiedDate returns the LastModifiedDate field if non-nil, zero value otherwise. + +### GetLastModifiedDateOk + +`func (o *RepositoryMetadata) GetLastModifiedDateOk() (*time.Time, bool)` + +GetLastModifiedDateOk returns a tuple with the LastModifiedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedDate + +`func (o *RepositoryMetadata) SetLastModifiedDate(v time.Time)` + +SetLastModifiedDate sets LastModifiedDate field to given value. + +### HasLastModifiedDate + +`func (o *RepositoryMetadata) HasLastModifiedDate() bool` + +HasLastModifiedDate returns a boolean if a field has been set. + +### GetLastModifiedBy + +`func (o *RepositoryMetadata) GetLastModifiedBy() string` + +GetLastModifiedBy returns the LastModifiedBy field if non-nil, zero value otherwise. + +### GetLastModifiedByOk + +`func (o *RepositoryMetadata) GetLastModifiedByOk() (*string, bool)` + +GetLastModifiedByOk returns a tuple with the LastModifiedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedBy + +`func (o *RepositoryMetadata) SetLastModifiedBy(v string)` + +SetLastModifiedBy sets LastModifiedBy field to given value. + +### HasLastModifiedBy + +`func (o *RepositoryMetadata) HasLastModifiedBy() bool` + +HasLastModifiedBy returns a boolean if a field has been set. + +### GetLastModifiedByUserId + +`func (o *RepositoryMetadata) GetLastModifiedByUserId() string` + +GetLastModifiedByUserId returns the LastModifiedByUserId field if non-nil, zero value otherwise. + +### GetLastModifiedByUserIdOk + +`func (o *RepositoryMetadata) GetLastModifiedByUserIdOk() (*string, bool)` + +GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedByUserId + +`func (o *RepositoryMetadata) SetLastModifiedByUserId(v string)` + +SetLastModifiedByUserId sets LastModifiedByUserId field to given value. + +### HasLastModifiedByUserId + +`func (o *RepositoryMetadata) HasLastModifiedByUserId() bool` + +HasLastModifiedByUserId returns a boolean if a field has been set. + +### GetResourceURN + +`func (o *RepositoryMetadata) GetResourceURN() string` + +GetResourceURN returns the ResourceURN field if non-nil, zero value otherwise. + +### GetResourceURNOk + +`func (o *RepositoryMetadata) GetResourceURNOk() (*string, bool)` + +GetResourceURNOk returns a tuple with the ResourceURN field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceURN + +`func (o *RepositoryMetadata) SetResourceURN(v string)` + +SetResourceURN sets ResourceURN field to given value. + +### HasResourceURN + +`func (o *RepositoryMetadata) HasResourceURN() bool` + +HasResourceURN returns a boolean if a field has been set. + +### GetArtifactCount + +`func (o *RepositoryMetadata) GetArtifactCount() int64` + +GetArtifactCount returns the ArtifactCount field if non-nil, zero value otherwise. + +### GetArtifactCountOk + +`func (o *RepositoryMetadata) GetArtifactCountOk() (*int64, bool)` + +GetArtifactCountOk returns a tuple with the ArtifactCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArtifactCount + +`func (o *RepositoryMetadata) SetArtifactCount(v int64)` + +SetArtifactCount sets ArtifactCount field to given value. + + +### GetPullCount + +`func (o *RepositoryMetadata) GetPullCount() int64` + +GetPullCount returns the PullCount field if non-nil, zero value otherwise. + +### GetPullCountOk + +`func (o *RepositoryMetadata) GetPullCountOk() (*int64, bool)` + +GetPullCountOk returns a tuple with the PullCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPullCount + +`func (o *RepositoryMetadata) SetPullCount(v int64)` + +SetPullCount sets PullCount field to given value. + + +### GetPushCount + +`func (o *RepositoryMetadata) GetPushCount() int64` + +GetPushCount returns the PushCount field if non-nil, zero value otherwise. + +### GetPushCountOk + +`func (o *RepositoryMetadata) GetPushCountOk() (*int64, bool)` + +GetPushCountOk returns a tuple with the PushCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPushCount + +`func (o *RepositoryMetadata) SetPushCount(v int64)` + +SetPushCount sets PushCount field to given value. + + +### GetLastPulledAt + +`func (o *RepositoryMetadata) GetLastPulledAt() time.Time` + +GetLastPulledAt returns the LastPulledAt field if non-nil, zero value otherwise. + +### GetLastPulledAtOk + +`func (o *RepositoryMetadata) GetLastPulledAtOk() (*time.Time, bool)` + +GetLastPulledAtOk returns a tuple with the LastPulledAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastPulledAt + +`func (o *RepositoryMetadata) SetLastPulledAt(v time.Time)` + +SetLastPulledAt sets LastPulledAt field to given value. + +### HasLastPulledAt + +`func (o *RepositoryMetadata) HasLastPulledAt() bool` + +HasLastPulledAt returns a boolean if a field has been set. + +### GetLastPushedAt + +`func (o *RepositoryMetadata) GetLastPushedAt() time.Time` + +GetLastPushedAt returns the LastPushedAt field if non-nil, zero value otherwise. + +### GetLastPushedAtOk + +`func (o *RepositoryMetadata) GetLastPushedAtOk() (*time.Time, bool)` + +GetLastPushedAtOk returns a tuple with the LastPushedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastPushedAt + +`func (o *RepositoryMetadata) SetLastPushedAt(v time.Time)` + +SetLastPushedAt sets LastPushedAt field to given value. + +### HasLastPushedAt + +`func (o *RepositoryMetadata) HasLastPushedAt() bool` + +HasLastPushedAt returns a boolean if a field has been set. + +### GetLastSeverity + +`func (o *RepositoryMetadata) GetLastSeverity() string` + +GetLastSeverity returns the LastSeverity field if non-nil, zero value otherwise. + +### GetLastSeverityOk + +`func (o *RepositoryMetadata) GetLastSeverityOk() (*string, bool)` + +GetLastSeverityOk returns a tuple with the LastSeverity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeverity + +`func (o *RepositoryMetadata) SetLastSeverity(v string)` + +SetLastSeverity sets LastSeverity field to given value. + +### HasLastSeverity + +`func (o *RepositoryMetadata) HasLastSeverity() bool` + +HasLastSeverity returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/RepositoryMetadataAllOf.md b/products/containerregistry/docs/models/RepositoryMetadataAllOf.md new file mode 100644 index 0000000..1828bd2 --- /dev/null +++ b/products/containerregistry/docs/models/RepositoryMetadataAllOf.md @@ -0,0 +1,168 @@ +# RepositoryMetadataAllOf + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**ArtifactCount** | **int64** | | | +|**PullCount** | **int64** | | | +|**PushCount** | **int64** | | | +|**LastPulledAt** | Pointer to [**time.Time**](time.Time.md) | | [optional] | +|**LastPushedAt** | Pointer to [**time.Time**](time.Time.md) | | [optional] | +|**LastSeverity** | Pointer to **string** | The CVSS vulnerability severity rating | [optional] | + +## Methods + +### NewRepositoryMetadataAllOf + +`func NewRepositoryMetadataAllOf(artifactCount int64, pullCount int64, pushCount int64, ) *RepositoryMetadataAllOf` + +NewRepositoryMetadataAllOf instantiates a new RepositoryMetadataAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryMetadataAllOfWithDefaults + +`func NewRepositoryMetadataAllOfWithDefaults() *RepositoryMetadataAllOf` + +NewRepositoryMetadataAllOfWithDefaults instantiates a new RepositoryMetadataAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetArtifactCount + +`func (o *RepositoryMetadataAllOf) GetArtifactCount() int64` + +GetArtifactCount returns the ArtifactCount field if non-nil, zero value otherwise. + +### GetArtifactCountOk + +`func (o *RepositoryMetadataAllOf) GetArtifactCountOk() (*int64, bool)` + +GetArtifactCountOk returns a tuple with the ArtifactCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArtifactCount + +`func (o *RepositoryMetadataAllOf) SetArtifactCount(v int64)` + +SetArtifactCount sets ArtifactCount field to given value. + + +### GetPullCount + +`func (o *RepositoryMetadataAllOf) GetPullCount() int64` + +GetPullCount returns the PullCount field if non-nil, zero value otherwise. + +### GetPullCountOk + +`func (o *RepositoryMetadataAllOf) GetPullCountOk() (*int64, bool)` + +GetPullCountOk returns a tuple with the PullCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPullCount + +`func (o *RepositoryMetadataAllOf) SetPullCount(v int64)` + +SetPullCount sets PullCount field to given value. + + +### GetPushCount + +`func (o *RepositoryMetadataAllOf) GetPushCount() int64` + +GetPushCount returns the PushCount field if non-nil, zero value otherwise. + +### GetPushCountOk + +`func (o *RepositoryMetadataAllOf) GetPushCountOk() (*int64, bool)` + +GetPushCountOk returns a tuple with the PushCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPushCount + +`func (o *RepositoryMetadataAllOf) SetPushCount(v int64)` + +SetPushCount sets PushCount field to given value. + + +### GetLastPulledAt + +`func (o *RepositoryMetadataAllOf) GetLastPulledAt() time.Time` + +GetLastPulledAt returns the LastPulledAt field if non-nil, zero value otherwise. + +### GetLastPulledAtOk + +`func (o *RepositoryMetadataAllOf) GetLastPulledAtOk() (*time.Time, bool)` + +GetLastPulledAtOk returns a tuple with the LastPulledAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastPulledAt + +`func (o *RepositoryMetadataAllOf) SetLastPulledAt(v time.Time)` + +SetLastPulledAt sets LastPulledAt field to given value. + +### HasLastPulledAt + +`func (o *RepositoryMetadataAllOf) HasLastPulledAt() bool` + +HasLastPulledAt returns a boolean if a field has been set. + +### GetLastPushedAt + +`func (o *RepositoryMetadataAllOf) GetLastPushedAt() time.Time` + +GetLastPushedAt returns the LastPushedAt field if non-nil, zero value otherwise. + +### GetLastPushedAtOk + +`func (o *RepositoryMetadataAllOf) GetLastPushedAtOk() (*time.Time, bool)` + +GetLastPushedAtOk returns a tuple with the LastPushedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastPushedAt + +`func (o *RepositoryMetadataAllOf) SetLastPushedAt(v time.Time)` + +SetLastPushedAt sets LastPushedAt field to given value. + +### HasLastPushedAt + +`func (o *RepositoryMetadataAllOf) HasLastPushedAt() bool` + +HasLastPushedAt returns a boolean if a field has been set. + +### GetLastSeverity + +`func (o *RepositoryMetadataAllOf) GetLastSeverity() string` + +GetLastSeverity returns the LastSeverity field if non-nil, zero value otherwise. + +### GetLastSeverityOk + +`func (o *RepositoryMetadataAllOf) GetLastSeverityOk() (*string, bool)` + +GetLastSeverityOk returns a tuple with the LastSeverity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeverity + +`func (o *RepositoryMetadataAllOf) SetLastSeverity(v string)` + +SetLastSeverity sets LastSeverity field to given value. + +### HasLastSeverity + +`func (o *RepositoryMetadataAllOf) HasLastSeverity() bool` + +HasLastSeverity returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/RepositoryRead.md b/products/containerregistry/docs/models/RepositoryRead.md new file mode 100644 index 0000000..636a03b --- /dev/null +++ b/products/containerregistry/docs/models/RepositoryRead.md @@ -0,0 +1,132 @@ +# RepositoryRead + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Id** | **string** | | | +|**Type** | **string** | | | +|**Href** | **string** | | | +|**Metadata** | [**RepositoryMetadata**](RepositoryMetadata.md) | | | +|**Properties** | [**Repository**](Repository.md) | | | + +## Methods + +### NewRepositoryRead + +`func NewRepositoryRead(id string, type_ string, href string, metadata RepositoryMetadata, properties Repository, ) *RepositoryRead` + +NewRepositoryRead instantiates a new RepositoryRead object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryReadWithDefaults + +`func NewRepositoryReadWithDefaults() *RepositoryRead` + +NewRepositoryReadWithDefaults instantiates a new RepositoryRead object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RepositoryRead) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RepositoryRead) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RepositoryRead) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *RepositoryRead) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RepositoryRead) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RepositoryRead) SetType(v string)` + +SetType sets Type field to given value. + + +### GetHref + +`func (o *RepositoryRead) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *RepositoryRead) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *RepositoryRead) SetHref(v string)` + +SetHref sets Href field to given value. + + +### GetMetadata + +`func (o *RepositoryRead) GetMetadata() RepositoryMetadata` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *RepositoryRead) GetMetadataOk() (*RepositoryMetadata, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *RepositoryRead) SetMetadata(v RepositoryMetadata)` + +SetMetadata sets Metadata field to given value. + + +### GetProperties + +`func (o *RepositoryRead) GetProperties() Repository` + +GetProperties returns the Properties field if non-nil, zero value otherwise. + +### GetPropertiesOk + +`func (o *RepositoryRead) GetPropertiesOk() (*Repository, bool)` + +GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProperties + +`func (o *RepositoryRead) SetProperties(v Repository)` + +SetProperties sets Properties field to given value. + + + diff --git a/products/containerregistry/docs/models/RepositoryReadList.md b/products/containerregistry/docs/models/RepositoryReadList.md new file mode 100644 index 0000000..02001f4 --- /dev/null +++ b/products/containerregistry/docs/models/RepositoryReadList.md @@ -0,0 +1,179 @@ +# RepositoryReadList + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Id** | **string** | | | +|**Type** | **string** | | | +|**Href** | **string** | | | +|**Items** | Pointer to [**[]RepositoryRead**](RepositoryRead.md) | | [optional] | +|**Offset** | **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [readonly] | +|**Limit** | **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit). | [readonly] | +|**Links** | [**Links**](Links.md) | | | + +## Methods + +### NewRepositoryReadList + +`func NewRepositoryReadList(id string, type_ string, href string, offset int32, limit int32, links Links, ) *RepositoryReadList` + +NewRepositoryReadList instantiates a new RepositoryReadList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryReadListWithDefaults + +`func NewRepositoryReadListWithDefaults() *RepositoryReadList` + +NewRepositoryReadListWithDefaults instantiates a new RepositoryReadList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RepositoryReadList) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RepositoryReadList) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RepositoryReadList) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *RepositoryReadList) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RepositoryReadList) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RepositoryReadList) SetType(v string)` + +SetType sets Type field to given value. + + +### GetHref + +`func (o *RepositoryReadList) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *RepositoryReadList) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *RepositoryReadList) SetHref(v string)` + +SetHref sets Href field to given value. + + +### GetItems + +`func (o *RepositoryReadList) GetItems() []RepositoryRead` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *RepositoryReadList) GetItemsOk() (*[]RepositoryRead, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *RepositoryReadList) SetItems(v []RepositoryRead)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *RepositoryReadList) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### GetOffset + +`func (o *RepositoryReadList) GetOffset() int32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *RepositoryReadList) GetOffsetOk() (*int32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *RepositoryReadList) SetOffset(v int32)` + +SetOffset sets Offset field to given value. + + +### GetLimit + +`func (o *RepositoryReadList) GetLimit() int32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *RepositoryReadList) GetLimitOk() (*int32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *RepositoryReadList) SetLimit(v int32)` + +SetLimit sets Limit field to given value. + + +### GetLinks + +`func (o *RepositoryReadList) GetLinks() Links` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *RepositoryReadList) GetLinksOk() (*Links, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *RepositoryReadList) SetLinks(v Links)` + +SetLinks sets Links field to given value. + + + diff --git a/products/containerregistry/docs/models/Scope.md b/products/containerregistry/docs/models/Scope.md index 3ee1503..12a8f2b 100644 --- a/products/containerregistry/docs/models/Scope.md +++ b/products/containerregistry/docs/models/Scope.md @@ -47,16 +47,6 @@ and a boolean to check if the value has been set. SetActions sets Actions field to given value. -### SetActionsNil - -`func (o *Scope) SetActionsNil(b bool)` - - SetActionsNil sets the value for Actions to be an explicit nil - -### UnsetActions -`func (o *Scope) UnsetActions()` - -UnsetActions ensures that no value is present for Actions, not even an explicit nil ### GetName `func (o *Scope) GetName() string` diff --git a/products/containerregistry/docs/models/StorageUsage.md b/products/containerregistry/docs/models/StorageUsage.md index 96e5fa7..4bf5424 100644 --- a/products/containerregistry/docs/models/StorageUsage.md +++ b/products/containerregistry/docs/models/StorageUsage.md @@ -4,14 +4,14 @@ |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| -|**Bytes** | **NullableInt32** | | | -|**UpdatedAt** | Pointer to [**NullableTime**](time.Time.md) | | [optional] | +|**Bytes** | **int64** | | | +|**UpdatedAt** | Pointer to [**time.Time**](time.Time.md) | | [optional] | ## Methods ### NewStorageUsage -`func NewStorageUsage(bytes NullableInt32, ) *StorageUsage` +`func NewStorageUsage(bytes int64, ) *StorageUsage` NewStorageUsage instantiates a new StorageUsage object This constructor will assign default values to properties that have it defined, @@ -28,34 +28,24 @@ but it doesn't guarantee that properties required by API are set ### GetBytes -`func (o *StorageUsage) GetBytes() int32` +`func (o *StorageUsage) GetBytes() int64` GetBytes returns the Bytes field if non-nil, zero value otherwise. ### GetBytesOk -`func (o *StorageUsage) GetBytesOk() (*int32, bool)` +`func (o *StorageUsage) GetBytesOk() (*int64, bool)` GetBytesOk returns a tuple with the Bytes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBytes -`func (o *StorageUsage) SetBytes(v int32)` +`func (o *StorageUsage) SetBytes(v int64)` SetBytes sets Bytes field to given value. -### SetBytesNil - -`func (o *StorageUsage) SetBytesNil(b bool)` - - SetBytesNil sets the value for Bytes to be an explicit nil - -### UnsetBytes -`func (o *StorageUsage) UnsetBytes()` - -UnsetBytes ensures that no value is present for Bytes, not even an explicit nil ### GetUpdatedAt `func (o *StorageUsage) GetUpdatedAt() time.Time` @@ -81,14 +71,4 @@ SetUpdatedAt sets UpdatedAt field to given value. HasUpdatedAt returns a boolean if a field has been set. -### SetUpdatedAtNil - -`func (o *StorageUsage) SetUpdatedAtNil(b bool)` - - SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil - -### UnsetUpdatedAt -`func (o *StorageUsage) UnsetUpdatedAt()` - -UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil diff --git a/products/containerregistry/docs/models/TokenProperties.md b/products/containerregistry/docs/models/TokenProperties.md index 6f51e3b..16ca332 100644 --- a/products/containerregistry/docs/models/TokenProperties.md +++ b/products/containerregistry/docs/models/TokenProperties.md @@ -4,8 +4,8 @@ |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| -|**Credentials** | [**NullableCredentials**](Credentials.md) | | | -|**ExpiryDate** | Pointer to [**NullableTime**](time.Time.md) | | [optional] | +|**Credentials** | [**Credentials**](Credentials.md) | | | +|**ExpiryDate** | Pointer to [**time.Time**](time.Time.md) | | [optional] | |**Name** | **string** | | | |**Scopes** | Pointer to [**[]Scope**](Scope.md) | | [optional] | |**Status** | Pointer to **string** | | [optional] | @@ -14,7 +14,7 @@ ### NewTokenProperties -`func NewTokenProperties(credentials NullableCredentials, name string, ) *TokenProperties` +`func NewTokenProperties(credentials Credentials, name string, ) *TokenProperties` NewTokenProperties instantiates a new TokenProperties object This constructor will assign default values to properties that have it defined, @@ -49,16 +49,6 @@ and a boolean to check if the value has been set. SetCredentials sets Credentials field to given value. -### SetCredentialsNil - -`func (o *TokenProperties) SetCredentialsNil(b bool)` - - SetCredentialsNil sets the value for Credentials to be an explicit nil - -### UnsetCredentials -`func (o *TokenProperties) UnsetCredentials()` - -UnsetCredentials ensures that no value is present for Credentials, not even an explicit nil ### GetExpiryDate `func (o *TokenProperties) GetExpiryDate() time.Time` @@ -84,16 +74,6 @@ SetExpiryDate sets ExpiryDate field to given value. HasExpiryDate returns a boolean if a field has been set. -### SetExpiryDateNil - -`func (o *TokenProperties) SetExpiryDateNil(b bool)` - - SetExpiryDateNil sets the value for ExpiryDate to be an explicit nil - -### UnsetExpiryDate -`func (o *TokenProperties) UnsetExpiryDate()` - -UnsetExpiryDate ensures that no value is present for ExpiryDate, not even an explicit nil ### GetName `func (o *TokenProperties) GetName() string` @@ -139,16 +119,6 @@ SetScopes sets Scopes field to given value. HasScopes returns a boolean if a field has been set. -### SetScopesNil - -`func (o *TokenProperties) SetScopesNil(b bool)` - - SetScopesNil sets the value for Scopes to be an explicit nil - -### UnsetScopes -`func (o *TokenProperties) UnsetScopes()` - -UnsetScopes ensures that no value is present for Scopes, not even an explicit nil ### GetStatus `func (o *TokenProperties) GetStatus() string` diff --git a/products/containerregistry/docs/models/TokenResponse.md b/products/containerregistry/docs/models/TokenResponse.md index 4a72f38..76afd07 100644 --- a/products/containerregistry/docs/models/TokenResponse.md +++ b/products/containerregistry/docs/models/TokenResponse.md @@ -6,15 +6,15 @@ |------------ | ------------- | ------------- | -------------| |**Href** | Pointer to **string** | | [optional] | |**Id** | Pointer to **string** | | [optional] | -|**Metadata** | [**NullableApiResourceMetadata**](ApiResourceMetadata.md) | | | -|**Properties** | [**NullableTokenProperties**](TokenProperties.md) | | | +|**Metadata** | [**ApiResourceMetadata**](ApiResourceMetadata.md) | | | +|**Properties** | [**TokenProperties**](TokenProperties.md) | | | |**Type** | Pointer to **string** | | [optional] | ## Methods ### NewTokenResponse -`func NewTokenResponse(metadata NullableApiResourceMetadata, properties NullableTokenProperties, ) *TokenResponse` +`func NewTokenResponse(metadata ApiResourceMetadata, properties TokenProperties, ) *TokenResponse` NewTokenResponse instantiates a new TokenResponse object This constructor will assign default values to properties that have it defined, @@ -99,16 +99,6 @@ and a boolean to check if the value has been set. SetMetadata sets Metadata field to given value. -### SetMetadataNil - -`func (o *TokenResponse) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *TokenResponse) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil ### GetProperties `func (o *TokenResponse) GetProperties() TokenProperties` @@ -129,16 +119,6 @@ and a boolean to check if the value has been set. SetProperties sets Properties field to given value. -### SetPropertiesNil - -`func (o *TokenResponse) SetPropertiesNil(b bool)` - - SetPropertiesNil sets the value for Properties to be an explicit nil - -### UnsetProperties -`func (o *TokenResponse) UnsetProperties()` - -UnsetProperties ensures that no value is present for Properties, not even an explicit nil ### GetType `func (o *TokenResponse) GetType() string` diff --git a/products/containerregistry/docs/models/TokensResponse.md b/products/containerregistry/docs/models/TokensResponse.md index 951cf63..8b30cd7 100644 --- a/products/containerregistry/docs/models/TokensResponse.md +++ b/products/containerregistry/docs/models/TokensResponse.md @@ -148,16 +148,6 @@ SetItems sets Items field to given value. HasItems returns a boolean if a field has been set. -### SetItemsNil - -`func (o *TokensResponse) SetItemsNil(b bool)` - - SetItemsNil sets the value for Items to be an explicit nil - -### UnsetItems -`func (o *TokensResponse) UnsetItems()` - -UnsetItems ensures that no value is present for Items, not even an explicit nil ### GetLimit `func (o *TokensResponse) GetLimit() int32` diff --git a/products/containerregistry/docs/models/Vulnerability.md b/products/containerregistry/docs/models/Vulnerability.md new file mode 100644 index 0000000..0b74041 --- /dev/null +++ b/products/containerregistry/docs/models/Vulnerability.md @@ -0,0 +1,205 @@ +# Vulnerability + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Description** | **string** | A description of the vulnerability as provided by the source. | | +|**Recommendations** | Pointer to **string** | Recommendations for the vulnerability as provided by the source. | [optional] | +|**DataSource** | [**VulnerabilityDataSource**](VulnerabilityDataSource.md) | | | +|**Fixable** | **bool** | Indicates whether the vulnerability can be fixed by updating the affected package. | | +|**Affects** | [**[]Purl**](Purl.md) | | | +|**References** | Pointer to **[]string** | Published advisories of the vulnerability if provided. | [optional] | +|**Severity** | **string** | The CVSS vulnerability severity rating | | +|**Score** | **float32** | The CVSS score of the vulnerability | | + +## Methods + +### NewVulnerability + +`func NewVulnerability(description string, dataSource VulnerabilityDataSource, fixable bool, affects []Purl, severity string, score float32, ) *Vulnerability` + +NewVulnerability instantiates a new Vulnerability object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityWithDefaults + +`func NewVulnerabilityWithDefaults() *Vulnerability` + +NewVulnerabilityWithDefaults instantiates a new Vulnerability object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *Vulnerability) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Vulnerability) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Vulnerability) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetRecommendations + +`func (o *Vulnerability) GetRecommendations() string` + +GetRecommendations returns the Recommendations field if non-nil, zero value otherwise. + +### GetRecommendationsOk + +`func (o *Vulnerability) GetRecommendationsOk() (*string, bool)` + +GetRecommendationsOk returns a tuple with the Recommendations field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecommendations + +`func (o *Vulnerability) SetRecommendations(v string)` + +SetRecommendations sets Recommendations field to given value. + +### HasRecommendations + +`func (o *Vulnerability) HasRecommendations() bool` + +HasRecommendations returns a boolean if a field has been set. + +### GetDataSource + +`func (o *Vulnerability) GetDataSource() VulnerabilityDataSource` + +GetDataSource returns the DataSource field if non-nil, zero value otherwise. + +### GetDataSourceOk + +`func (o *Vulnerability) GetDataSourceOk() (*VulnerabilityDataSource, bool)` + +GetDataSourceOk returns a tuple with the DataSource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataSource + +`func (o *Vulnerability) SetDataSource(v VulnerabilityDataSource)` + +SetDataSource sets DataSource field to given value. + + +### GetFixable + +`func (o *Vulnerability) GetFixable() bool` + +GetFixable returns the Fixable field if non-nil, zero value otherwise. + +### GetFixableOk + +`func (o *Vulnerability) GetFixableOk() (*bool, bool)` + +GetFixableOk returns a tuple with the Fixable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFixable + +`func (o *Vulnerability) SetFixable(v bool)` + +SetFixable sets Fixable field to given value. + + +### GetAffects + +`func (o *Vulnerability) GetAffects() []Purl` + +GetAffects returns the Affects field if non-nil, zero value otherwise. + +### GetAffectsOk + +`func (o *Vulnerability) GetAffectsOk() (*[]Purl, bool)` + +GetAffectsOk returns a tuple with the Affects field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAffects + +`func (o *Vulnerability) SetAffects(v []Purl)` + +SetAffects sets Affects field to given value. + + +### GetReferences + +`func (o *Vulnerability) GetReferences() []string` + +GetReferences returns the References field if non-nil, zero value otherwise. + +### GetReferencesOk + +`func (o *Vulnerability) GetReferencesOk() (*[]string, bool)` + +GetReferencesOk returns a tuple with the References field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferences + +`func (o *Vulnerability) SetReferences(v []string)` + +SetReferences sets References field to given value. + +### HasReferences + +`func (o *Vulnerability) HasReferences() bool` + +HasReferences returns a boolean if a field has been set. + +### GetSeverity + +`func (o *Vulnerability) GetSeverity() string` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *Vulnerability) GetSeverityOk() (*string, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *Vulnerability) SetSeverity(v string)` + +SetSeverity sets Severity field to given value. + + +### GetScore + +`func (o *Vulnerability) GetScore() float32` + +GetScore returns the Score field if non-nil, zero value otherwise. + +### GetScoreOk + +`func (o *Vulnerability) GetScoreOk() (*float32, bool)` + +GetScoreOk returns a tuple with the Score field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScore + +`func (o *Vulnerability) SetScore(v float32)` + +SetScore sets Score field to given value. + + + diff --git a/products/containerregistry/docs/models/VulnerabilityDataSource.md b/products/containerregistry/docs/models/VulnerabilityDataSource.md new file mode 100644 index 0000000..e85c836 --- /dev/null +++ b/products/containerregistry/docs/models/VulnerabilityDataSource.md @@ -0,0 +1,79 @@ +# VulnerabilityDataSource + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Id** | Pointer to **string** | The id of the source. | [optional] | +|**Url** | Pointer to **string** | The URL of the source. | [optional] | + +## Methods + +### NewVulnerabilityDataSource + +`func NewVulnerabilityDataSource() *VulnerabilityDataSource` + +NewVulnerabilityDataSource instantiates a new VulnerabilityDataSource object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityDataSourceWithDefaults + +`func NewVulnerabilityDataSourceWithDefaults() *VulnerabilityDataSource` + +NewVulnerabilityDataSourceWithDefaults instantiates a new VulnerabilityDataSource object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *VulnerabilityDataSource) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *VulnerabilityDataSource) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *VulnerabilityDataSource) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *VulnerabilityDataSource) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetUrl + +`func (o *VulnerabilityDataSource) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *VulnerabilityDataSource) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *VulnerabilityDataSource) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *VulnerabilityDataSource) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/VulnerabilityMetadata.md b/products/containerregistry/docs/models/VulnerabilityMetadata.md new file mode 100644 index 0000000..04a1f0a --- /dev/null +++ b/products/containerregistry/docs/models/VulnerabilityMetadata.md @@ -0,0 +1,74 @@ +# VulnerabilityMetadata + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**PublishedAt** | [**time.Time**](time.Time.md) | The date and time the vulnerability was published | | +|**UpdatedAt** | Pointer to [**time.Time**](time.Time.md) | The date and time the vulnerability was last updated | [optional] | + +## Methods + +### NewVulnerabilityMetadata + +`func NewVulnerabilityMetadata(publishedAt time.Time, ) *VulnerabilityMetadata` + +NewVulnerabilityMetadata instantiates a new VulnerabilityMetadata object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityMetadataWithDefaults + +`func NewVulnerabilityMetadataWithDefaults() *VulnerabilityMetadata` + +NewVulnerabilityMetadataWithDefaults instantiates a new VulnerabilityMetadata object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPublishedAt + +`func (o *VulnerabilityMetadata) GetPublishedAt() time.Time` + +GetPublishedAt returns the PublishedAt field if non-nil, zero value otherwise. + +### GetPublishedAtOk + +`func (o *VulnerabilityMetadata) GetPublishedAtOk() (*time.Time, bool)` + +GetPublishedAtOk returns a tuple with the PublishedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublishedAt + +`func (o *VulnerabilityMetadata) SetPublishedAt(v time.Time)` + +SetPublishedAt sets PublishedAt field to given value. + + +### GetUpdatedAt + +`func (o *VulnerabilityMetadata) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *VulnerabilityMetadata) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *VulnerabilityMetadata) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *VulnerabilityMetadata) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + diff --git a/products/containerregistry/docs/models/VulnerabilityRead.md b/products/containerregistry/docs/models/VulnerabilityRead.md new file mode 100644 index 0000000..0b1b8e0 --- /dev/null +++ b/products/containerregistry/docs/models/VulnerabilityRead.md @@ -0,0 +1,132 @@ +# VulnerabilityRead + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Id** | **string** | The ID of the vulnerability allocated by the advisory database | | +|**Type** | **string** | | | +|**Href** | **string** | | | +|**Metadata** | [**VulnerabilityMetadata**](VulnerabilityMetadata.md) | | | +|**Properties** | [**Vulnerability**](Vulnerability.md) | | | + +## Methods + +### NewVulnerabilityRead + +`func NewVulnerabilityRead(id string, type_ string, href string, metadata VulnerabilityMetadata, properties Vulnerability, ) *VulnerabilityRead` + +NewVulnerabilityRead instantiates a new VulnerabilityRead object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityReadWithDefaults + +`func NewVulnerabilityReadWithDefaults() *VulnerabilityRead` + +NewVulnerabilityReadWithDefaults instantiates a new VulnerabilityRead object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *VulnerabilityRead) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *VulnerabilityRead) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *VulnerabilityRead) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *VulnerabilityRead) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *VulnerabilityRead) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *VulnerabilityRead) SetType(v string)` + +SetType sets Type field to given value. + + +### GetHref + +`func (o *VulnerabilityRead) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *VulnerabilityRead) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *VulnerabilityRead) SetHref(v string)` + +SetHref sets Href field to given value. + + +### GetMetadata + +`func (o *VulnerabilityRead) GetMetadata() VulnerabilityMetadata` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *VulnerabilityRead) GetMetadataOk() (*VulnerabilityMetadata, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *VulnerabilityRead) SetMetadata(v VulnerabilityMetadata)` + +SetMetadata sets Metadata field to given value. + + +### GetProperties + +`func (o *VulnerabilityRead) GetProperties() Vulnerability` + +GetProperties returns the Properties field if non-nil, zero value otherwise. + +### GetPropertiesOk + +`func (o *VulnerabilityRead) GetPropertiesOk() (*Vulnerability, bool)` + +GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProperties + +`func (o *VulnerabilityRead) SetProperties(v Vulnerability)` + +SetProperties sets Properties field to given value. + + + diff --git a/products/containerregistry/docs/models/VulnerabilityReadList.md b/products/containerregistry/docs/models/VulnerabilityReadList.md new file mode 100644 index 0000000..ae5887d --- /dev/null +++ b/products/containerregistry/docs/models/VulnerabilityReadList.md @@ -0,0 +1,179 @@ +# VulnerabilityReadList + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**Id** | **string** | | | +|**Type** | **string** | | | +|**Href** | **string** | | | +|**Items** | Pointer to [**[]VulnerabilityRead**](VulnerabilityRead.md) | | [optional] | +|**Offset** | **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [readonly] | +|**Limit** | **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit). | [readonly] | +|**Links** | [**Links**](Links.md) | | | + +## Methods + +### NewVulnerabilityReadList + +`func NewVulnerabilityReadList(id string, type_ string, href string, offset int32, limit int32, links Links, ) *VulnerabilityReadList` + +NewVulnerabilityReadList instantiates a new VulnerabilityReadList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVulnerabilityReadListWithDefaults + +`func NewVulnerabilityReadListWithDefaults() *VulnerabilityReadList` + +NewVulnerabilityReadListWithDefaults instantiates a new VulnerabilityReadList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *VulnerabilityReadList) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *VulnerabilityReadList) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *VulnerabilityReadList) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *VulnerabilityReadList) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *VulnerabilityReadList) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *VulnerabilityReadList) SetType(v string)` + +SetType sets Type field to given value. + + +### GetHref + +`func (o *VulnerabilityReadList) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *VulnerabilityReadList) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *VulnerabilityReadList) SetHref(v string)` + +SetHref sets Href field to given value. + + +### GetItems + +`func (o *VulnerabilityReadList) GetItems() []VulnerabilityRead` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *VulnerabilityReadList) GetItemsOk() (*[]VulnerabilityRead, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *VulnerabilityReadList) SetItems(v []VulnerabilityRead)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *VulnerabilityReadList) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### GetOffset + +`func (o *VulnerabilityReadList) GetOffset() int32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *VulnerabilityReadList) GetOffsetOk() (*int32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *VulnerabilityReadList) SetOffset(v int32)` + +SetOffset sets Offset field to given value. + + +### GetLimit + +`func (o *VulnerabilityReadList) GetLimit() int32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *VulnerabilityReadList) GetLimitOk() (*int32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *VulnerabilityReadList) SetLimit(v int32)` + +SetLimit sets Limit field to given value. + + +### GetLinks + +`func (o *VulnerabilityReadList) GetLinks() Links` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *VulnerabilityReadList) GetLinksOk() (*Links, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *VulnerabilityReadList) SetLinks(v Links)` + +SetLinks sets Links field to given value. + + + diff --git a/products/containerregistry/docs/models/WeeklySchedule.md b/products/containerregistry/docs/models/WeeklySchedule.md index 636e3fa..f1300a4 100644 --- a/products/containerregistry/docs/models/WeeklySchedule.md +++ b/products/containerregistry/docs/models/WeeklySchedule.md @@ -46,16 +46,6 @@ and a boolean to check if the value has been set. SetDays sets Days field to given value. -### SetDaysNil - -`func (o *WeeklySchedule) SetDaysNil(b bool)` - - SetDaysNil sets the value for Days to be an explicit nil - -### UnsetDays -`func (o *WeeklySchedule) UnsetDays()` - -UnsetDays ensures that no value is present for Days, not even an explicit nil ### GetTime `func (o *WeeklySchedule) GetTime() string` diff --git a/products/containerregistry/docs/summary.md b/products/containerregistry/docs/summary.md index 77230bf..87f995f 100644 --- a/products/containerregistry/docs/summary.md +++ b/products/containerregistry/docs/summary.md @@ -5,21 +5,35 @@ ## API +* [ArtifactsApi](api/ArtifactsApi.md) * [LocationsApi](api/LocationsApi.md) * [NamesApi](api/NamesApi.md) * [RegistriesApi](api/RegistriesApi.md) * [RepositoriesApi](api/RepositoriesApi.md) * [TokensApi](api/TokensApi.md) +* [VulnerabilitiesApi](api/VulnerabilitiesApi.md) ## Models * [ApiErrorMessage](models/ApiErrorMessage.md) * [ApiErrorResponse](models/ApiErrorResponse.md) * [ApiResourceMetadata](models/ApiResourceMetadata.md) +* [Artifact](models/Artifact.md) +* [ArtifactMetadata](models/ArtifactMetadata.md) +* [ArtifactMetadataAllOf](models/ArtifactMetadataAllOf.md) +* [ArtifactRead](models/ArtifactRead.md) +* [ArtifactReadList](models/ArtifactReadList.md) +* [ArtifactVulnerabilityReadList](models/ArtifactVulnerabilityReadList.md) * [Credentials](models/Credentials.md) * [Day](models/Day.md) +* [Error](models/Error.md) +* [ErrorMessages](models/ErrorMessages.md) +* [Feature](models/Feature.md) +* [FeatureVulnerabilityScanning](models/FeatureVulnerabilityScanning.md) +* [Links](models/Links.md) * [Location](models/Location.md) * [LocationsResponse](models/LocationsResponse.md) +* [Metadata](models/Metadata.md) * [Pagination](models/Pagination.md) * [PaginationLinks](models/PaginationLinks.md) * [PatchRegistryInput](models/PatchRegistryInput.md) @@ -30,16 +44,30 @@ * [PostTokenInput](models/PostTokenInput.md) * [PostTokenOutput](models/PostTokenOutput.md) * [PostTokenProperties](models/PostTokenProperties.md) +* [Purl](models/Purl.md) * [PutRegistryInput](models/PutRegistryInput.md) * [PutRegistryOutput](models/PutRegistryOutput.md) * [PutTokenInput](models/PutTokenInput.md) * [PutTokenOutput](models/PutTokenOutput.md) * [RegistriesResponse](models/RegistriesResponse.md) +* [RegistryArtifactsReadList](models/RegistryArtifactsReadList.md) +* [RegistryFeatures](models/RegistryFeatures.md) +* [RegistryPagination](models/RegistryPagination.md) * [RegistryProperties](models/RegistryProperties.md) * [RegistryResponse](models/RegistryResponse.md) +* [Repository](models/Repository.md) +* [RepositoryMetadata](models/RepositoryMetadata.md) +* [RepositoryMetadataAllOf](models/RepositoryMetadataAllOf.md) +* [RepositoryRead](models/RepositoryRead.md) +* [RepositoryReadList](models/RepositoryReadList.md) * [Scope](models/Scope.md) * [StorageUsage](models/StorageUsage.md) * [TokenProperties](models/TokenProperties.md) * [TokenResponse](models/TokenResponse.md) * [TokensResponse](models/TokensResponse.md) +* [Vulnerability](models/Vulnerability.md) +* [VulnerabilityDataSource](models/VulnerabilityDataSource.md) +* [VulnerabilityMetadata](models/VulnerabilityMetadata.md) +* [VulnerabilityRead](models/VulnerabilityRead.md) +* [VulnerabilityReadList](models/VulnerabilityReadList.md) * [WeeklySchedule](models/WeeklySchedule.md) diff --git a/products/containerregistry/go.mod b/products/containerregistry/go.mod index 6f03d6f..ca33860 100644 --- a/products/containerregistry/go.mod +++ b/products/containerregistry/go.mod @@ -1,17 +1,9 @@ -module github.com/ionos-cloud/sdk-go-bundle/products/containerregistry +module github.com/ionos-cloud/sdk-go-bundle/products/containerregistry/v2 -go 1.19 +go 1.21 require ( - github.com/ionos-cloud/sdk-go-bundle/shared v0.1.0 - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 + golang.org/x/oauth2 v0.21.0 + github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1 ) -require ( - github.com/golang/protobuf v1.4.2 // indirect - golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect - google.golang.org/appengine v1.6.6 // indirect - google.golang.org/protobuf v1.25.0 // indirect -) - -replace github.com/ionos-cloud/sdk-go-bundle/shared => ../../shared diff --git a/products/containerregistry/go.sum b/products/containerregistry/go.sum index 6b0823d..e4315ee 100644 --- a/products/containerregistry/go.sum +++ b/products/containerregistry/go.sum @@ -1,365 +1,15 @@ -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.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -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/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -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/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -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= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -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/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -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/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -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/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/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -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.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= 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.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -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.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -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-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -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/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/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -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/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -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.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/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-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -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/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1 h1:NWobgIhmUJKG6ohFXefMj+KmpEEvLYEDUgGzpns6HQE= +github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1/go.mod h1:cLIl4zmB1yMdPSNgTzaRmXeuusEAY1O3Lp/iXSc/R6E= 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-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/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-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-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/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-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-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/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 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= -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/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -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/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= 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.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/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-20190606165138-5da285871e9c/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-20191001151750-bb3f8db39f24/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-20200113162924-86b910548bc1/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-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -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-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/tools v0.0.0-20180917221912-90fa682c2a6e/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-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-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-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-20191012152004-8de300cfc20a/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-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -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= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -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.19.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/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= 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 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= -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-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -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.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/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.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -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= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -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= diff --git a/products/containerregistry/model_api_error_message.go b/products/containerregistry/model_api_error_message.go index cabf03d..b155388 100644 --- a/products/containerregistry/model_api_error_message.go +++ b/products/containerregistry/model_api_error_message.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,10 +15,13 @@ import ( "encoding/json" ) +// checks if the ApiErrorMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiErrorMessage{} + // ApiErrorMessage struct for ApiErrorMessage type ApiErrorMessage struct { - ErrorCode *string `json:"errorCode"` - Message *string `json:"message"` + ErrorCode string `json:"errorCode"` + Message string `json:"message"` } // NewApiErrorMessage instantiates a new ApiErrorMessage object @@ -28,8 +31,8 @@ type ApiErrorMessage struct { func NewApiErrorMessage(errorCode string, message string) *ApiErrorMessage { this := ApiErrorMessage{} - this.ErrorCode = &errorCode - this.Message = &message + this.ErrorCode = errorCode + this.Message = message return &this } @@ -43,92 +46,58 @@ func NewApiErrorMessageWithDefaults() *ApiErrorMessage { } // GetErrorCode returns the ErrorCode field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApiErrorMessage) GetErrorCode() *string { +func (o *ApiErrorMessage) GetErrorCode() string { if o == nil { - return nil + var ret string + return ret } return o.ErrorCode - } // GetErrorCodeOk returns a tuple with the ErrorCode field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiErrorMessage) GetErrorCodeOk() (*string, bool) { if o == nil { return nil, false } - - return o.ErrorCode, true + return &o.ErrorCode, true } // SetErrorCode sets field value func (o *ApiErrorMessage) SetErrorCode(v string) { - - o.ErrorCode = &v - -} - -// HasErrorCode returns a boolean if a field has been set. -func (o *ApiErrorMessage) HasErrorCode() bool { - if o != nil && o.ErrorCode != nil { - return true - } - - return false + o.ErrorCode = v } // GetMessage returns the Message field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApiErrorMessage) GetMessage() *string { +func (o *ApiErrorMessage) GetMessage() string { if o == nil { - return nil + var ret string + return ret } return o.Message - } // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiErrorMessage) GetMessageOk() (*string, bool) { if o == nil { return nil, false } - - return o.Message, true + return &o.Message, true } // SetMessage sets field value func (o *ApiErrorMessage) SetMessage(v string) { - - o.Message = &v - -} - -// HasMessage returns a boolean if a field has been set. -func (o *ApiErrorMessage) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false + o.Message = v } -func (o ApiErrorMessage) MarshalJSON() ([]byte, error) { +func (o ApiErrorMessage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.ErrorCode != nil { - toSerialize["errorCode"] = o.ErrorCode - } - - if o.Message != nil { - toSerialize["message"] = o.Message - } - - return json.Marshal(toSerialize) + toSerialize["errorCode"] = o.ErrorCode + toSerialize["message"] = o.Message + return toSerialize, nil } type NullableApiErrorMessage struct { diff --git a/products/containerregistry/model_api_error_response.go b/products/containerregistry/model_api_error_response.go index 83ac865..c946874 100644 --- a/products/containerregistry/model_api_error_response.go +++ b/products/containerregistry/model_api_error_response.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,10 +15,13 @@ import ( "encoding/json" ) +// checks if the ApiErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiErrorResponse{} + // ApiErrorResponse struct for ApiErrorResponse type ApiErrorResponse struct { - HttpStatus *int32 `json:"httpStatus"` - Messages *[]ApiErrorMessage `json:"messages"` + HttpStatus int32 `json:"httpStatus"` + Messages []ApiErrorMessage `json:"messages"` } // NewApiErrorResponse instantiates a new ApiErrorResponse object @@ -28,8 +31,8 @@ type ApiErrorResponse struct { func NewApiErrorResponse(httpStatus int32, messages []ApiErrorMessage) *ApiErrorResponse { this := ApiErrorResponse{} - this.HttpStatus = &httpStatus - this.Messages = &messages + this.HttpStatus = httpStatus + this.Messages = messages return &this } @@ -43,90 +46,58 @@ func NewApiErrorResponseWithDefaults() *ApiErrorResponse { } // GetHttpStatus returns the HttpStatus field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ApiErrorResponse) GetHttpStatus() *int32 { +func (o *ApiErrorResponse) GetHttpStatus() int32 { if o == nil { - return nil + var ret int32 + return ret } return o.HttpStatus - } // GetHttpStatusOk returns a tuple with the HttpStatus field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiErrorResponse) GetHttpStatusOk() (*int32, bool) { if o == nil { return nil, false } - - return o.HttpStatus, true + return &o.HttpStatus, true } // SetHttpStatus sets field value func (o *ApiErrorResponse) SetHttpStatus(v int32) { - - o.HttpStatus = &v - -} - -// HasHttpStatus returns a boolean if a field has been set. -func (o *ApiErrorResponse) HasHttpStatus() bool { - if o != nil && o.HttpStatus != nil { - return true - } - - return false + o.HttpStatus = v } // GetMessages returns the Messages field value -// If the value is explicit nil, the zero value for []ApiErrorMessage will be returned -func (o *ApiErrorResponse) GetMessages() *[]ApiErrorMessage { +func (o *ApiErrorResponse) GetMessages() []ApiErrorMessage { if o == nil { - return nil + var ret []ApiErrorMessage + return ret } return o.Messages - } // GetMessagesOk returns a tuple with the Messages field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ApiErrorResponse) GetMessagesOk() (*[]ApiErrorMessage, bool) { +func (o *ApiErrorResponse) GetMessagesOk() ([]ApiErrorMessage, bool) { if o == nil { return nil, false } - return o.Messages, true } // SetMessages sets field value func (o *ApiErrorResponse) SetMessages(v []ApiErrorMessage) { - - o.Messages = &v - -} - -// HasMessages returns a boolean if a field has been set. -func (o *ApiErrorResponse) HasMessages() bool { - if o != nil && o.Messages != nil { - return true - } - - return false + o.Messages = v } -func (o ApiErrorResponse) MarshalJSON() ([]byte, error) { +func (o ApiErrorResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.HttpStatus != nil { - toSerialize["httpStatus"] = o.HttpStatus - } - + toSerialize["httpStatus"] = o.HttpStatus toSerialize["messages"] = o.Messages - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableApiErrorResponse struct { diff --git a/products/containerregistry/model_api_resource_metadata.go b/products/containerregistry/model_api_resource_metadata.go index cf90220..a63e9e8 100644 --- a/products/containerregistry/model_api_resource_metadata.go +++ b/products/containerregistry/model_api_resource_metadata.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -17,28 +17,31 @@ import ( "time" ) +// checks if the ApiResourceMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiResourceMetadata{} + // ApiResourceMetadata struct for ApiResourceMetadata type ApiResourceMetadata struct { - CreatedBy *string `json:"createdBy"` - CreatedByUserId *string `json:"createdByUserId"` + CreatedBy string `json:"createdBy"` + CreatedByUserId string `json:"createdByUserId"` CreatedDate *IonosTime `json:"createdDate"` LastModifiedBy *string `json:"lastModifiedBy,omitempty"` LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` LastModifiedDate *IonosTime `json:"lastModifiedDate,omitempty"` - State *string `json:"state"` + State string `json:"state"` } // NewApiResourceMetadata instantiates a new ApiResourceMetadata object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewApiResourceMetadata(createdBy string, createdByUserId string, createdDate IonosTime, state string) *ApiResourceMetadata { +func NewApiResourceMetadata(createdBy string, createdByUserId string, createdDate time.Time, state string) *ApiResourceMetadata { this := ApiResourceMetadata{} - this.CreatedBy = &createdBy - this.CreatedByUserId = &createdByUserId - this.CreatedDate = &createdDate - this.State = &state + this.CreatedBy = createdBy + this.CreatedByUserId = createdByUserId + this.CreatedDate = &IonosTime{createdDate} + this.State = state return &this } @@ -52,314 +55,220 @@ func NewApiResourceMetadataWithDefaults() *ApiResourceMetadata { } // GetCreatedBy returns the CreatedBy field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApiResourceMetadata) GetCreatedBy() *string { +func (o *ApiResourceMetadata) GetCreatedBy() string { if o == nil { - return nil + var ret string + return ret } return o.CreatedBy - } // GetCreatedByOk returns a tuple with the CreatedBy field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiResourceMetadata) GetCreatedByOk() (*string, bool) { if o == nil { return nil, false } - - return o.CreatedBy, true + return &o.CreatedBy, true } // SetCreatedBy sets field value func (o *ApiResourceMetadata) SetCreatedBy(v string) { - - o.CreatedBy = &v - -} - -// HasCreatedBy returns a boolean if a field has been set. -func (o *ApiResourceMetadata) HasCreatedBy() bool { - if o != nil && o.CreatedBy != nil { - return true - } - - return false + o.CreatedBy = v } // GetCreatedByUserId returns the CreatedByUserId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApiResourceMetadata) GetCreatedByUserId() *string { +func (o *ApiResourceMetadata) GetCreatedByUserId() string { if o == nil { - return nil + var ret string + return ret } return o.CreatedByUserId - } // GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiResourceMetadata) GetCreatedByUserIdOk() (*string, bool) { if o == nil { return nil, false } - - return o.CreatedByUserId, true + return &o.CreatedByUserId, true } // SetCreatedByUserId sets field value func (o *ApiResourceMetadata) SetCreatedByUserId(v string) { - - o.CreatedByUserId = &v - -} - -// HasCreatedByUserId returns a boolean if a field has been set. -func (o *ApiResourceMetadata) HasCreatedByUserId() bool { - if o != nil && o.CreatedByUserId != nil { - return true - } - - return false + o.CreatedByUserId = v } // GetCreatedDate returns the CreatedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *ApiResourceMetadata) GetCreatedDate() *time.Time { +func (o *ApiResourceMetadata) GetCreatedDate() time.Time { if o == nil { - return nil + var ret time.Time + return ret } if o.CreatedDate == nil { - return nil + var ret time.Time + return ret } - return &o.CreatedDate.Time - + return o.CreatedDate.Time } // GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiResourceMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } - if o.CreatedDate == nil { - return nil, false + return nil, true } return &o.CreatedDate.Time, true - } // SetCreatedDate sets field value func (o *ApiResourceMetadata) SetCreatedDate(v time.Time) { - o.CreatedDate = &IonosTime{v} - } -// HasCreatedDate returns a boolean if a field has been set. -func (o *ApiResourceMetadata) HasCreatedDate() bool { - if o != nil && o.CreatedDate != nil { - return true +// GetLastModifiedBy returns the LastModifiedBy field value if set, zero value otherwise. +func (o *ApiResourceMetadata) GetLastModifiedBy() string { + if o == nil || IsNil(o.LastModifiedBy) { + var ret string + return ret } - - return false + return *o.LastModifiedBy } -// GetLastModifiedBy returns the LastModifiedBy field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApiResourceMetadata) GetLastModifiedBy() *string { - if o == nil { - return nil - } - - return o.LastModifiedBy - -} - -// GetLastModifiedByOk returns a tuple with the LastModifiedBy field value +// GetLastModifiedByOk returns a tuple with the LastModifiedBy field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiResourceMetadata) GetLastModifiedByOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.LastModifiedBy) { return nil, false } - return o.LastModifiedBy, true } -// SetLastModifiedBy sets field value -func (o *ApiResourceMetadata) SetLastModifiedBy(v string) { - - o.LastModifiedBy = &v - -} - // HasLastModifiedBy returns a boolean if a field has been set. func (o *ApiResourceMetadata) HasLastModifiedBy() bool { - if o != nil && o.LastModifiedBy != nil { + if o != nil && !IsNil(o.LastModifiedBy) { return true } return false } -// GetLastModifiedByUserId returns the LastModifiedByUserId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApiResourceMetadata) GetLastModifiedByUserId() *string { - if o == nil { - return nil - } - - return o.LastModifiedByUserId +// SetLastModifiedBy gets a reference to the given string and assigns it to the LastModifiedBy field. +func (o *ApiResourceMetadata) SetLastModifiedBy(v string) { + o.LastModifiedBy = &v +} +// GetLastModifiedByUserId returns the LastModifiedByUserId field value if set, zero value otherwise. +func (o *ApiResourceMetadata) GetLastModifiedByUserId() string { + if o == nil || IsNil(o.LastModifiedByUserId) { + var ret string + return ret + } + return *o.LastModifiedByUserId } -// GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value +// GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiResourceMetadata) GetLastModifiedByUserIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.LastModifiedByUserId) { return nil, false } - return o.LastModifiedByUserId, true } -// SetLastModifiedByUserId sets field value -func (o *ApiResourceMetadata) SetLastModifiedByUserId(v string) { - - o.LastModifiedByUserId = &v - -} - // HasLastModifiedByUserId returns a boolean if a field has been set. func (o *ApiResourceMetadata) HasLastModifiedByUserId() bool { - if o != nil && o.LastModifiedByUserId != nil { + if o != nil && !IsNil(o.LastModifiedByUserId) { return true } return false } -// GetLastModifiedDate returns the LastModifiedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *ApiResourceMetadata) GetLastModifiedDate() *time.Time { - if o == nil { - return nil - } +// SetLastModifiedByUserId gets a reference to the given string and assigns it to the LastModifiedByUserId field. +func (o *ApiResourceMetadata) SetLastModifiedByUserId(v string) { + o.LastModifiedByUserId = &v +} - if o.LastModifiedDate == nil { - return nil +// GetLastModifiedDate returns the LastModifiedDate field value if set, zero value otherwise. +func (o *ApiResourceMetadata) GetLastModifiedDate() time.Time { + if o == nil || IsNil(o.LastModifiedDate) { + var ret time.Time + return ret } - return &o.LastModifiedDate.Time - + return o.LastModifiedDate.Time } -// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value +// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiResourceMetadata) GetLastModifiedDateOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - - if o.LastModifiedDate == nil { + if o == nil || IsNil(o.LastModifiedDate) { return nil, false } return &o.LastModifiedDate.Time, true - -} - -// SetLastModifiedDate sets field value -func (o *ApiResourceMetadata) SetLastModifiedDate(v time.Time) { - - o.LastModifiedDate = &IonosTime{v} - } // HasLastModifiedDate returns a boolean if a field has been set. func (o *ApiResourceMetadata) HasLastModifiedDate() bool { - if o != nil && o.LastModifiedDate != nil { + if o != nil && !IsNil(o.LastModifiedDate) { return true } return false } +// SetLastModifiedDate gets a reference to the given time.Time and assigns it to the LastModifiedDate field. +func (o *ApiResourceMetadata) SetLastModifiedDate(v time.Time) { + o.LastModifiedDate = &IonosTime{v} +} + // GetState returns the State field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApiResourceMetadata) GetState() *string { +func (o *ApiResourceMetadata) GetState() string { if o == nil { - return nil + var ret string + return ret } return o.State - } // GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApiResourceMetadata) GetStateOk() (*string, bool) { if o == nil { return nil, false } - - return o.State, true + return &o.State, true } // SetState sets field value func (o *ApiResourceMetadata) SetState(v string) { - - o.State = &v - + o.State = v } -// HasState returns a boolean if a field has been set. -func (o *ApiResourceMetadata) HasState() bool { - if o != nil && o.State != nil { - return true - } - - return false -} - -func (o ApiResourceMetadata) MarshalJSON() ([]byte, error) { +func (o ApiResourceMetadata) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.CreatedBy != nil { - toSerialize["createdBy"] = o.CreatedBy - } - - if o.CreatedByUserId != nil { - toSerialize["createdByUserId"] = o.CreatedByUserId - } - - if o.CreatedDate != nil { - toSerialize["createdDate"] = o.CreatedDate - } - - if o.LastModifiedBy != nil { + toSerialize["createdBy"] = o.CreatedBy + toSerialize["createdByUserId"] = o.CreatedByUserId + toSerialize["createdDate"] = o.CreatedDate + if !IsNil(o.LastModifiedBy) { toSerialize["lastModifiedBy"] = o.LastModifiedBy } - - if o.LastModifiedByUserId != nil { + if !IsNil(o.LastModifiedByUserId) { toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId } - - toSerialize["lastModifiedDate"] = o.LastModifiedDate - - if o.State != nil { - toSerialize["state"] = o.State + if !IsNil(o.LastModifiedDate) { + toSerialize["lastModifiedDate"] = o.LastModifiedDate } - - return json.Marshal(toSerialize) + toSerialize["state"] = o.State + return toSerialize, nil } type NullableApiResourceMetadata struct { diff --git a/products/containerregistry/model_artifact.go b/products/containerregistry/model_artifact.go new file mode 100644 index 0000000..2a7f6d7 --- /dev/null +++ b/products/containerregistry/model_artifact.go @@ -0,0 +1,203 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the Artifact type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Artifact{} + +// Artifact struct for Artifact +type Artifact struct { + RepositoryName string `json:"repositoryName"` + // The digest of the artifact + Digest string `json:"digest"` + // The tags of an artifact + Tags []string `json:"tags,omitempty"` + // The media type of the artifact + MediaType string `json:"mediaType"` +} + +// NewArtifact instantiates a new Artifact object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifact(repositoryName string, digest string, mediaType string) *Artifact { + this := Artifact{} + + this.RepositoryName = repositoryName + this.Digest = digest + this.MediaType = mediaType + + return &this +} + +// NewArtifactWithDefaults instantiates a new Artifact object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactWithDefaults() *Artifact { + this := Artifact{} + return &this +} + +// GetRepositoryName returns the RepositoryName field value +func (o *Artifact) GetRepositoryName() string { + if o == nil { + var ret string + return ret + } + + return o.RepositoryName +} + +// GetRepositoryNameOk returns a tuple with the RepositoryName field value +// and a boolean to check if the value has been set. +func (o *Artifact) GetRepositoryNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RepositoryName, true +} + +// SetRepositoryName sets field value +func (o *Artifact) SetRepositoryName(v string) { + o.RepositoryName = v +} + +// GetDigest returns the Digest field value +func (o *Artifact) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *Artifact) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *Artifact) SetDigest(v string) { + o.Digest = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *Artifact) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Artifact) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Artifact) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *Artifact) SetTags(v []string) { + o.Tags = v +} + +// GetMediaType returns the MediaType field value +func (o *Artifact) GetMediaType() string { + if o == nil { + var ret string + return ret + } + + return o.MediaType +} + +// GetMediaTypeOk returns a tuple with the MediaType field value +// and a boolean to check if the value has been set. +func (o *Artifact) GetMediaTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MediaType, true +} + +// SetMediaType sets field value +func (o *Artifact) SetMediaType(v string) { + o.MediaType = v +} + +func (o Artifact) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["repositoryName"] = o.RepositoryName + toSerialize["digest"] = o.Digest + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + toSerialize["mediaType"] = o.MediaType + return toSerialize, nil +} + +type NullableArtifact struct { + value *Artifact + isSet bool +} + +func (v NullableArtifact) Get() *Artifact { + return v.value +} + +func (v *NullableArtifact) Set(val *Artifact) { + v.value = val + v.isSet = true +} + +func (v NullableArtifact) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifact) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifact(val *Artifact) *NullableArtifact { + return &NullableArtifact{value: val, isSet: true} +} + +func (v NullableArtifact) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifact) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_artifact_metadata.go b/products/containerregistry/model_artifact_metadata.go new file mode 100644 index 0000000..bf00f9c --- /dev/null +++ b/products/containerregistry/model_artifact_metadata.go @@ -0,0 +1,657 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" + + "time" +) + +// checks if the ArtifactMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactMetadata{} + +// ArtifactMetadata struct for ArtifactMetadata +type ArtifactMetadata struct { + // The ISO 8601 creation timestamp. + CreatedDate *IonosTime `json:"createdDate,omitempty"` + // Unique name of the identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // Unique id of the identity that created the resource. + CreatedByUserId *string `json:"createdByUserId,omitempty"` + // The ISO 8601 modified timestamp. + LastModifiedDate *IonosTime `json:"lastModifiedDate,omitempty"` + // Unique name of the identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // Unique id of the identity that last modified the resource. + LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` + // Unique name of the resource. + ResourceURN *string `json:"resourceURN,omitempty"` + // The date and time the artifact was last pushed + LastPushedAt *IonosTime `json:"lastPushedAt"` + // The date and time the artifact was last pulled + LastPulledAt *IonosTime `json:"lastPulledAt,omitempty"` + // The date and time the artifact was last scanned + LastScannedAt *IonosTime `json:"lastScannedAt,omitempty"` + // The number of times the artifact was pushed + PushCount int64 `json:"pushCount"` + // The number of times the artifact was pulled + PullCount int64 `json:"pullCount"` + // The CVSS vulnerability severity rating + VulnMaxSeverity *string `json:"vulnMaxSeverity,omitempty"` + // The total CVSS score of all vulnerabilities of the artifact + VulnTotalScore *float32 `json:"vulnTotalScore,omitempty"` + // The total number of vulnerabilities of the artifact + VulnTotalCount *int64 `json:"vulnTotalCount,omitempty"` + // The number of fixable vulnerabilities of the artifact + VulnFixableCount *int64 `json:"vulnFixableCount,omitempty"` +} + +// NewArtifactMetadata instantiates a new ArtifactMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactMetadata(lastPushedAt time.Time, pushCount int64, pullCount int64) *ArtifactMetadata { + this := ArtifactMetadata{} + + this.LastPushedAt = &IonosTime{lastPushedAt} + this.PushCount = pushCount + this.PullCount = pullCount + + return &this +} + +// NewArtifactMetadataWithDefaults instantiates a new ArtifactMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactMetadataWithDefaults() *ArtifactMetadata { + this := ArtifactMetadata{} + return &this +} + +// GetCreatedDate returns the CreatedDate field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetCreatedDate() time.Time { + if o == nil || IsNil(o.CreatedDate) { + var ret time.Time + return ret + } + return o.CreatedDate.Time +} + +// GetCreatedDateOk returns a tuple with the CreatedDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetCreatedDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedDate) { + return nil, false + } + return &o.CreatedDate.Time, true +} + +// HasCreatedDate returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasCreatedDate() bool { + if o != nil && !IsNil(o.CreatedDate) { + return true + } + + return false +} + +// SetCreatedDate gets a reference to the given time.Time and assigns it to the CreatedDate field. +func (o *ArtifactMetadata) SetCreatedDate(v time.Time) { + o.CreatedDate = &IonosTime{v} +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy) { + var ret string + return ret + } + return *o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetCreatedByOk() (*string, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasCreatedBy() bool { + if o != nil && !IsNil(o.CreatedBy) { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. +func (o *ArtifactMetadata) SetCreatedBy(v string) { + o.CreatedBy = &v +} + +// GetCreatedByUserId returns the CreatedByUserId field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetCreatedByUserId() string { + if o == nil || IsNil(o.CreatedByUserId) { + var ret string + return ret + } + return *o.CreatedByUserId +} + +// GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetCreatedByUserIdOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByUserId) { + return nil, false + } + return o.CreatedByUserId, true +} + +// HasCreatedByUserId returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasCreatedByUserId() bool { + if o != nil && !IsNil(o.CreatedByUserId) { + return true + } + + return false +} + +// SetCreatedByUserId gets a reference to the given string and assigns it to the CreatedByUserId field. +func (o *ArtifactMetadata) SetCreatedByUserId(v string) { + o.CreatedByUserId = &v +} + +// GetLastModifiedDate returns the LastModifiedDate field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetLastModifiedDate() time.Time { + if o == nil || IsNil(o.LastModifiedDate) { + var ret time.Time + return ret + } + return o.LastModifiedDate.Time +} + +// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetLastModifiedDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastModifiedDate) { + return nil, false + } + return &o.LastModifiedDate.Time, true +} + +// HasLastModifiedDate returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasLastModifiedDate() bool { + if o != nil && !IsNil(o.LastModifiedDate) { + return true + } + + return false +} + +// SetLastModifiedDate gets a reference to the given time.Time and assigns it to the LastModifiedDate field. +func (o *ArtifactMetadata) SetLastModifiedDate(v time.Time) { + o.LastModifiedDate = &IonosTime{v} +} + +// GetLastModifiedBy returns the LastModifiedBy field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetLastModifiedBy() string { + if o == nil || IsNil(o.LastModifiedBy) { + var ret string + return ret + } + return *o.LastModifiedBy +} + +// GetLastModifiedByOk returns a tuple with the LastModifiedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetLastModifiedByOk() (*string, bool) { + if o == nil || IsNil(o.LastModifiedBy) { + return nil, false + } + return o.LastModifiedBy, true +} + +// HasLastModifiedBy returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasLastModifiedBy() bool { + if o != nil && !IsNil(o.LastModifiedBy) { + return true + } + + return false +} + +// SetLastModifiedBy gets a reference to the given string and assigns it to the LastModifiedBy field. +func (o *ArtifactMetadata) SetLastModifiedBy(v string) { + o.LastModifiedBy = &v +} + +// GetLastModifiedByUserId returns the LastModifiedByUserId field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetLastModifiedByUserId() string { + if o == nil || IsNil(o.LastModifiedByUserId) { + var ret string + return ret + } + return *o.LastModifiedByUserId +} + +// GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetLastModifiedByUserIdOk() (*string, bool) { + if o == nil || IsNil(o.LastModifiedByUserId) { + return nil, false + } + return o.LastModifiedByUserId, true +} + +// HasLastModifiedByUserId returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasLastModifiedByUserId() bool { + if o != nil && !IsNil(o.LastModifiedByUserId) { + return true + } + + return false +} + +// SetLastModifiedByUserId gets a reference to the given string and assigns it to the LastModifiedByUserId field. +func (o *ArtifactMetadata) SetLastModifiedByUserId(v string) { + o.LastModifiedByUserId = &v +} + +// GetResourceURN returns the ResourceURN field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetResourceURN() string { + if o == nil || IsNil(o.ResourceURN) { + var ret string + return ret + } + return *o.ResourceURN +} + +// GetResourceURNOk returns a tuple with the ResourceURN field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetResourceURNOk() (*string, bool) { + if o == nil || IsNil(o.ResourceURN) { + return nil, false + } + return o.ResourceURN, true +} + +// HasResourceURN returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasResourceURN() bool { + if o != nil && !IsNil(o.ResourceURN) { + return true + } + + return false +} + +// SetResourceURN gets a reference to the given string and assigns it to the ResourceURN field. +func (o *ArtifactMetadata) SetResourceURN(v string) { + o.ResourceURN = &v +} + +// GetLastPushedAt returns the LastPushedAt field value +func (o *ArtifactMetadata) GetLastPushedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + if o.LastPushedAt == nil { + var ret time.Time + return ret + } + return o.LastPushedAt.Time +} + +// GetLastPushedAtOk returns a tuple with the LastPushedAt field value +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetLastPushedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + if o.LastPushedAt == nil { + return nil, true + } + return &o.LastPushedAt.Time, true +} + +// SetLastPushedAt sets field value +func (o *ArtifactMetadata) SetLastPushedAt(v time.Time) { + o.LastPushedAt = &IonosTime{v} +} + +// GetLastPulledAt returns the LastPulledAt field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetLastPulledAt() time.Time { + if o == nil || IsNil(o.LastPulledAt) { + var ret time.Time + return ret + } + return o.LastPulledAt.Time +} + +// GetLastPulledAtOk returns a tuple with the LastPulledAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetLastPulledAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPulledAt) { + return nil, false + } + return &o.LastPulledAt.Time, true +} + +// HasLastPulledAt returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasLastPulledAt() bool { + if o != nil && !IsNil(o.LastPulledAt) { + return true + } + + return false +} + +// SetLastPulledAt gets a reference to the given time.Time and assigns it to the LastPulledAt field. +func (o *ArtifactMetadata) SetLastPulledAt(v time.Time) { + o.LastPulledAt = &IonosTime{v} +} + +// GetLastScannedAt returns the LastScannedAt field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetLastScannedAt() time.Time { + if o == nil || IsNil(o.LastScannedAt) { + var ret time.Time + return ret + } + return o.LastScannedAt.Time +} + +// GetLastScannedAtOk returns a tuple with the LastScannedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetLastScannedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastScannedAt) { + return nil, false + } + return &o.LastScannedAt.Time, true +} + +// HasLastScannedAt returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasLastScannedAt() bool { + if o != nil && !IsNil(o.LastScannedAt) { + return true + } + + return false +} + +// SetLastScannedAt gets a reference to the given time.Time and assigns it to the LastScannedAt field. +func (o *ArtifactMetadata) SetLastScannedAt(v time.Time) { + o.LastScannedAt = &IonosTime{v} +} + +// GetPushCount returns the PushCount field value +func (o *ArtifactMetadata) GetPushCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PushCount +} + +// GetPushCountOk returns a tuple with the PushCount field value +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetPushCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PushCount, true +} + +// SetPushCount sets field value +func (o *ArtifactMetadata) SetPushCount(v int64) { + o.PushCount = v +} + +// GetPullCount returns the PullCount field value +func (o *ArtifactMetadata) GetPullCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PullCount +} + +// GetPullCountOk returns a tuple with the PullCount field value +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetPullCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PullCount, true +} + +// SetPullCount sets field value +func (o *ArtifactMetadata) SetPullCount(v int64) { + o.PullCount = v +} + +// GetVulnMaxSeverity returns the VulnMaxSeverity field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetVulnMaxSeverity() string { + if o == nil || IsNil(o.VulnMaxSeverity) { + var ret string + return ret + } + return *o.VulnMaxSeverity +} + +// GetVulnMaxSeverityOk returns a tuple with the VulnMaxSeverity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetVulnMaxSeverityOk() (*string, bool) { + if o == nil || IsNil(o.VulnMaxSeverity) { + return nil, false + } + return o.VulnMaxSeverity, true +} + +// HasVulnMaxSeverity returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasVulnMaxSeverity() bool { + if o != nil && !IsNil(o.VulnMaxSeverity) { + return true + } + + return false +} + +// SetVulnMaxSeverity gets a reference to the given string and assigns it to the VulnMaxSeverity field. +func (o *ArtifactMetadata) SetVulnMaxSeverity(v string) { + o.VulnMaxSeverity = &v +} + +// GetVulnTotalScore returns the VulnTotalScore field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetVulnTotalScore() float32 { + if o == nil || IsNil(o.VulnTotalScore) { + var ret float32 + return ret + } + return *o.VulnTotalScore +} + +// GetVulnTotalScoreOk returns a tuple with the VulnTotalScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetVulnTotalScoreOk() (*float32, bool) { + if o == nil || IsNil(o.VulnTotalScore) { + return nil, false + } + return o.VulnTotalScore, true +} + +// HasVulnTotalScore returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasVulnTotalScore() bool { + if o != nil && !IsNil(o.VulnTotalScore) { + return true + } + + return false +} + +// SetVulnTotalScore gets a reference to the given float32 and assigns it to the VulnTotalScore field. +func (o *ArtifactMetadata) SetVulnTotalScore(v float32) { + o.VulnTotalScore = &v +} + +// GetVulnTotalCount returns the VulnTotalCount field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetVulnTotalCount() int64 { + if o == nil || IsNil(o.VulnTotalCount) { + var ret int64 + return ret + } + return *o.VulnTotalCount +} + +// GetVulnTotalCountOk returns a tuple with the VulnTotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetVulnTotalCountOk() (*int64, bool) { + if o == nil || IsNil(o.VulnTotalCount) { + return nil, false + } + return o.VulnTotalCount, true +} + +// HasVulnTotalCount returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasVulnTotalCount() bool { + if o != nil && !IsNil(o.VulnTotalCount) { + return true + } + + return false +} + +// SetVulnTotalCount gets a reference to the given int64 and assigns it to the VulnTotalCount field. +func (o *ArtifactMetadata) SetVulnTotalCount(v int64) { + o.VulnTotalCount = &v +} + +// GetVulnFixableCount returns the VulnFixableCount field value if set, zero value otherwise. +func (o *ArtifactMetadata) GetVulnFixableCount() int64 { + if o == nil || IsNil(o.VulnFixableCount) { + var ret int64 + return ret + } + return *o.VulnFixableCount +} + +// GetVulnFixableCountOk returns a tuple with the VulnFixableCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadata) GetVulnFixableCountOk() (*int64, bool) { + if o == nil || IsNil(o.VulnFixableCount) { + return nil, false + } + return o.VulnFixableCount, true +} + +// HasVulnFixableCount returns a boolean if a field has been set. +func (o *ArtifactMetadata) HasVulnFixableCount() bool { + if o != nil && !IsNil(o.VulnFixableCount) { + return true + } + + return false +} + +// SetVulnFixableCount gets a reference to the given int64 and assigns it to the VulnFixableCount field. +func (o *ArtifactMetadata) SetVulnFixableCount(v int64) { + o.VulnFixableCount = &v +} + +func (o ArtifactMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedDate) { + toSerialize["createdDate"] = o.CreatedDate + } + if !IsNil(o.CreatedBy) { + toSerialize["createdBy"] = o.CreatedBy + } + if !IsNil(o.CreatedByUserId) { + toSerialize["createdByUserId"] = o.CreatedByUserId + } + if !IsNil(o.LastModifiedDate) { + toSerialize["lastModifiedDate"] = o.LastModifiedDate + } + if !IsNil(o.LastModifiedBy) { + toSerialize["lastModifiedBy"] = o.LastModifiedBy + } + if !IsNil(o.LastModifiedByUserId) { + toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId + } + if !IsNil(o.ResourceURN) { + toSerialize["resourceURN"] = o.ResourceURN + } + toSerialize["lastPushedAt"] = o.LastPushedAt + if !IsNil(o.LastPulledAt) { + toSerialize["lastPulledAt"] = o.LastPulledAt + } + if !IsNil(o.LastScannedAt) { + toSerialize["lastScannedAt"] = o.LastScannedAt + } + toSerialize["pushCount"] = o.PushCount + toSerialize["pullCount"] = o.PullCount + if !IsNil(o.VulnMaxSeverity) { + toSerialize["vulnMaxSeverity"] = o.VulnMaxSeverity + } + if !IsNil(o.VulnTotalScore) { + toSerialize["vulnTotalScore"] = o.VulnTotalScore + } + if !IsNil(o.VulnTotalCount) { + toSerialize["vulnTotalCount"] = o.VulnTotalCount + } + if !IsNil(o.VulnFixableCount) { + toSerialize["vulnFixableCount"] = o.VulnFixableCount + } + return toSerialize, nil +} + +type NullableArtifactMetadata struct { + value *ArtifactMetadata + isSet bool +} + +func (v NullableArtifactMetadata) Get() *ArtifactMetadata { + return v.value +} + +func (v *NullableArtifactMetadata) Set(val *ArtifactMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactMetadata(val *ArtifactMetadata) *NullableArtifactMetadata { + return &NullableArtifactMetadata{value: val, isSet: true} +} + +func (v NullableArtifactMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_artifact_metadata_all_of.go b/products/containerregistry/model_artifact_metadata_all_of.go new file mode 100644 index 0000000..8e6eccd --- /dev/null +++ b/products/containerregistry/model_artifact_metadata_all_of.go @@ -0,0 +1,398 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" + + "time" +) + +// checks if the ArtifactMetadataAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactMetadataAllOf{} + +// ArtifactMetadataAllOf struct for ArtifactMetadataAllOf +type ArtifactMetadataAllOf struct { + // The date and time the artifact was last pushed + LastPushedAt *IonosTime `json:"lastPushedAt"` + // The date and time the artifact was last pulled + LastPulledAt *IonosTime `json:"lastPulledAt,omitempty"` + // The date and time the artifact was last scanned + LastScannedAt *IonosTime `json:"lastScannedAt,omitempty"` + // The number of times the artifact was pushed + PushCount int64 `json:"pushCount"` + // The number of times the artifact was pulled + PullCount int64 `json:"pullCount"` + // The CVSS vulnerability severity rating + VulnMaxSeverity *string `json:"vulnMaxSeverity,omitempty"` + // The total CVSS score of all vulnerabilities of the artifact + VulnTotalScore *float32 `json:"vulnTotalScore,omitempty"` + // The total number of vulnerabilities of the artifact + VulnTotalCount *int64 `json:"vulnTotalCount,omitempty"` + // The number of fixable vulnerabilities of the artifact + VulnFixableCount *int64 `json:"vulnFixableCount,omitempty"` +} + +// NewArtifactMetadataAllOf instantiates a new ArtifactMetadataAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactMetadataAllOf(lastPushedAt time.Time, pushCount int64, pullCount int64) *ArtifactMetadataAllOf { + this := ArtifactMetadataAllOf{} + + this.LastPushedAt = &IonosTime{lastPushedAt} + this.PushCount = pushCount + this.PullCount = pullCount + + return &this +} + +// NewArtifactMetadataAllOfWithDefaults instantiates a new ArtifactMetadataAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactMetadataAllOfWithDefaults() *ArtifactMetadataAllOf { + this := ArtifactMetadataAllOf{} + return &this +} + +// GetLastPushedAt returns the LastPushedAt field value +func (o *ArtifactMetadataAllOf) GetLastPushedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + if o.LastPushedAt == nil { + var ret time.Time + return ret + } + return o.LastPushedAt.Time +} + +// GetLastPushedAtOk returns a tuple with the LastPushedAt field value +// and a boolean to check if the value has been set. +func (o *ArtifactMetadataAllOf) GetLastPushedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + if o.LastPushedAt == nil { + return nil, true + } + return &o.LastPushedAt.Time, true +} + +// SetLastPushedAt sets field value +func (o *ArtifactMetadataAllOf) SetLastPushedAt(v time.Time) { + o.LastPushedAt = &IonosTime{v} +} + +// GetLastPulledAt returns the LastPulledAt field value if set, zero value otherwise. +func (o *ArtifactMetadataAllOf) GetLastPulledAt() time.Time { + if o == nil || IsNil(o.LastPulledAt) { + var ret time.Time + return ret + } + return o.LastPulledAt.Time +} + +// GetLastPulledAtOk returns a tuple with the LastPulledAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadataAllOf) GetLastPulledAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPulledAt) { + return nil, false + } + return &o.LastPulledAt.Time, true +} + +// HasLastPulledAt returns a boolean if a field has been set. +func (o *ArtifactMetadataAllOf) HasLastPulledAt() bool { + if o != nil && !IsNil(o.LastPulledAt) { + return true + } + + return false +} + +// SetLastPulledAt gets a reference to the given time.Time and assigns it to the LastPulledAt field. +func (o *ArtifactMetadataAllOf) SetLastPulledAt(v time.Time) { + o.LastPulledAt = &IonosTime{v} +} + +// GetLastScannedAt returns the LastScannedAt field value if set, zero value otherwise. +func (o *ArtifactMetadataAllOf) GetLastScannedAt() time.Time { + if o == nil || IsNil(o.LastScannedAt) { + var ret time.Time + return ret + } + return o.LastScannedAt.Time +} + +// GetLastScannedAtOk returns a tuple with the LastScannedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadataAllOf) GetLastScannedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastScannedAt) { + return nil, false + } + return &o.LastScannedAt.Time, true +} + +// HasLastScannedAt returns a boolean if a field has been set. +func (o *ArtifactMetadataAllOf) HasLastScannedAt() bool { + if o != nil && !IsNil(o.LastScannedAt) { + return true + } + + return false +} + +// SetLastScannedAt gets a reference to the given time.Time and assigns it to the LastScannedAt field. +func (o *ArtifactMetadataAllOf) SetLastScannedAt(v time.Time) { + o.LastScannedAt = &IonosTime{v} +} + +// GetPushCount returns the PushCount field value +func (o *ArtifactMetadataAllOf) GetPushCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PushCount +} + +// GetPushCountOk returns a tuple with the PushCount field value +// and a boolean to check if the value has been set. +func (o *ArtifactMetadataAllOf) GetPushCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PushCount, true +} + +// SetPushCount sets field value +func (o *ArtifactMetadataAllOf) SetPushCount(v int64) { + o.PushCount = v +} + +// GetPullCount returns the PullCount field value +func (o *ArtifactMetadataAllOf) GetPullCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PullCount +} + +// GetPullCountOk returns a tuple with the PullCount field value +// and a boolean to check if the value has been set. +func (o *ArtifactMetadataAllOf) GetPullCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PullCount, true +} + +// SetPullCount sets field value +func (o *ArtifactMetadataAllOf) SetPullCount(v int64) { + o.PullCount = v +} + +// GetVulnMaxSeverity returns the VulnMaxSeverity field value if set, zero value otherwise. +func (o *ArtifactMetadataAllOf) GetVulnMaxSeverity() string { + if o == nil || IsNil(o.VulnMaxSeverity) { + var ret string + return ret + } + return *o.VulnMaxSeverity +} + +// GetVulnMaxSeverityOk returns a tuple with the VulnMaxSeverity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadataAllOf) GetVulnMaxSeverityOk() (*string, bool) { + if o == nil || IsNil(o.VulnMaxSeverity) { + return nil, false + } + return o.VulnMaxSeverity, true +} + +// HasVulnMaxSeverity returns a boolean if a field has been set. +func (o *ArtifactMetadataAllOf) HasVulnMaxSeverity() bool { + if o != nil && !IsNil(o.VulnMaxSeverity) { + return true + } + + return false +} + +// SetVulnMaxSeverity gets a reference to the given string and assigns it to the VulnMaxSeverity field. +func (o *ArtifactMetadataAllOf) SetVulnMaxSeverity(v string) { + o.VulnMaxSeverity = &v +} + +// GetVulnTotalScore returns the VulnTotalScore field value if set, zero value otherwise. +func (o *ArtifactMetadataAllOf) GetVulnTotalScore() float32 { + if o == nil || IsNil(o.VulnTotalScore) { + var ret float32 + return ret + } + return *o.VulnTotalScore +} + +// GetVulnTotalScoreOk returns a tuple with the VulnTotalScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadataAllOf) GetVulnTotalScoreOk() (*float32, bool) { + if o == nil || IsNil(o.VulnTotalScore) { + return nil, false + } + return o.VulnTotalScore, true +} + +// HasVulnTotalScore returns a boolean if a field has been set. +func (o *ArtifactMetadataAllOf) HasVulnTotalScore() bool { + if o != nil && !IsNil(o.VulnTotalScore) { + return true + } + + return false +} + +// SetVulnTotalScore gets a reference to the given float32 and assigns it to the VulnTotalScore field. +func (o *ArtifactMetadataAllOf) SetVulnTotalScore(v float32) { + o.VulnTotalScore = &v +} + +// GetVulnTotalCount returns the VulnTotalCount field value if set, zero value otherwise. +func (o *ArtifactMetadataAllOf) GetVulnTotalCount() int64 { + if o == nil || IsNil(o.VulnTotalCount) { + var ret int64 + return ret + } + return *o.VulnTotalCount +} + +// GetVulnTotalCountOk returns a tuple with the VulnTotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadataAllOf) GetVulnTotalCountOk() (*int64, bool) { + if o == nil || IsNil(o.VulnTotalCount) { + return nil, false + } + return o.VulnTotalCount, true +} + +// HasVulnTotalCount returns a boolean if a field has been set. +func (o *ArtifactMetadataAllOf) HasVulnTotalCount() bool { + if o != nil && !IsNil(o.VulnTotalCount) { + return true + } + + return false +} + +// SetVulnTotalCount gets a reference to the given int64 and assigns it to the VulnTotalCount field. +func (o *ArtifactMetadataAllOf) SetVulnTotalCount(v int64) { + o.VulnTotalCount = &v +} + +// GetVulnFixableCount returns the VulnFixableCount field value if set, zero value otherwise. +func (o *ArtifactMetadataAllOf) GetVulnFixableCount() int64 { + if o == nil || IsNil(o.VulnFixableCount) { + var ret int64 + return ret + } + return *o.VulnFixableCount +} + +// GetVulnFixableCountOk returns a tuple with the VulnFixableCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactMetadataAllOf) GetVulnFixableCountOk() (*int64, bool) { + if o == nil || IsNil(o.VulnFixableCount) { + return nil, false + } + return o.VulnFixableCount, true +} + +// HasVulnFixableCount returns a boolean if a field has been set. +func (o *ArtifactMetadataAllOf) HasVulnFixableCount() bool { + if o != nil && !IsNil(o.VulnFixableCount) { + return true + } + + return false +} + +// SetVulnFixableCount gets a reference to the given int64 and assigns it to the VulnFixableCount field. +func (o *ArtifactMetadataAllOf) SetVulnFixableCount(v int64) { + o.VulnFixableCount = &v +} + +func (o ArtifactMetadataAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["lastPushedAt"] = o.LastPushedAt + if !IsNil(o.LastPulledAt) { + toSerialize["lastPulledAt"] = o.LastPulledAt + } + if !IsNil(o.LastScannedAt) { + toSerialize["lastScannedAt"] = o.LastScannedAt + } + toSerialize["pushCount"] = o.PushCount + toSerialize["pullCount"] = o.PullCount + if !IsNil(o.VulnMaxSeverity) { + toSerialize["vulnMaxSeverity"] = o.VulnMaxSeverity + } + if !IsNil(o.VulnTotalScore) { + toSerialize["vulnTotalScore"] = o.VulnTotalScore + } + if !IsNil(o.VulnTotalCount) { + toSerialize["vulnTotalCount"] = o.VulnTotalCount + } + if !IsNil(o.VulnFixableCount) { + toSerialize["vulnFixableCount"] = o.VulnFixableCount + } + return toSerialize, nil +} + +type NullableArtifactMetadataAllOf struct { + value *ArtifactMetadataAllOf + isSet bool +} + +func (v NullableArtifactMetadataAllOf) Get() *ArtifactMetadataAllOf { + return v.value +} + +func (v *NullableArtifactMetadataAllOf) Set(val *ArtifactMetadataAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactMetadataAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactMetadataAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactMetadataAllOf(val *ArtifactMetadataAllOf) *NullableArtifactMetadataAllOf { + return &NullableArtifactMetadataAllOf{value: val, isSet: true} +} + +func (v NullableArtifactMetadataAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactMetadataAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_artifact_read.go b/products/containerregistry/model_artifact_read.go new file mode 100644 index 0000000..f6181cb --- /dev/null +++ b/products/containerregistry/model_artifact_read.go @@ -0,0 +1,219 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the ArtifactRead type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactRead{} + +// ArtifactRead struct for ArtifactRead +type ArtifactRead struct { + // The digest of the artifact + Id string `json:"id"` + Type string `json:"type"` + Href string `json:"href"` + Metadata ArtifactMetadata `json:"metadata"` + Properties Artifact `json:"properties"` +} + +// NewArtifactRead instantiates a new ArtifactRead object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactRead(id string, type_ string, href string, metadata ArtifactMetadata, properties Artifact) *ArtifactRead { + this := ArtifactRead{} + + this.Id = id + this.Type = type_ + this.Href = href + this.Metadata = metadata + this.Properties = properties + + return &this +} + +// NewArtifactReadWithDefaults instantiates a new ArtifactRead object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactReadWithDefaults() *ArtifactRead { + this := ArtifactRead{} + return &this +} + +// GetId returns the Id field value +func (o *ArtifactRead) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ArtifactRead) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ArtifactRead) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *ArtifactRead) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ArtifactRead) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ArtifactRead) SetType(v string) { + o.Type = v +} + +// GetHref returns the Href field value +func (o *ArtifactRead) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *ArtifactRead) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *ArtifactRead) SetHref(v string) { + o.Href = v +} + +// GetMetadata returns the Metadata field value +func (o *ArtifactRead) GetMetadata() ArtifactMetadata { + if o == nil { + var ret ArtifactMetadata + return ret + } + + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *ArtifactRead) GetMetadataOk() (*ArtifactMetadata, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value +func (o *ArtifactRead) SetMetadata(v ArtifactMetadata) { + o.Metadata = v +} + +// GetProperties returns the Properties field value +func (o *ArtifactRead) GetProperties() Artifact { + if o == nil { + var ret Artifact + return ret + } + + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +func (o *ArtifactRead) GetPropertiesOk() (*Artifact, bool) { + if o == nil { + return nil, false + } + return &o.Properties, true +} + +// SetProperties sets field value +func (o *ArtifactRead) SetProperties(v Artifact) { + o.Properties = v +} + +func (o ArtifactRead) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + toSerialize["href"] = o.Href + toSerialize["metadata"] = o.Metadata + toSerialize["properties"] = o.Properties + return toSerialize, nil +} + +type NullableArtifactRead struct { + value *ArtifactRead + isSet bool +} + +func (v NullableArtifactRead) Get() *ArtifactRead { + return v.value +} + +func (v *NullableArtifactRead) Set(val *ArtifactRead) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactRead) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactRead) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactRead(val *ArtifactRead) *NullableArtifactRead { + return &NullableArtifactRead{value: val, isSet: true} +} + +func (v NullableArtifactRead) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactRead) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_artifact_read_list.go b/products/containerregistry/model_artifact_read_list.go new file mode 100644 index 0000000..7be5cf7 --- /dev/null +++ b/products/containerregistry/model_artifact_read_list.go @@ -0,0 +1,283 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the ArtifactReadList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactReadList{} + +// ArtifactReadList struct for ArtifactReadList +type ArtifactReadList struct { + Id string `json:"id"` + Type string `json:"type"` + Href string `json:"href"` + Items []ArtifactRead `json:"items,omitempty"` + // The offset specified in the request (if none was specified, the default offset is 0). + Offset int32 `json:"offset"` + // The limit specified in the request (if none was specified, use the endpoint's default pagination limit). + Limit int32 `json:"limit"` + Links Links `json:"_links"` +} + +// NewArtifactReadList instantiates a new ArtifactReadList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactReadList(id string, type_ string, href string, offset int32, limit int32, links Links) *ArtifactReadList { + this := ArtifactReadList{} + + this.Id = id + this.Type = type_ + this.Href = href + this.Offset = offset + this.Limit = limit + this.Links = links + + return &this +} + +// NewArtifactReadListWithDefaults instantiates a new ArtifactReadList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactReadListWithDefaults() *ArtifactReadList { + this := ArtifactReadList{} + return &this +} + +// GetId returns the Id field value +func (o *ArtifactReadList) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ArtifactReadList) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ArtifactReadList) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *ArtifactReadList) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ArtifactReadList) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ArtifactReadList) SetType(v string) { + o.Type = v +} + +// GetHref returns the Href field value +func (o *ArtifactReadList) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *ArtifactReadList) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *ArtifactReadList) SetHref(v string) { + o.Href = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ArtifactReadList) GetItems() []ArtifactRead { + if o == nil || IsNil(o.Items) { + var ret []ArtifactRead + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactReadList) GetItemsOk() ([]ArtifactRead, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ArtifactReadList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ArtifactRead and assigns it to the Items field. +func (o *ArtifactReadList) SetItems(v []ArtifactRead) { + o.Items = v +} + +// GetOffset returns the Offset field value +func (o *ArtifactReadList) GetOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *ArtifactReadList) GetOffsetOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *ArtifactReadList) SetOffset(v int32) { + o.Offset = v +} + +// GetLimit returns the Limit field value +func (o *ArtifactReadList) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *ArtifactReadList) GetLimitOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *ArtifactReadList) SetLimit(v int32) { + o.Limit = v +} + +// GetLinks returns the Links field value +func (o *ArtifactReadList) GetLinks() Links { + if o == nil { + var ret Links + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *ArtifactReadList) GetLinksOk() (*Links, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *ArtifactReadList) SetLinks(v Links) { + o.Links = v +} + +func (o ArtifactReadList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + toSerialize["href"] = o.Href + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + toSerialize["offset"] = o.Offset + toSerialize["limit"] = o.Limit + toSerialize["_links"] = o.Links + return toSerialize, nil +} + +type NullableArtifactReadList struct { + value *ArtifactReadList + isSet bool +} + +func (v NullableArtifactReadList) Get() *ArtifactReadList { + return v.value +} + +func (v *NullableArtifactReadList) Set(val *ArtifactReadList) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactReadList) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactReadList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactReadList(val *ArtifactReadList) *NullableArtifactReadList { + return &NullableArtifactReadList{value: val, isSet: true} +} + +func (v NullableArtifactReadList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactReadList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_artifact_vulnerability_read_list.go b/products/containerregistry/model_artifact_vulnerability_read_list.go new file mode 100644 index 0000000..f3f33d7 --- /dev/null +++ b/products/containerregistry/model_artifact_vulnerability_read_list.go @@ -0,0 +1,283 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the ArtifactVulnerabilityReadList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactVulnerabilityReadList{} + +// ArtifactVulnerabilityReadList struct for ArtifactVulnerabilityReadList +type ArtifactVulnerabilityReadList struct { + Id string `json:"id"` + Type string `json:"type"` + Href string `json:"href"` + Items []VulnerabilityRead `json:"items,omitempty"` + // The offset specified in the request (if none was specified, the default offset is 0). + Offset int32 `json:"offset"` + // The limit specified in the request (if none was specified, use the endpoint's default pagination limit). + Limit int32 `json:"limit"` + Links Links `json:"_links"` +} + +// NewArtifactVulnerabilityReadList instantiates a new ArtifactVulnerabilityReadList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactVulnerabilityReadList(id string, type_ string, href string, offset int32, limit int32, links Links) *ArtifactVulnerabilityReadList { + this := ArtifactVulnerabilityReadList{} + + this.Id = id + this.Type = type_ + this.Href = href + this.Offset = offset + this.Limit = limit + this.Links = links + + return &this +} + +// NewArtifactVulnerabilityReadListWithDefaults instantiates a new ArtifactVulnerabilityReadList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactVulnerabilityReadListWithDefaults() *ArtifactVulnerabilityReadList { + this := ArtifactVulnerabilityReadList{} + return &this +} + +// GetId returns the Id field value +func (o *ArtifactVulnerabilityReadList) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ArtifactVulnerabilityReadList) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ArtifactVulnerabilityReadList) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *ArtifactVulnerabilityReadList) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ArtifactVulnerabilityReadList) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ArtifactVulnerabilityReadList) SetType(v string) { + o.Type = v +} + +// GetHref returns the Href field value +func (o *ArtifactVulnerabilityReadList) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *ArtifactVulnerabilityReadList) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *ArtifactVulnerabilityReadList) SetHref(v string) { + o.Href = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ArtifactVulnerabilityReadList) GetItems() []VulnerabilityRead { + if o == nil || IsNil(o.Items) { + var ret []VulnerabilityRead + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactVulnerabilityReadList) GetItemsOk() ([]VulnerabilityRead, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ArtifactVulnerabilityReadList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []VulnerabilityRead and assigns it to the Items field. +func (o *ArtifactVulnerabilityReadList) SetItems(v []VulnerabilityRead) { + o.Items = v +} + +// GetOffset returns the Offset field value +func (o *ArtifactVulnerabilityReadList) GetOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *ArtifactVulnerabilityReadList) GetOffsetOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *ArtifactVulnerabilityReadList) SetOffset(v int32) { + o.Offset = v +} + +// GetLimit returns the Limit field value +func (o *ArtifactVulnerabilityReadList) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *ArtifactVulnerabilityReadList) GetLimitOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *ArtifactVulnerabilityReadList) SetLimit(v int32) { + o.Limit = v +} + +// GetLinks returns the Links field value +func (o *ArtifactVulnerabilityReadList) GetLinks() Links { + if o == nil { + var ret Links + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *ArtifactVulnerabilityReadList) GetLinksOk() (*Links, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *ArtifactVulnerabilityReadList) SetLinks(v Links) { + o.Links = v +} + +func (o ArtifactVulnerabilityReadList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + toSerialize["href"] = o.Href + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + toSerialize["offset"] = o.Offset + toSerialize["limit"] = o.Limit + toSerialize["_links"] = o.Links + return toSerialize, nil +} + +type NullableArtifactVulnerabilityReadList struct { + value *ArtifactVulnerabilityReadList + isSet bool +} + +func (v NullableArtifactVulnerabilityReadList) Get() *ArtifactVulnerabilityReadList { + return v.value +} + +func (v *NullableArtifactVulnerabilityReadList) Set(val *ArtifactVulnerabilityReadList) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactVulnerabilityReadList) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactVulnerabilityReadList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactVulnerabilityReadList(val *ArtifactVulnerabilityReadList) *NullableArtifactVulnerabilityReadList { + return &NullableArtifactVulnerabilityReadList{value: val, isSet: true} +} + +func (v NullableArtifactVulnerabilityReadList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactVulnerabilityReadList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_credentials.go b/products/containerregistry/model_credentials.go index fc3799c..9fb39dc 100644 --- a/products/containerregistry/model_credentials.go +++ b/products/containerregistry/model_credentials.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,10 +15,13 @@ import ( "encoding/json" ) +// checks if the Credentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Credentials{} + // Credentials struct for Credentials type Credentials struct { - Password *string `json:"password"` - Username *string `json:"username"` + Password string `json:"password"` + Username string `json:"username"` } // NewCredentials instantiates a new Credentials object @@ -28,8 +31,8 @@ type Credentials struct { func NewCredentials(password string, username string) *Credentials { this := Credentials{} - this.Password = &password - this.Username = &username + this.Password = password + this.Username = username return &this } @@ -43,92 +46,58 @@ func NewCredentialsWithDefaults() *Credentials { } // GetPassword returns the Password field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Credentials) GetPassword() *string { +func (o *Credentials) GetPassword() string { if o == nil { - return nil + var ret string + return ret } return o.Password - } // GetPasswordOk returns a tuple with the Password field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Credentials) GetPasswordOk() (*string, bool) { if o == nil { return nil, false } - - return o.Password, true + return &o.Password, true } // SetPassword sets field value func (o *Credentials) SetPassword(v string) { - - o.Password = &v - -} - -// HasPassword returns a boolean if a field has been set. -func (o *Credentials) HasPassword() bool { - if o != nil && o.Password != nil { - return true - } - - return false + o.Password = v } // GetUsername returns the Username field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Credentials) GetUsername() *string { +func (o *Credentials) GetUsername() string { if o == nil { - return nil + var ret string + return ret } return o.Username - } // GetUsernameOk returns a tuple with the Username field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Credentials) GetUsernameOk() (*string, bool) { if o == nil { return nil, false } - - return o.Username, true + return &o.Username, true } // SetUsername sets field value func (o *Credentials) SetUsername(v string) { - - o.Username = &v - -} - -// HasUsername returns a boolean if a field has been set. -func (o *Credentials) HasUsername() bool { - if o != nil && o.Username != nil { - return true - } - - return false + o.Username = v } -func (o Credentials) MarshalJSON() ([]byte, error) { +func (o Credentials) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Password != nil { - toSerialize["password"] = o.Password - } - - if o.Username != nil { - toSerialize["username"] = o.Username - } - - return json.Marshal(toSerialize) + toSerialize["password"] = o.Password + toSerialize["username"] = o.Username + return toSerialize, nil } type NullableCredentials struct { diff --git a/products/containerregistry/model_day.go b/products/containerregistry/model_day.go index 92b1b54..731d015 100644 --- a/products/containerregistry/model_day.go +++ b/products/containerregistry/model_day.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ diff --git a/products/containerregistry/model_error.go b/products/containerregistry/model_error.go new file mode 100644 index 0000000..18c0fe8 --- /dev/null +++ b/products/containerregistry/model_error.go @@ -0,0 +1,156 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + +// Error The Error object is used to represent an error response from the API. +type Error struct { + // The HTTP status code of the operation. + HttpStatus *int32 `json:"httpStatus,omitempty"` + // A list of error messages. + Messages []ErrorMessages `json:"messages,omitempty"` +} + +// NewError instantiates a new Error object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewError() *Error { + this := Error{} + + return &this +} + +// NewErrorWithDefaults instantiates a new Error object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetHttpStatus returns the HttpStatus field value if set, zero value otherwise. +func (o *Error) GetHttpStatus() int32 { + if o == nil || IsNil(o.HttpStatus) { + var ret int32 + return ret + } + return *o.HttpStatus +} + +// GetHttpStatusOk returns a tuple with the HttpStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetHttpStatusOk() (*int32, bool) { + if o == nil || IsNil(o.HttpStatus) { + return nil, false + } + return o.HttpStatus, true +} + +// HasHttpStatus returns a boolean if a field has been set. +func (o *Error) HasHttpStatus() bool { + if o != nil && !IsNil(o.HttpStatus) { + return true + } + + return false +} + +// SetHttpStatus gets a reference to the given int32 and assigns it to the HttpStatus field. +func (o *Error) SetHttpStatus(v int32) { + o.HttpStatus = &v +} + +// GetMessages returns the Messages field value if set, zero value otherwise. +func (o *Error) GetMessages() []ErrorMessages { + if o == nil || IsNil(o.Messages) { + var ret []ErrorMessages + return ret + } + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetMessagesOk() ([]ErrorMessages, bool) { + if o == nil || IsNil(o.Messages) { + return nil, false + } + return o.Messages, true +} + +// HasMessages returns a boolean if a field has been set. +func (o *Error) HasMessages() bool { + if o != nil && !IsNil(o.Messages) { + return true + } + + return false +} + +// SetMessages gets a reference to the given []ErrorMessages and assigns it to the Messages field. +func (o *Error) SetMessages(v []ErrorMessages) { + o.Messages = v +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.HttpStatus) { + toSerialize["httpStatus"] = o.HttpStatus + } + if !IsNil(o.Messages) { + toSerialize["messages"] = o.Messages + } + return toSerialize, nil +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_error_messages.go b/products/containerregistry/model_error_messages.go new file mode 100644 index 0000000..393c28f --- /dev/null +++ b/products/containerregistry/model_error_messages.go @@ -0,0 +1,156 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the ErrorMessages type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorMessages{} + +// ErrorMessages struct for ErrorMessages +type ErrorMessages struct { + // Application internal error code + ErrorCode *string `json:"errorCode,omitempty"` + // A human readable explanation specific to this occurrence of the problem. + Message *string `json:"message,omitempty"` +} + +// NewErrorMessages instantiates a new ErrorMessages object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewErrorMessages() *ErrorMessages { + this := ErrorMessages{} + + return &this +} + +// NewErrorMessagesWithDefaults instantiates a new ErrorMessages object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorMessagesWithDefaults() *ErrorMessages { + this := ErrorMessages{} + return &this +} + +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *ErrorMessages) GetErrorCode() string { + if o == nil || IsNil(o.ErrorCode) { + var ret string + return ret + } + return *o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorMessages) GetErrorCodeOk() (*string, bool) { + if o == nil || IsNil(o.ErrorCode) { + return nil, false + } + return o.ErrorCode, true +} + +// HasErrorCode returns a boolean if a field has been set. +func (o *ErrorMessages) HasErrorCode() bool { + if o != nil && !IsNil(o.ErrorCode) { + return true + } + + return false +} + +// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field. +func (o *ErrorMessages) SetErrorCode(v string) { + o.ErrorCode = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ErrorMessages) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorMessages) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ErrorMessages) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ErrorMessages) SetMessage(v string) { + o.Message = &v +} + +func (o ErrorMessages) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ErrorCode) { + toSerialize["errorCode"] = o.ErrorCode + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableErrorMessages struct { + value *ErrorMessages + isSet bool +} + +func (v NullableErrorMessages) Get() *ErrorMessages { + return v.value +} + +func (v *NullableErrorMessages) Set(val *ErrorMessages) { + v.value = val + v.isSet = true +} + +func (v NullableErrorMessages) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorMessages) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorMessages(val *ErrorMessages) *NullableErrorMessages { + return &NullableErrorMessages{value: val, isSet: true} +} + +func (v NullableErrorMessages) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorMessages) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_feature.go b/products/containerregistry/model_feature.go new file mode 100644 index 0000000..447f4d1 --- /dev/null +++ b/products/containerregistry/model_feature.go @@ -0,0 +1,148 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the Feature type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Feature{} + +// Feature An optional registry feature +type Feature struct { + Enabled bool `json:"enabled"` + Properties map[string]interface{} `json:"properties,omitempty"` +} + +// NewFeature instantiates a new Feature object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeature(enabled bool) *Feature { + this := Feature{} + + this.Enabled = enabled + + return &this +} + +// NewFeatureWithDefaults instantiates a new Feature object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeatureWithDefaults() *Feature { + this := Feature{} + var enabled bool = true + this.Enabled = enabled + return &this +} + +// GetEnabled returns the Enabled field value +func (o *Feature) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *Feature) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *Feature) SetEnabled(v bool) { + o.Enabled = v +} + +// GetProperties returns the Properties field value if set, zero value otherwise. +func (o *Feature) GetProperties() map[string]interface{} { + if o == nil || IsNil(o.Properties) { + var ret map[string]interface{} + return ret + } + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Feature) GetPropertiesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Properties) { + return map[string]interface{}{}, false + } + return o.Properties, true +} + +// HasProperties returns a boolean if a field has been set. +func (o *Feature) HasProperties() bool { + if o != nil && !IsNil(o.Properties) { + return true + } + + return false +} + +// SetProperties gets a reference to the given map[string]interface{} and assigns it to the Properties field. +func (o *Feature) SetProperties(v map[string]interface{}) { + o.Properties = v +} + +func (o Feature) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + if !IsNil(o.Properties) { + toSerialize["properties"] = o.Properties + } + return toSerialize, nil +} + +type NullableFeature struct { + value *Feature + isSet bool +} + +func (v NullableFeature) Get() *Feature { + return v.value +} + +func (v *NullableFeature) Set(val *Feature) { + v.value = val + v.isSet = true +} + +func (v NullableFeature) IsSet() bool { + return v.isSet +} + +func (v *NullableFeature) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeature(val *Feature) *NullableFeature { + return &NullableFeature{value: val, isSet: true} +} + +func (v NullableFeature) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeature) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_feature_vulnerability_scanning.go b/products/containerregistry/model_feature_vulnerability_scanning.go new file mode 100644 index 0000000..f8ab964 --- /dev/null +++ b/products/containerregistry/model_feature_vulnerability_scanning.go @@ -0,0 +1,148 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the FeatureVulnerabilityScanning type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeatureVulnerabilityScanning{} + +// FeatureVulnerabilityScanning Vulnerability scanning for images. __Note__: this is a paid add-on +type FeatureVulnerabilityScanning struct { + Enabled bool `json:"enabled"` + Properties map[string]interface{} `json:"properties,omitempty"` +} + +// NewFeatureVulnerabilityScanning instantiates a new FeatureVulnerabilityScanning object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeatureVulnerabilityScanning(enabled bool) *FeatureVulnerabilityScanning { + this := FeatureVulnerabilityScanning{} + + this.Enabled = enabled + + return &this +} + +// NewFeatureVulnerabilityScanningWithDefaults instantiates a new FeatureVulnerabilityScanning object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeatureVulnerabilityScanningWithDefaults() *FeatureVulnerabilityScanning { + this := FeatureVulnerabilityScanning{} + var enabled bool = true + this.Enabled = enabled + return &this +} + +// GetEnabled returns the Enabled field value +func (o *FeatureVulnerabilityScanning) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *FeatureVulnerabilityScanning) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *FeatureVulnerabilityScanning) SetEnabled(v bool) { + o.Enabled = v +} + +// GetProperties returns the Properties field value if set, zero value otherwise. +func (o *FeatureVulnerabilityScanning) GetProperties() map[string]interface{} { + if o == nil || IsNil(o.Properties) { + var ret map[string]interface{} + return ret + } + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureVulnerabilityScanning) GetPropertiesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Properties) { + return map[string]interface{}{}, false + } + return o.Properties, true +} + +// HasProperties returns a boolean if a field has been set. +func (o *FeatureVulnerabilityScanning) HasProperties() bool { + if o != nil && !IsNil(o.Properties) { + return true + } + + return false +} + +// SetProperties gets a reference to the given map[string]interface{} and assigns it to the Properties field. +func (o *FeatureVulnerabilityScanning) SetProperties(v map[string]interface{}) { + o.Properties = v +} + +func (o FeatureVulnerabilityScanning) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + if !IsNil(o.Properties) { + toSerialize["properties"] = o.Properties + } + return toSerialize, nil +} + +type NullableFeatureVulnerabilityScanning struct { + value *FeatureVulnerabilityScanning + isSet bool +} + +func (v NullableFeatureVulnerabilityScanning) Get() *FeatureVulnerabilityScanning { + return v.value +} + +func (v *NullableFeatureVulnerabilityScanning) Set(val *FeatureVulnerabilityScanning) { + v.value = val + v.isSet = true +} + +func (v NullableFeatureVulnerabilityScanning) IsSet() bool { + return v.isSet +} + +func (v *NullableFeatureVulnerabilityScanning) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeatureVulnerabilityScanning(val *FeatureVulnerabilityScanning) *NullableFeatureVulnerabilityScanning { + return &NullableFeatureVulnerabilityScanning{value: val, isSet: true} +} + +func (v NullableFeatureVulnerabilityScanning) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeatureVulnerabilityScanning) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_links.go b/products/containerregistry/model_links.go new file mode 100644 index 0000000..edcf020 --- /dev/null +++ b/products/containerregistry/model_links.go @@ -0,0 +1,193 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the Links type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Links{} + +// Links URLs to navigate the different pages. As of now we always only return a single page. +type Links struct { + // URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0. + Prev *string `json:"prev,omitempty"` + // URL (with offset and limit parameters) of the current page. + Self *string `json:"self,omitempty"` + // URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements. + Next *string `json:"next,omitempty"` +} + +// NewLinks instantiates a new Links object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLinks() *Links { + this := Links{} + + return &this +} + +// NewLinksWithDefaults instantiates a new Links object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLinksWithDefaults() *Links { + this := Links{} + return &this +} + +// GetPrev returns the Prev field value if set, zero value otherwise. +func (o *Links) GetPrev() string { + if o == nil || IsNil(o.Prev) { + var ret string + return ret + } + return *o.Prev +} + +// GetPrevOk returns a tuple with the Prev field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Links) GetPrevOk() (*string, bool) { + if o == nil || IsNil(o.Prev) { + return nil, false + } + return o.Prev, true +} + +// HasPrev returns a boolean if a field has been set. +func (o *Links) HasPrev() bool { + if o != nil && !IsNil(o.Prev) { + return true + } + + return false +} + +// SetPrev gets a reference to the given string and assigns it to the Prev field. +func (o *Links) SetPrev(v string) { + o.Prev = &v +} + +// GetSelf returns the Self field value if set, zero value otherwise. +func (o *Links) GetSelf() string { + if o == nil || IsNil(o.Self) { + var ret string + return ret + } + return *o.Self +} + +// GetSelfOk returns a tuple with the Self field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Links) GetSelfOk() (*string, bool) { + if o == nil || IsNil(o.Self) { + return nil, false + } + return o.Self, true +} + +// HasSelf returns a boolean if a field has been set. +func (o *Links) HasSelf() bool { + if o != nil && !IsNil(o.Self) { + return true + } + + return false +} + +// SetSelf gets a reference to the given string and assigns it to the Self field. +func (o *Links) SetSelf(v string) { + o.Self = &v +} + +// GetNext returns the Next field value if set, zero value otherwise. +func (o *Links) GetNext() string { + if o == nil || IsNil(o.Next) { + var ret string + return ret + } + return *o.Next +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Links) GetNextOk() (*string, bool) { + if o == nil || IsNil(o.Next) { + return nil, false + } + return o.Next, true +} + +// HasNext returns a boolean if a field has been set. +func (o *Links) HasNext() bool { + if o != nil && !IsNil(o.Next) { + return true + } + + return false +} + +// SetNext gets a reference to the given string and assigns it to the Next field. +func (o *Links) SetNext(v string) { + o.Next = &v +} + +func (o Links) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Prev) { + toSerialize["prev"] = o.Prev + } + if !IsNil(o.Self) { + toSerialize["self"] = o.Self + } + if !IsNil(o.Next) { + toSerialize["next"] = o.Next + } + return toSerialize, nil +} + +type NullableLinks struct { + value *Links + isSet bool +} + +func (v NullableLinks) Get() *Links { + return v.value +} + +func (v *NullableLinks) Set(val *Links) { + v.value = val + v.isSet = true +} + +func (v NullableLinks) IsSet() bool { + return v.isSet +} + +func (v *NullableLinks) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLinks(val *Links) *NullableLinks { + return &NullableLinks{value: val, isSet: true} +} + +func (v NullableLinks) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLinks) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_location.go b/products/containerregistry/model_location.go index 522628b..964640a 100644 --- a/products/containerregistry/model_location.go +++ b/products/containerregistry/model_location.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Location type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Location{} + // Location struct for Location type Location struct { Id *string `json:"id,omitempty"` @@ -38,51 +41,44 @@ func NewLocationWithDefaults() *Location { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Location) GetId() *string { - if o == nil { - return nil +// GetId returns the Id field value if set, zero value otherwise. +func (o *Location) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret } - - return o.Id - + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Location) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *Location) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *Location) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } -func (o Location) MarshalJSON() ([]byte, error) { +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Location) SetId(v string) { + o.Id = &v +} + +func (o Location) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableLocation struct { diff --git a/products/containerregistry/model_locations_response.go b/products/containerregistry/model_locations_response.go index f557bed..3d80537 100644 --- a/products/containerregistry/model_locations_response.go +++ b/products/containerregistry/model_locations_response.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,12 +15,15 @@ import ( "encoding/json" ) +// checks if the LocationsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LocationsResponse{} + // LocationsResponse struct for LocationsResponse type LocationsResponse struct { - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Items *[]Location `json:"items,omitempty"` - Type *string `json:"type,omitempty"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Items []Location `json:"items,omitempty"` + Type *string `json:"type,omitempty"` } // NewLocationsResponse instantiates a new LocationsResponse object @@ -41,175 +44,149 @@ func NewLocationsResponseWithDefaults() *LocationsResponse { return &this } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LocationsResponse) GetHref() *string { - if o == nil { - return nil +// GetHref returns the Href field value if set, zero value otherwise. +func (o *LocationsResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret } - - return o.Href - + return *o.Href } -// GetHrefOk returns a tuple with the Href field value +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LocationsResponse) GetHrefOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Href) { return nil, false } - return o.Href, true } -// SetHref sets field value -func (o *LocationsResponse) SetHref(v string) { - - o.Href = &v - -} - // HasHref returns a boolean if a field has been set. func (o *LocationsResponse) HasHref() bool { - if o != nil && o.Href != nil { + if o != nil && !IsNil(o.Href) { return true } return false } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LocationsResponse) GetId() *string { - if o == nil { - return nil - } - - return o.Id +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *LocationsResponse) SetHref(v string) { + o.Href = &v +} +// GetId returns the Id field value if set, zero value otherwise. +func (o *LocationsResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LocationsResponse) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *LocationsResponse) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *LocationsResponse) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Location will be returned -func (o *LocationsResponse) GetItems() *[]Location { - if o == nil { - return nil - } +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *LocationsResponse) SetId(v string) { + o.Id = &v +} +// GetItems returns the Items field value if set, zero value otherwise. +func (o *LocationsResponse) GetItems() []Location { + if o == nil || IsNil(o.Items) { + var ret []Location + return ret + } return o.Items - } -// GetItemsOk returns a tuple with the Items field value +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LocationsResponse) GetItemsOk() (*[]Location, bool) { - if o == nil { +func (o *LocationsResponse) GetItemsOk() ([]Location, bool) { + if o == nil || IsNil(o.Items) { return nil, false } - return o.Items, true } -// SetItems sets field value -func (o *LocationsResponse) SetItems(v []Location) { - - o.Items = &v - -} - // HasItems returns a boolean if a field has been set. func (o *LocationsResponse) HasItems() bool { - if o != nil && o.Items != nil { + if o != nil && !IsNil(o.Items) { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LocationsResponse) GetType() *string { - if o == nil { - return nil - } - - return o.Type +// SetItems gets a reference to the given []Location and assigns it to the Items field. +func (o *LocationsResponse) SetItems(v []Location) { + o.Items = v +} +// GetType returns the Type field value if set, zero value otherwise. +func (o *LocationsResponse) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type } -// GetTypeOk returns a tuple with the Type field value +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LocationsResponse) GetTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Type, true } -// SetType sets field value -func (o *LocationsResponse) SetType(v string) { - - o.Type = &v - -} - // HasType returns a boolean if a field has been set. func (o *LocationsResponse) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } return false } -func (o LocationsResponse) MarshalJSON() ([]byte, error) { +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *LocationsResponse) SetType(v string) { + o.Type = &v +} + +func (o LocationsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Href != nil { + if !IsNil(o.Href) { toSerialize["href"] = o.Href } - - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - - toSerialize["items"] = o.Items - - if o.Type != nil { + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableLocationsResponse struct { diff --git a/products/containerregistry/model_metadata.go b/products/containerregistry/model_metadata.go new file mode 100644 index 0000000..3b13bb4 --- /dev/null +++ b/products/containerregistry/model_metadata.go @@ -0,0 +1,343 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" + + "time" +) + +// checks if the Metadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Metadata{} + +// Metadata Metadata of the resource. +type Metadata struct { + // The ISO 8601 creation timestamp. + CreatedDate *IonosTime `json:"createdDate,omitempty"` + // Unique name of the identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // Unique id of the identity that created the resource. + CreatedByUserId *string `json:"createdByUserId,omitempty"` + // The ISO 8601 modified timestamp. + LastModifiedDate *IonosTime `json:"lastModifiedDate,omitempty"` + // Unique name of the identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // Unique id of the identity that last modified the resource. + LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` + // Unique name of the resource. + ResourceURN *string `json:"resourceURN,omitempty"` +} + +// NewMetadata instantiates a new Metadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMetadata() *Metadata { + this := Metadata{} + + return &this +} + +// NewMetadataWithDefaults instantiates a new Metadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMetadataWithDefaults() *Metadata { + this := Metadata{} + return &this +} + +// GetCreatedDate returns the CreatedDate field value if set, zero value otherwise. +func (o *Metadata) GetCreatedDate() time.Time { + if o == nil || IsNil(o.CreatedDate) { + var ret time.Time + return ret + } + return o.CreatedDate.Time +} + +// GetCreatedDateOk returns a tuple with the CreatedDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metadata) GetCreatedDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedDate) { + return nil, false + } + return &o.CreatedDate.Time, true +} + +// HasCreatedDate returns a boolean if a field has been set. +func (o *Metadata) HasCreatedDate() bool { + if o != nil && !IsNil(o.CreatedDate) { + return true + } + + return false +} + +// SetCreatedDate gets a reference to the given time.Time and assigns it to the CreatedDate field. +func (o *Metadata) SetCreatedDate(v time.Time) { + o.CreatedDate = &IonosTime{v} +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *Metadata) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy) { + var ret string + return ret + } + return *o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metadata) GetCreatedByOk() (*string, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *Metadata) HasCreatedBy() bool { + if o != nil && !IsNil(o.CreatedBy) { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. +func (o *Metadata) SetCreatedBy(v string) { + o.CreatedBy = &v +} + +// GetCreatedByUserId returns the CreatedByUserId field value if set, zero value otherwise. +func (o *Metadata) GetCreatedByUserId() string { + if o == nil || IsNil(o.CreatedByUserId) { + var ret string + return ret + } + return *o.CreatedByUserId +} + +// GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metadata) GetCreatedByUserIdOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByUserId) { + return nil, false + } + return o.CreatedByUserId, true +} + +// HasCreatedByUserId returns a boolean if a field has been set. +func (o *Metadata) HasCreatedByUserId() bool { + if o != nil && !IsNil(o.CreatedByUserId) { + return true + } + + return false +} + +// SetCreatedByUserId gets a reference to the given string and assigns it to the CreatedByUserId field. +func (o *Metadata) SetCreatedByUserId(v string) { + o.CreatedByUserId = &v +} + +// GetLastModifiedDate returns the LastModifiedDate field value if set, zero value otherwise. +func (o *Metadata) GetLastModifiedDate() time.Time { + if o == nil || IsNil(o.LastModifiedDate) { + var ret time.Time + return ret + } + return o.LastModifiedDate.Time +} + +// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metadata) GetLastModifiedDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastModifiedDate) { + return nil, false + } + return &o.LastModifiedDate.Time, true +} + +// HasLastModifiedDate returns a boolean if a field has been set. +func (o *Metadata) HasLastModifiedDate() bool { + if o != nil && !IsNil(o.LastModifiedDate) { + return true + } + + return false +} + +// SetLastModifiedDate gets a reference to the given time.Time and assigns it to the LastModifiedDate field. +func (o *Metadata) SetLastModifiedDate(v time.Time) { + o.LastModifiedDate = &IonosTime{v} +} + +// GetLastModifiedBy returns the LastModifiedBy field value if set, zero value otherwise. +func (o *Metadata) GetLastModifiedBy() string { + if o == nil || IsNil(o.LastModifiedBy) { + var ret string + return ret + } + return *o.LastModifiedBy +} + +// GetLastModifiedByOk returns a tuple with the LastModifiedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metadata) GetLastModifiedByOk() (*string, bool) { + if o == nil || IsNil(o.LastModifiedBy) { + return nil, false + } + return o.LastModifiedBy, true +} + +// HasLastModifiedBy returns a boolean if a field has been set. +func (o *Metadata) HasLastModifiedBy() bool { + if o != nil && !IsNil(o.LastModifiedBy) { + return true + } + + return false +} + +// SetLastModifiedBy gets a reference to the given string and assigns it to the LastModifiedBy field. +func (o *Metadata) SetLastModifiedBy(v string) { + o.LastModifiedBy = &v +} + +// GetLastModifiedByUserId returns the LastModifiedByUserId field value if set, zero value otherwise. +func (o *Metadata) GetLastModifiedByUserId() string { + if o == nil || IsNil(o.LastModifiedByUserId) { + var ret string + return ret + } + return *o.LastModifiedByUserId +} + +// GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metadata) GetLastModifiedByUserIdOk() (*string, bool) { + if o == nil || IsNil(o.LastModifiedByUserId) { + return nil, false + } + return o.LastModifiedByUserId, true +} + +// HasLastModifiedByUserId returns a boolean if a field has been set. +func (o *Metadata) HasLastModifiedByUserId() bool { + if o != nil && !IsNil(o.LastModifiedByUserId) { + return true + } + + return false +} + +// SetLastModifiedByUserId gets a reference to the given string and assigns it to the LastModifiedByUserId field. +func (o *Metadata) SetLastModifiedByUserId(v string) { + o.LastModifiedByUserId = &v +} + +// GetResourceURN returns the ResourceURN field value if set, zero value otherwise. +func (o *Metadata) GetResourceURN() string { + if o == nil || IsNil(o.ResourceURN) { + var ret string + return ret + } + return *o.ResourceURN +} + +// GetResourceURNOk returns a tuple with the ResourceURN field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metadata) GetResourceURNOk() (*string, bool) { + if o == nil || IsNil(o.ResourceURN) { + return nil, false + } + return o.ResourceURN, true +} + +// HasResourceURN returns a boolean if a field has been set. +func (o *Metadata) HasResourceURN() bool { + if o != nil && !IsNil(o.ResourceURN) { + return true + } + + return false +} + +// SetResourceURN gets a reference to the given string and assigns it to the ResourceURN field. +func (o *Metadata) SetResourceURN(v string) { + o.ResourceURN = &v +} + +func (o Metadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedDate) { + toSerialize["createdDate"] = o.CreatedDate + } + if !IsNil(o.CreatedBy) { + toSerialize["createdBy"] = o.CreatedBy + } + if !IsNil(o.CreatedByUserId) { + toSerialize["createdByUserId"] = o.CreatedByUserId + } + if !IsNil(o.LastModifiedDate) { + toSerialize["lastModifiedDate"] = o.LastModifiedDate + } + if !IsNil(o.LastModifiedBy) { + toSerialize["lastModifiedBy"] = o.LastModifiedBy + } + if !IsNil(o.LastModifiedByUserId) { + toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId + } + if !IsNil(o.ResourceURN) { + toSerialize["resourceURN"] = o.ResourceURN + } + return toSerialize, nil +} + +type NullableMetadata struct { + value *Metadata + isSet bool +} + +func (v NullableMetadata) Get() *Metadata { + return v.value +} + +func (v *NullableMetadata) Set(val *Metadata) { + v.value = val + v.isSet = true +} + +func (v NullableMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetadata(val *Metadata) *NullableMetadata { + return &NullableMetadata{value: val, isSet: true} +} + +func (v NullableMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_pagination.go b/products/containerregistry/model_pagination.go index f2287c1..aecb619 100644 --- a/products/containerregistry/model_pagination.go +++ b/products/containerregistry/model_pagination.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,23 +15,28 @@ import ( "encoding/json" ) -// Pagination struct for Pagination +// checks if the Pagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pagination{} + +// Pagination Pagination information. The offset and limit parameters are used to navigate the list of elements. The _links object contains URLs to navigate the different pages. type Pagination struct { - // The maximum number of elements to return (used together with pagination.token for pagination) - Limit *int32 `json:"limit"` - // An opaque token used to iterate the set of results (used together with limit for pagination) - Token *string `json:"token"` + // The offset specified in the request (if none was specified, the default offset is 0). + Offset int32 `json:"offset"` + // The limit specified in the request (if none was specified, use the endpoint's default pagination limit). + Limit int32 `json:"limit"` + Links Links `json:"_links"` } // NewPagination instantiates a new Pagination object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPagination(limit int32, token string) *Pagination { +func NewPagination(offset int32, limit int32, links Links) *Pagination { this := Pagination{} - this.Limit = &limit - this.Token = &token + this.Offset = offset + this.Limit = limit + this.Links = links return &this } @@ -44,93 +49,84 @@ func NewPaginationWithDefaults() *Pagination { return &this } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *Pagination) GetLimit() *int32 { +// GetOffset returns the Offset field value +func (o *Pagination) GetOffset() int32 { if o == nil { - return nil + var ret int32 + return ret } - return o.Limit - + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Pagination) GetLimitOk() (*int32, bool) { +func (o *Pagination) GetOffsetOk() (*int32, bool) { if o == nil { return nil, false } - - return o.Limit, true + return &o.Offset, true } -// SetLimit sets field value -func (o *Pagination) SetLimit(v int32) { - - o.Limit = &v - -} - -// HasLimit returns a boolean if a field has been set. -func (o *Pagination) HasLimit() bool { - if o != nil && o.Limit != nil { - return true - } - - return false +// SetOffset sets field value +func (o *Pagination) SetOffset(v int32) { + o.Offset = v } -// GetToken returns the Token field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Pagination) GetToken() *string { +// GetLimit returns the Limit field value +func (o *Pagination) GetLimit() int32 { if o == nil { - return nil + var ret int32 + return ret } - return o.Token - + return o.Limit } -// GetTokenOk returns a tuple with the Token field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Pagination) GetTokenOk() (*string, bool) { +func (o *Pagination) GetLimitOk() (*int32, bool) { if o == nil { return nil, false } - - return o.Token, true + return &o.Limit, true } -// SetToken sets field value -func (o *Pagination) SetToken(v string) { - - o.Token = &v - +// SetLimit sets field value +func (o *Pagination) SetLimit(v int32) { + o.Limit = v } -// HasToken returns a boolean if a field has been set. -func (o *Pagination) HasToken() bool { - if o != nil && o.Token != nil { - return true +// GetLinks returns the Links field value +func (o *Pagination) GetLinks() Links { + if o == nil { + var ret Links + return ret } - return false + return o.Links } -func (o Pagination) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Limit != nil { - toSerialize["limit"] = o.Limit +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetLinksOk() (*Links, bool) { + if o == nil { + return nil, false } + return &o.Links, true +} - if o.Token != nil { - toSerialize["token"] = o.Token - } +// SetLinks sets field value +func (o *Pagination) SetLinks(v Links) { + o.Links = v +} - return json.Marshal(toSerialize) +func (o Pagination) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["offset"] = o.Offset + toSerialize["limit"] = o.Limit + toSerialize["_links"] = o.Links + return toSerialize, nil } type NullablePagination struct { diff --git a/products/containerregistry/model_pagination_links.go b/products/containerregistry/model_pagination_links.go index 954274c..2911d32 100644 --- a/products/containerregistry/model_pagination_links.go +++ b/products/containerregistry/model_pagination_links.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,11 +15,14 @@ import ( "encoding/json" ) +// checks if the PaginationLinks type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginationLinks{} + // PaginationLinks struct for PaginationLinks type PaginationLinks struct { - Next *string `json:"next"` - Previous *string `json:"previous"` - Self *string `json:"self"` + Next string `json:"next"` + Previous string `json:"previous"` + Self string `json:"self"` } // NewPaginationLinks instantiates a new PaginationLinks object @@ -29,9 +32,9 @@ type PaginationLinks struct { func NewPaginationLinks(next string, previous string, self string) *PaginationLinks { this := PaginationLinks{} - this.Next = &next - this.Previous = &previous - this.Self = &self + this.Next = next + this.Previous = previous + this.Self = self return &this } @@ -45,134 +48,83 @@ func NewPaginationLinksWithDefaults() *PaginationLinks { } // GetNext returns the Next field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PaginationLinks) GetNext() *string { +func (o *PaginationLinks) GetNext() string { if o == nil { - return nil + var ret string + return ret } return o.Next - } // GetNextOk returns a tuple with the Next field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PaginationLinks) GetNextOk() (*string, bool) { if o == nil { return nil, false } - - return o.Next, true + return &o.Next, true } // SetNext sets field value func (o *PaginationLinks) SetNext(v string) { - - o.Next = &v - -} - -// HasNext returns a boolean if a field has been set. -func (o *PaginationLinks) HasNext() bool { - if o != nil && o.Next != nil { - return true - } - - return false + o.Next = v } // GetPrevious returns the Previous field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PaginationLinks) GetPrevious() *string { +func (o *PaginationLinks) GetPrevious() string { if o == nil { - return nil + var ret string + return ret } return o.Previous - } // GetPreviousOk returns a tuple with the Previous field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PaginationLinks) GetPreviousOk() (*string, bool) { if o == nil { return nil, false } - - return o.Previous, true + return &o.Previous, true } // SetPrevious sets field value func (o *PaginationLinks) SetPrevious(v string) { - - o.Previous = &v - -} - -// HasPrevious returns a boolean if a field has been set. -func (o *PaginationLinks) HasPrevious() bool { - if o != nil && o.Previous != nil { - return true - } - - return false + o.Previous = v } // GetSelf returns the Self field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PaginationLinks) GetSelf() *string { +func (o *PaginationLinks) GetSelf() string { if o == nil { - return nil + var ret string + return ret } return o.Self - } // GetSelfOk returns a tuple with the Self field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PaginationLinks) GetSelfOk() (*string, bool) { if o == nil { return nil, false } - - return o.Self, true + return &o.Self, true } // SetSelf sets field value func (o *PaginationLinks) SetSelf(v string) { - - o.Self = &v - + o.Self = v } -// HasSelf returns a boolean if a field has been set. -func (o *PaginationLinks) HasSelf() bool { - if o != nil && o.Self != nil { - return true - } - - return false -} - -func (o PaginationLinks) MarshalJSON() ([]byte, error) { +func (o PaginationLinks) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Next != nil { - toSerialize["next"] = o.Next - } - - if o.Previous != nil { - toSerialize["previous"] = o.Previous - } - - if o.Self != nil { - toSerialize["self"] = o.Self - } - - return json.Marshal(toSerialize) + toSerialize["next"] = o.Next + toSerialize["previous"] = o.Previous + toSerialize["self"] = o.Self + return toSerialize, nil } type NullablePaginationLinks struct { diff --git a/products/containerregistry/model_patch_registry_input.go b/products/containerregistry/model_patch_registry_input.go index b7fd041..fc623cb 100644 --- a/products/containerregistry/model_patch_registry_input.go +++ b/products/containerregistry/model_patch_registry_input.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,9 +15,15 @@ import ( "encoding/json" ) +// checks if the PatchRegistryInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchRegistryInput{} + // PatchRegistryInput struct for PatchRegistryInput type PatchRegistryInput struct { - GarbageCollectionSchedule *WeeklySchedule `json:"garbageCollectionSchedule,omitempty"` + GarbageCollectionSchedule *WeeklySchedule `json:"garbageCollectionSchedule,omitempty"` + Features *RegistryFeatures `json:"features,omitempty"` + // Subnets and IPs that are allowed to access the registry API, supports IPv4 and IPv6. Maximum of 25 items may be specified. If no CIDR is given /32 and /128 are assumed for IPv4 and IPv6 respectively. 0.0.0.0/0 can be used to deny all traffic. __Note__: If this list is empty or not set, there are no restrictions. + ApiSubnetAllowList []string `json:"apiSubnetAllowList,omitempty"` } // NewPatchRegistryInput instantiates a new PatchRegistryInput object @@ -38,49 +44,114 @@ func NewPatchRegistryInputWithDefaults() *PatchRegistryInput { return &this } -// GetGarbageCollectionSchedule returns the GarbageCollectionSchedule field value -// If the value is explicit nil, the zero value for WeeklySchedule will be returned -func (o *PatchRegistryInput) GetGarbageCollectionSchedule() *WeeklySchedule { - if o == nil { - return nil +// GetGarbageCollectionSchedule returns the GarbageCollectionSchedule field value if set, zero value otherwise. +func (o *PatchRegistryInput) GetGarbageCollectionSchedule() WeeklySchedule { + if o == nil || IsNil(o.GarbageCollectionSchedule) { + var ret WeeklySchedule + return ret } - - return o.GarbageCollectionSchedule - + return *o.GarbageCollectionSchedule } -// GetGarbageCollectionScheduleOk returns a tuple with the GarbageCollectionSchedule field value +// GetGarbageCollectionScheduleOk returns a tuple with the GarbageCollectionSchedule field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchRegistryInput) GetGarbageCollectionScheduleOk() (*WeeklySchedule, bool) { - if o == nil { + if o == nil || IsNil(o.GarbageCollectionSchedule) { return nil, false } - return o.GarbageCollectionSchedule, true } -// SetGarbageCollectionSchedule sets field value -func (o *PatchRegistryInput) SetGarbageCollectionSchedule(v WeeklySchedule) { +// HasGarbageCollectionSchedule returns a boolean if a field has been set. +func (o *PatchRegistryInput) HasGarbageCollectionSchedule() bool { + if o != nil && !IsNil(o.GarbageCollectionSchedule) { + return true + } + + return false +} +// SetGarbageCollectionSchedule gets a reference to the given WeeklySchedule and assigns it to the GarbageCollectionSchedule field. +func (o *PatchRegistryInput) SetGarbageCollectionSchedule(v WeeklySchedule) { o.GarbageCollectionSchedule = &v +} +// GetFeatures returns the Features field value if set, zero value otherwise. +func (o *PatchRegistryInput) GetFeatures() RegistryFeatures { + if o == nil || IsNil(o.Features) { + var ret RegistryFeatures + return ret + } + return *o.Features } -// HasGarbageCollectionSchedule returns a boolean if a field has been set. -func (o *PatchRegistryInput) HasGarbageCollectionSchedule() bool { - if o != nil && o.GarbageCollectionSchedule != nil { +// GetFeaturesOk returns a tuple with the Features field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchRegistryInput) GetFeaturesOk() (*RegistryFeatures, bool) { + if o == nil || IsNil(o.Features) { + return nil, false + } + return o.Features, true +} + +// HasFeatures returns a boolean if a field has been set. +func (o *PatchRegistryInput) HasFeatures() bool { + if o != nil && !IsNil(o.Features) { return true } return false } -func (o PatchRegistryInput) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - toSerialize["garbageCollectionSchedule"] = o.GarbageCollectionSchedule +// SetFeatures gets a reference to the given RegistryFeatures and assigns it to the Features field. +func (o *PatchRegistryInput) SetFeatures(v RegistryFeatures) { + o.Features = &v +} + +// GetApiSubnetAllowList returns the ApiSubnetAllowList field value if set, zero value otherwise. +func (o *PatchRegistryInput) GetApiSubnetAllowList() []string { + if o == nil || IsNil(o.ApiSubnetAllowList) { + var ret []string + return ret + } + return o.ApiSubnetAllowList +} + +// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchRegistryInput) GetApiSubnetAllowListOk() ([]string, bool) { + if o == nil || IsNil(o.ApiSubnetAllowList) { + return nil, false + } + return o.ApiSubnetAllowList, true +} + +// HasApiSubnetAllowList returns a boolean if a field has been set. +func (o *PatchRegistryInput) HasApiSubnetAllowList() bool { + if o != nil && !IsNil(o.ApiSubnetAllowList) { + return true + } + + return false +} - return json.Marshal(toSerialize) +// SetApiSubnetAllowList gets a reference to the given []string and assigns it to the ApiSubnetAllowList field. +func (o *PatchRegistryInput) SetApiSubnetAllowList(v []string) { + o.ApiSubnetAllowList = v +} + +func (o PatchRegistryInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GarbageCollectionSchedule) { + toSerialize["garbageCollectionSchedule"] = o.GarbageCollectionSchedule + } + if !IsNil(o.Features) { + toSerialize["features"] = o.Features + } + if !IsNil(o.ApiSubnetAllowList) { + toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList + } + return toSerialize, nil } type NullablePatchRegistryInput struct { diff --git a/products/containerregistry/model_patch_token_input.go b/products/containerregistry/model_patch_token_input.go index aa54287..70551da 100644 --- a/products/containerregistry/model_patch_token_input.go +++ b/products/containerregistry/model_patch_token_input.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -17,10 +17,13 @@ import ( "time" ) +// checks if the PatchTokenInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchTokenInput{} + // PatchTokenInput struct for PatchTokenInput type PatchTokenInput struct { ExpiryDate *IonosTime `json:"expiryDate,omitempty"` - Scopes *[]Scope `json:"scopes,omitempty"` + Scopes []Scope `json:"scopes,omitempty"` Status *string `json:"status,omitempty"` } @@ -42,138 +45,114 @@ func NewPatchTokenInputWithDefaults() *PatchTokenInput { return &this } -// GetExpiryDate returns the ExpiryDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *PatchTokenInput) GetExpiryDate() *time.Time { - if o == nil { - return nil - } - - if o.ExpiryDate == nil { - return nil +// GetExpiryDate returns the ExpiryDate field value if set, zero value otherwise. +func (o *PatchTokenInput) GetExpiryDate() time.Time { + if o == nil || IsNil(o.ExpiryDate) { + var ret time.Time + return ret } - return &o.ExpiryDate.Time - + return o.ExpiryDate.Time } -// GetExpiryDateOk returns a tuple with the ExpiryDate field value +// GetExpiryDateOk returns a tuple with the ExpiryDate field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchTokenInput) GetExpiryDateOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - - if o.ExpiryDate == nil { + if o == nil || IsNil(o.ExpiryDate) { return nil, false } return &o.ExpiryDate.Time, true - -} - -// SetExpiryDate sets field value -func (o *PatchTokenInput) SetExpiryDate(v time.Time) { - - o.ExpiryDate = &IonosTime{v} - } // HasExpiryDate returns a boolean if a field has been set. func (o *PatchTokenInput) HasExpiryDate() bool { - if o != nil && o.ExpiryDate != nil { + if o != nil && !IsNil(o.ExpiryDate) { return true } return false } -// GetScopes returns the Scopes field value -// If the value is explicit nil, the zero value for []Scope will be returned -func (o *PatchTokenInput) GetScopes() *[]Scope { - if o == nil { - return nil - } +// SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field. +func (o *PatchTokenInput) SetExpiryDate(v time.Time) { + o.ExpiryDate = &IonosTime{v} +} +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *PatchTokenInput) GetScopes() []Scope { + if o == nil || IsNil(o.Scopes) { + var ret []Scope + return ret + } return o.Scopes - } -// GetScopesOk returns a tuple with the Scopes field value +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchTokenInput) GetScopesOk() (*[]Scope, bool) { - if o == nil { +func (o *PatchTokenInput) GetScopesOk() ([]Scope, bool) { + if o == nil || IsNil(o.Scopes) { return nil, false } - return o.Scopes, true } -// SetScopes sets field value -func (o *PatchTokenInput) SetScopes(v []Scope) { - - o.Scopes = &v - -} - // HasScopes returns a boolean if a field has been set. func (o *PatchTokenInput) HasScopes() bool { - if o != nil && o.Scopes != nil { + if o != nil && !IsNil(o.Scopes) { return true } return false } -// GetStatus returns the Status field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PatchTokenInput) GetStatus() *string { - if o == nil { - return nil - } - - return o.Status +// SetScopes gets a reference to the given []Scope and assigns it to the Scopes field. +func (o *PatchTokenInput) SetScopes(v []Scope) { + o.Scopes = v +} +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PatchTokenInput) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status } -// GetStatusOk returns a tuple with the Status field value +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchTokenInput) GetStatusOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Status) { return nil, false } - return o.Status, true } -// SetStatus sets field value -func (o *PatchTokenInput) SetStatus(v string) { - - o.Status = &v - -} - // HasStatus returns a boolean if a field has been set. func (o *PatchTokenInput) HasStatus() bool { - if o != nil && o.Status != nil { + if o != nil && !IsNil(o.Status) { return true } return false } -func (o PatchTokenInput) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - toSerialize["expiryDate"] = o.ExpiryDate - - toSerialize["scopes"] = o.Scopes +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *PatchTokenInput) SetStatus(v string) { + o.Status = &v +} - if o.Status != nil { +func (o PatchTokenInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpiryDate) { + toSerialize["expiryDate"] = o.ExpiryDate + } + if !IsNil(o.Scopes) { + toSerialize["scopes"] = o.Scopes + } + if !IsNil(o.Status) { toSerialize["status"] = o.Status } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchTokenInput struct { diff --git a/products/containerregistry/model_post_registry_input.go b/products/containerregistry/model_post_registry_input.go index 65a8c39..dbbd956 100644 --- a/products/containerregistry/model_post_registry_input.go +++ b/products/containerregistry/model_post_registry_input.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,9 +15,12 @@ import ( "encoding/json" ) +// checks if the PostRegistryInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostRegistryInput{} + // PostRegistryInput struct for PostRegistryInput type PostRegistryInput struct { - Properties *PostRegistryProperties `json:"properties"` + Properties PostRegistryProperties `json:"properties"` } // NewPostRegistryInput instantiates a new PostRegistryInput object @@ -27,7 +30,7 @@ type PostRegistryInput struct { func NewPostRegistryInput(properties PostRegistryProperties) *PostRegistryInput { this := PostRegistryInput{} - this.Properties = &properties + this.Properties = properties return &this } @@ -41,50 +44,33 @@ func NewPostRegistryInputWithDefaults() *PostRegistryInput { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for PostRegistryProperties will be returned -func (o *PostRegistryInput) GetProperties() *PostRegistryProperties { +func (o *PostRegistryInput) GetProperties() PostRegistryProperties { if o == nil { - return nil + var ret PostRegistryProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostRegistryInput) GetPropertiesOk() (*PostRegistryProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *PostRegistryInput) SetProperties(v PostRegistryProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *PostRegistryInput) HasProperties() bool { - if o != nil && o.Properties != nil { - return true - } - - return false -} - -func (o PostRegistryInput) MarshalJSON() ([]byte, error) { +func (o PostRegistryInput) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Properties != nil { - toSerialize["properties"] = o.Properties - } - - return json.Marshal(toSerialize) + toSerialize["properties"] = o.Properties + return toSerialize, nil } type NullablePostRegistryInput struct { diff --git a/products/containerregistry/model_post_registry_output.go b/products/containerregistry/model_post_registry_output.go index 00c18ba..2219769 100644 --- a/products/containerregistry/model_post_registry_output.go +++ b/products/containerregistry/model_post_registry_output.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,13 +15,16 @@ import ( "encoding/json" ) +// checks if the PostRegistryOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostRegistryOutput{} + // PostRegistryOutput struct for PostRegistryOutput type PostRegistryOutput struct { - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Metadata *ApiResourceMetadata `json:"metadata"` - Properties *RegistryProperties `json:"properties"` - Type *string `json:"type,omitempty"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Metadata ApiResourceMetadata `json:"metadata"` + Properties RegistryProperties `json:"properties"` + Type *string `json:"type,omitempty"` } // NewPostRegistryOutput instantiates a new PostRegistryOutput object @@ -31,8 +34,8 @@ type PostRegistryOutput struct { func NewPostRegistryOutput(metadata ApiResourceMetadata, properties RegistryProperties) *PostRegistryOutput { this := PostRegistryOutput{} - this.Metadata = &metadata - this.Properties = &properties + this.Metadata = metadata + this.Properties = properties return &this } @@ -45,215 +48,164 @@ func NewPostRegistryOutputWithDefaults() *PostRegistryOutput { return &this } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostRegistryOutput) GetHref() *string { - if o == nil { - return nil +// GetHref returns the Href field value if set, zero value otherwise. +func (o *PostRegistryOutput) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret } - - return o.Href - + return *o.Href } -// GetHrefOk returns a tuple with the Href field value +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostRegistryOutput) GetHrefOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Href) { return nil, false } - return o.Href, true } -// SetHref sets field value -func (o *PostRegistryOutput) SetHref(v string) { - - o.Href = &v - -} - // HasHref returns a boolean if a field has been set. func (o *PostRegistryOutput) HasHref() bool { - if o != nil && o.Href != nil { + if o != nil && !IsNil(o.Href) { return true } return false } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostRegistryOutput) GetId() *string { - if o == nil { - return nil - } - - return o.Id +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *PostRegistryOutput) SetHref(v string) { + o.Href = &v +} +// GetId returns the Id field value if set, zero value otherwise. +func (o *PostRegistryOutput) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostRegistryOutput) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *PostRegistryOutput) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *PostRegistryOutput) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PostRegistryOutput) SetId(v string) { + o.Id = &v +} + // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for ApiResourceMetadata will be returned -func (o *PostRegistryOutput) GetMetadata() *ApiResourceMetadata { +func (o *PostRegistryOutput) GetMetadata() ApiResourceMetadata { if o == nil { - return nil + var ret ApiResourceMetadata + return ret } return o.Metadata - } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostRegistryOutput) GetMetadataOk() (*ApiResourceMetadata, bool) { if o == nil { return nil, false } - - return o.Metadata, true + return &o.Metadata, true } // SetMetadata sets field value func (o *PostRegistryOutput) SetMetadata(v ApiResourceMetadata) { - - o.Metadata = &v - -} - -// HasMetadata returns a boolean if a field has been set. -func (o *PostRegistryOutput) HasMetadata() bool { - if o != nil && o.Metadata != nil { - return true - } - - return false + o.Metadata = v } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for RegistryProperties will be returned -func (o *PostRegistryOutput) GetProperties() *RegistryProperties { +func (o *PostRegistryOutput) GetProperties() RegistryProperties { if o == nil { - return nil + var ret RegistryProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostRegistryOutput) GetPropertiesOk() (*RegistryProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *PostRegistryOutput) SetProperties(v RegistryProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *PostRegistryOutput) HasProperties() bool { - if o != nil && o.Properties != nil { - return true +// GetType returns the Type field value if set, zero value otherwise. +func (o *PostRegistryOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret } - - return false -} - -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostRegistryOutput) GetType() *string { - if o == nil { - return nil - } - - return o.Type - + return *o.Type } -// GetTypeOk returns a tuple with the Type field value +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostRegistryOutput) GetTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Type, true } -// SetType sets field value -func (o *PostRegistryOutput) SetType(v string) { - - o.Type = &v - -} - // HasType returns a boolean if a field has been set. func (o *PostRegistryOutput) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } return false } -func (o PostRegistryOutput) MarshalJSON() ([]byte, error) { +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PostRegistryOutput) SetType(v string) { + o.Type = &v +} + +func (o PostRegistryOutput) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Href != nil { + if !IsNil(o.Href) { toSerialize["href"] = o.Href } - - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - toSerialize["metadata"] = o.Metadata - toSerialize["properties"] = o.Properties - - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePostRegistryOutput struct { diff --git a/products/containerregistry/model_post_registry_properties.go b/products/containerregistry/model_post_registry_properties.go index f26f5ed..d06352f 100644 --- a/products/containerregistry/model_post_registry_properties.go +++ b/products/containerregistry/model_post_registry_properties.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,11 +15,17 @@ import ( "encoding/json" ) +// checks if the PostRegistryProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostRegistryProperties{} + // PostRegistryProperties struct for PostRegistryProperties type PostRegistryProperties struct { - GarbageCollectionSchedule *WeeklySchedule `json:"garbageCollectionSchedule,omitempty"` - Location *string `json:"location"` - Name *string `json:"name"` + GarbageCollectionSchedule *WeeklySchedule `json:"garbageCollectionSchedule,omitempty"` + Location string `json:"location"` + Name string `json:"name"` + Features *RegistryFeatures `json:"features,omitempty"` + // Subnets and IPs that are allowed to access the registry API, supports IPv4 and IPv6. Maximum of 25 items may be specified. If no CIDR is given /32 and /128 are assumed for IPv4 and IPv6 respectively. 0.0.0.0/0 can be used to deny all traffic. __Note__: If this list is empty or not set, there are no restrictions. + ApiSubnetAllowList []string `json:"apiSubnetAllowList,omitempty"` } // NewPostRegistryProperties instantiates a new PostRegistryProperties object @@ -29,8 +35,8 @@ type PostRegistryProperties struct { func NewPostRegistryProperties(location string, name string) *PostRegistryProperties { this := PostRegistryProperties{} - this.Location = &location - this.Name = &name + this.Location = location + this.Name = name return &this } @@ -43,133 +49,164 @@ func NewPostRegistryPropertiesWithDefaults() *PostRegistryProperties { return &this } -// GetGarbageCollectionSchedule returns the GarbageCollectionSchedule field value -// If the value is explicit nil, the zero value for WeeklySchedule will be returned -func (o *PostRegistryProperties) GetGarbageCollectionSchedule() *WeeklySchedule { - if o == nil { - return nil +// GetGarbageCollectionSchedule returns the GarbageCollectionSchedule field value if set, zero value otherwise. +func (o *PostRegistryProperties) GetGarbageCollectionSchedule() WeeklySchedule { + if o == nil || IsNil(o.GarbageCollectionSchedule) { + var ret WeeklySchedule + return ret } - - return o.GarbageCollectionSchedule - + return *o.GarbageCollectionSchedule } -// GetGarbageCollectionScheduleOk returns a tuple with the GarbageCollectionSchedule field value +// GetGarbageCollectionScheduleOk returns a tuple with the GarbageCollectionSchedule field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostRegistryProperties) GetGarbageCollectionScheduleOk() (*WeeklySchedule, bool) { - if o == nil { + if o == nil || IsNil(o.GarbageCollectionSchedule) { return nil, false } - return o.GarbageCollectionSchedule, true } -// SetGarbageCollectionSchedule sets field value -func (o *PostRegistryProperties) SetGarbageCollectionSchedule(v WeeklySchedule) { - - o.GarbageCollectionSchedule = &v - -} - // HasGarbageCollectionSchedule returns a boolean if a field has been set. func (o *PostRegistryProperties) HasGarbageCollectionSchedule() bool { - if o != nil && o.GarbageCollectionSchedule != nil { + if o != nil && !IsNil(o.GarbageCollectionSchedule) { return true } return false } +// SetGarbageCollectionSchedule gets a reference to the given WeeklySchedule and assigns it to the GarbageCollectionSchedule field. +func (o *PostRegistryProperties) SetGarbageCollectionSchedule(v WeeklySchedule) { + o.GarbageCollectionSchedule = &v +} + // GetLocation returns the Location field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostRegistryProperties) GetLocation() *string { +func (o *PostRegistryProperties) GetLocation() string { if o == nil { - return nil + var ret string + return ret } return o.Location - } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostRegistryProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } - - return o.Location, true + return &o.Location, true } // SetLocation sets field value func (o *PostRegistryProperties) SetLocation(v string) { - - o.Location = &v - -} - -// HasLocation returns a boolean if a field has been set. -func (o *PostRegistryProperties) HasLocation() bool { - if o != nil && o.Location != nil { - return true - } - - return false + o.Location = v } // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostRegistryProperties) GetName() *string { +func (o *PostRegistryProperties) GetName() string { if o == nil { - return nil + var ret string + return ret } return o.Name - } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostRegistryProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - - return o.Name, true + return &o.Name, true } // SetName sets field value func (o *PostRegistryProperties) SetName(v string) { + o.Name = v +} - o.Name = &v +// GetFeatures returns the Features field value if set, zero value otherwise. +func (o *PostRegistryProperties) GetFeatures() RegistryFeatures { + if o == nil || IsNil(o.Features) { + var ret RegistryFeatures + return ret + } + return *o.Features +} +// GetFeaturesOk returns a tuple with the Features field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostRegistryProperties) GetFeaturesOk() (*RegistryFeatures, bool) { + if o == nil || IsNil(o.Features) { + return nil, false + } + return o.Features, true } -// HasName returns a boolean if a field has been set. -func (o *PostRegistryProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasFeatures returns a boolean if a field has been set. +func (o *PostRegistryProperties) HasFeatures() bool { + if o != nil && !IsNil(o.Features) { return true } return false } -func (o PostRegistryProperties) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - toSerialize["garbageCollectionSchedule"] = o.GarbageCollectionSchedule +// SetFeatures gets a reference to the given RegistryFeatures and assigns it to the Features field. +func (o *PostRegistryProperties) SetFeatures(v RegistryFeatures) { + o.Features = &v +} + +// GetApiSubnetAllowList returns the ApiSubnetAllowList field value if set, zero value otherwise. +func (o *PostRegistryProperties) GetApiSubnetAllowList() []string { + if o == nil || IsNil(o.ApiSubnetAllowList) { + var ret []string + return ret + } + return o.ApiSubnetAllowList +} - if o.Location != nil { - toSerialize["location"] = o.Location +// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostRegistryProperties) GetApiSubnetAllowListOk() ([]string, bool) { + if o == nil || IsNil(o.ApiSubnetAllowList) { + return nil, false } + return o.ApiSubnetAllowList, true +} - if o.Name != nil { - toSerialize["name"] = o.Name +// HasApiSubnetAllowList returns a boolean if a field has been set. +func (o *PostRegistryProperties) HasApiSubnetAllowList() bool { + if o != nil && !IsNil(o.ApiSubnetAllowList) { + return true } - return json.Marshal(toSerialize) + return false +} + +// SetApiSubnetAllowList gets a reference to the given []string and assigns it to the ApiSubnetAllowList field. +func (o *PostRegistryProperties) SetApiSubnetAllowList(v []string) { + o.ApiSubnetAllowList = v +} + +func (o PostRegistryProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GarbageCollectionSchedule) { + toSerialize["garbageCollectionSchedule"] = o.GarbageCollectionSchedule + } + toSerialize["location"] = o.Location + toSerialize["name"] = o.Name + if !IsNil(o.Features) { + toSerialize["features"] = o.Features + } + if !IsNil(o.ApiSubnetAllowList) { + toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList + } + return toSerialize, nil } type NullablePostRegistryProperties struct { diff --git a/products/containerregistry/model_post_token_input.go b/products/containerregistry/model_post_token_input.go index b53c760..145e151 100644 --- a/products/containerregistry/model_post_token_input.go +++ b/products/containerregistry/model_post_token_input.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,9 +15,12 @@ import ( "encoding/json" ) +// checks if the PostTokenInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostTokenInput{} + // PostTokenInput struct for PostTokenInput type PostTokenInput struct { - Properties *PostTokenProperties `json:"properties"` + Properties PostTokenProperties `json:"properties"` } // NewPostTokenInput instantiates a new PostTokenInput object @@ -27,7 +30,7 @@ type PostTokenInput struct { func NewPostTokenInput(properties PostTokenProperties) *PostTokenInput { this := PostTokenInput{} - this.Properties = &properties + this.Properties = properties return &this } @@ -41,50 +44,33 @@ func NewPostTokenInputWithDefaults() *PostTokenInput { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for PostTokenProperties will be returned -func (o *PostTokenInput) GetProperties() *PostTokenProperties { +func (o *PostTokenInput) GetProperties() PostTokenProperties { if o == nil { - return nil + var ret PostTokenProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostTokenInput) GetPropertiesOk() (*PostTokenProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *PostTokenInput) SetProperties(v PostTokenProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *PostTokenInput) HasProperties() bool { - if o != nil && o.Properties != nil { - return true - } - - return false -} - -func (o PostTokenInput) MarshalJSON() ([]byte, error) { +func (o PostTokenInput) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Properties != nil { - toSerialize["properties"] = o.Properties - } - - return json.Marshal(toSerialize) + toSerialize["properties"] = o.Properties + return toSerialize, nil } type NullablePostTokenInput struct { diff --git a/products/containerregistry/model_post_token_output.go b/products/containerregistry/model_post_token_output.go index bb5bff3..3b89012 100644 --- a/products/containerregistry/model_post_token_output.go +++ b/products/containerregistry/model_post_token_output.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,13 +15,16 @@ import ( "encoding/json" ) +// checks if the PostTokenOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostTokenOutput{} + // PostTokenOutput struct for PostTokenOutput type PostTokenOutput struct { - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Metadata *ApiResourceMetadata `json:"metadata"` - Properties *TokenProperties `json:"properties"` - Type *string `json:"type,omitempty"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Metadata ApiResourceMetadata `json:"metadata"` + Properties TokenProperties `json:"properties"` + Type *string `json:"type,omitempty"` } // NewPostTokenOutput instantiates a new PostTokenOutput object @@ -31,8 +34,8 @@ type PostTokenOutput struct { func NewPostTokenOutput(metadata ApiResourceMetadata, properties TokenProperties) *PostTokenOutput { this := PostTokenOutput{} - this.Metadata = &metadata - this.Properties = &properties + this.Metadata = metadata + this.Properties = properties return &this } @@ -45,215 +48,164 @@ func NewPostTokenOutputWithDefaults() *PostTokenOutput { return &this } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostTokenOutput) GetHref() *string { - if o == nil { - return nil +// GetHref returns the Href field value if set, zero value otherwise. +func (o *PostTokenOutput) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret } - - return o.Href - + return *o.Href } -// GetHrefOk returns a tuple with the Href field value +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostTokenOutput) GetHrefOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Href) { return nil, false } - return o.Href, true } -// SetHref sets field value -func (o *PostTokenOutput) SetHref(v string) { - - o.Href = &v - -} - // HasHref returns a boolean if a field has been set. func (o *PostTokenOutput) HasHref() bool { - if o != nil && o.Href != nil { + if o != nil && !IsNil(o.Href) { return true } return false } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostTokenOutput) GetId() *string { - if o == nil { - return nil - } - - return o.Id +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *PostTokenOutput) SetHref(v string) { + o.Href = &v +} +// GetId returns the Id field value if set, zero value otherwise. +func (o *PostTokenOutput) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostTokenOutput) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *PostTokenOutput) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *PostTokenOutput) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PostTokenOutput) SetId(v string) { + o.Id = &v +} + // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for ApiResourceMetadata will be returned -func (o *PostTokenOutput) GetMetadata() *ApiResourceMetadata { +func (o *PostTokenOutput) GetMetadata() ApiResourceMetadata { if o == nil { - return nil + var ret ApiResourceMetadata + return ret } return o.Metadata - } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostTokenOutput) GetMetadataOk() (*ApiResourceMetadata, bool) { if o == nil { return nil, false } - - return o.Metadata, true + return &o.Metadata, true } // SetMetadata sets field value func (o *PostTokenOutput) SetMetadata(v ApiResourceMetadata) { - - o.Metadata = &v - -} - -// HasMetadata returns a boolean if a field has been set. -func (o *PostTokenOutput) HasMetadata() bool { - if o != nil && o.Metadata != nil { - return true - } - - return false + o.Metadata = v } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for TokenProperties will be returned -func (o *PostTokenOutput) GetProperties() *TokenProperties { +func (o *PostTokenOutput) GetProperties() TokenProperties { if o == nil { - return nil + var ret TokenProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostTokenOutput) GetPropertiesOk() (*TokenProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *PostTokenOutput) SetProperties(v TokenProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *PostTokenOutput) HasProperties() bool { - if o != nil && o.Properties != nil { - return true +// GetType returns the Type field value if set, zero value otherwise. +func (o *PostTokenOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret } - - return false -} - -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostTokenOutput) GetType() *string { - if o == nil { - return nil - } - - return o.Type - + return *o.Type } -// GetTypeOk returns a tuple with the Type field value +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostTokenOutput) GetTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Type, true } -// SetType sets field value -func (o *PostTokenOutput) SetType(v string) { - - o.Type = &v - -} - // HasType returns a boolean if a field has been set. func (o *PostTokenOutput) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } return false } -func (o PostTokenOutput) MarshalJSON() ([]byte, error) { +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PostTokenOutput) SetType(v string) { + o.Type = &v +} + +func (o PostTokenOutput) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Href != nil { + if !IsNil(o.Href) { toSerialize["href"] = o.Href } - - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - toSerialize["metadata"] = o.Metadata - toSerialize["properties"] = o.Properties - - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePostTokenOutput struct { diff --git a/products/containerregistry/model_post_token_properties.go b/products/containerregistry/model_post_token_properties.go index e8f3a1c..1c3aefe 100644 --- a/products/containerregistry/model_post_token_properties.go +++ b/products/containerregistry/model_post_token_properties.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -17,11 +17,14 @@ import ( "time" ) +// checks if the PostTokenProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostTokenProperties{} + // PostTokenProperties struct for PostTokenProperties type PostTokenProperties struct { ExpiryDate *IonosTime `json:"expiryDate,omitempty"` - Name *string `json:"name"` - Scopes *[]Scope `json:"scopes,omitempty"` + Name string `json:"name"` + Scopes []Scope `json:"scopes,omitempty"` Status *string `json:"status,omitempty"` } @@ -32,7 +35,7 @@ type PostTokenProperties struct { func NewPostTokenProperties(name string) *PostTokenProperties { this := PostTokenProperties{} - this.Name = &name + this.Name = name return &this } @@ -45,180 +48,139 @@ func NewPostTokenPropertiesWithDefaults() *PostTokenProperties { return &this } -// GetExpiryDate returns the ExpiryDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *PostTokenProperties) GetExpiryDate() *time.Time { - if o == nil { - return nil - } - - if o.ExpiryDate == nil { - return nil +// GetExpiryDate returns the ExpiryDate field value if set, zero value otherwise. +func (o *PostTokenProperties) GetExpiryDate() time.Time { + if o == nil || IsNil(o.ExpiryDate) { + var ret time.Time + return ret } - return &o.ExpiryDate.Time - + return o.ExpiryDate.Time } -// GetExpiryDateOk returns a tuple with the ExpiryDate field value +// GetExpiryDateOk returns a tuple with the ExpiryDate field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostTokenProperties) GetExpiryDateOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - - if o.ExpiryDate == nil { + if o == nil || IsNil(o.ExpiryDate) { return nil, false } return &o.ExpiryDate.Time, true - -} - -// SetExpiryDate sets field value -func (o *PostTokenProperties) SetExpiryDate(v time.Time) { - - o.ExpiryDate = &IonosTime{v} - } // HasExpiryDate returns a boolean if a field has been set. func (o *PostTokenProperties) HasExpiryDate() bool { - if o != nil && o.ExpiryDate != nil { + if o != nil && !IsNil(o.ExpiryDate) { return true } return false } +// SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field. +func (o *PostTokenProperties) SetExpiryDate(v time.Time) { + o.ExpiryDate = &IonosTime{v} +} + // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostTokenProperties) GetName() *string { +func (o *PostTokenProperties) GetName() string { if o == nil { - return nil + var ret string + return ret } return o.Name - } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostTokenProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - - return o.Name, true + return &o.Name, true } // SetName sets field value func (o *PostTokenProperties) SetName(v string) { - - o.Name = &v - + o.Name = v } -// HasName returns a boolean if a field has been set. -func (o *PostTokenProperties) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// GetScopes returns the Scopes field value -// If the value is explicit nil, the zero value for []Scope will be returned -func (o *PostTokenProperties) GetScopes() *[]Scope { - if o == nil { - return nil +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *PostTokenProperties) GetScopes() []Scope { + if o == nil || IsNil(o.Scopes) { + var ret []Scope + return ret } - return o.Scopes - } -// GetScopesOk returns a tuple with the Scopes field value +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PostTokenProperties) GetScopesOk() (*[]Scope, bool) { - if o == nil { +func (o *PostTokenProperties) GetScopesOk() ([]Scope, bool) { + if o == nil || IsNil(o.Scopes) { return nil, false } - return o.Scopes, true } -// SetScopes sets field value -func (o *PostTokenProperties) SetScopes(v []Scope) { - - o.Scopes = &v - -} - // HasScopes returns a boolean if a field has been set. func (o *PostTokenProperties) HasScopes() bool { - if o != nil && o.Scopes != nil { + if o != nil && !IsNil(o.Scopes) { return true } return false } -// GetStatus returns the Status field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PostTokenProperties) GetStatus() *string { - if o == nil { - return nil - } - - return o.Status +// SetScopes gets a reference to the given []Scope and assigns it to the Scopes field. +func (o *PostTokenProperties) SetScopes(v []Scope) { + o.Scopes = v +} +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PostTokenProperties) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status } -// GetStatusOk returns a tuple with the Status field value +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PostTokenProperties) GetStatusOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Status) { return nil, false } - return o.Status, true } -// SetStatus sets field value -func (o *PostTokenProperties) SetStatus(v string) { - - o.Status = &v - -} - // HasStatus returns a boolean if a field has been set. func (o *PostTokenProperties) HasStatus() bool { - if o != nil && o.Status != nil { + if o != nil && !IsNil(o.Status) { return true } return false } -func (o PostTokenProperties) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - toSerialize["expiryDate"] = o.ExpiryDate +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *PostTokenProperties) SetStatus(v string) { + o.Status = &v +} - if o.Name != nil { - toSerialize["name"] = o.Name +func (o PostTokenProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpiryDate) { + toSerialize["expiryDate"] = o.ExpiryDate } - - toSerialize["scopes"] = o.Scopes - - if o.Status != nil { + toSerialize["name"] = o.Name + if !IsNil(o.Scopes) { + toSerialize["scopes"] = o.Scopes + } + if !IsNil(o.Status) { toSerialize["status"] = o.Status } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePostTokenProperties struct { diff --git a/products/containerregistry/model_purl.go b/products/containerregistry/model_purl.go new file mode 100644 index 0000000..a50b963 --- /dev/null +++ b/products/containerregistry/model_purl.go @@ -0,0 +1,167 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the Purl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Purl{} + +// Purl struct for Purl +type Purl struct { + // The affected package type + Type string `json:"type"` + // The affected package name + Name string `json:"name"` + // The affected package version + Version string `json:"version"` +} + +// NewPurl instantiates a new Purl object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPurl(type_ string, name string, version string) *Purl { + this := Purl{} + + this.Type = type_ + this.Name = name + this.Version = version + + return &this +} + +// NewPurlWithDefaults instantiates a new Purl object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPurlWithDefaults() *Purl { + this := Purl{} + return &this +} + +// GetType returns the Type field value +func (o *Purl) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Purl) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Purl) SetType(v string) { + o.Type = v +} + +// GetName returns the Name field value +func (o *Purl) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Purl) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Purl) SetName(v string) { + o.Name = v +} + +// GetVersion returns the Version field value +func (o *Purl) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Purl) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *Purl) SetVersion(v string) { + o.Version = v +} + +func (o Purl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["name"] = o.Name + toSerialize["version"] = o.Version + return toSerialize, nil +} + +type NullablePurl struct { + value *Purl + isSet bool +} + +func (v NullablePurl) Get() *Purl { + return v.value +} + +func (v *NullablePurl) Set(val *Purl) { + v.value = val + v.isSet = true +} + +func (v NullablePurl) IsSet() bool { + return v.isSet +} + +func (v *NullablePurl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePurl(val *Purl) *NullablePurl { + return &NullablePurl{value: val, isSet: true} +} + +func (v NullablePurl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePurl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_put_registry_input.go b/products/containerregistry/model_put_registry_input.go index b720045..2ad7efc 100644 --- a/products/containerregistry/model_put_registry_input.go +++ b/products/containerregistry/model_put_registry_input.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,9 +15,12 @@ import ( "encoding/json" ) +// checks if the PutRegistryInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PutRegistryInput{} + // PutRegistryInput struct for PutRegistryInput type PutRegistryInput struct { - Properties *PostRegistryProperties `json:"properties"` + Properties PostRegistryProperties `json:"properties"` } // NewPutRegistryInput instantiates a new PutRegistryInput object @@ -27,7 +30,7 @@ type PutRegistryInput struct { func NewPutRegistryInput(properties PostRegistryProperties) *PutRegistryInput { this := PutRegistryInput{} - this.Properties = &properties + this.Properties = properties return &this } @@ -41,50 +44,33 @@ func NewPutRegistryInputWithDefaults() *PutRegistryInput { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for PostRegistryProperties will be returned -func (o *PutRegistryInput) GetProperties() *PostRegistryProperties { +func (o *PutRegistryInput) GetProperties() PostRegistryProperties { if o == nil { - return nil + var ret PostRegistryProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutRegistryInput) GetPropertiesOk() (*PostRegistryProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *PutRegistryInput) SetProperties(v PostRegistryProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *PutRegistryInput) HasProperties() bool { - if o != nil && o.Properties != nil { - return true - } - - return false -} - -func (o PutRegistryInput) MarshalJSON() ([]byte, error) { +func (o PutRegistryInput) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Properties != nil { - toSerialize["properties"] = o.Properties - } - - return json.Marshal(toSerialize) + toSerialize["properties"] = o.Properties + return toSerialize, nil } type NullablePutRegistryInput struct { diff --git a/products/containerregistry/model_put_registry_output.go b/products/containerregistry/model_put_registry_output.go index 7e020b8..1368970 100644 --- a/products/containerregistry/model_put_registry_output.go +++ b/products/containerregistry/model_put_registry_output.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,13 +15,16 @@ import ( "encoding/json" ) +// checks if the PutRegistryOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PutRegistryOutput{} + // PutRegistryOutput struct for PutRegistryOutput type PutRegistryOutput struct { - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Metadata *ApiResourceMetadata `json:"metadata"` - Properties *RegistryProperties `json:"properties"` - Type *string `json:"type,omitempty"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Metadata ApiResourceMetadata `json:"metadata"` + Properties RegistryProperties `json:"properties"` + Type *string `json:"type,omitempty"` } // NewPutRegistryOutput instantiates a new PutRegistryOutput object @@ -31,8 +34,8 @@ type PutRegistryOutput struct { func NewPutRegistryOutput(metadata ApiResourceMetadata, properties RegistryProperties) *PutRegistryOutput { this := PutRegistryOutput{} - this.Metadata = &metadata - this.Properties = &properties + this.Metadata = metadata + this.Properties = properties return &this } @@ -45,215 +48,164 @@ func NewPutRegistryOutputWithDefaults() *PutRegistryOutput { return &this } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PutRegistryOutput) GetHref() *string { - if o == nil { - return nil +// GetHref returns the Href field value if set, zero value otherwise. +func (o *PutRegistryOutput) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret } - - return o.Href - + return *o.Href } -// GetHrefOk returns a tuple with the Href field value +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutRegistryOutput) GetHrefOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Href) { return nil, false } - return o.Href, true } -// SetHref sets field value -func (o *PutRegistryOutput) SetHref(v string) { - - o.Href = &v - -} - // HasHref returns a boolean if a field has been set. func (o *PutRegistryOutput) HasHref() bool { - if o != nil && o.Href != nil { + if o != nil && !IsNil(o.Href) { return true } return false } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PutRegistryOutput) GetId() *string { - if o == nil { - return nil - } - - return o.Id +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *PutRegistryOutput) SetHref(v string) { + o.Href = &v +} +// GetId returns the Id field value if set, zero value otherwise. +func (o *PutRegistryOutput) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutRegistryOutput) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *PutRegistryOutput) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *PutRegistryOutput) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PutRegistryOutput) SetId(v string) { + o.Id = &v +} + // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for ApiResourceMetadata will be returned -func (o *PutRegistryOutput) GetMetadata() *ApiResourceMetadata { +func (o *PutRegistryOutput) GetMetadata() ApiResourceMetadata { if o == nil { - return nil + var ret ApiResourceMetadata + return ret } return o.Metadata - } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutRegistryOutput) GetMetadataOk() (*ApiResourceMetadata, bool) { if o == nil { return nil, false } - - return o.Metadata, true + return &o.Metadata, true } // SetMetadata sets field value func (o *PutRegistryOutput) SetMetadata(v ApiResourceMetadata) { - - o.Metadata = &v - -} - -// HasMetadata returns a boolean if a field has been set. -func (o *PutRegistryOutput) HasMetadata() bool { - if o != nil && o.Metadata != nil { - return true - } - - return false + o.Metadata = v } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for RegistryProperties will be returned -func (o *PutRegistryOutput) GetProperties() *RegistryProperties { +func (o *PutRegistryOutput) GetProperties() RegistryProperties { if o == nil { - return nil + var ret RegistryProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutRegistryOutput) GetPropertiesOk() (*RegistryProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *PutRegistryOutput) SetProperties(v RegistryProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *PutRegistryOutput) HasProperties() bool { - if o != nil && o.Properties != nil { - return true +// GetType returns the Type field value if set, zero value otherwise. +func (o *PutRegistryOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret } - - return false -} - -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PutRegistryOutput) GetType() *string { - if o == nil { - return nil - } - - return o.Type - + return *o.Type } -// GetTypeOk returns a tuple with the Type field value +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutRegistryOutput) GetTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Type, true } -// SetType sets field value -func (o *PutRegistryOutput) SetType(v string) { - - o.Type = &v - -} - // HasType returns a boolean if a field has been set. func (o *PutRegistryOutput) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } return false } -func (o PutRegistryOutput) MarshalJSON() ([]byte, error) { +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PutRegistryOutput) SetType(v string) { + o.Type = &v +} + +func (o PutRegistryOutput) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Href != nil { + if !IsNil(o.Href) { toSerialize["href"] = o.Href } - - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - toSerialize["metadata"] = o.Metadata - toSerialize["properties"] = o.Properties - - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePutRegistryOutput struct { diff --git a/products/containerregistry/model_put_token_input.go b/products/containerregistry/model_put_token_input.go index 277d59b..2e80595 100644 --- a/products/containerregistry/model_put_token_input.go +++ b/products/containerregistry/model_put_token_input.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,9 +15,12 @@ import ( "encoding/json" ) +// checks if the PutTokenInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PutTokenInput{} + // PutTokenInput struct for PutTokenInput type PutTokenInput struct { - Properties *PostTokenProperties `json:"properties"` + Properties PostTokenProperties `json:"properties"` } // NewPutTokenInput instantiates a new PutTokenInput object @@ -27,7 +30,7 @@ type PutTokenInput struct { func NewPutTokenInput(properties PostTokenProperties) *PutTokenInput { this := PutTokenInput{} - this.Properties = &properties + this.Properties = properties return &this } @@ -41,50 +44,33 @@ func NewPutTokenInputWithDefaults() *PutTokenInput { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for PostTokenProperties will be returned -func (o *PutTokenInput) GetProperties() *PostTokenProperties { +func (o *PutTokenInput) GetProperties() PostTokenProperties { if o == nil { - return nil + var ret PostTokenProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutTokenInput) GetPropertiesOk() (*PostTokenProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *PutTokenInput) SetProperties(v PostTokenProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *PutTokenInput) HasProperties() bool { - if o != nil && o.Properties != nil { - return true - } - - return false -} - -func (o PutTokenInput) MarshalJSON() ([]byte, error) { +func (o PutTokenInput) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Properties != nil { - toSerialize["properties"] = o.Properties - } - - return json.Marshal(toSerialize) + toSerialize["properties"] = o.Properties + return toSerialize, nil } type NullablePutTokenInput struct { diff --git a/products/containerregistry/model_put_token_output.go b/products/containerregistry/model_put_token_output.go index f3bc3b4..949baac 100644 --- a/products/containerregistry/model_put_token_output.go +++ b/products/containerregistry/model_put_token_output.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,13 +15,16 @@ import ( "encoding/json" ) +// checks if the PutTokenOutput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PutTokenOutput{} + // PutTokenOutput struct for PutTokenOutput type PutTokenOutput struct { - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Metadata *ApiResourceMetadata `json:"metadata"` - Properties *TokenProperties `json:"properties"` - Type *string `json:"type,omitempty"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Metadata ApiResourceMetadata `json:"metadata"` + Properties TokenProperties `json:"properties"` + Type *string `json:"type,omitempty"` } // NewPutTokenOutput instantiates a new PutTokenOutput object @@ -31,8 +34,8 @@ type PutTokenOutput struct { func NewPutTokenOutput(metadata ApiResourceMetadata, properties TokenProperties) *PutTokenOutput { this := PutTokenOutput{} - this.Metadata = &metadata - this.Properties = &properties + this.Metadata = metadata + this.Properties = properties return &this } @@ -45,215 +48,164 @@ func NewPutTokenOutputWithDefaults() *PutTokenOutput { return &this } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PutTokenOutput) GetHref() *string { - if o == nil { - return nil +// GetHref returns the Href field value if set, zero value otherwise. +func (o *PutTokenOutput) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret } - - return o.Href - + return *o.Href } -// GetHrefOk returns a tuple with the Href field value +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutTokenOutput) GetHrefOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Href) { return nil, false } - return o.Href, true } -// SetHref sets field value -func (o *PutTokenOutput) SetHref(v string) { - - o.Href = &v - -} - // HasHref returns a boolean if a field has been set. func (o *PutTokenOutput) HasHref() bool { - if o != nil && o.Href != nil { + if o != nil && !IsNil(o.Href) { return true } return false } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PutTokenOutput) GetId() *string { - if o == nil { - return nil - } - - return o.Id +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *PutTokenOutput) SetHref(v string) { + o.Href = &v +} +// GetId returns the Id field value if set, zero value otherwise. +func (o *PutTokenOutput) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutTokenOutput) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *PutTokenOutput) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *PutTokenOutput) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PutTokenOutput) SetId(v string) { + o.Id = &v +} + // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for ApiResourceMetadata will be returned -func (o *PutTokenOutput) GetMetadata() *ApiResourceMetadata { +func (o *PutTokenOutput) GetMetadata() ApiResourceMetadata { if o == nil { - return nil + var ret ApiResourceMetadata + return ret } return o.Metadata - } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutTokenOutput) GetMetadataOk() (*ApiResourceMetadata, bool) { if o == nil { return nil, false } - - return o.Metadata, true + return &o.Metadata, true } // SetMetadata sets field value func (o *PutTokenOutput) SetMetadata(v ApiResourceMetadata) { - - o.Metadata = &v - -} - -// HasMetadata returns a boolean if a field has been set. -func (o *PutTokenOutput) HasMetadata() bool { - if o != nil && o.Metadata != nil { - return true - } - - return false + o.Metadata = v } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for TokenProperties will be returned -func (o *PutTokenOutput) GetProperties() *TokenProperties { +func (o *PutTokenOutput) GetProperties() TokenProperties { if o == nil { - return nil + var ret TokenProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutTokenOutput) GetPropertiesOk() (*TokenProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *PutTokenOutput) SetProperties(v TokenProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *PutTokenOutput) HasProperties() bool { - if o != nil && o.Properties != nil { - return true +// GetType returns the Type field value if set, zero value otherwise. +func (o *PutTokenOutput) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret } - - return false -} - -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PutTokenOutput) GetType() *string { - if o == nil { - return nil - } - - return o.Type - + return *o.Type } -// GetTypeOk returns a tuple with the Type field value +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PutTokenOutput) GetTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Type, true } -// SetType sets field value -func (o *PutTokenOutput) SetType(v string) { - - o.Type = &v - -} - // HasType returns a boolean if a field has been set. func (o *PutTokenOutput) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } return false } -func (o PutTokenOutput) MarshalJSON() ([]byte, error) { +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PutTokenOutput) SetType(v string) { + o.Type = &v +} + +func (o PutTokenOutput) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Href != nil { + if !IsNil(o.Href) { toSerialize["href"] = o.Href } - - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - toSerialize["metadata"] = o.Metadata - toSerialize["properties"] = o.Properties - - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePutTokenOutput struct { diff --git a/products/containerregistry/model_registries_response.go b/products/containerregistry/model_registries_response.go index 85fc000..b983605 100644 --- a/products/containerregistry/model_registries_response.go +++ b/products/containerregistry/model_registries_response.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,25 +15,28 @@ import ( "encoding/json" ) +// checks if the RegistriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegistriesResponse{} + // RegistriesResponse struct for RegistriesResponse type RegistriesResponse struct { - Links *PaginationLinks `json:"_links"` - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Items *[]RegistryResponse `json:"items,omitempty"` - Pagination *Pagination `json:"pagination"` - Type *string `json:"type,omitempty"` + Links PaginationLinks `json:"_links"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Items []RegistryResponse `json:"items,omitempty"` + Pagination RegistryPagination `json:"pagination"` + Type *string `json:"type,omitempty"` } // NewRegistriesResponse instantiates a new RegistriesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewRegistriesResponse(links PaginationLinks, pagination Pagination) *RegistriesResponse { +func NewRegistriesResponse(links PaginationLinks, pagination RegistryPagination) *RegistriesResponse { this := RegistriesResponse{} - this.Links = &links - this.Pagination = &pagination + this.Links = links + this.Pagination = pagination return &this } @@ -47,258 +50,198 @@ func NewRegistriesResponseWithDefaults() *RegistriesResponse { } // GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *RegistriesResponse) GetLinks() *PaginationLinks { +func (o *RegistriesResponse) GetLinks() PaginationLinks { if o == nil { - return nil + var ret PaginationLinks + return ret } return o.Links - } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistriesResponse) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - - return o.Links, true + return &o.Links, true } // SetLinks sets field value func (o *RegistriesResponse) SetLinks(v PaginationLinks) { - - o.Links = &v - -} - -// HasLinks returns a boolean if a field has been set. -func (o *RegistriesResponse) HasLinks() bool { - if o != nil && o.Links != nil { - return true - } - - return false + o.Links = v } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RegistriesResponse) GetHref() *string { - if o == nil { - return nil +// GetHref returns the Href field value if set, zero value otherwise. +func (o *RegistriesResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret } - - return o.Href - + return *o.Href } -// GetHrefOk returns a tuple with the Href field value +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistriesResponse) GetHrefOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Href) { return nil, false } - return o.Href, true } -// SetHref sets field value -func (o *RegistriesResponse) SetHref(v string) { - - o.Href = &v - -} - // HasHref returns a boolean if a field has been set. func (o *RegistriesResponse) HasHref() bool { - if o != nil && o.Href != nil { + if o != nil && !IsNil(o.Href) { return true } return false } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RegistriesResponse) GetId() *string { - if o == nil { - return nil - } - - return o.Id +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *RegistriesResponse) SetHref(v string) { + o.Href = &v +} +// GetId returns the Id field value if set, zero value otherwise. +func (o *RegistriesResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistriesResponse) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *RegistriesResponse) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *RegistriesResponse) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []RegistryResponse will be returned -func (o *RegistriesResponse) GetItems() *[]RegistryResponse { - if o == nil { - return nil - } +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RegistriesResponse) SetId(v string) { + o.Id = &v +} +// GetItems returns the Items field value if set, zero value otherwise. +func (o *RegistriesResponse) GetItems() []RegistryResponse { + if o == nil || IsNil(o.Items) { + var ret []RegistryResponse + return ret + } return o.Items - } -// GetItemsOk returns a tuple with the Items field value +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RegistriesResponse) GetItemsOk() (*[]RegistryResponse, bool) { - if o == nil { +func (o *RegistriesResponse) GetItemsOk() ([]RegistryResponse, bool) { + if o == nil || IsNil(o.Items) { return nil, false } - return o.Items, true } -// SetItems sets field value -func (o *RegistriesResponse) SetItems(v []RegistryResponse) { - - o.Items = &v - -} - // HasItems returns a boolean if a field has been set. func (o *RegistriesResponse) HasItems() bool { - if o != nil && o.Items != nil { + if o != nil && !IsNil(o.Items) { return true } return false } +// SetItems gets a reference to the given []RegistryResponse and assigns it to the Items field. +func (o *RegistriesResponse) SetItems(v []RegistryResponse) { + o.Items = v +} + // GetPagination returns the Pagination field value -// If the value is explicit nil, the zero value for Pagination will be returned -func (o *RegistriesResponse) GetPagination() *Pagination { +func (o *RegistriesResponse) GetPagination() RegistryPagination { if o == nil { - return nil + var ret RegistryPagination + return ret } return o.Pagination - } // GetPaginationOk returns a tuple with the Pagination field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RegistriesResponse) GetPaginationOk() (*Pagination, bool) { +func (o *RegistriesResponse) GetPaginationOk() (*RegistryPagination, bool) { if o == nil { return nil, false } - - return o.Pagination, true + return &o.Pagination, true } // SetPagination sets field value -func (o *RegistriesResponse) SetPagination(v Pagination) { - - o.Pagination = &v - +func (o *RegistriesResponse) SetPagination(v RegistryPagination) { + o.Pagination = v } -// HasPagination returns a boolean if a field has been set. -func (o *RegistriesResponse) HasPagination() bool { - if o != nil && o.Pagination != nil { - return true +// GetType returns the Type field value if set, zero value otherwise. +func (o *RegistriesResponse) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret } - - return false + return *o.Type } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RegistriesResponse) GetType() *string { - if o == nil { - return nil - } - - return o.Type - -} - -// GetTypeOk returns a tuple with the Type field value +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistriesResponse) GetTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Type, true } -// SetType sets field value -func (o *RegistriesResponse) SetType(v string) { - - o.Type = &v - -} - // HasType returns a boolean if a field has been set. func (o *RegistriesResponse) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } return false } -func (o RegistriesResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Links != nil { - toSerialize["_links"] = o.Links - } +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RegistriesResponse) SetType(v string) { + o.Type = &v +} - if o.Href != nil { +func (o RegistriesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["_links"] = o.Links + if !IsNil(o.Href) { toSerialize["href"] = o.Href } - - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - - toSerialize["items"] = o.Items - - if o.Pagination != nil { - toSerialize["pagination"] = o.Pagination + if !IsNil(o.Items) { + toSerialize["items"] = o.Items } - - if o.Type != nil { + toSerialize["pagination"] = o.Pagination + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRegistriesResponse struct { diff --git a/products/containerregistry/model_registry_artifacts_read_list.go b/products/containerregistry/model_registry_artifacts_read_list.go new file mode 100644 index 0000000..11d9b8b --- /dev/null +++ b/products/containerregistry/model_registry_artifacts_read_list.go @@ -0,0 +1,283 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the RegistryArtifactsReadList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegistryArtifactsReadList{} + +// RegistryArtifactsReadList struct for RegistryArtifactsReadList +type RegistryArtifactsReadList struct { + Id string `json:"id"` + Type string `json:"type"` + Href string `json:"href"` + Items []ArtifactRead `json:"items,omitempty"` + // The offset specified in the request (if none was specified, the default offset is 0). + Offset int32 `json:"offset"` + // The limit specified in the request (if none was specified, use the endpoint's default pagination limit). + Limit int32 `json:"limit"` + Links Links `json:"_links"` +} + +// NewRegistryArtifactsReadList instantiates a new RegistryArtifactsReadList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRegistryArtifactsReadList(id string, type_ string, href string, offset int32, limit int32, links Links) *RegistryArtifactsReadList { + this := RegistryArtifactsReadList{} + + this.Id = id + this.Type = type_ + this.Href = href + this.Offset = offset + this.Limit = limit + this.Links = links + + return &this +} + +// NewRegistryArtifactsReadListWithDefaults instantiates a new RegistryArtifactsReadList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRegistryArtifactsReadListWithDefaults() *RegistryArtifactsReadList { + this := RegistryArtifactsReadList{} + return &this +} + +// GetId returns the Id field value +func (o *RegistryArtifactsReadList) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RegistryArtifactsReadList) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RegistryArtifactsReadList) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *RegistryArtifactsReadList) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RegistryArtifactsReadList) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RegistryArtifactsReadList) SetType(v string) { + o.Type = v +} + +// GetHref returns the Href field value +func (o *RegistryArtifactsReadList) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *RegistryArtifactsReadList) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *RegistryArtifactsReadList) SetHref(v string) { + o.Href = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *RegistryArtifactsReadList) GetItems() []ArtifactRead { + if o == nil || IsNil(o.Items) { + var ret []ArtifactRead + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryArtifactsReadList) GetItemsOk() ([]ArtifactRead, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *RegistryArtifactsReadList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ArtifactRead and assigns it to the Items field. +func (o *RegistryArtifactsReadList) SetItems(v []ArtifactRead) { + o.Items = v +} + +// GetOffset returns the Offset field value +func (o *RegistryArtifactsReadList) GetOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *RegistryArtifactsReadList) GetOffsetOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *RegistryArtifactsReadList) SetOffset(v int32) { + o.Offset = v +} + +// GetLimit returns the Limit field value +func (o *RegistryArtifactsReadList) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *RegistryArtifactsReadList) GetLimitOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *RegistryArtifactsReadList) SetLimit(v int32) { + o.Limit = v +} + +// GetLinks returns the Links field value +func (o *RegistryArtifactsReadList) GetLinks() Links { + if o == nil { + var ret Links + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *RegistryArtifactsReadList) GetLinksOk() (*Links, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *RegistryArtifactsReadList) SetLinks(v Links) { + o.Links = v +} + +func (o RegistryArtifactsReadList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + toSerialize["href"] = o.Href + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + toSerialize["offset"] = o.Offset + toSerialize["limit"] = o.Limit + toSerialize["_links"] = o.Links + return toSerialize, nil +} + +type NullableRegistryArtifactsReadList struct { + value *RegistryArtifactsReadList + isSet bool +} + +func (v NullableRegistryArtifactsReadList) Get() *RegistryArtifactsReadList { + return v.value +} + +func (v *NullableRegistryArtifactsReadList) Set(val *RegistryArtifactsReadList) { + v.value = val + v.isSet = true +} + +func (v NullableRegistryArtifactsReadList) IsSet() bool { + return v.isSet +} + +func (v *NullableRegistryArtifactsReadList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRegistryArtifactsReadList(val *RegistryArtifactsReadList) *NullableRegistryArtifactsReadList { + return &NullableRegistryArtifactsReadList{value: val, isSet: true} +} + +func (v NullableRegistryArtifactsReadList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRegistryArtifactsReadList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_registry_features.go b/products/containerregistry/model_registry_features.go new file mode 100644 index 0000000..153c93b --- /dev/null +++ b/products/containerregistry/model_registry_features.go @@ -0,0 +1,118 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the RegistryFeatures type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegistryFeatures{} + +// RegistryFeatures Optional registry features. __Note__: some may incur additional charges - see individual feature descriptions for details +type RegistryFeatures struct { + VulnerabilityScanning *FeatureVulnerabilityScanning `json:"vulnerabilityScanning,omitempty"` +} + +// NewRegistryFeatures instantiates a new RegistryFeatures object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRegistryFeatures() *RegistryFeatures { + this := RegistryFeatures{} + + return &this +} + +// NewRegistryFeaturesWithDefaults instantiates a new RegistryFeatures object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRegistryFeaturesWithDefaults() *RegistryFeatures { + this := RegistryFeatures{} + return &this +} + +// GetVulnerabilityScanning returns the VulnerabilityScanning field value if set, zero value otherwise. +func (o *RegistryFeatures) GetVulnerabilityScanning() FeatureVulnerabilityScanning { + if o == nil || IsNil(o.VulnerabilityScanning) { + var ret FeatureVulnerabilityScanning + return ret + } + return *o.VulnerabilityScanning +} + +// GetVulnerabilityScanningOk returns a tuple with the VulnerabilityScanning field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryFeatures) GetVulnerabilityScanningOk() (*FeatureVulnerabilityScanning, bool) { + if o == nil || IsNil(o.VulnerabilityScanning) { + return nil, false + } + return o.VulnerabilityScanning, true +} + +// HasVulnerabilityScanning returns a boolean if a field has been set. +func (o *RegistryFeatures) HasVulnerabilityScanning() bool { + if o != nil && !IsNil(o.VulnerabilityScanning) { + return true + } + + return false +} + +// SetVulnerabilityScanning gets a reference to the given FeatureVulnerabilityScanning and assigns it to the VulnerabilityScanning field. +func (o *RegistryFeatures) SetVulnerabilityScanning(v FeatureVulnerabilityScanning) { + o.VulnerabilityScanning = &v +} + +func (o RegistryFeatures) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.VulnerabilityScanning) { + toSerialize["vulnerabilityScanning"] = o.VulnerabilityScanning + } + return toSerialize, nil +} + +type NullableRegistryFeatures struct { + value *RegistryFeatures + isSet bool +} + +func (v NullableRegistryFeatures) Get() *RegistryFeatures { + return v.value +} + +func (v *NullableRegistryFeatures) Set(val *RegistryFeatures) { + v.value = val + v.isSet = true +} + +func (v NullableRegistryFeatures) IsSet() bool { + return v.isSet +} + +func (v *NullableRegistryFeatures) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRegistryFeatures(val *RegistryFeatures) *NullableRegistryFeatures { + return &NullableRegistryFeatures{value: val, isSet: true} +} + +func (v NullableRegistryFeatures) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRegistryFeatures) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_registry_pagination.go b/products/containerregistry/model_registry_pagination.go new file mode 100644 index 0000000..faed61e --- /dev/null +++ b/products/containerregistry/model_registry_pagination.go @@ -0,0 +1,139 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the RegistryPagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegistryPagination{} + +// RegistryPagination struct for RegistryPagination +type RegistryPagination struct { + // The maximum number of elements to return (used together with pagination.token for pagination) + Limit int32 `json:"limit"` + // An opaque token used to iterate the set of results (used together with limit for pagination) + Token string `json:"token"` +} + +// NewRegistryPagination instantiates a new RegistryPagination object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRegistryPagination(limit int32, token string) *RegistryPagination { + this := RegistryPagination{} + + this.Limit = limit + this.Token = token + + return &this +} + +// NewRegistryPaginationWithDefaults instantiates a new RegistryPagination object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRegistryPaginationWithDefaults() *RegistryPagination { + this := RegistryPagination{} + return &this +} + +// GetLimit returns the Limit field value +func (o *RegistryPagination) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *RegistryPagination) GetLimitOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *RegistryPagination) SetLimit(v int32) { + o.Limit = v +} + +// GetToken returns the Token field value +func (o *RegistryPagination) GetToken() string { + if o == nil { + var ret string + return ret + } + + return o.Token +} + +// GetTokenOk returns a tuple with the Token field value +// and a boolean to check if the value has been set. +func (o *RegistryPagination) GetTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Token, true +} + +// SetToken sets field value +func (o *RegistryPagination) SetToken(v string) { + o.Token = v +} + +func (o RegistryPagination) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["limit"] = o.Limit + toSerialize["token"] = o.Token + return toSerialize, nil +} + +type NullableRegistryPagination struct { + value *RegistryPagination + isSet bool +} + +func (v NullableRegistryPagination) Get() *RegistryPagination { + return v.value +} + +func (v *NullableRegistryPagination) Set(val *RegistryPagination) { + v.value = val + v.isSet = true +} + +func (v NullableRegistryPagination) IsSet() bool { + return v.isSet +} + +func (v *NullableRegistryPagination) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRegistryPagination(val *RegistryPagination) *NullableRegistryPagination { + return &NullableRegistryPagination{value: val, isSet: true} +} + +func (v NullableRegistryPagination) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRegistryPagination) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_registry_properties.go b/products/containerregistry/model_registry_properties.go index f11b2c5..2668824 100644 --- a/products/containerregistry/model_registry_properties.go +++ b/products/containerregistry/model_registry_properties.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,13 +15,19 @@ import ( "encoding/json" ) +// checks if the RegistryProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegistryProperties{} + // RegistryProperties struct for RegistryProperties type RegistryProperties struct { - GarbageCollectionSchedule *WeeklySchedule `json:"garbageCollectionSchedule,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Location *string `json:"location"` - Name *string `json:"name"` - StorageUsage *StorageUsage `json:"storageUsage,omitempty"` + GarbageCollectionSchedule *WeeklySchedule `json:"garbageCollectionSchedule,omitempty"` + Hostname *string `json:"hostname,omitempty"` + Location string `json:"location"` + Name string `json:"name"` + StorageUsage *StorageUsage `json:"storageUsage,omitempty"` + Features *RegistryFeatures `json:"features,omitempty"` + // Subnets and IPs that are allowed to access the registry API, supports IPv4 and IPv6. Maximum of 25 items may be specified. If no CIDR is given /32 and /128 are assumed for IPv4 and IPv6 respectively. 0.0.0.0/0 can be used to deny all traffic. __Note__: If this list is empty or not set, there are no restrictions. + ApiSubnetAllowList []string `json:"apiSubnetAllowList,omitempty"` } // NewRegistryProperties instantiates a new RegistryProperties object @@ -31,8 +37,8 @@ type RegistryProperties struct { func NewRegistryProperties(location string, name string) *RegistryProperties { this := RegistryProperties{} - this.Location = &location - this.Name = &name + this.Location = location + this.Name = name return &this } @@ -45,215 +51,234 @@ func NewRegistryPropertiesWithDefaults() *RegistryProperties { return &this } -// GetGarbageCollectionSchedule returns the GarbageCollectionSchedule field value -// If the value is explicit nil, the zero value for WeeklySchedule will be returned -func (o *RegistryProperties) GetGarbageCollectionSchedule() *WeeklySchedule { - if o == nil { - return nil +// GetGarbageCollectionSchedule returns the GarbageCollectionSchedule field value if set, zero value otherwise. +func (o *RegistryProperties) GetGarbageCollectionSchedule() WeeklySchedule { + if o == nil || IsNil(o.GarbageCollectionSchedule) { + var ret WeeklySchedule + return ret } - - return o.GarbageCollectionSchedule - + return *o.GarbageCollectionSchedule } -// GetGarbageCollectionScheduleOk returns a tuple with the GarbageCollectionSchedule field value +// GetGarbageCollectionScheduleOk returns a tuple with the GarbageCollectionSchedule field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistryProperties) GetGarbageCollectionScheduleOk() (*WeeklySchedule, bool) { - if o == nil { + if o == nil || IsNil(o.GarbageCollectionSchedule) { return nil, false } - return o.GarbageCollectionSchedule, true } -// SetGarbageCollectionSchedule sets field value -func (o *RegistryProperties) SetGarbageCollectionSchedule(v WeeklySchedule) { - - o.GarbageCollectionSchedule = &v - -} - // HasGarbageCollectionSchedule returns a boolean if a field has been set. func (o *RegistryProperties) HasGarbageCollectionSchedule() bool { - if o != nil && o.GarbageCollectionSchedule != nil { + if o != nil && !IsNil(o.GarbageCollectionSchedule) { return true } return false } -// GetHostname returns the Hostname field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RegistryProperties) GetHostname() *string { - if o == nil { - return nil - } - - return o.Hostname +// SetGarbageCollectionSchedule gets a reference to the given WeeklySchedule and assigns it to the GarbageCollectionSchedule field. +func (o *RegistryProperties) SetGarbageCollectionSchedule(v WeeklySchedule) { + o.GarbageCollectionSchedule = &v +} +// GetHostname returns the Hostname field value if set, zero value otherwise. +func (o *RegistryProperties) GetHostname() string { + if o == nil || IsNil(o.Hostname) { + var ret string + return ret + } + return *o.Hostname } -// GetHostnameOk returns a tuple with the Hostname field value +// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistryProperties) GetHostnameOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Hostname) { return nil, false } - return o.Hostname, true } -// SetHostname sets field value -func (o *RegistryProperties) SetHostname(v string) { - - o.Hostname = &v - -} - // HasHostname returns a boolean if a field has been set. func (o *RegistryProperties) HasHostname() bool { - if o != nil && o.Hostname != nil { + if o != nil && !IsNil(o.Hostname) { return true } return false } +// SetHostname gets a reference to the given string and assigns it to the Hostname field. +func (o *RegistryProperties) SetHostname(v string) { + o.Hostname = &v +} + // GetLocation returns the Location field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RegistryProperties) GetLocation() *string { +func (o *RegistryProperties) GetLocation() string { if o == nil { - return nil + var ret string + return ret } return o.Location - } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistryProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } - - return o.Location, true + return &o.Location, true } // SetLocation sets field value func (o *RegistryProperties) SetLocation(v string) { - - o.Location = &v - -} - -// HasLocation returns a boolean if a field has been set. -func (o *RegistryProperties) HasLocation() bool { - if o != nil && o.Location != nil { - return true - } - - return false + o.Location = v } // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RegistryProperties) GetName() *string { +func (o *RegistryProperties) GetName() string { if o == nil { - return nil + var ret string + return ret } return o.Name - } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistryProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - - return o.Name, true + return &o.Name, true } // SetName sets field value func (o *RegistryProperties) SetName(v string) { + o.Name = v +} - o.Name = &v +// GetStorageUsage returns the StorageUsage field value if set, zero value otherwise. +func (o *RegistryProperties) GetStorageUsage() StorageUsage { + if o == nil || IsNil(o.StorageUsage) { + var ret StorageUsage + return ret + } + return *o.StorageUsage +} +// GetStorageUsageOk returns a tuple with the StorageUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryProperties) GetStorageUsageOk() (*StorageUsage, bool) { + if o == nil || IsNil(o.StorageUsage) { + return nil, false + } + return o.StorageUsage, true } -// HasName returns a boolean if a field has been set. -func (o *RegistryProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasStorageUsage returns a boolean if a field has been set. +func (o *RegistryProperties) HasStorageUsage() bool { + if o != nil && !IsNil(o.StorageUsage) { return true } return false } -// GetStorageUsage returns the StorageUsage field value -// If the value is explicit nil, the zero value for StorageUsage will be returned -func (o *RegistryProperties) GetStorageUsage() *StorageUsage { - if o == nil { - return nil - } - - return o.StorageUsage +// SetStorageUsage gets a reference to the given StorageUsage and assigns it to the StorageUsage field. +func (o *RegistryProperties) SetStorageUsage(v StorageUsage) { + o.StorageUsage = &v +} +// GetFeatures returns the Features field value if set, zero value otherwise. +func (o *RegistryProperties) GetFeatures() RegistryFeatures { + if o == nil || IsNil(o.Features) { + var ret RegistryFeatures + return ret + } + return *o.Features } -// GetStorageUsageOk returns a tuple with the StorageUsage field value +// GetFeaturesOk returns a tuple with the Features field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RegistryProperties) GetStorageUsageOk() (*StorageUsage, bool) { - if o == nil { +func (o *RegistryProperties) GetFeaturesOk() (*RegistryFeatures, bool) { + if o == nil || IsNil(o.Features) { return nil, false } + return o.Features, true +} - return o.StorageUsage, true +// HasFeatures returns a boolean if a field has been set. +func (o *RegistryProperties) HasFeatures() bool { + if o != nil && !IsNil(o.Features) { + return true + } + + return false } -// SetStorageUsage sets field value -func (o *RegistryProperties) SetStorageUsage(v StorageUsage) { +// SetFeatures gets a reference to the given RegistryFeatures and assigns it to the Features field. +func (o *RegistryProperties) SetFeatures(v RegistryFeatures) { + o.Features = &v +} - o.StorageUsage = &v +// GetApiSubnetAllowList returns the ApiSubnetAllowList field value if set, zero value otherwise. +func (o *RegistryProperties) GetApiSubnetAllowList() []string { + if o == nil || IsNil(o.ApiSubnetAllowList) { + var ret []string + return ret + } + return o.ApiSubnetAllowList +} +// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegistryProperties) GetApiSubnetAllowListOk() ([]string, bool) { + if o == nil || IsNil(o.ApiSubnetAllowList) { + return nil, false + } + return o.ApiSubnetAllowList, true } -// HasStorageUsage returns a boolean if a field has been set. -func (o *RegistryProperties) HasStorageUsage() bool { - if o != nil && o.StorageUsage != nil { +// HasApiSubnetAllowList returns a boolean if a field has been set. +func (o *RegistryProperties) HasApiSubnetAllowList() bool { + if o != nil && !IsNil(o.ApiSubnetAllowList) { return true } return false } -func (o RegistryProperties) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - toSerialize["garbageCollectionSchedule"] = o.GarbageCollectionSchedule +// SetApiSubnetAllowList gets a reference to the given []string and assigns it to the ApiSubnetAllowList field. +func (o *RegistryProperties) SetApiSubnetAllowList(v []string) { + o.ApiSubnetAllowList = v +} - if o.Hostname != nil { +func (o RegistryProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GarbageCollectionSchedule) { + toSerialize["garbageCollectionSchedule"] = o.GarbageCollectionSchedule + } + if !IsNil(o.Hostname) { toSerialize["hostname"] = o.Hostname } - - if o.Location != nil { - toSerialize["location"] = o.Location + toSerialize["location"] = o.Location + toSerialize["name"] = o.Name + if !IsNil(o.StorageUsage) { + toSerialize["storageUsage"] = o.StorageUsage } - - if o.Name != nil { - toSerialize["name"] = o.Name + if !IsNil(o.Features) { + toSerialize["features"] = o.Features } - - toSerialize["storageUsage"] = o.StorageUsage - - return json.Marshal(toSerialize) + if !IsNil(o.ApiSubnetAllowList) { + toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList + } + return toSerialize, nil } type NullableRegistryProperties struct { diff --git a/products/containerregistry/model_registry_response.go b/products/containerregistry/model_registry_response.go index 45e8ce7..e8b740e 100644 --- a/products/containerregistry/model_registry_response.go +++ b/products/containerregistry/model_registry_response.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,13 +15,16 @@ import ( "encoding/json" ) +// checks if the RegistryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RegistryResponse{} + // RegistryResponse struct for RegistryResponse type RegistryResponse struct { - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Metadata *ApiResourceMetadata `json:"metadata"` - Properties *RegistryProperties `json:"properties"` - Type *string `json:"type,omitempty"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Metadata ApiResourceMetadata `json:"metadata"` + Properties RegistryProperties `json:"properties"` + Type *string `json:"type,omitempty"` } // NewRegistryResponse instantiates a new RegistryResponse object @@ -31,8 +34,8 @@ type RegistryResponse struct { func NewRegistryResponse(metadata ApiResourceMetadata, properties RegistryProperties) *RegistryResponse { this := RegistryResponse{} - this.Metadata = &metadata - this.Properties = &properties + this.Metadata = metadata + this.Properties = properties return &this } @@ -45,215 +48,164 @@ func NewRegistryResponseWithDefaults() *RegistryResponse { return &this } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RegistryResponse) GetHref() *string { - if o == nil { - return nil +// GetHref returns the Href field value if set, zero value otherwise. +func (o *RegistryResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret } - - return o.Href - + return *o.Href } -// GetHrefOk returns a tuple with the Href field value +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistryResponse) GetHrefOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Href) { return nil, false } - return o.Href, true } -// SetHref sets field value -func (o *RegistryResponse) SetHref(v string) { - - o.Href = &v - -} - // HasHref returns a boolean if a field has been set. func (o *RegistryResponse) HasHref() bool { - if o != nil && o.Href != nil { + if o != nil && !IsNil(o.Href) { return true } return false } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RegistryResponse) GetId() *string { - if o == nil { - return nil - } - - return o.Id +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *RegistryResponse) SetHref(v string) { + o.Href = &v +} +// GetId returns the Id field value if set, zero value otherwise. +func (o *RegistryResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistryResponse) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *RegistryResponse) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *RegistryResponse) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RegistryResponse) SetId(v string) { + o.Id = &v +} + // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for ApiResourceMetadata will be returned -func (o *RegistryResponse) GetMetadata() *ApiResourceMetadata { +func (o *RegistryResponse) GetMetadata() ApiResourceMetadata { if o == nil { - return nil + var ret ApiResourceMetadata + return ret } return o.Metadata - } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistryResponse) GetMetadataOk() (*ApiResourceMetadata, bool) { if o == nil { return nil, false } - - return o.Metadata, true + return &o.Metadata, true } // SetMetadata sets field value func (o *RegistryResponse) SetMetadata(v ApiResourceMetadata) { - - o.Metadata = &v - -} - -// HasMetadata returns a boolean if a field has been set. -func (o *RegistryResponse) HasMetadata() bool { - if o != nil && o.Metadata != nil { - return true - } - - return false + o.Metadata = v } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for RegistryProperties will be returned -func (o *RegistryResponse) GetProperties() *RegistryProperties { +func (o *RegistryResponse) GetProperties() RegistryProperties { if o == nil { - return nil + var ret RegistryProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistryResponse) GetPropertiesOk() (*RegistryProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *RegistryResponse) SetProperties(v RegistryProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *RegistryResponse) HasProperties() bool { - if o != nil && o.Properties != nil { - return true +// GetType returns the Type field value if set, zero value otherwise. +func (o *RegistryResponse) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret } - - return false -} - -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RegistryResponse) GetType() *string { - if o == nil { - return nil - } - - return o.Type - + return *o.Type } -// GetTypeOk returns a tuple with the Type field value +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RegistryResponse) GetTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Type, true } -// SetType sets field value -func (o *RegistryResponse) SetType(v string) { - - o.Type = &v - -} - // HasType returns a boolean if a field has been set. func (o *RegistryResponse) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } return false } -func (o RegistryResponse) MarshalJSON() ([]byte, error) { +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RegistryResponse) SetType(v string) { + o.Type = &v +} + +func (o RegistryResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Href != nil { + if !IsNil(o.Href) { toSerialize["href"] = o.Href } - - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - toSerialize["metadata"] = o.Metadata - toSerialize["properties"] = o.Properties - - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRegistryResponse struct { diff --git a/products/containerregistry/model_repository.go b/products/containerregistry/model_repository.go new file mode 100644 index 0000000..3a7ccdd --- /dev/null +++ b/products/containerregistry/model_repository.go @@ -0,0 +1,110 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the Repository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Repository{} + +// Repository struct for Repository +type Repository struct { + Name string `json:"name"` +} + +// NewRepository instantiates a new Repository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepository(name string) *Repository { + this := Repository{} + + this.Name = name + + return &this +} + +// NewRepositoryWithDefaults instantiates a new Repository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryWithDefaults() *Repository { + this := Repository{} + return &this +} + +// GetName returns the Name field value +func (o *Repository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Repository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Repository) SetName(v string) { + o.Name = v +} + +func (o Repository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableRepository struct { + value *Repository + isSet bool +} + +func (v NullableRepository) Get() *Repository { + return v.value +} + +func (v *NullableRepository) Set(val *Repository) { + v.value = val + v.isSet = true +} + +func (v NullableRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepository(val *Repository) *NullableRepository { + return &NullableRepository{value: val, isSet: true} +} + +func (v NullableRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_repository_metadata.go b/products/containerregistry/model_repository_metadata.go new file mode 100644 index 0000000..09a67c4 --- /dev/null +++ b/products/containerregistry/model_repository_metadata.go @@ -0,0 +1,534 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" + + "time" +) + +// checks if the RepositoryMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryMetadata{} + +// RepositoryMetadata struct for RepositoryMetadata +type RepositoryMetadata struct { + // The ISO 8601 creation timestamp. + CreatedDate *IonosTime `json:"createdDate,omitempty"` + // Unique name of the identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // Unique id of the identity that created the resource. + CreatedByUserId *string `json:"createdByUserId,omitempty"` + // The ISO 8601 modified timestamp. + LastModifiedDate *IonosTime `json:"lastModifiedDate,omitempty"` + // Unique name of the identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // Unique id of the identity that last modified the resource. + LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` + // Unique name of the resource. + ResourceURN *string `json:"resourceURN,omitempty"` + ArtifactCount int64 `json:"artifactCount"` + PullCount int64 `json:"pullCount"` + PushCount int64 `json:"pushCount"` + LastPulledAt *IonosTime `json:"lastPulledAt,omitempty"` + LastPushedAt *IonosTime `json:"lastPushedAt,omitempty"` + // The CVSS vulnerability severity rating + LastSeverity *string `json:"lastSeverity,omitempty"` +} + +// NewRepositoryMetadata instantiates a new RepositoryMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryMetadata(artifactCount int64, pullCount int64, pushCount int64) *RepositoryMetadata { + this := RepositoryMetadata{} + + this.ArtifactCount = artifactCount + this.PullCount = pullCount + this.PushCount = pushCount + + return &this +} + +// NewRepositoryMetadataWithDefaults instantiates a new RepositoryMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryMetadataWithDefaults() *RepositoryMetadata { + this := RepositoryMetadata{} + return &this +} + +// GetCreatedDate returns the CreatedDate field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetCreatedDate() time.Time { + if o == nil || IsNil(o.CreatedDate) { + var ret time.Time + return ret + } + return o.CreatedDate.Time +} + +// GetCreatedDateOk returns a tuple with the CreatedDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetCreatedDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedDate) { + return nil, false + } + return &o.CreatedDate.Time, true +} + +// HasCreatedDate returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasCreatedDate() bool { + if o != nil && !IsNil(o.CreatedDate) { + return true + } + + return false +} + +// SetCreatedDate gets a reference to the given time.Time and assigns it to the CreatedDate field. +func (o *RepositoryMetadata) SetCreatedDate(v time.Time) { + o.CreatedDate = &IonosTime{v} +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy) { + var ret string + return ret + } + return *o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetCreatedByOk() (*string, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasCreatedBy() bool { + if o != nil && !IsNil(o.CreatedBy) { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. +func (o *RepositoryMetadata) SetCreatedBy(v string) { + o.CreatedBy = &v +} + +// GetCreatedByUserId returns the CreatedByUserId field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetCreatedByUserId() string { + if o == nil || IsNil(o.CreatedByUserId) { + var ret string + return ret + } + return *o.CreatedByUserId +} + +// GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetCreatedByUserIdOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByUserId) { + return nil, false + } + return o.CreatedByUserId, true +} + +// HasCreatedByUserId returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasCreatedByUserId() bool { + if o != nil && !IsNil(o.CreatedByUserId) { + return true + } + + return false +} + +// SetCreatedByUserId gets a reference to the given string and assigns it to the CreatedByUserId field. +func (o *RepositoryMetadata) SetCreatedByUserId(v string) { + o.CreatedByUserId = &v +} + +// GetLastModifiedDate returns the LastModifiedDate field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetLastModifiedDate() time.Time { + if o == nil || IsNil(o.LastModifiedDate) { + var ret time.Time + return ret + } + return o.LastModifiedDate.Time +} + +// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetLastModifiedDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastModifiedDate) { + return nil, false + } + return &o.LastModifiedDate.Time, true +} + +// HasLastModifiedDate returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasLastModifiedDate() bool { + if o != nil && !IsNil(o.LastModifiedDate) { + return true + } + + return false +} + +// SetLastModifiedDate gets a reference to the given time.Time and assigns it to the LastModifiedDate field. +func (o *RepositoryMetadata) SetLastModifiedDate(v time.Time) { + o.LastModifiedDate = &IonosTime{v} +} + +// GetLastModifiedBy returns the LastModifiedBy field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetLastModifiedBy() string { + if o == nil || IsNil(o.LastModifiedBy) { + var ret string + return ret + } + return *o.LastModifiedBy +} + +// GetLastModifiedByOk returns a tuple with the LastModifiedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetLastModifiedByOk() (*string, bool) { + if o == nil || IsNil(o.LastModifiedBy) { + return nil, false + } + return o.LastModifiedBy, true +} + +// HasLastModifiedBy returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasLastModifiedBy() bool { + if o != nil && !IsNil(o.LastModifiedBy) { + return true + } + + return false +} + +// SetLastModifiedBy gets a reference to the given string and assigns it to the LastModifiedBy field. +func (o *RepositoryMetadata) SetLastModifiedBy(v string) { + o.LastModifiedBy = &v +} + +// GetLastModifiedByUserId returns the LastModifiedByUserId field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetLastModifiedByUserId() string { + if o == nil || IsNil(o.LastModifiedByUserId) { + var ret string + return ret + } + return *o.LastModifiedByUserId +} + +// GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetLastModifiedByUserIdOk() (*string, bool) { + if o == nil || IsNil(o.LastModifiedByUserId) { + return nil, false + } + return o.LastModifiedByUserId, true +} + +// HasLastModifiedByUserId returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasLastModifiedByUserId() bool { + if o != nil && !IsNil(o.LastModifiedByUserId) { + return true + } + + return false +} + +// SetLastModifiedByUserId gets a reference to the given string and assigns it to the LastModifiedByUserId field. +func (o *RepositoryMetadata) SetLastModifiedByUserId(v string) { + o.LastModifiedByUserId = &v +} + +// GetResourceURN returns the ResourceURN field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetResourceURN() string { + if o == nil || IsNil(o.ResourceURN) { + var ret string + return ret + } + return *o.ResourceURN +} + +// GetResourceURNOk returns a tuple with the ResourceURN field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetResourceURNOk() (*string, bool) { + if o == nil || IsNil(o.ResourceURN) { + return nil, false + } + return o.ResourceURN, true +} + +// HasResourceURN returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasResourceURN() bool { + if o != nil && !IsNil(o.ResourceURN) { + return true + } + + return false +} + +// SetResourceURN gets a reference to the given string and assigns it to the ResourceURN field. +func (o *RepositoryMetadata) SetResourceURN(v string) { + o.ResourceURN = &v +} + +// GetArtifactCount returns the ArtifactCount field value +func (o *RepositoryMetadata) GetArtifactCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ArtifactCount +} + +// GetArtifactCountOk returns a tuple with the ArtifactCount field value +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetArtifactCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ArtifactCount, true +} + +// SetArtifactCount sets field value +func (o *RepositoryMetadata) SetArtifactCount(v int64) { + o.ArtifactCount = v +} + +// GetPullCount returns the PullCount field value +func (o *RepositoryMetadata) GetPullCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PullCount +} + +// GetPullCountOk returns a tuple with the PullCount field value +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetPullCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PullCount, true +} + +// SetPullCount sets field value +func (o *RepositoryMetadata) SetPullCount(v int64) { + o.PullCount = v +} + +// GetPushCount returns the PushCount field value +func (o *RepositoryMetadata) GetPushCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PushCount +} + +// GetPushCountOk returns a tuple with the PushCount field value +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetPushCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PushCount, true +} + +// SetPushCount sets field value +func (o *RepositoryMetadata) SetPushCount(v int64) { + o.PushCount = v +} + +// GetLastPulledAt returns the LastPulledAt field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetLastPulledAt() time.Time { + if o == nil || IsNil(o.LastPulledAt) { + var ret time.Time + return ret + } + return o.LastPulledAt.Time +} + +// GetLastPulledAtOk returns a tuple with the LastPulledAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetLastPulledAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPulledAt) { + return nil, false + } + return &o.LastPulledAt.Time, true +} + +// HasLastPulledAt returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasLastPulledAt() bool { + if o != nil && !IsNil(o.LastPulledAt) { + return true + } + + return false +} + +// SetLastPulledAt gets a reference to the given time.Time and assigns it to the LastPulledAt field. +func (o *RepositoryMetadata) SetLastPulledAt(v time.Time) { + o.LastPulledAt = &IonosTime{v} +} + +// GetLastPushedAt returns the LastPushedAt field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetLastPushedAt() time.Time { + if o == nil || IsNil(o.LastPushedAt) { + var ret time.Time + return ret + } + return o.LastPushedAt.Time +} + +// GetLastPushedAtOk returns a tuple with the LastPushedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetLastPushedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPushedAt) { + return nil, false + } + return &o.LastPushedAt.Time, true +} + +// HasLastPushedAt returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasLastPushedAt() bool { + if o != nil && !IsNil(o.LastPushedAt) { + return true + } + + return false +} + +// SetLastPushedAt gets a reference to the given time.Time and assigns it to the LastPushedAt field. +func (o *RepositoryMetadata) SetLastPushedAt(v time.Time) { + o.LastPushedAt = &IonosTime{v} +} + +// GetLastSeverity returns the LastSeverity field value if set, zero value otherwise. +func (o *RepositoryMetadata) GetLastSeverity() string { + if o == nil || IsNil(o.LastSeverity) { + var ret string + return ret + } + return *o.LastSeverity +} + +// GetLastSeverityOk returns a tuple with the LastSeverity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadata) GetLastSeverityOk() (*string, bool) { + if o == nil || IsNil(o.LastSeverity) { + return nil, false + } + return o.LastSeverity, true +} + +// HasLastSeverity returns a boolean if a field has been set. +func (o *RepositoryMetadata) HasLastSeverity() bool { + if o != nil && !IsNil(o.LastSeverity) { + return true + } + + return false +} + +// SetLastSeverity gets a reference to the given string and assigns it to the LastSeverity field. +func (o *RepositoryMetadata) SetLastSeverity(v string) { + o.LastSeverity = &v +} + +func (o RepositoryMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedDate) { + toSerialize["createdDate"] = o.CreatedDate + } + if !IsNil(o.CreatedBy) { + toSerialize["createdBy"] = o.CreatedBy + } + if !IsNil(o.CreatedByUserId) { + toSerialize["createdByUserId"] = o.CreatedByUserId + } + if !IsNil(o.LastModifiedDate) { + toSerialize["lastModifiedDate"] = o.LastModifiedDate + } + if !IsNil(o.LastModifiedBy) { + toSerialize["lastModifiedBy"] = o.LastModifiedBy + } + if !IsNil(o.LastModifiedByUserId) { + toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId + } + if !IsNil(o.ResourceURN) { + toSerialize["resourceURN"] = o.ResourceURN + } + toSerialize["artifactCount"] = o.ArtifactCount + toSerialize["pullCount"] = o.PullCount + toSerialize["pushCount"] = o.PushCount + if !IsNil(o.LastPulledAt) { + toSerialize["lastPulledAt"] = o.LastPulledAt + } + if !IsNil(o.LastPushedAt) { + toSerialize["lastPushedAt"] = o.LastPushedAt + } + if !IsNil(o.LastSeverity) { + toSerialize["lastSeverity"] = o.LastSeverity + } + return toSerialize, nil +} + +type NullableRepositoryMetadata struct { + value *RepositoryMetadata + isSet bool +} + +func (v NullableRepositoryMetadata) Get() *RepositoryMetadata { + return v.value +} + +func (v *NullableRepositoryMetadata) Set(val *RepositoryMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryMetadata(val *RepositoryMetadata) *NullableRepositoryMetadata { + return &NullableRepositoryMetadata{value: val, isSet: true} +} + +func (v NullableRepositoryMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_repository_metadata_all_of.go b/products/containerregistry/model_repository_metadata_all_of.go new file mode 100644 index 0000000..b0ad5b2 --- /dev/null +++ b/products/containerregistry/model_repository_metadata_all_of.go @@ -0,0 +1,275 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" + + "time" +) + +// checks if the RepositoryMetadataAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryMetadataAllOf{} + +// RepositoryMetadataAllOf struct for RepositoryMetadataAllOf +type RepositoryMetadataAllOf struct { + ArtifactCount int64 `json:"artifactCount"` + PullCount int64 `json:"pullCount"` + PushCount int64 `json:"pushCount"` + LastPulledAt *IonosTime `json:"lastPulledAt,omitempty"` + LastPushedAt *IonosTime `json:"lastPushedAt,omitempty"` + // The CVSS vulnerability severity rating + LastSeverity *string `json:"lastSeverity,omitempty"` +} + +// NewRepositoryMetadataAllOf instantiates a new RepositoryMetadataAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryMetadataAllOf(artifactCount int64, pullCount int64, pushCount int64) *RepositoryMetadataAllOf { + this := RepositoryMetadataAllOf{} + + this.ArtifactCount = artifactCount + this.PullCount = pullCount + this.PushCount = pushCount + + return &this +} + +// NewRepositoryMetadataAllOfWithDefaults instantiates a new RepositoryMetadataAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryMetadataAllOfWithDefaults() *RepositoryMetadataAllOf { + this := RepositoryMetadataAllOf{} + return &this +} + +// GetArtifactCount returns the ArtifactCount field value +func (o *RepositoryMetadataAllOf) GetArtifactCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ArtifactCount +} + +// GetArtifactCountOk returns a tuple with the ArtifactCount field value +// and a boolean to check if the value has been set. +func (o *RepositoryMetadataAllOf) GetArtifactCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ArtifactCount, true +} + +// SetArtifactCount sets field value +func (o *RepositoryMetadataAllOf) SetArtifactCount(v int64) { + o.ArtifactCount = v +} + +// GetPullCount returns the PullCount field value +func (o *RepositoryMetadataAllOf) GetPullCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PullCount +} + +// GetPullCountOk returns a tuple with the PullCount field value +// and a boolean to check if the value has been set. +func (o *RepositoryMetadataAllOf) GetPullCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PullCount, true +} + +// SetPullCount sets field value +func (o *RepositoryMetadataAllOf) SetPullCount(v int64) { + o.PullCount = v +} + +// GetPushCount returns the PushCount field value +func (o *RepositoryMetadataAllOf) GetPushCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PushCount +} + +// GetPushCountOk returns a tuple with the PushCount field value +// and a boolean to check if the value has been set. +func (o *RepositoryMetadataAllOf) GetPushCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PushCount, true +} + +// SetPushCount sets field value +func (o *RepositoryMetadataAllOf) SetPushCount(v int64) { + o.PushCount = v +} + +// GetLastPulledAt returns the LastPulledAt field value if set, zero value otherwise. +func (o *RepositoryMetadataAllOf) GetLastPulledAt() time.Time { + if o == nil || IsNil(o.LastPulledAt) { + var ret time.Time + return ret + } + return o.LastPulledAt.Time +} + +// GetLastPulledAtOk returns a tuple with the LastPulledAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadataAllOf) GetLastPulledAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPulledAt) { + return nil, false + } + return &o.LastPulledAt.Time, true +} + +// HasLastPulledAt returns a boolean if a field has been set. +func (o *RepositoryMetadataAllOf) HasLastPulledAt() bool { + if o != nil && !IsNil(o.LastPulledAt) { + return true + } + + return false +} + +// SetLastPulledAt gets a reference to the given time.Time and assigns it to the LastPulledAt field. +func (o *RepositoryMetadataAllOf) SetLastPulledAt(v time.Time) { + o.LastPulledAt = &IonosTime{v} +} + +// GetLastPushedAt returns the LastPushedAt field value if set, zero value otherwise. +func (o *RepositoryMetadataAllOf) GetLastPushedAt() time.Time { + if o == nil || IsNil(o.LastPushedAt) { + var ret time.Time + return ret + } + return o.LastPushedAt.Time +} + +// GetLastPushedAtOk returns a tuple with the LastPushedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadataAllOf) GetLastPushedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPushedAt) { + return nil, false + } + return &o.LastPushedAt.Time, true +} + +// HasLastPushedAt returns a boolean if a field has been set. +func (o *RepositoryMetadataAllOf) HasLastPushedAt() bool { + if o != nil && !IsNil(o.LastPushedAt) { + return true + } + + return false +} + +// SetLastPushedAt gets a reference to the given time.Time and assigns it to the LastPushedAt field. +func (o *RepositoryMetadataAllOf) SetLastPushedAt(v time.Time) { + o.LastPushedAt = &IonosTime{v} +} + +// GetLastSeverity returns the LastSeverity field value if set, zero value otherwise. +func (o *RepositoryMetadataAllOf) GetLastSeverity() string { + if o == nil || IsNil(o.LastSeverity) { + var ret string + return ret + } + return *o.LastSeverity +} + +// GetLastSeverityOk returns a tuple with the LastSeverity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryMetadataAllOf) GetLastSeverityOk() (*string, bool) { + if o == nil || IsNil(o.LastSeverity) { + return nil, false + } + return o.LastSeverity, true +} + +// HasLastSeverity returns a boolean if a field has been set. +func (o *RepositoryMetadataAllOf) HasLastSeverity() bool { + if o != nil && !IsNil(o.LastSeverity) { + return true + } + + return false +} + +// SetLastSeverity gets a reference to the given string and assigns it to the LastSeverity field. +func (o *RepositoryMetadataAllOf) SetLastSeverity(v string) { + o.LastSeverity = &v +} + +func (o RepositoryMetadataAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["artifactCount"] = o.ArtifactCount + toSerialize["pullCount"] = o.PullCount + toSerialize["pushCount"] = o.PushCount + if !IsNil(o.LastPulledAt) { + toSerialize["lastPulledAt"] = o.LastPulledAt + } + if !IsNil(o.LastPushedAt) { + toSerialize["lastPushedAt"] = o.LastPushedAt + } + if !IsNil(o.LastSeverity) { + toSerialize["lastSeverity"] = o.LastSeverity + } + return toSerialize, nil +} + +type NullableRepositoryMetadataAllOf struct { + value *RepositoryMetadataAllOf + isSet bool +} + +func (v NullableRepositoryMetadataAllOf) Get() *RepositoryMetadataAllOf { + return v.value +} + +func (v *NullableRepositoryMetadataAllOf) Set(val *RepositoryMetadataAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryMetadataAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryMetadataAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryMetadataAllOf(val *RepositoryMetadataAllOf) *NullableRepositoryMetadataAllOf { + return &NullableRepositoryMetadataAllOf{value: val, isSet: true} +} + +func (v NullableRepositoryMetadataAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryMetadataAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_repository_read.go b/products/containerregistry/model_repository_read.go new file mode 100644 index 0000000..32e2bc0 --- /dev/null +++ b/products/containerregistry/model_repository_read.go @@ -0,0 +1,218 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the RepositoryRead type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryRead{} + +// RepositoryRead struct for RepositoryRead +type RepositoryRead struct { + Id string `json:"id"` + Type string `json:"type"` + Href string `json:"href"` + Metadata RepositoryMetadata `json:"metadata"` + Properties Repository `json:"properties"` +} + +// NewRepositoryRead instantiates a new RepositoryRead object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryRead(id string, type_ string, href string, metadata RepositoryMetadata, properties Repository) *RepositoryRead { + this := RepositoryRead{} + + this.Id = id + this.Type = type_ + this.Href = href + this.Metadata = metadata + this.Properties = properties + + return &this +} + +// NewRepositoryReadWithDefaults instantiates a new RepositoryRead object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryReadWithDefaults() *RepositoryRead { + this := RepositoryRead{} + return &this +} + +// GetId returns the Id field value +func (o *RepositoryRead) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RepositoryRead) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RepositoryRead) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *RepositoryRead) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RepositoryRead) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RepositoryRead) SetType(v string) { + o.Type = v +} + +// GetHref returns the Href field value +func (o *RepositoryRead) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *RepositoryRead) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *RepositoryRead) SetHref(v string) { + o.Href = v +} + +// GetMetadata returns the Metadata field value +func (o *RepositoryRead) GetMetadata() RepositoryMetadata { + if o == nil { + var ret RepositoryMetadata + return ret + } + + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *RepositoryRead) GetMetadataOk() (*RepositoryMetadata, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value +func (o *RepositoryRead) SetMetadata(v RepositoryMetadata) { + o.Metadata = v +} + +// GetProperties returns the Properties field value +func (o *RepositoryRead) GetProperties() Repository { + if o == nil { + var ret Repository + return ret + } + + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +func (o *RepositoryRead) GetPropertiesOk() (*Repository, bool) { + if o == nil { + return nil, false + } + return &o.Properties, true +} + +// SetProperties sets field value +func (o *RepositoryRead) SetProperties(v Repository) { + o.Properties = v +} + +func (o RepositoryRead) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + toSerialize["href"] = o.Href + toSerialize["metadata"] = o.Metadata + toSerialize["properties"] = o.Properties + return toSerialize, nil +} + +type NullableRepositoryRead struct { + value *RepositoryRead + isSet bool +} + +func (v NullableRepositoryRead) Get() *RepositoryRead { + return v.value +} + +func (v *NullableRepositoryRead) Set(val *RepositoryRead) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryRead) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryRead) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryRead(val *RepositoryRead) *NullableRepositoryRead { + return &NullableRepositoryRead{value: val, isSet: true} +} + +func (v NullableRepositoryRead) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryRead) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_repository_read_list.go b/products/containerregistry/model_repository_read_list.go new file mode 100644 index 0000000..9496ef3 --- /dev/null +++ b/products/containerregistry/model_repository_read_list.go @@ -0,0 +1,283 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the RepositoryReadList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryReadList{} + +// RepositoryReadList struct for RepositoryReadList +type RepositoryReadList struct { + Id string `json:"id"` + Type string `json:"type"` + Href string `json:"href"` + Items []RepositoryRead `json:"items,omitempty"` + // The offset specified in the request (if none was specified, the default offset is 0). + Offset int32 `json:"offset"` + // The limit specified in the request (if none was specified, use the endpoint's default pagination limit). + Limit int32 `json:"limit"` + Links Links `json:"_links"` +} + +// NewRepositoryReadList instantiates a new RepositoryReadList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryReadList(id string, type_ string, href string, offset int32, limit int32, links Links) *RepositoryReadList { + this := RepositoryReadList{} + + this.Id = id + this.Type = type_ + this.Href = href + this.Offset = offset + this.Limit = limit + this.Links = links + + return &this +} + +// NewRepositoryReadListWithDefaults instantiates a new RepositoryReadList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryReadListWithDefaults() *RepositoryReadList { + this := RepositoryReadList{} + return &this +} + +// GetId returns the Id field value +func (o *RepositoryReadList) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RepositoryReadList) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RepositoryReadList) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *RepositoryReadList) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RepositoryReadList) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RepositoryReadList) SetType(v string) { + o.Type = v +} + +// GetHref returns the Href field value +func (o *RepositoryReadList) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *RepositoryReadList) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *RepositoryReadList) SetHref(v string) { + o.Href = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *RepositoryReadList) GetItems() []RepositoryRead { + if o == nil || IsNil(o.Items) { + var ret []RepositoryRead + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryReadList) GetItemsOk() ([]RepositoryRead, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *RepositoryReadList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []RepositoryRead and assigns it to the Items field. +func (o *RepositoryReadList) SetItems(v []RepositoryRead) { + o.Items = v +} + +// GetOffset returns the Offset field value +func (o *RepositoryReadList) GetOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *RepositoryReadList) GetOffsetOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *RepositoryReadList) SetOffset(v int32) { + o.Offset = v +} + +// GetLimit returns the Limit field value +func (o *RepositoryReadList) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *RepositoryReadList) GetLimitOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *RepositoryReadList) SetLimit(v int32) { + o.Limit = v +} + +// GetLinks returns the Links field value +func (o *RepositoryReadList) GetLinks() Links { + if o == nil { + var ret Links + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *RepositoryReadList) GetLinksOk() (*Links, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *RepositoryReadList) SetLinks(v Links) { + o.Links = v +} + +func (o RepositoryReadList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + toSerialize["href"] = o.Href + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + toSerialize["offset"] = o.Offset + toSerialize["limit"] = o.Limit + toSerialize["_links"] = o.Links + return toSerialize, nil +} + +type NullableRepositoryReadList struct { + value *RepositoryReadList + isSet bool +} + +func (v NullableRepositoryReadList) Get() *RepositoryReadList { + return v.value +} + +func (v *NullableRepositoryReadList) Set(val *RepositoryReadList) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryReadList) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryReadList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryReadList(val *RepositoryReadList) *NullableRepositoryReadList { + return &NullableRepositoryReadList{value: val, isSet: true} +} + +func (v NullableRepositoryReadList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryReadList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_scope.go b/products/containerregistry/model_scope.go index c062a4d..de8c687 100644 --- a/products/containerregistry/model_scope.go +++ b/products/containerregistry/model_scope.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,11 +15,14 @@ import ( "encoding/json" ) +// checks if the Scope type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Scope{} + // Scope struct for Scope type Scope struct { - Actions *[]string `json:"actions"` - Name *string `json:"name"` - Type *string `json:"type"` + Actions []string `json:"actions"` + Name string `json:"name"` + Type string `json:"type"` } // NewScope instantiates a new Scope object @@ -29,9 +32,9 @@ type Scope struct { func NewScope(actions []string, name string, type_ string) *Scope { this := Scope{} - this.Actions = &actions - this.Name = &name - this.Type = &type_ + this.Actions = actions + this.Name = name + this.Type = type_ return &this } @@ -45,132 +48,83 @@ func NewScopeWithDefaults() *Scope { } // GetActions returns the Actions field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *Scope) GetActions() *[]string { +func (o *Scope) GetActions() []string { if o == nil { - return nil + var ret []string + return ret } return o.Actions - } // GetActionsOk returns a tuple with the Actions field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Scope) GetActionsOk() (*[]string, bool) { +func (o *Scope) GetActionsOk() ([]string, bool) { if o == nil { return nil, false } - return o.Actions, true } // SetActions sets field value func (o *Scope) SetActions(v []string) { - - o.Actions = &v - -} - -// HasActions returns a boolean if a field has been set. -func (o *Scope) HasActions() bool { - if o != nil && o.Actions != nil { - return true - } - - return false + o.Actions = v } // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Scope) GetName() *string { +func (o *Scope) GetName() string { if o == nil { - return nil + var ret string + return ret } return o.Name - } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Scope) GetNameOk() (*string, bool) { if o == nil { return nil, false } - - return o.Name, true + return &o.Name, true } // SetName sets field value func (o *Scope) SetName(v string) { - - o.Name = &v - -} - -// HasName returns a boolean if a field has been set. -func (o *Scope) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false + o.Name = v } // GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Scope) GetType() *string { +func (o *Scope) GetType() string { if o == nil { - return nil + var ret string + return ret } return o.Type - } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Scope) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - - return o.Type, true + return &o.Type, true } // SetType sets field value func (o *Scope) SetType(v string) { - - o.Type = &v - + o.Type = v } -// HasType returns a boolean if a field has been set. -func (o *Scope) HasType() bool { - if o != nil && o.Type != nil { - return true - } - - return false -} - -func (o Scope) MarshalJSON() ([]byte, error) { +func (o Scope) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["actions"] = o.Actions - - if o.Name != nil { - toSerialize["name"] = o.Name - } - - if o.Type != nil { - toSerialize["type"] = o.Type - } - - return json.Marshal(toSerialize) + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + return toSerialize, nil } type NullableScope struct { diff --git a/products/containerregistry/model_storage_usage.go b/products/containerregistry/model_storage_usage.go index 1434e4a..5451267 100644 --- a/products/containerregistry/model_storage_usage.go +++ b/products/containerregistry/model_storage_usage.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -17,9 +17,12 @@ import ( "time" ) +// checks if the StorageUsage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageUsage{} + // StorageUsage struct for StorageUsage type StorageUsage struct { - Bytes *int32 `json:"bytes"` + Bytes int64 `json:"bytes"` UpdatedAt *IonosTime `json:"updatedAt,omitempty"` } @@ -27,10 +30,10 @@ type StorageUsage struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewStorageUsage(bytes int32) *StorageUsage { +func NewStorageUsage(bytes int64) *StorageUsage { this := StorageUsage{} - this.Bytes = &bytes + this.Bytes = bytes return &this } @@ -44,95 +47,68 @@ func NewStorageUsageWithDefaults() *StorageUsage { } // GetBytes returns the Bytes field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *StorageUsage) GetBytes() *int32 { +func (o *StorageUsage) GetBytes() int64 { if o == nil { - return nil + var ret int64 + return ret } return o.Bytes - } // GetBytesOk returns a tuple with the Bytes field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *StorageUsage) GetBytesOk() (*int32, bool) { +func (o *StorageUsage) GetBytesOk() (*int64, bool) { if o == nil { return nil, false } - - return o.Bytes, true + return &o.Bytes, true } // SetBytes sets field value -func (o *StorageUsage) SetBytes(v int32) { - - o.Bytes = &v - +func (o *StorageUsage) SetBytes(v int64) { + o.Bytes = v } -// HasBytes returns a boolean if a field has been set. -func (o *StorageUsage) HasBytes() bool { - if o != nil && o.Bytes != nil { - return true +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *StorageUsage) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret } - - return false + return o.UpdatedAt.Time } -// GetUpdatedAt returns the UpdatedAt field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *StorageUsage) GetUpdatedAt() *time.Time { - if o == nil { - return nil - } - - if o.UpdatedAt == nil { - return nil - } - return &o.UpdatedAt.Time - -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *StorageUsage) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - - if o.UpdatedAt == nil { + if o == nil || IsNil(o.UpdatedAt) { return nil, false } return &o.UpdatedAt.Time, true - -} - -// SetUpdatedAt sets field value -func (o *StorageUsage) SetUpdatedAt(v time.Time) { - - o.UpdatedAt = &IonosTime{v} - } // HasUpdatedAt returns a boolean if a field has been set. func (o *StorageUsage) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { + if o != nil && !IsNil(o.UpdatedAt) { return true } return false } -func (o StorageUsage) MarshalJSON() ([]byte, error) { +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *StorageUsage) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &IonosTime{v} +} + +func (o StorageUsage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["bytes"] = o.Bytes - - toSerialize["updatedAt"] = o.UpdatedAt - - return json.Marshal(toSerialize) + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil } type NullableStorageUsage struct { diff --git a/products/containerregistry/model_token_properties.go b/products/containerregistry/model_token_properties.go index 1981152..2fe5304 100644 --- a/products/containerregistry/model_token_properties.go +++ b/products/containerregistry/model_token_properties.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -17,13 +17,16 @@ import ( "time" ) +// checks if the TokenProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenProperties{} + // TokenProperties struct for TokenProperties type TokenProperties struct { - Credentials *Credentials `json:"credentials"` - ExpiryDate *IonosTime `json:"expiryDate,omitempty"` - Name *string `json:"name"` - Scopes *[]Scope `json:"scopes,omitempty"` - Status *string `json:"status,omitempty"` + Credentials Credentials `json:"credentials"` + ExpiryDate *IonosTime `json:"expiryDate,omitempty"` + Name string `json:"name"` + Scopes []Scope `json:"scopes,omitempty"` + Status *string `json:"status,omitempty"` } // NewTokenProperties instantiates a new TokenProperties object @@ -33,8 +36,8 @@ type TokenProperties struct { func NewTokenProperties(credentials Credentials, name string) *TokenProperties { this := TokenProperties{} - this.Credentials = &credentials - this.Name = &name + this.Credentials = credentials + this.Name = name return &this } @@ -48,219 +51,163 @@ func NewTokenPropertiesWithDefaults() *TokenProperties { } // GetCredentials returns the Credentials field value -// If the value is explicit nil, the zero value for Credentials will be returned -func (o *TokenProperties) GetCredentials() *Credentials { +func (o *TokenProperties) GetCredentials() Credentials { if o == nil { - return nil + var ret Credentials + return ret } return o.Credentials - } // GetCredentialsOk returns a tuple with the Credentials field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokenProperties) GetCredentialsOk() (*Credentials, bool) { if o == nil { return nil, false } - - return o.Credentials, true + return &o.Credentials, true } // SetCredentials sets field value func (o *TokenProperties) SetCredentials(v Credentials) { - - o.Credentials = &v - + o.Credentials = v } -// HasCredentials returns a boolean if a field has been set. -func (o *TokenProperties) HasCredentials() bool { - if o != nil && o.Credentials != nil { - return true +// GetExpiryDate returns the ExpiryDate field value if set, zero value otherwise. +func (o *TokenProperties) GetExpiryDate() time.Time { + if o == nil || IsNil(o.ExpiryDate) { + var ret time.Time + return ret } - - return false + return o.ExpiryDate.Time } -// GetExpiryDate returns the ExpiryDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *TokenProperties) GetExpiryDate() *time.Time { - if o == nil { - return nil - } - - if o.ExpiryDate == nil { - return nil - } - return &o.ExpiryDate.Time - -} - -// GetExpiryDateOk returns a tuple with the ExpiryDate field value +// GetExpiryDateOk returns a tuple with the ExpiryDate field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokenProperties) GetExpiryDateOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - - if o.ExpiryDate == nil { + if o == nil || IsNil(o.ExpiryDate) { return nil, false } return &o.ExpiryDate.Time, true - -} - -// SetExpiryDate sets field value -func (o *TokenProperties) SetExpiryDate(v time.Time) { - - o.ExpiryDate = &IonosTime{v} - } // HasExpiryDate returns a boolean if a field has been set. func (o *TokenProperties) HasExpiryDate() bool { - if o != nil && o.ExpiryDate != nil { + if o != nil && !IsNil(o.ExpiryDate) { return true } return false } +// SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field. +func (o *TokenProperties) SetExpiryDate(v time.Time) { + o.ExpiryDate = &IonosTime{v} +} + // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TokenProperties) GetName() *string { +func (o *TokenProperties) GetName() string { if o == nil { - return nil + var ret string + return ret } return o.Name - } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokenProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - - return o.Name, true + return &o.Name, true } // SetName sets field value func (o *TokenProperties) SetName(v string) { - - o.Name = &v - -} - -// HasName returns a boolean if a field has been set. -func (o *TokenProperties) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false + o.Name = v } -// GetScopes returns the Scopes field value -// If the value is explicit nil, the zero value for []Scope will be returned -func (o *TokenProperties) GetScopes() *[]Scope { - if o == nil { - return nil +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *TokenProperties) GetScopes() []Scope { + if o == nil || IsNil(o.Scopes) { + var ret []Scope + return ret } - return o.Scopes - } -// GetScopesOk returns a tuple with the Scopes field value +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TokenProperties) GetScopesOk() (*[]Scope, bool) { - if o == nil { +func (o *TokenProperties) GetScopesOk() ([]Scope, bool) { + if o == nil || IsNil(o.Scopes) { return nil, false } - return o.Scopes, true } -// SetScopes sets field value -func (o *TokenProperties) SetScopes(v []Scope) { - - o.Scopes = &v - -} - // HasScopes returns a boolean if a field has been set. func (o *TokenProperties) HasScopes() bool { - if o != nil && o.Scopes != nil { + if o != nil && !IsNil(o.Scopes) { return true } return false } -// GetStatus returns the Status field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TokenProperties) GetStatus() *string { - if o == nil { - return nil - } - - return o.Status +// SetScopes gets a reference to the given []Scope and assigns it to the Scopes field. +func (o *TokenProperties) SetScopes(v []Scope) { + o.Scopes = v +} +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TokenProperties) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status } -// GetStatusOk returns a tuple with the Status field value +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokenProperties) GetStatusOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Status) { return nil, false } - return o.Status, true } -// SetStatus sets field value -func (o *TokenProperties) SetStatus(v string) { - - o.Status = &v - -} - // HasStatus returns a boolean if a field has been set. func (o *TokenProperties) HasStatus() bool { - if o != nil && o.Status != nil { + if o != nil && !IsNil(o.Status) { return true } return false } -func (o TokenProperties) MarshalJSON() ([]byte, error) { +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *TokenProperties) SetStatus(v string) { + o.Status = &v +} + +func (o TokenProperties) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["credentials"] = o.Credentials - - toSerialize["expiryDate"] = o.ExpiryDate - - if o.Name != nil { - toSerialize["name"] = o.Name + if !IsNil(o.ExpiryDate) { + toSerialize["expiryDate"] = o.ExpiryDate } - - toSerialize["scopes"] = o.Scopes - - if o.Status != nil { + toSerialize["name"] = o.Name + if !IsNil(o.Scopes) { + toSerialize["scopes"] = o.Scopes + } + if !IsNil(o.Status) { toSerialize["status"] = o.Status } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableTokenProperties struct { diff --git a/products/containerregistry/model_token_response.go b/products/containerregistry/model_token_response.go index cc0bb7f..256e001 100644 --- a/products/containerregistry/model_token_response.go +++ b/products/containerregistry/model_token_response.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,13 +15,16 @@ import ( "encoding/json" ) +// checks if the TokenResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenResponse{} + // TokenResponse struct for TokenResponse type TokenResponse struct { - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Metadata *ApiResourceMetadata `json:"metadata"` - Properties *TokenProperties `json:"properties"` - Type *string `json:"type,omitempty"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Metadata ApiResourceMetadata `json:"metadata"` + Properties TokenProperties `json:"properties"` + Type *string `json:"type,omitempty"` } // NewTokenResponse instantiates a new TokenResponse object @@ -31,8 +34,8 @@ type TokenResponse struct { func NewTokenResponse(metadata ApiResourceMetadata, properties TokenProperties) *TokenResponse { this := TokenResponse{} - this.Metadata = &metadata - this.Properties = &properties + this.Metadata = metadata + this.Properties = properties return &this } @@ -45,215 +48,164 @@ func NewTokenResponseWithDefaults() *TokenResponse { return &this } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TokenResponse) GetHref() *string { - if o == nil { - return nil +// GetHref returns the Href field value if set, zero value otherwise. +func (o *TokenResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret } - - return o.Href - + return *o.Href } -// GetHrefOk returns a tuple with the Href field value +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokenResponse) GetHrefOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Href) { return nil, false } - return o.Href, true } -// SetHref sets field value -func (o *TokenResponse) SetHref(v string) { - - o.Href = &v - -} - // HasHref returns a boolean if a field has been set. func (o *TokenResponse) HasHref() bool { - if o != nil && o.Href != nil { + if o != nil && !IsNil(o.Href) { return true } return false } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TokenResponse) GetId() *string { - if o == nil { - return nil - } - - return o.Id +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *TokenResponse) SetHref(v string) { + o.Href = &v +} +// GetId returns the Id field value if set, zero value otherwise. +func (o *TokenResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokenResponse) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *TokenResponse) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *TokenResponse) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TokenResponse) SetId(v string) { + o.Id = &v +} + // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for ApiResourceMetadata will be returned -func (o *TokenResponse) GetMetadata() *ApiResourceMetadata { +func (o *TokenResponse) GetMetadata() ApiResourceMetadata { if o == nil { - return nil + var ret ApiResourceMetadata + return ret } return o.Metadata - } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokenResponse) GetMetadataOk() (*ApiResourceMetadata, bool) { if o == nil { return nil, false } - - return o.Metadata, true + return &o.Metadata, true } // SetMetadata sets field value func (o *TokenResponse) SetMetadata(v ApiResourceMetadata) { - - o.Metadata = &v - -} - -// HasMetadata returns a boolean if a field has been set. -func (o *TokenResponse) HasMetadata() bool { - if o != nil && o.Metadata != nil { - return true - } - - return false + o.Metadata = v } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for TokenProperties will be returned -func (o *TokenResponse) GetProperties() *TokenProperties { +func (o *TokenResponse) GetProperties() TokenProperties { if o == nil { - return nil + var ret TokenProperties + return ret } return o.Properties - } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokenResponse) GetPropertiesOk() (*TokenProperties, bool) { if o == nil { return nil, false } - - return o.Properties, true + return &o.Properties, true } // SetProperties sets field value func (o *TokenResponse) SetProperties(v TokenProperties) { - - o.Properties = &v - + o.Properties = v } -// HasProperties returns a boolean if a field has been set. -func (o *TokenResponse) HasProperties() bool { - if o != nil && o.Properties != nil { - return true +// GetType returns the Type field value if set, zero value otherwise. +func (o *TokenResponse) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret } - - return false -} - -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TokenResponse) GetType() *string { - if o == nil { - return nil - } - - return o.Type - + return *o.Type } -// GetTypeOk returns a tuple with the Type field value +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokenResponse) GetTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Type, true } -// SetType sets field value -func (o *TokenResponse) SetType(v string) { - - o.Type = &v - -} - // HasType returns a boolean if a field has been set. func (o *TokenResponse) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } return false } -func (o TokenResponse) MarshalJSON() ([]byte, error) { +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *TokenResponse) SetType(v string) { + o.Type = &v +} + +func (o TokenResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Href != nil { + if !IsNil(o.Href) { toSerialize["href"] = o.Href } - - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - toSerialize["metadata"] = o.Metadata - toSerialize["properties"] = o.Properties - - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableTokenResponse struct { diff --git a/products/containerregistry/model_tokens_response.go b/products/containerregistry/model_tokens_response.go index a55021f..9f5b90f 100644 --- a/products/containerregistry/model_tokens_response.go +++ b/products/containerregistry/model_tokens_response.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,17 +15,20 @@ import ( "encoding/json" ) +// checks if the TokensResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokensResponse{} + // TokensResponse struct for TokensResponse type TokensResponse struct { - Links *PaginationLinks `json:"_links"` - Count *int32 `json:"count"` - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Items *[]TokenResponse `json:"items,omitempty"` - Limit *int32 `json:"limit"` - Offset *int32 `json:"offset"` - Total *int32 `json:"total"` - Type *string `json:"type,omitempty"` + Links PaginationLinks `json:"_links"` + Count int32 `json:"count"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Items []TokenResponse `json:"items,omitempty"` + Limit int32 `json:"limit"` + Offset int32 `json:"offset"` + Total int32 `json:"total"` + Type *string `json:"type,omitempty"` } // NewTokensResponse instantiates a new TokensResponse object @@ -35,11 +38,11 @@ type TokensResponse struct { func NewTokensResponse(links PaginationLinks, count int32, limit int32, offset int32, total int32) *TokensResponse { this := TokensResponse{} - this.Links = &links - this.Count = &count - this.Limit = &limit - this.Offset = &offset - this.Total = &total + this.Links = links + this.Count = count + this.Limit = limit + this.Offset = offset + this.Total = total return &this } @@ -53,384 +56,273 @@ func NewTokensResponseWithDefaults() *TokensResponse { } // GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *TokensResponse) GetLinks() *PaginationLinks { +func (o *TokensResponse) GetLinks() PaginationLinks { if o == nil { - return nil + var ret PaginationLinks + return ret } return o.Links - } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokensResponse) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - - return o.Links, true + return &o.Links, true } // SetLinks sets field value func (o *TokensResponse) SetLinks(v PaginationLinks) { - - o.Links = &v - -} - -// HasLinks returns a boolean if a field has been set. -func (o *TokensResponse) HasLinks() bool { - if o != nil && o.Links != nil { - return true - } - - return false + o.Links = v } // GetCount returns the Count field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TokensResponse) GetCount() *int32 { +func (o *TokensResponse) GetCount() int32 { if o == nil { - return nil + var ret int32 + return ret } return o.Count - } // GetCountOk returns a tuple with the Count field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokensResponse) GetCountOk() (*int32, bool) { if o == nil { return nil, false } - - return o.Count, true + return &o.Count, true } // SetCount sets field value func (o *TokensResponse) SetCount(v int32) { - - o.Count = &v - + o.Count = v } -// HasCount returns a boolean if a field has been set. -func (o *TokensResponse) HasCount() bool { - if o != nil && o.Count != nil { - return true +// GetHref returns the Href field value if set, zero value otherwise. +func (o *TokensResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret } - - return false -} - -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TokensResponse) GetHref() *string { - if o == nil { - return nil - } - - return o.Href - + return *o.Href } -// GetHrefOk returns a tuple with the Href field value +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokensResponse) GetHrefOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Href) { return nil, false } - return o.Href, true } -// SetHref sets field value -func (o *TokensResponse) SetHref(v string) { - - o.Href = &v - -} - // HasHref returns a boolean if a field has been set. func (o *TokensResponse) HasHref() bool { - if o != nil && o.Href != nil { + if o != nil && !IsNil(o.Href) { return true } return false } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TokensResponse) GetId() *string { - if o == nil { - return nil - } - - return o.Id +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *TokensResponse) SetHref(v string) { + o.Href = &v +} +// GetId returns the Id field value if set, zero value otherwise. +func (o *TokensResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokensResponse) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return o.Id, true } -// SetId sets field value -func (o *TokensResponse) SetId(v string) { - - o.Id = &v - -} - // HasId returns a boolean if a field has been set. func (o *TokensResponse) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !IsNil(o.Id) { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []TokenResponse will be returned -func (o *TokensResponse) GetItems() *[]TokenResponse { - if o == nil { - return nil - } +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TokensResponse) SetId(v string) { + o.Id = &v +} +// GetItems returns the Items field value if set, zero value otherwise. +func (o *TokensResponse) GetItems() []TokenResponse { + if o == nil || IsNil(o.Items) { + var ret []TokenResponse + return ret + } return o.Items - } -// GetItemsOk returns a tuple with the Items field value +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TokensResponse) GetItemsOk() (*[]TokenResponse, bool) { - if o == nil { +func (o *TokensResponse) GetItemsOk() ([]TokenResponse, bool) { + if o == nil || IsNil(o.Items) { return nil, false } - return o.Items, true } -// SetItems sets field value -func (o *TokensResponse) SetItems(v []TokenResponse) { - - o.Items = &v - -} - // HasItems returns a boolean if a field has been set. func (o *TokensResponse) HasItems() bool { - if o != nil && o.Items != nil { + if o != nil && !IsNil(o.Items) { return true } return false } +// SetItems gets a reference to the given []TokenResponse and assigns it to the Items field. +func (o *TokensResponse) SetItems(v []TokenResponse) { + o.Items = v +} + // GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TokensResponse) GetLimit() *int32 { +func (o *TokensResponse) GetLimit() int32 { if o == nil { - return nil + var ret int32 + return ret } return o.Limit - } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokensResponse) GetLimitOk() (*int32, bool) { if o == nil { return nil, false } - - return o.Limit, true + return &o.Limit, true } // SetLimit sets field value func (o *TokensResponse) SetLimit(v int32) { - - o.Limit = &v - -} - -// HasLimit returns a boolean if a field has been set. -func (o *TokensResponse) HasLimit() bool { - if o != nil && o.Limit != nil { - return true - } - - return false + o.Limit = v } // GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TokensResponse) GetOffset() *int32 { +func (o *TokensResponse) GetOffset() int32 { if o == nil { - return nil + var ret int32 + return ret } return o.Offset - } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokensResponse) GetOffsetOk() (*int32, bool) { if o == nil { return nil, false } - - return o.Offset, true + return &o.Offset, true } // SetOffset sets field value func (o *TokensResponse) SetOffset(v int32) { - - o.Offset = &v - -} - -// HasOffset returns a boolean if a field has been set. -func (o *TokensResponse) HasOffset() bool { - if o != nil && o.Offset != nil { - return true - } - - return false + o.Offset = v } // GetTotal returns the Total field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TokensResponse) GetTotal() *int32 { +func (o *TokensResponse) GetTotal() int32 { if o == nil { - return nil + var ret int32 + return ret } return o.Total - } // GetTotalOk returns a tuple with the Total field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokensResponse) GetTotalOk() (*int32, bool) { if o == nil { return nil, false } - - return o.Total, true + return &o.Total, true } // SetTotal sets field value func (o *TokensResponse) SetTotal(v int32) { - - o.Total = &v - + o.Total = v } -// HasTotal returns a boolean if a field has been set. -func (o *TokensResponse) HasTotal() bool { - if o != nil && o.Total != nil { - return true +// GetType returns the Type field value if set, zero value otherwise. +func (o *TokensResponse) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret } - - return false + return *o.Type } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TokensResponse) GetType() *string { - if o == nil { - return nil - } - - return o.Type - -} - -// GetTypeOk returns a tuple with the Type field value +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TokensResponse) GetTypeOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Type, true } -// SetType sets field value -func (o *TokensResponse) SetType(v string) { - - o.Type = &v - -} - // HasType returns a boolean if a field has been set. func (o *TokensResponse) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } return false } -func (o TokensResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Links != nil { - toSerialize["_links"] = o.Links - } - - if o.Count != nil { - toSerialize["count"] = o.Count - } +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *TokensResponse) SetType(v string) { + o.Type = &v +} - if o.Href != nil { +func (o TokensResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["_links"] = o.Links + toSerialize["count"] = o.Count + if !IsNil(o.Href) { toSerialize["href"] = o.Href } - - if o.Id != nil { + if !IsNil(o.Id) { toSerialize["id"] = o.Id } - - toSerialize["items"] = o.Items - - if o.Limit != nil { - toSerialize["limit"] = o.Limit - } - - if o.Offset != nil { - toSerialize["offset"] = o.Offset + if !IsNil(o.Items) { + toSerialize["items"] = o.Items } - - if o.Total != nil { - toSerialize["total"] = o.Total - } - - if o.Type != nil { + toSerialize["limit"] = o.Limit + toSerialize["offset"] = o.Offset + toSerialize["total"] = o.Total + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableTokensResponse struct { diff --git a/products/containerregistry/model_vulnerability.go b/products/containerregistry/model_vulnerability.go new file mode 100644 index 0000000..916fc02 --- /dev/null +++ b/products/containerregistry/model_vulnerability.go @@ -0,0 +1,323 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the Vulnerability type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Vulnerability{} + +// Vulnerability struct for Vulnerability +type Vulnerability struct { + // A description of the vulnerability as provided by the source. + Description string `json:"description"` + // Recommendations for the vulnerability as provided by the source. + Recommendations *string `json:"recommendations,omitempty"` + DataSource VulnerabilityDataSource `json:"dataSource"` + // Indicates whether the vulnerability can be fixed by updating the affected package. + Fixable bool `json:"fixable"` + Affects []Purl `json:"affects"` + // Published advisories of the vulnerability if provided. + References []string `json:"references,omitempty"` + // The CVSS vulnerability severity rating + Severity string `json:"severity"` + // The CVSS score of the vulnerability + Score float32 `json:"score"` +} + +// NewVulnerability instantiates a new Vulnerability object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVulnerability(description string, dataSource VulnerabilityDataSource, fixable bool, affects []Purl, severity string, score float32) *Vulnerability { + this := Vulnerability{} + + this.Description = description + this.DataSource = dataSource + this.Fixable = fixable + this.Affects = affects + this.Severity = severity + this.Score = score + + return &this +} + +// NewVulnerabilityWithDefaults instantiates a new Vulnerability object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVulnerabilityWithDefaults() *Vulnerability { + this := Vulnerability{} + return &this +} + +// GetDescription returns the Description field value +func (o *Vulnerability) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *Vulnerability) SetDescription(v string) { + o.Description = v +} + +// GetRecommendations returns the Recommendations field value if set, zero value otherwise. +func (o *Vulnerability) GetRecommendations() string { + if o == nil || IsNil(o.Recommendations) { + var ret string + return ret + } + return *o.Recommendations +} + +// GetRecommendationsOk returns a tuple with the Recommendations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetRecommendationsOk() (*string, bool) { + if o == nil || IsNil(o.Recommendations) { + return nil, false + } + return o.Recommendations, true +} + +// HasRecommendations returns a boolean if a field has been set. +func (o *Vulnerability) HasRecommendations() bool { + if o != nil && !IsNil(o.Recommendations) { + return true + } + + return false +} + +// SetRecommendations gets a reference to the given string and assigns it to the Recommendations field. +func (o *Vulnerability) SetRecommendations(v string) { + o.Recommendations = &v +} + +// GetDataSource returns the DataSource field value +func (o *Vulnerability) GetDataSource() VulnerabilityDataSource { + if o == nil { + var ret VulnerabilityDataSource + return ret + } + + return o.DataSource +} + +// GetDataSourceOk returns a tuple with the DataSource field value +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetDataSourceOk() (*VulnerabilityDataSource, bool) { + if o == nil { + return nil, false + } + return &o.DataSource, true +} + +// SetDataSource sets field value +func (o *Vulnerability) SetDataSource(v VulnerabilityDataSource) { + o.DataSource = v +} + +// GetFixable returns the Fixable field value +func (o *Vulnerability) GetFixable() bool { + if o == nil { + var ret bool + return ret + } + + return o.Fixable +} + +// GetFixableOk returns a tuple with the Fixable field value +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetFixableOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Fixable, true +} + +// SetFixable sets field value +func (o *Vulnerability) SetFixable(v bool) { + o.Fixable = v +} + +// GetAffects returns the Affects field value +func (o *Vulnerability) GetAffects() []Purl { + if o == nil { + var ret []Purl + return ret + } + + return o.Affects +} + +// GetAffectsOk returns a tuple with the Affects field value +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetAffectsOk() ([]Purl, bool) { + if o == nil { + return nil, false + } + return o.Affects, true +} + +// SetAffects sets field value +func (o *Vulnerability) SetAffects(v []Purl) { + o.Affects = v +} + +// GetReferences returns the References field value if set, zero value otherwise. +func (o *Vulnerability) GetReferences() []string { + if o == nil || IsNil(o.References) { + var ret []string + return ret + } + return o.References +} + +// GetReferencesOk returns a tuple with the References field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetReferencesOk() ([]string, bool) { + if o == nil || IsNil(o.References) { + return nil, false + } + return o.References, true +} + +// HasReferences returns a boolean if a field has been set. +func (o *Vulnerability) HasReferences() bool { + if o != nil && !IsNil(o.References) { + return true + } + + return false +} + +// SetReferences gets a reference to the given []string and assigns it to the References field. +func (o *Vulnerability) SetReferences(v []string) { + o.References = v +} + +// GetSeverity returns the Severity field value +func (o *Vulnerability) GetSeverity() string { + if o == nil { + var ret string + return ret + } + + return o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetSeverityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Severity, true +} + +// SetSeverity sets field value +func (o *Vulnerability) SetSeverity(v string) { + o.Severity = v +} + +// GetScore returns the Score field value +func (o *Vulnerability) GetScore() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Score +} + +// GetScoreOk returns a tuple with the Score field value +// and a boolean to check if the value has been set. +func (o *Vulnerability) GetScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Score, true +} + +// SetScore sets field value +func (o *Vulnerability) SetScore(v float32) { + o.Score = v +} + +func (o Vulnerability) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + if !IsNil(o.Recommendations) { + toSerialize["recommendations"] = o.Recommendations + } + toSerialize["dataSource"] = o.DataSource + toSerialize["fixable"] = o.Fixable + toSerialize["affects"] = o.Affects + if !IsNil(o.References) { + toSerialize["references"] = o.References + } + toSerialize["severity"] = o.Severity + toSerialize["score"] = o.Score + return toSerialize, nil +} + +type NullableVulnerability struct { + value *Vulnerability + isSet bool +} + +func (v NullableVulnerability) Get() *Vulnerability { + return v.value +} + +func (v *NullableVulnerability) Set(val *Vulnerability) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerability) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerability) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerability(val *Vulnerability) *NullableVulnerability { + return &NullableVulnerability{value: val, isSet: true} +} + +func (v NullableVulnerability) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerability) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_vulnerability_data_source.go b/products/containerregistry/model_vulnerability_data_source.go new file mode 100644 index 0000000..9ba3adf --- /dev/null +++ b/products/containerregistry/model_vulnerability_data_source.go @@ -0,0 +1,156 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the VulnerabilityDataSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VulnerabilityDataSource{} + +// VulnerabilityDataSource The source that published the vulnerability. +type VulnerabilityDataSource struct { + // The id of the source. + Id *string `json:"id,omitempty"` + // The URL of the source. + Url *string `json:"url,omitempty"` +} + +// NewVulnerabilityDataSource instantiates a new VulnerabilityDataSource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVulnerabilityDataSource() *VulnerabilityDataSource { + this := VulnerabilityDataSource{} + + return &this +} + +// NewVulnerabilityDataSourceWithDefaults instantiates a new VulnerabilityDataSource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVulnerabilityDataSourceWithDefaults() *VulnerabilityDataSource { + this := VulnerabilityDataSource{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *VulnerabilityDataSource) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityDataSource) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *VulnerabilityDataSource) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *VulnerabilityDataSource) SetId(v string) { + o.Id = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *VulnerabilityDataSource) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityDataSource) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *VulnerabilityDataSource) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *VulnerabilityDataSource) SetUrl(v string) { + o.Url = &v +} + +func (o VulnerabilityDataSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + return toSerialize, nil +} + +type NullableVulnerabilityDataSource struct { + value *VulnerabilityDataSource + isSet bool +} + +func (v NullableVulnerabilityDataSource) Get() *VulnerabilityDataSource { + return v.value +} + +func (v *NullableVulnerabilityDataSource) Set(val *VulnerabilityDataSource) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerabilityDataSource) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerabilityDataSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerabilityDataSource(val *VulnerabilityDataSource) *NullableVulnerabilityDataSource { + return &NullableVulnerabilityDataSource{value: val, isSet: true} +} + +func (v NullableVulnerabilityDataSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerabilityDataSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_vulnerability_metadata.go b/products/containerregistry/model_vulnerability_metadata.go new file mode 100644 index 0000000..c4d7a80 --- /dev/null +++ b/products/containerregistry/model_vulnerability_metadata.go @@ -0,0 +1,157 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" + + "time" +) + +// checks if the VulnerabilityMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VulnerabilityMetadata{} + +// VulnerabilityMetadata struct for VulnerabilityMetadata +type VulnerabilityMetadata struct { + // The date and time the vulnerability was published + PublishedAt *IonosTime `json:"publishedAt"` + // The date and time the vulnerability was last updated + UpdatedAt *IonosTime `json:"updatedAt,omitempty"` +} + +// NewVulnerabilityMetadata instantiates a new VulnerabilityMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVulnerabilityMetadata(publishedAt time.Time) *VulnerabilityMetadata { + this := VulnerabilityMetadata{} + + this.PublishedAt = &IonosTime{publishedAt} + + return &this +} + +// NewVulnerabilityMetadataWithDefaults instantiates a new VulnerabilityMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVulnerabilityMetadataWithDefaults() *VulnerabilityMetadata { + this := VulnerabilityMetadata{} + return &this +} + +// GetPublishedAt returns the PublishedAt field value +func (o *VulnerabilityMetadata) GetPublishedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + if o.PublishedAt == nil { + var ret time.Time + return ret + } + return o.PublishedAt.Time +} + +// GetPublishedAtOk returns a tuple with the PublishedAt field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityMetadata) GetPublishedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + if o.PublishedAt == nil { + return nil, true + } + return &o.PublishedAt.Time, true +} + +// SetPublishedAt sets field value +func (o *VulnerabilityMetadata) SetPublishedAt(v time.Time) { + o.PublishedAt = &IonosTime{v} +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *VulnerabilityMetadata) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return o.UpdatedAt.Time +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityMetadata) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return &o.UpdatedAt.Time, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *VulnerabilityMetadata) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *VulnerabilityMetadata) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &IonosTime{v} +} + +func (o VulnerabilityMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["publishedAt"] = o.PublishedAt + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableVulnerabilityMetadata struct { + value *VulnerabilityMetadata + isSet bool +} + +func (v NullableVulnerabilityMetadata) Get() *VulnerabilityMetadata { + return v.value +} + +func (v *NullableVulnerabilityMetadata) Set(val *VulnerabilityMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerabilityMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerabilityMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerabilityMetadata(val *VulnerabilityMetadata) *NullableVulnerabilityMetadata { + return &NullableVulnerabilityMetadata{value: val, isSet: true} +} + +func (v NullableVulnerabilityMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerabilityMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_vulnerability_read.go b/products/containerregistry/model_vulnerability_read.go new file mode 100644 index 0000000..4b3b9f3 --- /dev/null +++ b/products/containerregistry/model_vulnerability_read.go @@ -0,0 +1,219 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the VulnerabilityRead type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VulnerabilityRead{} + +// VulnerabilityRead struct for VulnerabilityRead +type VulnerabilityRead struct { + // The ID of the vulnerability allocated by the advisory database + Id string `json:"id"` + Type string `json:"type"` + Href string `json:"href"` + Metadata VulnerabilityMetadata `json:"metadata"` + Properties Vulnerability `json:"properties"` +} + +// NewVulnerabilityRead instantiates a new VulnerabilityRead object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVulnerabilityRead(id string, type_ string, href string, metadata VulnerabilityMetadata, properties Vulnerability) *VulnerabilityRead { + this := VulnerabilityRead{} + + this.Id = id + this.Type = type_ + this.Href = href + this.Metadata = metadata + this.Properties = properties + + return &this +} + +// NewVulnerabilityReadWithDefaults instantiates a new VulnerabilityRead object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVulnerabilityReadWithDefaults() *VulnerabilityRead { + this := VulnerabilityRead{} + return &this +} + +// GetId returns the Id field value +func (o *VulnerabilityRead) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityRead) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *VulnerabilityRead) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *VulnerabilityRead) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityRead) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *VulnerabilityRead) SetType(v string) { + o.Type = v +} + +// GetHref returns the Href field value +func (o *VulnerabilityRead) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityRead) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *VulnerabilityRead) SetHref(v string) { + o.Href = v +} + +// GetMetadata returns the Metadata field value +func (o *VulnerabilityRead) GetMetadata() VulnerabilityMetadata { + if o == nil { + var ret VulnerabilityMetadata + return ret + } + + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityRead) GetMetadataOk() (*VulnerabilityMetadata, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value +func (o *VulnerabilityRead) SetMetadata(v VulnerabilityMetadata) { + o.Metadata = v +} + +// GetProperties returns the Properties field value +func (o *VulnerabilityRead) GetProperties() Vulnerability { + if o == nil { + var ret Vulnerability + return ret + } + + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityRead) GetPropertiesOk() (*Vulnerability, bool) { + if o == nil { + return nil, false + } + return &o.Properties, true +} + +// SetProperties sets field value +func (o *VulnerabilityRead) SetProperties(v Vulnerability) { + o.Properties = v +} + +func (o VulnerabilityRead) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + toSerialize["href"] = o.Href + toSerialize["metadata"] = o.Metadata + toSerialize["properties"] = o.Properties + return toSerialize, nil +} + +type NullableVulnerabilityRead struct { + value *VulnerabilityRead + isSet bool +} + +func (v NullableVulnerabilityRead) Get() *VulnerabilityRead { + return v.value +} + +func (v *NullableVulnerabilityRead) Set(val *VulnerabilityRead) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerabilityRead) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerabilityRead) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerabilityRead(val *VulnerabilityRead) *NullableVulnerabilityRead { + return &NullableVulnerabilityRead{value: val, isSet: true} +} + +func (v NullableVulnerabilityRead) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerabilityRead) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_vulnerability_read_list.go b/products/containerregistry/model_vulnerability_read_list.go new file mode 100644 index 0000000..28f3328 --- /dev/null +++ b/products/containerregistry/model_vulnerability_read_list.go @@ -0,0 +1,283 @@ +/* + * Container Registry service + * + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex + * + * API version: 1.2.1 + * Contact: support@cloud.ionos.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package containerregistry + +import ( + "encoding/json" +) + +// checks if the VulnerabilityReadList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VulnerabilityReadList{} + +// VulnerabilityReadList struct for VulnerabilityReadList +type VulnerabilityReadList struct { + Id string `json:"id"` + Type string `json:"type"` + Href string `json:"href"` + Items []VulnerabilityRead `json:"items,omitempty"` + // The offset specified in the request (if none was specified, the default offset is 0). + Offset int32 `json:"offset"` + // The limit specified in the request (if none was specified, use the endpoint's default pagination limit). + Limit int32 `json:"limit"` + Links Links `json:"_links"` +} + +// NewVulnerabilityReadList instantiates a new VulnerabilityReadList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVulnerabilityReadList(id string, type_ string, href string, offset int32, limit int32, links Links) *VulnerabilityReadList { + this := VulnerabilityReadList{} + + this.Id = id + this.Type = type_ + this.Href = href + this.Offset = offset + this.Limit = limit + this.Links = links + + return &this +} + +// NewVulnerabilityReadListWithDefaults instantiates a new VulnerabilityReadList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVulnerabilityReadListWithDefaults() *VulnerabilityReadList { + this := VulnerabilityReadList{} + return &this +} + +// GetId returns the Id field value +func (o *VulnerabilityReadList) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityReadList) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *VulnerabilityReadList) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *VulnerabilityReadList) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityReadList) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *VulnerabilityReadList) SetType(v string) { + o.Type = v +} + +// GetHref returns the Href field value +func (o *VulnerabilityReadList) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityReadList) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *VulnerabilityReadList) SetHref(v string) { + o.Href = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *VulnerabilityReadList) GetItems() []VulnerabilityRead { + if o == nil || IsNil(o.Items) { + var ret []VulnerabilityRead + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VulnerabilityReadList) GetItemsOk() ([]VulnerabilityRead, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *VulnerabilityReadList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []VulnerabilityRead and assigns it to the Items field. +func (o *VulnerabilityReadList) SetItems(v []VulnerabilityRead) { + o.Items = v +} + +// GetOffset returns the Offset field value +func (o *VulnerabilityReadList) GetOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityReadList) GetOffsetOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *VulnerabilityReadList) SetOffset(v int32) { + o.Offset = v +} + +// GetLimit returns the Limit field value +func (o *VulnerabilityReadList) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityReadList) GetLimitOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *VulnerabilityReadList) SetLimit(v int32) { + o.Limit = v +} + +// GetLinks returns the Links field value +func (o *VulnerabilityReadList) GetLinks() Links { + if o == nil { + var ret Links + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *VulnerabilityReadList) GetLinksOk() (*Links, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *VulnerabilityReadList) SetLinks(v Links) { + o.Links = v +} + +func (o VulnerabilityReadList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + toSerialize["href"] = o.Href + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + toSerialize["offset"] = o.Offset + toSerialize["limit"] = o.Limit + toSerialize["_links"] = o.Links + return toSerialize, nil +} + +type NullableVulnerabilityReadList struct { + value *VulnerabilityReadList + isSet bool +} + +func (v NullableVulnerabilityReadList) Get() *VulnerabilityReadList { + return v.value +} + +func (v *NullableVulnerabilityReadList) Set(val *VulnerabilityReadList) { + v.value = val + v.isSet = true +} + +func (v NullableVulnerabilityReadList) IsSet() bool { + return v.isSet +} + +func (v *NullableVulnerabilityReadList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVulnerabilityReadList(val *VulnerabilityReadList) *NullableVulnerabilityReadList { + return &NullableVulnerabilityReadList{value: val, isSet: true} +} + +func (v NullableVulnerabilityReadList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVulnerabilityReadList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/products/containerregistry/model_weekly_schedule.go b/products/containerregistry/model_weekly_schedule.go index b0e975f..083cc33 100644 --- a/products/containerregistry/model_weekly_schedule.go +++ b/products/containerregistry/model_weekly_schedule.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -15,11 +15,14 @@ import ( "encoding/json" ) +// checks if the WeeklySchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WeeklySchedule{} + // WeeklySchedule struct for WeeklySchedule type WeeklySchedule struct { - Days *[]Day `json:"days"` + Days []Day `json:"days"` // UTC time of day e.g. 01:00:00 - as defined by partial-time - RFC3339 - Time *string `json:"time"` + Time string `json:"time"` } // NewWeeklySchedule instantiates a new WeeklySchedule object @@ -29,8 +32,8 @@ type WeeklySchedule struct { func NewWeeklySchedule(days []Day, time string) *WeeklySchedule { this := WeeklySchedule{} - this.Days = &days - this.Time = &time + this.Days = days + this.Time = time return &this } @@ -44,90 +47,58 @@ func NewWeeklyScheduleWithDefaults() *WeeklySchedule { } // GetDays returns the Days field value -// If the value is explicit nil, the zero value for []Day will be returned -func (o *WeeklySchedule) GetDays() *[]Day { +func (o *WeeklySchedule) GetDays() []Day { if o == nil { - return nil + var ret []Day + return ret } return o.Days - } // GetDaysOk returns a tuple with the Days field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *WeeklySchedule) GetDaysOk() (*[]Day, bool) { +func (o *WeeklySchedule) GetDaysOk() ([]Day, bool) { if o == nil { return nil, false } - return o.Days, true } // SetDays sets field value func (o *WeeklySchedule) SetDays(v []Day) { - - o.Days = &v - -} - -// HasDays returns a boolean if a field has been set. -func (o *WeeklySchedule) HasDays() bool { - if o != nil && o.Days != nil { - return true - } - - return false + o.Days = v } // GetTime returns the Time field value -// If the value is explicit nil, the zero value for string will be returned -func (o *WeeklySchedule) GetTime() *string { +func (o *WeeklySchedule) GetTime() string { if o == nil { - return nil + var ret string + return ret } return o.Time - } // GetTimeOk returns a tuple with the Time field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *WeeklySchedule) GetTimeOk() (*string, bool) { if o == nil { return nil, false } - - return o.Time, true + return &o.Time, true } // SetTime sets field value func (o *WeeklySchedule) SetTime(v string) { - - o.Time = &v - -} - -// HasTime returns a boolean if a field has been set. -func (o *WeeklySchedule) HasTime() bool { - if o != nil && o.Time != nil { - return true - } - - return false + o.Time = v } -func (o WeeklySchedule) MarshalJSON() ([]byte, error) { +func (o WeeklySchedule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["days"] = o.Days - - if o.Time != nil { - toSerialize["time"] = o.Time - } - - return json.Marshal(toSerialize) + toSerialize["time"] = o.Time + return toSerialize, nil } type NullableWeeklySchedule struct { diff --git a/products/containerregistry/utils.go b/products/containerregistry/utils.go index 2e4f1d1..d42b797 100644 --- a/products/containerregistry/utils.go +++ b/products/containerregistry/utils.go @@ -1,9 +1,9 @@ /* * Container Registry service * - * Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. + * ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex * - * API version: 1.0 + * API version: 1.2.1 * Contact: support@cloud.ionos.com */ @@ -12,7 +12,9 @@ package containerregistry import ( + "encoding/json" "github.com/ionos-cloud/sdk-go-bundle/shared" + "reflect" "strings" "time" ) @@ -45,3 +47,313 @@ func (t *IonosTime) UnmarshalJSON(data []byte) error { *t = IonosTime{tt} return nil } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +func IsZero(v interface{}) bool { + return reflect.ValueOf(v).IsZero() +}