diff --git a/services/serviceaccount/api_default.go b/services/serviceaccount/api_default.go index bd6bf6228..16ec41a58 100644 --- a/services/serviceaccount/api_default.go +++ b/services/serviceaccount/api_default.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -23,6 +24,7 @@ import ( "github.com/stackitcloud/stackit-sdk-go/core/oapierror" ) +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DefaultApi interface { /* CreateAccessToken Create a new Access Token @@ -32,6 +34,8 @@ type DefaultApi interface { @param projectId The ID of the project. @param serviceAccountEmail The email of the Service Account. @return ApiCreateAccessTokenRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateAccessToken(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateAccessTokenRequest /* @@ -42,6 +46,7 @@ type DefaultApi interface { @param serviceAccountEmail The email of the Service Account. @return AccessToken + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateAccessTokenExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*AccessToken, error) /* @@ -52,6 +57,8 @@ type DefaultApi interface { @param projectId The ID of the project. @param serviceAccountEmail The email of the service account. @return ApiCreateFederatedIdentityProviderRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateFederatedIdentityProviderRequest /* @@ -62,6 +69,7 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @return CreateFederatedIdentityProviderResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateFederatedIdentityProviderExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*CreateFederatedIdentityProviderResponse, error) /* @@ -71,6 +79,8 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @return ApiCreateServiceAccountRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateServiceAccount(ctx context.Context, projectId string) ApiCreateServiceAccountRequest /* @@ -80,6 +90,7 @@ type DefaultApi interface { @param projectId The ID of the project. @return ServiceAccount + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateServiceAccountExecute(ctx context.Context, projectId string) (*ServiceAccount, error) /* @@ -90,6 +101,8 @@ type DefaultApi interface { @param projectId The ID of the project. @param serviceAccountEmail The email of the service account. @return ApiCreateServiceAccountKeyRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateServiceAccountKeyRequest /* @@ -100,6 +113,7 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @return CreateServiceAccountKeyResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateServiceAccountKeyExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*CreateServiceAccountKeyResponse, error) /* @@ -109,6 +123,8 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateShortLivedAccessTokenRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateShortLivedAccessToken(ctx context.Context) ApiCreateShortLivedAccessTokenRequest /* @@ -117,6 +133,7 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return CreateShortLivedAccessTokenResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateShortLivedAccessTokenExecute(ctx context.Context) (*CreateShortLivedAccessTokenResponse, error) /* @@ -128,11 +145,14 @@ type DefaultApi interface { @param serviceAccountEmail The ID of the Service Account. @param accessTokenId The ID of the Access Token. @return ApiDeleteAccessTokenRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteAccessToken(ctx context.Context, projectId string, serviceAccountEmail string, accessTokenId string) ApiDeleteAccessTokenRequest /* DeleteAccessTokenExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteAccessTokenExecute(ctx context.Context, projectId string, serviceAccountEmail string, accessTokenId string) error /* @@ -143,11 +163,14 @@ type DefaultApi interface { @param projectId The ID of the project. @param serviceAccountEmail The email of the Service Account. @return ApiDeleteServiceAccountRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteServiceAccount(ctx context.Context, projectId string, serviceAccountEmail string) ApiDeleteServiceAccountRequest /* DeleteServiceAccountExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteServiceAccountExecute(ctx context.Context, projectId string, serviceAccountEmail string) error /* @@ -159,11 +182,14 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @param keyId ID of the key. @return ApiDeleteServiceAccountKeyRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiDeleteServiceAccountKeyRequest /* DeleteServiceAccountKeyExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteServiceAccountKeyExecute(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) error /* @@ -175,11 +201,14 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @param federationId ID of the Federated Identity Provider. @return ApiDeleteServiceFederatedIdentityProviderRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteServiceFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) ApiDeleteServiceFederatedIdentityProviderRequest /* DeleteServiceFederatedIdentityProviderExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteServiceFederatedIdentityProviderExecute(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) error /* @@ -189,6 +218,8 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param serviceAccountEmail The email of the service account. @return ApiGetJWKSRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetJWKS(ctx context.Context, serviceAccountEmail string) ApiGetJWKSRequest /* @@ -198,6 +229,7 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @return JWKS + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetJWKSExecute(ctx context.Context, serviceAccountEmail string) (*JWKS, error) /* @@ -209,6 +241,8 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @param keyId ID of the key. @return ApiGetServiceAccountKeyRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiGetServiceAccountKeyRequest /* @@ -220,6 +254,7 @@ type DefaultApi interface { @param keyId ID of the key. @return GetServiceAccountKeyResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetServiceAccountKeyExecute(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) (*GetServiceAccountKeyResponse, error) /* @@ -230,6 +265,8 @@ type DefaultApi interface { @param projectId The ID of the project. @param serviceAccountEmail The email of the Service Account. @return ApiListAccessTokensRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListAccessTokens(ctx context.Context, projectId string, serviceAccountEmail string) ApiListAccessTokensRequest /* @@ -240,6 +277,7 @@ type DefaultApi interface { @param serviceAccountEmail The email of the Service Account. @return ListAccessTokensResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListAccessTokensExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*ListAccessTokensResponse, error) /* @@ -250,6 +288,8 @@ type DefaultApi interface { @param projectId The ID of the project. @param serviceAccountEmail The email of the service account. @return ApiListFederatedIdentityProvidersRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListFederatedIdentityProviders(ctx context.Context, projectId string, serviceAccountEmail string) ApiListFederatedIdentityProvidersRequest /* @@ -260,6 +300,7 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @return FederatedListFederatedIdentityProvidersResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListFederatedIdentityProvidersExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*FederatedListFederatedIdentityProvidersResponse, error) /* @@ -270,6 +311,8 @@ type DefaultApi interface { @param projectId The ID of the project. @param serviceAccountEmail The email of the service account. @return ApiListServiceAccountKeysRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListServiceAccountKeys(ctx context.Context, projectId string, serviceAccountEmail string) ApiListServiceAccountKeysRequest /* @@ -280,6 +323,7 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @return ListServiceAccountKeysResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListServiceAccountKeysExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*ListServiceAccountKeysResponse, error) /* @@ -289,6 +333,8 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @return ApiListServiceAccountsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListServiceAccounts(ctx context.Context, projectId string) ApiListServiceAccountsRequest /* @@ -298,6 +344,7 @@ type DefaultApi interface { @param projectId The ID of the project. @return ListServiceAccountsResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListServiceAccountsExecute(ctx context.Context, projectId string) (*ListServiceAccountsResponse, error) /* @@ -309,6 +356,8 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @param federationId ID of the Federated Identity Provider. @return ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ PartialUpdateServiceAccountFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest /* @@ -320,6 +369,7 @@ type DefaultApi interface { @param federationId ID of the Federated Identity Provider. @return CreateFederatedIdentityProviderResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ PartialUpdateServiceAccountFederatedIdentityProviderExecute(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) (*CreateFederatedIdentityProviderResponse, error) /* @@ -331,6 +381,8 @@ type DefaultApi interface { @param serviceAccountEmail The email of the service account. @param keyId ID of the key. @return ApiPartialUpdateServiceAccountKeyRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ PartialUpdateServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiPartialUpdateServiceAccountKeyRequest /* @@ -342,101 +394,148 @@ type DefaultApi interface { @param keyId ID of the key. @return PartialUpdateServiceAccountKeyResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ PartialUpdateServiceAccountKeyExecute(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) (*PartialUpdateServiceAccountKeyResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateAccessTokenRequest interface { // Token request. Optional. If not specified the access token will be valid for 90days. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateAccessTokenPayload(createAccessTokenPayload CreateAccessTokenPayload) ApiCreateAccessTokenRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*AccessToken, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateFederatedIdentityProviderRequest interface { // Federated identity provider request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateFederatedIdentityProviderPayload(createFederatedIdentityProviderPayload CreateFederatedIdentityProviderPayload) ApiCreateFederatedIdentityProviderRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateFederatedIdentityProviderResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateServiceAccountRequest interface { // Service account request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateServiceAccountPayload(createServiceAccountPayload CreateServiceAccountPayload) ApiCreateServiceAccountRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ServiceAccount, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateServiceAccountKeyRequest interface { // Service account request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateServiceAccountKeyPayload(createServiceAccountKeyPayload CreateServiceAccountKeyPayload) ApiCreateServiceAccountKeyRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateServiceAccountKeyResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateShortLivedAccessTokenRequest interface { // Always use URL encoded values. E.g. urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead GrantType(grantType string) ApiCreateShortLivedAccessTokenRequest // The self signed JWT. Must be given when grant_type is urn:ietf:params:oauth:grant-type:jwt-bearer + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Assertion(assertion string) ApiCreateShortLivedAccessTokenRequest // Refresh token provided by a previous call with a self signed token. Must be given when grant_type is refresh_token + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead RefreshToken(refreshToken string) ApiCreateShortLivedAccessTokenRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateShortLivedAccessTokenResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteAccessTokenRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteServiceAccountRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteServiceAccountKeyRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteServiceFederatedIdentityProviderRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetJWKSRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*JWKS, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetServiceAccountKeyRequest interface { // Requested format for the public key + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Format(format string) ApiGetServiceAccountKeyRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*GetServiceAccountKeyResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListAccessTokensRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListAccessTokensResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListFederatedIdentityProvidersRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*FederatedListFederatedIdentityProvidersResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListServiceAccountKeysRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListServiceAccountKeysResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListServiceAccountsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListServiceAccountsResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest interface { // Delete a Federated Identity Provider + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead PartialUpdateServiceAccountFederatedIdentityProviderPayload(partialUpdateServiceAccountFederatedIdentityProviderPayload PartialUpdateServiceAccountFederatedIdentityProviderPayload) ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateFederatedIdentityProviderResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiPartialUpdateServiceAccountKeyRequest interface { // Service account request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead PartialUpdateServiceAccountKeyPayload(partialUpdateServiceAccountKeyPayload PartialUpdateServiceAccountKeyPayload) ApiPartialUpdateServiceAccountKeyRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*PartialUpdateServiceAccountKeyResponse, error) } // DefaultApiService DefaultApi service +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DefaultApiService service +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateAccessTokenRequest struct { ctx context.Context apiService *DefaultApiService @@ -446,12 +545,13 @@ type CreateAccessTokenRequest struct { } // Token request. Optional. If not specified the access token will be valid for 90days. - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateAccessTokenRequest) CreateAccessTokenPayload(createAccessTokenPayload CreateAccessTokenPayload) ApiCreateAccessTokenRequest { r.createAccessTokenPayload = &createAccessTokenPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateAccessTokenRequest) Execute() (*AccessToken, error) { var ( localVarHTTPMethod = http.MethodPost @@ -590,7 +690,7 @@ func (r CreateAccessTokenRequest) Execute() (*AccessToken, error) { /* CreateAccessToken: Create a new Access Token -Create an Access Token for a Service Account. The service token can be then used for API calls. Save the response token, as it is not recoverable later. Token metadata can be requested until the token is not expired. A token cannot be created using another token from the same service account. Consider using service account keys instead as a more secure and automation friendly solution. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -606,6 +706,7 @@ func (a *APIClient) CreateAccessToken(ctx context.Context, projectId string, ser } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateAccessTokenExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*AccessToken, error) { r := CreateAccessTokenRequest{ apiService: a.defaultApi, @@ -616,6 +717,7 @@ func (a *APIClient) CreateAccessTokenExecute(ctx context.Context, projectId stri return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderRequest struct { ctx context.Context apiService *DefaultApiService @@ -625,12 +727,13 @@ type CreateFederatedIdentityProviderRequest struct { } // Federated identity provider request - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateFederatedIdentityProviderRequest) CreateFederatedIdentityProviderPayload(createFederatedIdentityProviderPayload CreateFederatedIdentityProviderPayload) ApiCreateFederatedIdentityProviderRequest { r.createFederatedIdentityProviderPayload = &createFederatedIdentityProviderPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateFederatedIdentityProviderRequest) Execute() (*CreateFederatedIdentityProviderResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -780,7 +883,7 @@ func (r CreateFederatedIdentityProviderRequest) Execute() (*CreateFederatedIdent /* CreateFederatedIdentityProvider: Create a new Federated Identity Provider -Federate the service account with an identity provider. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -796,6 +899,7 @@ func (a *APIClient) CreateFederatedIdentityProvider(ctx context.Context, project } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateFederatedIdentityProviderExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*CreateFederatedIdentityProviderResponse, error) { r := CreateFederatedIdentityProviderRequest{ apiService: a.defaultApi, @@ -806,6 +910,7 @@ func (a *APIClient) CreateFederatedIdentityProviderExecute(ctx context.Context, return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountRequest struct { ctx context.Context apiService *DefaultApiService @@ -814,12 +919,13 @@ type CreateServiceAccountRequest struct { } // Service account request - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateServiceAccountRequest) CreateServiceAccountPayload(createServiceAccountPayload CreateServiceAccountPayload) ApiCreateServiceAccountRequest { r.createServiceAccountPayload = &createServiceAccountPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateServiceAccountRequest) Execute() (*ServiceAccount, error) { var ( localVarHTTPMethod = http.MethodPost @@ -957,7 +1063,7 @@ func (r CreateServiceAccountRequest) Execute() (*ServiceAccount, error) { /* CreateServiceAccount: Create a new Service Account -Create a new Service Account in a project. The service account only resides in the project, and initially has no roles or permissions on any resources. After creation, the service account can be assigned to this project, other projects in the parent organization or to the parent organization. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -971,6 +1077,7 @@ func (a *APIClient) CreateServiceAccount(ctx context.Context, projectId string) } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateServiceAccountExecute(ctx context.Context, projectId string) (*ServiceAccount, error) { r := CreateServiceAccountRequest{ apiService: a.defaultApi, @@ -980,6 +1087,7 @@ func (a *APIClient) CreateServiceAccountExecute(ctx context.Context, projectId s return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyRequest struct { ctx context.Context apiService *DefaultApiService @@ -989,12 +1097,13 @@ type CreateServiceAccountKeyRequest struct { } // Service account request - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateServiceAccountKeyRequest) CreateServiceAccountKeyPayload(createServiceAccountKeyPayload CreateServiceAccountKeyPayload) ApiCreateServiceAccountKeyRequest { r.createServiceAccountKeyPayload = &createServiceAccountKeyPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateServiceAccountKeyRequest) Execute() (*CreateServiceAccountKeyResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -1133,7 +1242,7 @@ func (r CreateServiceAccountKeyRequest) Execute() (*CreateServiceAccountKeyRespo /* CreateServiceAccountKey: Create a new Service Account key -Create a new key to the service account. You can generate an RSA keypair, and post the PUBLIC part of the keypair, or leave empty, then the service will generate a pair. Maximum of 10 key can be added. A new key cannot be created using the same service account (authenticated using the short lived token of another key of the same service account). +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -1149,6 +1258,7 @@ func (a *APIClient) CreateServiceAccountKey(ctx context.Context, projectId strin } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateServiceAccountKeyExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*CreateServiceAccountKeyResponse, error) { r := CreateServiceAccountKeyRequest{ apiService: a.defaultApi, @@ -1159,6 +1269,7 @@ func (a *APIClient) CreateServiceAccountKeyExecute(ctx context.Context, projectI return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenRequest struct { ctx context.Context apiService *DefaultApiService @@ -1168,26 +1279,27 @@ type CreateShortLivedAccessTokenRequest struct { } // Always use URL encoded values. E.g. urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateShortLivedAccessTokenRequest) GrantType(grantType string) ApiCreateShortLivedAccessTokenRequest { r.grantType = &grantType return r } // The self signed JWT. Must be given when grant_type is urn:ietf:params:oauth:grant-type:jwt-bearer - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateShortLivedAccessTokenRequest) Assertion(assertion string) ApiCreateShortLivedAccessTokenRequest { r.assertion = &assertion return r } // Refresh token provided by a previous call with a self signed token. Must be given when grant_type is refresh_token - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateShortLivedAccessTokenRequest) RefreshToken(refreshToken string) ApiCreateShortLivedAccessTokenRequest { r.refreshToken = &refreshToken return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateShortLivedAccessTokenRequest) Execute() (*CreateShortLivedAccessTokenResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -1310,8 +1422,7 @@ func (r CreateShortLivedAccessTokenRequest) Execute() (*CreateShortLivedAccessTo /* CreateShortLivedAccessToken: Request short lived API access token (OAUTH2). -Request a short lived API access token with OAUTH2. Compatible with [Using JWTs as Authorization Grants](https://www.rfc-editor.org/rfc/rfc7523.html#section-2.1) -You can request a token with a self signed token, or with a refresh token. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateShortLivedAccessTokenRequest @@ -1323,6 +1434,7 @@ func (a *APIClient) CreateShortLivedAccessToken(ctx context.Context) ApiCreateSh } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateShortLivedAccessTokenExecute(ctx context.Context) (*CreateShortLivedAccessTokenResponse, error) { r := CreateShortLivedAccessTokenRequest{ apiService: a.defaultApi, @@ -1331,6 +1443,7 @@ func (a *APIClient) CreateShortLivedAccessTokenExecute(ctx context.Context) (*Cr return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteAccessTokenRequest struct { ctx context.Context apiService *DefaultApiService @@ -1339,6 +1452,7 @@ type DeleteAccessTokenRequest struct { accessTokenId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteAccessTokenRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -1476,7 +1590,7 @@ func (r DeleteAccessTokenRequest) Execute() error { /* DeleteAccessToken: Revoke Access Token -Revoke an Access Token. The access token is instantly revoked, any following calls with the token will be unauthorized. The token metadata is still stored until the expiration time. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -1494,6 +1608,7 @@ func (a *APIClient) DeleteAccessToken(ctx context.Context, projectId string, ser } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteAccessTokenExecute(ctx context.Context, projectId string, serviceAccountEmail string, accessTokenId string) error { r := DeleteAccessTokenRequest{ apiService: a.defaultApi, @@ -1505,6 +1620,7 @@ func (a *APIClient) DeleteAccessTokenExecute(ctx context.Context, projectId stri return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteServiceAccountRequest struct { ctx context.Context apiService *DefaultApiService @@ -1512,6 +1628,7 @@ type DeleteServiceAccountRequest struct { serviceAccountEmail string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteServiceAccountRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -1637,7 +1754,7 @@ func (r DeleteServiceAccountRequest) Execute() error { /* DeleteServiceAccount: Delete Service Account -Delete a Service Account. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -1653,6 +1770,7 @@ func (a *APIClient) DeleteServiceAccount(ctx context.Context, projectId string, } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteServiceAccountExecute(ctx context.Context, projectId string, serviceAccountEmail string) error { r := DeleteServiceAccountRequest{ apiService: a.defaultApi, @@ -1663,6 +1781,7 @@ func (a *APIClient) DeleteServiceAccountExecute(ctx context.Context, projectId s return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteServiceAccountKeyRequest struct { ctx context.Context apiService *DefaultApiService @@ -1671,6 +1790,7 @@ type DeleteServiceAccountKeyRequest struct { keyId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteServiceAccountKeyRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -1786,7 +1906,7 @@ func (r DeleteServiceAccountKeyRequest) Execute() error { /* DeleteServiceAccountKey: Delete a service account key -Delete a key +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -1804,6 +1924,7 @@ func (a *APIClient) DeleteServiceAccountKey(ctx context.Context, projectId strin } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteServiceAccountKeyExecute(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) error { r := DeleteServiceAccountKeyRequest{ apiService: a.defaultApi, @@ -1815,6 +1936,7 @@ func (a *APIClient) DeleteServiceAccountKeyExecute(ctx context.Context, projectI return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteServiceFederatedIdentityProviderRequest struct { ctx context.Context apiService *DefaultApiService @@ -1823,6 +1945,7 @@ type DeleteServiceFederatedIdentityProviderRequest struct { federationId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteServiceFederatedIdentityProviderRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -1949,7 +2072,7 @@ func (r DeleteServiceFederatedIdentityProviderRequest) Execute() error { /* DeleteServiceFederatedIdentityProvider: Delete a service account Federated Identity Provider -Delete a Federated Identity Provider +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -1967,6 +2090,7 @@ func (a *APIClient) DeleteServiceFederatedIdentityProvider(ctx context.Context, } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteServiceFederatedIdentityProviderExecute(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) error { r := DeleteServiceFederatedIdentityProviderRequest{ apiService: a.defaultApi, @@ -1978,12 +2102,14 @@ func (a *APIClient) DeleteServiceFederatedIdentityProviderExecute(ctx context.Co return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetJWKSRequest struct { ctx context.Context apiService *DefaultApiService serviceAccountEmail string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetJWKSRequest) Execute() (*JWKS, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2076,7 +2202,7 @@ func (r GetJWKSRequest) Execute() (*JWKS, error) { /* GetJWKS: Get JSON Web Key set of the service account -Get JSON Web Key set of the service account +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param serviceAccountEmail The email of the service account. @@ -2090,6 +2216,7 @@ func (a *APIClient) GetJWKS(ctx context.Context, serviceAccountEmail string) Api } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetJWKSExecute(ctx context.Context, serviceAccountEmail string) (*JWKS, error) { r := GetJWKSRequest{ apiService: a.defaultApi, @@ -2099,6 +2226,7 @@ func (a *APIClient) GetJWKSExecute(ctx context.Context, serviceAccountEmail stri return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyRequest struct { ctx context.Context apiService *DefaultApiService @@ -2109,12 +2237,13 @@ type GetServiceAccountKeyRequest struct { } // Requested format for the public key - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetServiceAccountKeyRequest) Format(format string) ApiGetServiceAccountKeyRequest { r.format = &format return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetServiceAccountKeyRequest) Execute() (*GetServiceAccountKeyResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2244,7 +2373,7 @@ func (r GetServiceAccountKeyRequest) Execute() (*GetServiceAccountKeyResponse, e /* GetServiceAccountKey: Get service account key details -Get key details +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -2262,6 +2391,7 @@ func (a *APIClient) GetServiceAccountKey(ctx context.Context, projectId string, } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetServiceAccountKeyExecute(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) (*GetServiceAccountKeyResponse, error) { r := GetServiceAccountKeyRequest{ apiService: a.defaultApi, @@ -2273,6 +2403,7 @@ func (a *APIClient) GetServiceAccountKeyExecute(ctx context.Context, projectId s return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListAccessTokensRequest struct { ctx context.Context apiService *DefaultApiService @@ -2280,6 +2411,7 @@ type ListAccessTokensRequest struct { serviceAccountEmail string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListAccessTokensRequest) Execute() (*ListAccessTokensResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2416,7 +2548,7 @@ func (r ListAccessTokensRequest) Execute() (*ListAccessTokensResponse, error) { /* ListAccessTokens: List Access Tokens of Service Account -Get all Access Tokens of a Service Account. The token itself is not returned, only the metadata about the access tokens. Access tokens are listed until they are expired. Revoked tokens are returned until expired. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -2432,6 +2564,7 @@ func (a *APIClient) ListAccessTokens(ctx context.Context, projectId string, serv } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListAccessTokensExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*ListAccessTokensResponse, error) { r := ListAccessTokensRequest{ apiService: a.defaultApi, @@ -2442,6 +2575,7 @@ func (a *APIClient) ListAccessTokensExecute(ctx context.Context, projectId strin return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListFederatedIdentityProvidersRequest struct { ctx context.Context apiService *DefaultApiService @@ -2449,6 +2583,7 @@ type ListFederatedIdentityProvidersRequest struct { serviceAccountEmail string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListFederatedIdentityProvidersRequest) Execute() (*FederatedListFederatedIdentityProvidersResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2585,7 +2720,7 @@ func (r ListFederatedIdentityProvidersRequest) Execute() (*FederatedListFederate /* ListFederatedIdentityProviders: List all federated identity providers -List all the identity providers the service account is federated with. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -2601,6 +2736,7 @@ func (a *APIClient) ListFederatedIdentityProviders(ctx context.Context, projectI } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListFederatedIdentityProvidersExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*FederatedListFederatedIdentityProvidersResponse, error) { r := ListFederatedIdentityProvidersRequest{ apiService: a.defaultApi, @@ -2611,6 +2747,7 @@ func (a *APIClient) ListFederatedIdentityProvidersExecute(ctx context.Context, p return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountKeysRequest struct { ctx context.Context apiService *DefaultApiService @@ -2618,6 +2755,7 @@ type ListServiceAccountKeysRequest struct { serviceAccountEmail string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListServiceAccountKeysRequest) Execute() (*ListServiceAccountKeysResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2743,7 +2881,7 @@ func (r ListServiceAccountKeysRequest) Execute() (*ListServiceAccountKeysRespons /* ListServiceAccountKeys: List all keys that belong to the service account -List all keys that belong to the service account +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -2759,6 +2897,7 @@ func (a *APIClient) ListServiceAccountKeys(ctx context.Context, projectId string } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListServiceAccountKeysExecute(ctx context.Context, projectId string, serviceAccountEmail string) (*ListServiceAccountKeysResponse, error) { r := ListServiceAccountKeysRequest{ apiService: a.defaultApi, @@ -2769,12 +2908,14 @@ func (a *APIClient) ListServiceAccountKeysExecute(ctx context.Context, projectId return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountsRequest struct { ctx context.Context apiService *DefaultApiService projectId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListServiceAccountsRequest) Execute() (*ListServiceAccountsResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2899,7 +3040,7 @@ func (r ListServiceAccountsRequest) Execute() (*ListServiceAccountsResponse, err /* ListServiceAccounts: List all Service Accounts -List all Service Account resources in a project. Returns the service account resources, not the service accounts that has access to the project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -2913,6 +3054,7 @@ func (a *APIClient) ListServiceAccounts(ctx context.Context, projectId string) A } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListServiceAccountsExecute(ctx context.Context, projectId string) (*ListServiceAccountsResponse, error) { r := ListServiceAccountsRequest{ apiService: a.defaultApi, @@ -2922,6 +3064,7 @@ func (a *APIClient) ListServiceAccountsExecute(ctx context.Context, projectId st return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderRequest struct { ctx context.Context apiService *DefaultApiService @@ -2932,12 +3075,13 @@ type PartialUpdateServiceAccountFederatedIdentityProviderRequest struct { } // Delete a Federated Identity Provider - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r PartialUpdateServiceAccountFederatedIdentityProviderRequest) PartialUpdateServiceAccountFederatedIdentityProviderPayload(partialUpdateServiceAccountFederatedIdentityProviderPayload PartialUpdateServiceAccountFederatedIdentityProviderPayload) ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest { r.partialUpdateServiceAccountFederatedIdentityProviderPayload = &partialUpdateServiceAccountFederatedIdentityProviderPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r PartialUpdateServiceAccountFederatedIdentityProviderRequest) Execute() (*CreateFederatedIdentityProviderResponse, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -3088,7 +3232,7 @@ func (r PartialUpdateServiceAccountFederatedIdentityProviderRequest) Execute() ( /* PartialUpdateServiceAccountFederatedIdentityProvider: Update Service Account Federated Identity Provider -Update a Federated Identity Provider. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -3106,6 +3250,7 @@ func (a *APIClient) PartialUpdateServiceAccountFederatedIdentityProvider(ctx con } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) PartialUpdateServiceAccountFederatedIdentityProviderExecute(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) (*CreateFederatedIdentityProviderResponse, error) { r := PartialUpdateServiceAccountFederatedIdentityProviderRequest{ apiService: a.defaultApi, @@ -3117,6 +3262,7 @@ func (a *APIClient) PartialUpdateServiceAccountFederatedIdentityProviderExecute( return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyRequest struct { ctx context.Context apiService *DefaultApiService @@ -3127,12 +3273,13 @@ type PartialUpdateServiceAccountKeyRequest struct { } // Service account request - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r PartialUpdateServiceAccountKeyRequest) PartialUpdateServiceAccountKeyPayload(partialUpdateServiceAccountKeyPayload PartialUpdateServiceAccountKeyPayload) ApiPartialUpdateServiceAccountKeyRequest { r.partialUpdateServiceAccountKeyPayload = &partialUpdateServiceAccountKeyPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r PartialUpdateServiceAccountKeyRequest) Execute() (*PartialUpdateServiceAccountKeyResponse, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -3272,7 +3419,7 @@ func (r PartialUpdateServiceAccountKeyRequest) Execute() (*PartialUpdateServiceA /* PartialUpdateServiceAccountKey: Update Service Account key -Update a key. You can activate or deactivate a key, or set/delete validUntil. The key cannot be updated using the same service account (authenticated using the short lived token of the key). +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project. @@ -3290,6 +3437,7 @@ func (a *APIClient) PartialUpdateServiceAccountKey(ctx context.Context, projectI } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) PartialUpdateServiceAccountKeyExecute(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) (*PartialUpdateServiceAccountKeyResponse, error) { r := PartialUpdateServiceAccountKeyRequest{ apiService: a.defaultApi, diff --git a/services/serviceaccount/client.go b/services/serviceaccount/client.go index a5d1cbded..b76ebd5b5 100644 --- a/services/serviceaccount/client.go +++ b/services/serviceaccount/client.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -44,18 +45,21 @@ var ( // APIClient manages communication with the Service Account API API v2.0 // In most cases there should be only one, shared, APIClient. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type APIClient struct { cfg *config.Configuration common service // Reuse a single struct instead of allocating one for each service on the heap. defaultApi *DefaultApiService } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type service struct { client DefaultApi } // NewAPIClient creates a new API client. // Optionally receives configuration options +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { cfg := NewConfiguration() @@ -147,6 +151,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func ParameterValueToString(obj interface{}, key string) string { if reflect.TypeOf(obj).Kind() != reflect.Ptr { return fmt.Sprintf("%v", obj) @@ -285,6 +290,7 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { // Allow modification of underlying config for alternate implementations and testing // Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (c *APIClient) GetConfig() *config.Configuration { return c.cfg } @@ -595,6 +601,7 @@ func parseCacheControl(headers http.Header) cacheControl { } // CacheExpires helper function to determine remaining time before repeating a request. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func CacheExpires(r *http.Response) time.Time { // Figure out when the cache expires. var expires time.Time diff --git a/services/serviceaccount/configuration.go b/services/serviceaccount/configuration.go index 08b1f165d..1c70b7b18 100644 --- a/services/serviceaccount/configuration.go +++ b/services/serviceaccount/configuration.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -15,6 +16,7 @@ import ( ) // NewConfiguration returns a new Configuration object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewConfiguration() *config.Configuration { cfg := &config.Configuration{ DefaultHeader: make(map[string]string), diff --git a/services/serviceaccount/go.mod b/services/serviceaccount/go.mod index 388416cd2..7135b1865 100644 --- a/services/serviceaccount/go.mod +++ b/services/serviceaccount/go.mod @@ -2,7 +2,7 @@ module github.com/stackitcloud/stackit-sdk-go/services/serviceaccount go 1.21 -require github.com/stackitcloud/stackit-sdk-go/core v0.21.1 +require github.com/stackitcloud/stackit-sdk-go/core v0.22.0 require ( github.com/golang-jwt/jwt/v5 v5.3.1 // indirect diff --git a/services/serviceaccount/go.sum b/services/serviceaccount/go.sum index ca103c909..195011dd5 100644 --- a/services/serviceaccount/go.sum +++ b/services/serviceaccount/go.sum @@ -4,5 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= diff --git a/services/serviceaccount/model_access_token.go b/services/serviceaccount/model_access_token.go index 88ac3c699..f9b064987 100644 --- a/services/serviceaccount/model_access_token.go +++ b/services/serviceaccount/model_access_token.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &AccessToken{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokengetActiveAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokengetActiveArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokengetActiveRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAccessTokengetActiveAttributeTypeOk(arg AccessTokengetActiveAttributeType) (ret AccessTokengetActiveRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getAccessTokengetActiveAttributeTypeOk(arg AccessTokengetActiveAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAccessTokengetActiveAttributeType(arg *AccessTokengetActiveAttributeType, val AccessTokengetActiveRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setAccessTokengetActiveAttributeType(arg *AccessTokengetActiveAttributeType */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAccessTokenGetCreatedAtAttributeTypeOk(arg AccessTokenGetCreatedAtAttributeType) (ret AccessTokenGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +68,7 @@ func getAccessTokenGetCreatedAtAttributeTypeOk(arg AccessTokenGetCreatedAtAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAccessTokenGetCreatedAtAttributeType(arg *AccessTokenGetCreatedAtAttributeType, val AccessTokenGetCreatedAtRetType) { *arg = &val } @@ -63,8 +78,10 @@ func setAccessTokenGetCreatedAtAttributeType(arg *AccessTokenGetCreatedAtAttribu */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAccessTokenGetIdAttributeTypeOk(arg AccessTokenGetIdAttributeType) (ret AccessTokenGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +89,15 @@ func getAccessTokenGetIdAttributeTypeOk(arg AccessTokenGetIdAttributeType) (ret return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAccessTokenGetIdAttributeType(arg *AccessTokenGetIdAttributeType, val AccessTokenGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetIdRetType = string /* @@ -84,8 +105,10 @@ type AccessTokenGetIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetTokenAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAccessTokenGetTokenAttributeTypeOk(arg AccessTokenGetTokenAttributeType) (ret AccessTokenGetTokenRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getAccessTokenGetTokenAttributeTypeOk(arg AccessTokenGetTokenAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAccessTokenGetTokenAttributeType(arg *AccessTokenGetTokenAttributeType, val AccessTokenGetTokenRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetTokenArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetTokenRetType = string /* @@ -105,10 +132,16 @@ type AccessTokenGetTokenRetType = string */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetValidUntilAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetValidUntilArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenGetValidUntilRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAccessTokenGetValidUntilAttributeTypeOk(arg AccessTokenGetValidUntilAttributeType) (ret AccessTokenGetValidUntilRetType, ok bool) { if arg == nil { return ret, false @@ -116,11 +149,13 @@ func getAccessTokenGetValidUntilAttributeTypeOk(arg AccessTokenGetValidUntilAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAccessTokenGetValidUntilAttributeType(arg *AccessTokenGetValidUntilAttributeType, val AccessTokenGetValidUntilRetType) { *arg = &val } // AccessToken Contains token metadata and actual token. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessToken struct { // Newly created access tokens are valid, and can be revoked if needed. // REQUIRED @@ -139,12 +174,14 @@ type AccessToken struct { ValidUntil AccessTokenGetValidUntilAttributeType `json:"validUntil" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _AccessToken AccessToken // NewAccessToken instantiates a new AccessToken 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAccessToken(active AccessTokengetActiveArgType, createdAt AccessTokenGetCreatedAtArgType, id AccessTokenGetIdArgType, token AccessTokenGetTokenArgType, validUntil AccessTokenGetValidUntilArgType) *AccessToken { this := AccessToken{} setAccessTokengetActiveAttributeType(&this.Active, active) @@ -158,12 +195,14 @@ func NewAccessToken(active AccessTokengetActiveArgType, createdAt AccessTokenGet // NewAccessTokenWithDefaults instantiates a new AccessToken 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAccessTokenWithDefaults() *AccessToken { this := AccessToken{} return &this } // GetActive returns the Active field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetActive() (ret AccessTokengetActiveRetType) { ret, _ = o.GetActiveOk() return ret @@ -171,16 +210,19 @@ func (o *AccessToken) GetActive() (ret AccessTokengetActiveRetType) { // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetActiveOk() (ret AccessTokengetActiveRetType, ok bool) { return getAccessTokengetActiveAttributeTypeOk(o.Active) } // SetActive sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) SetActive(v AccessTokengetActiveRetType) { setAccessTokengetActiveAttributeType(&o.Active, v) } // GetCreatedAt returns the CreatedAt field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetCreatedAt() (ret AccessTokenGetCreatedAtRetType) { ret, _ = o.GetCreatedAtOk() return ret @@ -188,16 +230,19 @@ func (o *AccessToken) GetCreatedAt() (ret AccessTokenGetCreatedAtRetType) { // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetCreatedAtOk() (ret AccessTokenGetCreatedAtRetType, ok bool) { return getAccessTokenGetCreatedAtAttributeTypeOk(o.CreatedAt) } // SetCreatedAt sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) SetCreatedAt(v AccessTokenGetCreatedAtRetType) { setAccessTokenGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetId() (ret AccessTokenGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -205,16 +250,19 @@ func (o *AccessToken) GetId() (ret AccessTokenGetIdRetType) { // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetIdOk() (ret AccessTokenGetIdRetType, ok bool) { return getAccessTokenGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) SetId(v AccessTokenGetIdRetType) { setAccessTokenGetIdAttributeType(&o.Id, v) } // GetToken returns the Token field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetToken() (ret AccessTokenGetTokenRetType) { ret, _ = o.GetTokenOk() return ret @@ -222,16 +270,19 @@ func (o *AccessToken) GetToken() (ret AccessTokenGetTokenRetType) { // GetTokenOk returns a tuple with the Token field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetTokenOk() (ret AccessTokenGetTokenRetType, ok bool) { return getAccessTokenGetTokenAttributeTypeOk(o.Token) } // SetToken sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) SetToken(v AccessTokenGetTokenRetType) { setAccessTokenGetTokenAttributeType(&o.Token, v) } // GetValidUntil returns the ValidUntil field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetValidUntil() (ret AccessTokenGetValidUntilRetType) { ret, _ = o.GetValidUntilOk() return ret @@ -239,15 +290,18 @@ func (o *AccessToken) GetValidUntil() (ret AccessTokenGetValidUntilRetType) { // GetValidUntilOk returns a tuple with the ValidUntil field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) GetValidUntilOk() (ret AccessTokenGetValidUntilRetType, ok bool) { return getAccessTokenGetValidUntilAttributeTypeOk(o.ValidUntil) } // SetValidUntil sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessToken) SetValidUntil(v AccessTokenGetValidUntilRetType) { setAccessTokenGetValidUntilAttributeType(&o.ValidUntil, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o AccessToken) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getAccessTokengetActiveAttributeTypeOk(o.Active); ok { @@ -268,37 +322,45 @@ func (o AccessToken) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableAccessToken struct { value *AccessToken isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAccessToken) Get() *AccessToken { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAccessToken) Set(val *AccessToken) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAccessToken) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAccessToken) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableAccessToken(val *AccessToken) *NullableAccessToken { return &NullableAccessToken{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAccessToken) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAccessToken) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_access_token_metadata.go b/services/serviceaccount/model_access_token_metadata.go index fa80ad676..bbeae4943 100644 --- a/services/serviceaccount/model_access_token_metadata.go +++ b/services/serviceaccount/model_access_token_metadata.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &AccessTokenMetadata{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadatagetActiveAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadatagetActiveArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadatagetActiveRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAccessTokenMetadatagetActiveAttributeTypeOk(arg AccessTokenMetadatagetActiveAttributeType) (ret AccessTokenMetadatagetActiveRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getAccessTokenMetadatagetActiveAttributeTypeOk(arg AccessTokenMetadatagetAc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAccessTokenMetadatagetActiveAttributeType(arg *AccessTokenMetadatagetActiveAttributeType, val AccessTokenMetadatagetActiveRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setAccessTokenMetadatagetActiveAttributeType(arg *AccessTokenMetadatagetAct */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadataGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadataGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadataGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAccessTokenMetadataGetCreatedAtAttributeTypeOk(arg AccessTokenMetadataGetCreatedAtAttributeType) (ret AccessTokenMetadataGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +68,7 @@ func getAccessTokenMetadataGetCreatedAtAttributeTypeOk(arg AccessTokenMetadataGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAccessTokenMetadataGetCreatedAtAttributeType(arg *AccessTokenMetadataGetCreatedAtAttributeType, val AccessTokenMetadataGetCreatedAtRetType) { *arg = &val } @@ -63,8 +78,10 @@ func setAccessTokenMetadataGetCreatedAtAttributeType(arg *AccessTokenMetadataGet */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadataGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAccessTokenMetadataGetIdAttributeTypeOk(arg AccessTokenMetadataGetIdAttributeType) (ret AccessTokenMetadataGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +89,15 @@ func getAccessTokenMetadataGetIdAttributeTypeOk(arg AccessTokenMetadataGetIdAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAccessTokenMetadataGetIdAttributeType(arg *AccessTokenMetadataGetIdAttributeType, val AccessTokenMetadataGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadataGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadataGetIdRetType = string /* @@ -84,10 +105,16 @@ type AccessTokenMetadataGetIdRetType = string */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadataGetValidUntilAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadataGetValidUntilArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadataGetValidUntilRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAccessTokenMetadataGetValidUntilAttributeTypeOk(arg AccessTokenMetadataGetValidUntilAttributeType) (ret AccessTokenMetadataGetValidUntilRetType, ok bool) { if arg == nil { return ret, false @@ -95,11 +122,13 @@ func getAccessTokenMetadataGetValidUntilAttributeTypeOk(arg AccessTokenMetadataG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAccessTokenMetadataGetValidUntilAttributeType(arg *AccessTokenMetadataGetValidUntilAttributeType, val AccessTokenMetadataGetValidUntilRetType) { *arg = &val } // AccessTokenMetadata Does not contain the actual token. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AccessTokenMetadata struct { // If true, access token can be used for authorized API calls, if false, the token is not usable anymore. // REQUIRED @@ -115,12 +144,14 @@ type AccessTokenMetadata struct { ValidUntil AccessTokenMetadataGetValidUntilAttributeType `json:"validUntil" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _AccessTokenMetadata AccessTokenMetadata // NewAccessTokenMetadata instantiates a new AccessTokenMetadata 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAccessTokenMetadata(active AccessTokenMetadatagetActiveArgType, createdAt AccessTokenMetadataGetCreatedAtArgType, id AccessTokenMetadataGetIdArgType, validUntil AccessTokenMetadataGetValidUntilArgType) *AccessTokenMetadata { this := AccessTokenMetadata{} setAccessTokenMetadatagetActiveAttributeType(&this.Active, active) @@ -133,12 +164,14 @@ func NewAccessTokenMetadata(active AccessTokenMetadatagetActiveArgType, createdA // NewAccessTokenMetadataWithDefaults instantiates a new AccessTokenMetadata 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAccessTokenMetadataWithDefaults() *AccessTokenMetadata { this := AccessTokenMetadata{} return &this } // GetActive returns the Active field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) GetActive() (ret AccessTokenMetadatagetActiveRetType) { ret, _ = o.GetActiveOk() return ret @@ -146,16 +179,19 @@ func (o *AccessTokenMetadata) GetActive() (ret AccessTokenMetadatagetActiveRetTy // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) GetActiveOk() (ret AccessTokenMetadatagetActiveRetType, ok bool) { return getAccessTokenMetadatagetActiveAttributeTypeOk(o.Active) } // SetActive sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) SetActive(v AccessTokenMetadatagetActiveRetType) { setAccessTokenMetadatagetActiveAttributeType(&o.Active, v) } // GetCreatedAt returns the CreatedAt field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) GetCreatedAt() (ret AccessTokenMetadataGetCreatedAtRetType) { ret, _ = o.GetCreatedAtOk() return ret @@ -163,16 +199,19 @@ func (o *AccessTokenMetadata) GetCreatedAt() (ret AccessTokenMetadataGetCreatedA // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) GetCreatedAtOk() (ret AccessTokenMetadataGetCreatedAtRetType, ok bool) { return getAccessTokenMetadataGetCreatedAtAttributeTypeOk(o.CreatedAt) } // SetCreatedAt sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) SetCreatedAt(v AccessTokenMetadataGetCreatedAtRetType) { setAccessTokenMetadataGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) GetId() (ret AccessTokenMetadataGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -180,16 +219,19 @@ func (o *AccessTokenMetadata) GetId() (ret AccessTokenMetadataGetIdRetType) { // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) GetIdOk() (ret AccessTokenMetadataGetIdRetType, ok bool) { return getAccessTokenMetadataGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) SetId(v AccessTokenMetadataGetIdRetType) { setAccessTokenMetadataGetIdAttributeType(&o.Id, v) } // GetValidUntil returns the ValidUntil field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) GetValidUntil() (ret AccessTokenMetadataGetValidUntilRetType) { ret, _ = o.GetValidUntilOk() return ret @@ -197,15 +239,18 @@ func (o *AccessTokenMetadata) GetValidUntil() (ret AccessTokenMetadataGetValidUn // GetValidUntilOk returns a tuple with the ValidUntil field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) GetValidUntilOk() (ret AccessTokenMetadataGetValidUntilRetType, ok bool) { return getAccessTokenMetadataGetValidUntilAttributeTypeOk(o.ValidUntil) } // SetValidUntil sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AccessTokenMetadata) SetValidUntil(v AccessTokenMetadataGetValidUntilRetType) { setAccessTokenMetadataGetValidUntilAttributeType(&o.ValidUntil, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o AccessTokenMetadata) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getAccessTokenMetadatagetActiveAttributeTypeOk(o.Active); ok { @@ -223,37 +268,45 @@ func (o AccessTokenMetadata) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableAccessTokenMetadata struct { value *AccessTokenMetadata isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAccessTokenMetadata) Get() *AccessTokenMetadata { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAccessTokenMetadata) Set(val *AccessTokenMetadata) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAccessTokenMetadata) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAccessTokenMetadata) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableAccessTokenMetadata(val *AccessTokenMetadata) *NullableAccessTokenMetadata { return &NullableAccessTokenMetadata{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAccessTokenMetadata) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAccessTokenMetadata) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_auth_error.go b/services/serviceaccount/model_auth_error.go index a5ef6bfc9..8b6d933b5 100644 --- a/services/serviceaccount/model_auth_error.go +++ b/services/serviceaccount/model_auth_error.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &AuthError{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorGetErrorAttributeType = *AuthErrorError + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorGetErrorArgType = AuthErrorError + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorGetErrorRetType = AuthErrorError +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAuthErrorGetErrorAttributeTypeOk(arg AuthErrorGetErrorAttributeType) (ret AuthErrorGetErrorRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getAuthErrorGetErrorAttributeTypeOk(arg AuthErrorGetErrorAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAuthErrorGetErrorAttributeType(arg *AuthErrorGetErrorAttributeType, val AuthErrorGetErrorRetType) { *arg = &val } // AuthError struct for AuthError +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthError struct { // REQUIRED Error AuthErrorGetErrorAttributeType `json:"error" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _AuthError AuthError // NewAuthError instantiates a new AuthError 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAuthError(error_ AuthErrorGetErrorArgType) *AuthError { this := AuthError{} setAuthErrorGetErrorAttributeType(&this.Error, error_) @@ -58,12 +69,14 @@ func NewAuthError(error_ AuthErrorGetErrorArgType) *AuthError { // NewAuthErrorWithDefaults instantiates a new AuthError 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAuthErrorWithDefaults() *AuthError { this := AuthError{} return &this } // GetError returns the Error field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthError) GetError() (ret AuthErrorGetErrorRetType) { ret, _ = o.GetErrorOk() return ret @@ -71,15 +84,18 @@ func (o *AuthError) GetError() (ret AuthErrorGetErrorRetType) { // GetErrorOk returns a tuple with the Error field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthError) GetErrorOk() (ret AuthErrorGetErrorRetType, ok bool) { return getAuthErrorGetErrorAttributeTypeOk(o.Error) } // SetError sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthError) SetError(v AuthErrorGetErrorRetType) { setAuthErrorGetErrorAttributeType(&o.Error, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o AuthError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getAuthErrorGetErrorAttributeTypeOk(o.Error); ok { @@ -88,37 +104,45 @@ func (o AuthError) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableAuthError struct { value *AuthError isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAuthError) Get() *AuthError { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAuthError) Set(val *AuthError) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAuthError) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAuthError) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableAuthError(val *AuthError) *NullableAuthError { return &NullableAuthError{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAuthError) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAuthError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_auth_error_error.go b/services/serviceaccount/model_auth_error_error.go index fca97b576..8318089d9 100644 --- a/services/serviceaccount/model_auth_error_error.go +++ b/services/serviceaccount/model_auth_error_error.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &AuthErrorError{} */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorErrorGetCodeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorErrorGetCodeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorErrorGetCodeRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAuthErrorErrorGetCodeAttributeTypeOk(arg AuthErrorErrorGetCodeAttributeType) (ret AuthErrorErrorGetCodeRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getAuthErrorErrorGetCodeAttributeTypeOk(arg AuthErrorErrorGetCodeAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAuthErrorErrorGetCodeAttributeType(arg *AuthErrorErrorGetCodeAttributeType, val AuthErrorErrorGetCodeRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setAuthErrorErrorGetCodeAttributeType(arg *AuthErrorErrorGetCodeAttributeTy */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorErrorGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAuthErrorErrorGetMessageAttributeTypeOk(arg AuthErrorErrorGetMessageAttributeType) (ret AuthErrorErrorGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getAuthErrorErrorGetMessageAttributeTypeOk(arg AuthErrorErrorGetMessageAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAuthErrorErrorGetMessageAttributeType(arg *AuthErrorErrorGetMessageAttributeType, val AuthErrorErrorGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorErrorGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorErrorGetMessageRetType = string /* @@ -63,8 +77,10 @@ type AuthErrorErrorGetMessageRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorErrorGetStatusAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getAuthErrorErrorGetStatusAttributeTypeOk(arg AuthErrorErrorGetStatusAttributeType) (ret AuthErrorErrorGetStatusRetType, ok bool) { if arg == nil { return ret, false @@ -72,14 +88,19 @@ func getAuthErrorErrorGetStatusAttributeTypeOk(arg AuthErrorErrorGetStatusAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setAuthErrorErrorGetStatusAttributeType(arg *AuthErrorErrorGetStatusAttributeType, val AuthErrorErrorGetStatusRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorErrorGetStatusArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorErrorGetStatusRetType = string // AuthErrorError struct for AuthErrorError +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type AuthErrorError struct { // REQUIRED Code AuthErrorErrorGetCodeAttributeType `json:"code" required:"true"` @@ -89,12 +110,14 @@ type AuthErrorError struct { Status AuthErrorErrorGetStatusAttributeType `json:"status" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _AuthErrorError AuthErrorError // NewAuthErrorError instantiates a new AuthErrorError 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAuthErrorError(code AuthErrorErrorGetCodeArgType, message AuthErrorErrorGetMessageArgType, status AuthErrorErrorGetStatusArgType) *AuthErrorError { this := AuthErrorError{} setAuthErrorErrorGetCodeAttributeType(&this.Code, code) @@ -106,12 +129,14 @@ func NewAuthErrorError(code AuthErrorErrorGetCodeArgType, message AuthErrorError // NewAuthErrorErrorWithDefaults instantiates a new AuthErrorError 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAuthErrorErrorWithDefaults() *AuthErrorError { this := AuthErrorError{} return &this } // GetCode returns the Code field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthErrorError) GetCode() (ret AuthErrorErrorGetCodeRetType) { ret, _ = o.GetCodeOk() return ret @@ -119,16 +144,19 @@ func (o *AuthErrorError) GetCode() (ret AuthErrorErrorGetCodeRetType) { // GetCodeOk returns a tuple with the Code field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthErrorError) GetCodeOk() (ret AuthErrorErrorGetCodeRetType, ok bool) { return getAuthErrorErrorGetCodeAttributeTypeOk(o.Code) } // SetCode sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthErrorError) SetCode(v AuthErrorErrorGetCodeRetType) { setAuthErrorErrorGetCodeAttributeType(&o.Code, v) } // GetMessage returns the Message field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthErrorError) GetMessage() (ret AuthErrorErrorGetMessageRetType) { ret, _ = o.GetMessageOk() return ret @@ -136,16 +164,19 @@ func (o *AuthErrorError) GetMessage() (ret AuthErrorErrorGetMessageRetType) { // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthErrorError) GetMessageOk() (ret AuthErrorErrorGetMessageRetType, ok bool) { return getAuthErrorErrorGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthErrorError) SetMessage(v AuthErrorErrorGetMessageRetType) { setAuthErrorErrorGetMessageAttributeType(&o.Message, v) } // GetStatus returns the Status field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthErrorError) GetStatus() (ret AuthErrorErrorGetStatusRetType) { ret, _ = o.GetStatusOk() return ret @@ -153,15 +184,18 @@ func (o *AuthErrorError) GetStatus() (ret AuthErrorErrorGetStatusRetType) { // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthErrorError) GetStatusOk() (ret AuthErrorErrorGetStatusRetType, ok bool) { return getAuthErrorErrorGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *AuthErrorError) SetStatus(v AuthErrorErrorGetStatusRetType) { setAuthErrorErrorGetStatusAttributeType(&o.Status, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o AuthErrorError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getAuthErrorErrorGetCodeAttributeTypeOk(o.Code); ok { @@ -176,37 +210,45 @@ func (o AuthErrorError) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableAuthErrorError struct { value *AuthErrorError isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAuthErrorError) Get() *AuthErrorError { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAuthErrorError) Set(val *AuthErrorError) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAuthErrorError) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAuthErrorError) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableAuthErrorError(val *AuthErrorError) *NullableAuthErrorError { return &NullableAuthErrorError{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableAuthErrorError) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableAuthErrorError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_access_token_payload.go b/services/serviceaccount/model_create_access_token_payload.go index ac647bd2d..6fa8dc60e 100644 --- a/services/serviceaccount/model_create_access_token_payload.go +++ b/services/serviceaccount/model_create_access_token_payload.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateAccessTokenPayload{} */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateAccessTokenPayloadGetTtlDaysAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateAccessTokenPayloadGetTtlDaysArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateAccessTokenPayloadGetTtlDaysRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateAccessTokenPayloadGetTtlDaysAttributeTypeOk(arg CreateAccessTokenPayloadGetTtlDaysAttributeType) (ret CreateAccessTokenPayloadGetTtlDaysRetType, ok bool) { if arg == nil { return ret, false @@ -33,23 +40,27 @@ func getCreateAccessTokenPayloadGetTtlDaysAttributeTypeOk(arg CreateAccessTokenP return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateAccessTokenPayloadGetTtlDaysAttributeType(arg *CreateAccessTokenPayloadGetTtlDaysAttributeType, val CreateAccessTokenPayloadGetTtlDaysRetType) { *arg = &val } // CreateAccessTokenPayload struct for CreateAccessTokenPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateAccessTokenPayload struct { // The duration in days for how long the new Access Token should be valid. // REQUIRED TtlDays CreateAccessTokenPayloadGetTtlDaysAttributeType `json:"ttlDays" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateAccessTokenPayload CreateAccessTokenPayload // NewCreateAccessTokenPayload instantiates a new CreateAccessTokenPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateAccessTokenPayload(ttlDays CreateAccessTokenPayloadGetTtlDaysArgType) *CreateAccessTokenPayload { this := CreateAccessTokenPayload{} setCreateAccessTokenPayloadGetTtlDaysAttributeType(&this.TtlDays, ttlDays) @@ -59,12 +70,14 @@ func NewCreateAccessTokenPayload(ttlDays CreateAccessTokenPayloadGetTtlDaysArgTy // NewCreateAccessTokenPayloadWithDefaults instantiates a new CreateAccessTokenPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateAccessTokenPayloadWithDefaults() *CreateAccessTokenPayload { this := CreateAccessTokenPayload{} return &this } // GetTtlDays returns the TtlDays field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateAccessTokenPayload) GetTtlDays() (ret CreateAccessTokenPayloadGetTtlDaysRetType) { ret, _ = o.GetTtlDaysOk() return ret @@ -72,15 +85,18 @@ func (o *CreateAccessTokenPayload) GetTtlDays() (ret CreateAccessTokenPayloadGet // GetTtlDaysOk returns a tuple with the TtlDays field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateAccessTokenPayload) GetTtlDaysOk() (ret CreateAccessTokenPayloadGetTtlDaysRetType, ok bool) { return getCreateAccessTokenPayloadGetTtlDaysAttributeTypeOk(o.TtlDays) } // SetTtlDays sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateAccessTokenPayload) SetTtlDays(v CreateAccessTokenPayloadGetTtlDaysRetType) { setCreateAccessTokenPayloadGetTtlDaysAttributeType(&o.TtlDays, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateAccessTokenPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateAccessTokenPayloadGetTtlDaysAttributeTypeOk(o.TtlDays); ok { @@ -89,37 +105,45 @@ func (o CreateAccessTokenPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateAccessTokenPayload struct { value *CreateAccessTokenPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateAccessTokenPayload) Get() *CreateAccessTokenPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateAccessTokenPayload) Set(val *CreateAccessTokenPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateAccessTokenPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateAccessTokenPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateAccessTokenPayload(val *CreateAccessTokenPayload) *NullableCreateAccessTokenPayload { return &NullableCreateAccessTokenPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateAccessTokenPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateAccessTokenPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_federated_identity_provider_payload.go b/services/serviceaccount/model_create_federated_identity_provider_payload.go index 3ddf9d209..4184fb00c 100644 --- a/services/serviceaccount/model_create_federated_identity_provider_payload.go +++ b/services/serviceaccount/model_create_federated_identity_provider_payload.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateFederatedIdentityProviderPayload{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadGetAssertionsAttributeType = *[]CreateFederatedIdentityProviderPayloadAssertionsInner + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadGetAssertionsArgType = []CreateFederatedIdentityProviderPayloadAssertionsInner + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadGetAssertionsRetType = []CreateFederatedIdentityProviderPayloadAssertionsInner +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderPayloadGetAssertionsAttributeTypeOk(arg CreateFederatedIdentityProviderPayloadGetAssertionsAttributeType) (ret CreateFederatedIdentityProviderPayloadGetAssertionsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getCreateFederatedIdentityProviderPayloadGetAssertionsAttributeTypeOk(arg C return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderPayloadGetAssertionsAttributeType(arg *CreateFederatedIdentityProviderPayloadGetAssertionsAttributeType, val CreateFederatedIdentityProviderPayloadGetAssertionsRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setCreateFederatedIdentityProviderPayloadGetAssertionsAttributeType(arg *Cr */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadGetIssuerAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderPayloadGetIssuerAttributeTypeOk(arg CreateFederatedIdentityProviderPayloadGetIssuerAttributeType) (ret CreateFederatedIdentityProviderPayloadGetIssuerRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getCreateFederatedIdentityProviderPayloadGetIssuerAttributeTypeOk(arg Creat return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderPayloadGetIssuerAttributeType(arg *CreateFederatedIdentityProviderPayloadGetIssuerAttributeType, val CreateFederatedIdentityProviderPayloadGetIssuerRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadGetIssuerArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadGetIssuerRetType = string /* @@ -63,8 +77,10 @@ type CreateFederatedIdentityProviderPayloadGetIssuerRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderPayloadGetNameAttributeTypeOk(arg CreateFederatedIdentityProviderPayloadGetNameAttributeType) (ret CreateFederatedIdentityProviderPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -72,14 +88,19 @@ func getCreateFederatedIdentityProviderPayloadGetNameAttributeTypeOk(arg CreateF return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderPayloadGetNameAttributeType(arg *CreateFederatedIdentityProviderPayloadGetNameAttributeType, val CreateFederatedIdentityProviderPayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadGetNameRetType = string // CreateFederatedIdentityProviderPayload struct for CreateFederatedIdentityProviderPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayload struct { // list of assertions of the federated identity provider Assertions CreateFederatedIdentityProviderPayloadGetAssertionsAttributeType `json:"assertions,omitempty"` @@ -91,12 +112,14 @@ type CreateFederatedIdentityProviderPayload struct { Name CreateFederatedIdentityProviderPayloadGetNameAttributeType `json:"name" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateFederatedIdentityProviderPayload CreateFederatedIdentityProviderPayload // NewCreateFederatedIdentityProviderPayload instantiates a new CreateFederatedIdentityProviderPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateFederatedIdentityProviderPayload(issuer CreateFederatedIdentityProviderPayloadGetIssuerArgType, name CreateFederatedIdentityProviderPayloadGetNameArgType) *CreateFederatedIdentityProviderPayload { this := CreateFederatedIdentityProviderPayload{} setCreateFederatedIdentityProviderPayloadGetIssuerAttributeType(&this.Issuer, issuer) @@ -107,12 +130,14 @@ func NewCreateFederatedIdentityProviderPayload(issuer CreateFederatedIdentityPro // NewCreateFederatedIdentityProviderPayloadWithDefaults instantiates a new CreateFederatedIdentityProviderPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateFederatedIdentityProviderPayloadWithDefaults() *CreateFederatedIdentityProviderPayload { this := CreateFederatedIdentityProviderPayload{} return &this } // GetAssertions returns the Assertions field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) GetAssertions() (res CreateFederatedIdentityProviderPayloadGetAssertionsRetType) { res, _ = o.GetAssertionsOk() return @@ -120,22 +145,26 @@ func (o *CreateFederatedIdentityProviderPayload) GetAssertions() (res CreateFede // GetAssertionsOk returns a tuple with the Assertions field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) GetAssertionsOk() (ret CreateFederatedIdentityProviderPayloadGetAssertionsRetType, ok bool) { return getCreateFederatedIdentityProviderPayloadGetAssertionsAttributeTypeOk(o.Assertions) } // HasAssertions returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) HasAssertions() bool { _, ok := o.GetAssertionsOk() return ok } // SetAssertions gets a reference to the given []CreateFederatedIdentityProviderPayloadAssertionsInner and assigns it to the Assertions field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) SetAssertions(v CreateFederatedIdentityProviderPayloadGetAssertionsRetType) { setCreateFederatedIdentityProviderPayloadGetAssertionsAttributeType(&o.Assertions, v) } // GetIssuer returns the Issuer field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) GetIssuer() (ret CreateFederatedIdentityProviderPayloadGetIssuerRetType) { ret, _ = o.GetIssuerOk() return ret @@ -143,16 +172,19 @@ func (o *CreateFederatedIdentityProviderPayload) GetIssuer() (ret CreateFederate // GetIssuerOk returns a tuple with the Issuer field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) GetIssuerOk() (ret CreateFederatedIdentityProviderPayloadGetIssuerRetType, ok bool) { return getCreateFederatedIdentityProviderPayloadGetIssuerAttributeTypeOk(o.Issuer) } // SetIssuer sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) SetIssuer(v CreateFederatedIdentityProviderPayloadGetIssuerRetType) { setCreateFederatedIdentityProviderPayloadGetIssuerAttributeType(&o.Issuer, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) GetName() (ret CreateFederatedIdentityProviderPayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -160,15 +192,18 @@ func (o *CreateFederatedIdentityProviderPayload) GetName() (ret CreateFederatedI // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) GetNameOk() (ret CreateFederatedIdentityProviderPayloadGetNameRetType, ok bool) { return getCreateFederatedIdentityProviderPayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayload) SetName(v CreateFederatedIdentityProviderPayloadGetNameRetType) { setCreateFederatedIdentityProviderPayloadGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateFederatedIdentityProviderPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateFederatedIdentityProviderPayloadGetAssertionsAttributeTypeOk(o.Assertions); ok { @@ -183,37 +218,45 @@ func (o CreateFederatedIdentityProviderPayload) ToMap() (map[string]interface{}, return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateFederatedIdentityProviderPayload struct { value *CreateFederatedIdentityProviderPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderPayload) Get() *CreateFederatedIdentityProviderPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderPayload) Set(val *CreateFederatedIdentityProviderPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateFederatedIdentityProviderPayload(val *CreateFederatedIdentityProviderPayload) *NullableCreateFederatedIdentityProviderPayload { return &NullableCreateFederatedIdentityProviderPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_federated_identity_provider_payload_assertions_inner.go b/services/serviceaccount/model_create_federated_identity_provider_payload_assertions_inner.go index 7d9be05af..105af44d3 100644 --- a/services/serviceaccount/model_create_federated_identity_provider_payload_assertions_inner.go +++ b/services/serviceaccount/model_create_federated_identity_provider_payload_assertions_inner.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateFederatedIdentityProviderPayloadAssertionsInner{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeTypeOk(arg CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeType) (ret CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getCreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeType(arg *CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeType, val CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemRetType = string /* @@ -43,8 +50,10 @@ type CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemRetType = strin */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorAttributeTypeOk(arg CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorAttributeType) (ret CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getCreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorAttributeType(arg *CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorAttributeType, val CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorRetType = string /* @@ -64,8 +77,10 @@ type CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorRetType = s */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderPayloadAssertionsInnerGetValueAttributeTypeOk(arg CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueAttributeType) (ret CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueRetType, ok bool) { if arg == nil { return ret, false @@ -73,14 +88,19 @@ func getCreateFederatedIdentityProviderPayloadAssertionsInnerGetValueAttributeTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderPayloadAssertionsInnerGetValueAttributeType(arg *CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueAttributeType, val CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueRetType = string // CreateFederatedIdentityProviderPayloadAssertionsInner struct for CreateFederatedIdentityProviderPayloadAssertionsInner +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderPayloadAssertionsInner struct { // Item to compare Item CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeType `json:"item,omitempty"` @@ -94,6 +114,7 @@ type CreateFederatedIdentityProviderPayloadAssertionsInner 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateFederatedIdentityProviderPayloadAssertionsInner() *CreateFederatedIdentityProviderPayloadAssertionsInner { this := CreateFederatedIdentityProviderPayloadAssertionsInner{} return &this @@ -102,12 +123,14 @@ func NewCreateFederatedIdentityProviderPayloadAssertionsInner() *CreateFederated // NewCreateFederatedIdentityProviderPayloadAssertionsInnerWithDefaults instantiates a new CreateFederatedIdentityProviderPayloadAssertionsInner 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateFederatedIdentityProviderPayloadAssertionsInnerWithDefaults() *CreateFederatedIdentityProviderPayloadAssertionsInner { this := CreateFederatedIdentityProviderPayloadAssertionsInner{} return &this } // GetItem returns the Item field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetItem() (res CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemRetType) { res, _ = o.GetItemOk() return @@ -115,22 +138,26 @@ func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetItem() (res C // GetItemOk returns a tuple with the Item field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetItemOk() (ret CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemRetType, ok bool) { return getCreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeTypeOk(o.Item) } // HasItem returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) HasItem() bool { _, ok := o.GetItemOk() return ok } // SetItem gets a reference to the given string and assigns it to the Item field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) SetItem(v CreateFederatedIdentityProviderPayloadAssertionsInnerGetItemRetType) { setCreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeType(&o.Item, v) } // GetOperator returns the Operator field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetOperator() (res CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorRetType) { res, _ = o.GetOperatorOk() return @@ -138,22 +165,26 @@ func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetOperator() (r // GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetOperatorOk() (ret CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorRetType, ok bool) { return getCreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorAttributeTypeOk(o.Operator) } // HasOperator returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) HasOperator() bool { _, ok := o.GetOperatorOk() return ok } // SetOperator gets a reference to the given string and assigns it to the Operator field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) SetOperator(v CreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorRetType) { setCreateFederatedIdentityProviderPayloadAssertionsInnerGetOperatorAttributeType(&o.Operator, v) } // GetValue returns the Value field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetValue() (res CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueRetType) { res, _ = o.GetValueOk() return @@ -161,21 +192,25 @@ func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetValue() (res // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetValueOk() (ret CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueRetType, ok bool) { return getCreateFederatedIdentityProviderPayloadAssertionsInnerGetValueAttributeTypeOk(o.Value) } // HasValue returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) HasValue() bool { _, ok := o.GetValueOk() return ok } // SetValue gets a reference to the given string and assigns it to the Value field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) SetValue(v CreateFederatedIdentityProviderPayloadAssertionsInnerGetValueRetType) { setCreateFederatedIdentityProviderPayloadAssertionsInnerGetValueAttributeType(&o.Value, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateFederatedIdentityProviderPayloadAssertionsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateFederatedIdentityProviderPayloadAssertionsInnerGetItemAttributeTypeOk(o.Item); ok { @@ -190,37 +225,45 @@ func (o CreateFederatedIdentityProviderPayloadAssertionsInner) ToMap() (map[stri return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateFederatedIdentityProviderPayloadAssertionsInner struct { value *CreateFederatedIdentityProviderPayloadAssertionsInner isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderPayloadAssertionsInner) Get() *CreateFederatedIdentityProviderPayloadAssertionsInner { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderPayloadAssertionsInner) Set(val *CreateFederatedIdentityProviderPayloadAssertionsInner) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderPayloadAssertionsInner) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderPayloadAssertionsInner) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateFederatedIdentityProviderPayloadAssertionsInner(val *CreateFederatedIdentityProviderPayloadAssertionsInner) *NullableCreateFederatedIdentityProviderPayloadAssertionsInner { return &NullableCreateFederatedIdentityProviderPayloadAssertionsInner{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderPayloadAssertionsInner) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderPayloadAssertionsInner) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_federated_identity_provider_response.go b/services/serviceaccount/model_create_federated_identity_provider_response.go index 186c82fba..328c71bf6 100644 --- a/services/serviceaccount/model_create_federated_identity_provider_response.go +++ b/services/serviceaccount/model_create_federated_identity_provider_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &CreateFederatedIdentityProviderResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetAssertionsAttributeType = *[]CreateFederatedIdentityProviderResponseAssertionsInner + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetAssertionsArgType = []CreateFederatedIdentityProviderResponseAssertionsInner + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetAssertionsRetType = []CreateFederatedIdentityProviderResponseAssertionsInner +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderResponseGetAssertionsAttributeTypeOk(arg CreateFederatedIdentityProviderResponseGetAssertionsAttributeType) (ret CreateFederatedIdentityProviderResponseGetAssertionsRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getCreateFederatedIdentityProviderResponseGetAssertionsAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderResponseGetAssertionsAttributeType(arg *CreateFederatedIdentityProviderResponseGetAssertionsAttributeType, val CreateFederatedIdentityProviderResponseGetAssertionsRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setCreateFederatedIdentityProviderResponseGetAssertionsAttributeType(arg *C */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderResponseGetCreatedAtAttributeTypeOk(arg CreateFederatedIdentityProviderResponseGetCreatedAtAttributeType) (ret CreateFederatedIdentityProviderResponseGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +68,7 @@ func getCreateFederatedIdentityProviderResponseGetCreatedAtAttributeTypeOk(arg C return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderResponseGetCreatedAtAttributeType(arg *CreateFederatedIdentityProviderResponseGetCreatedAtAttributeType, val CreateFederatedIdentityProviderResponseGetCreatedAtRetType) { *arg = &val } @@ -63,8 +78,10 @@ func setCreateFederatedIdentityProviderResponseGetCreatedAtAttributeType(arg *Cr */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetIssuerAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderResponseGetIssuerAttributeTypeOk(arg CreateFederatedIdentityProviderResponseGetIssuerAttributeType) (ret CreateFederatedIdentityProviderResponseGetIssuerRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +89,15 @@ func getCreateFederatedIdentityProviderResponseGetIssuerAttributeTypeOk(arg Crea return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderResponseGetIssuerAttributeType(arg *CreateFederatedIdentityProviderResponseGetIssuerAttributeType, val CreateFederatedIdentityProviderResponseGetIssuerRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetIssuerArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetIssuerRetType = string /* @@ -84,8 +105,10 @@ type CreateFederatedIdentityProviderResponseGetIssuerRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderResponseGetNameAttributeTypeOk(arg CreateFederatedIdentityProviderResponseGetNameAttributeType) (ret CreateFederatedIdentityProviderResponseGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getCreateFederatedIdentityProviderResponseGetNameAttributeTypeOk(arg Create return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderResponseGetNameAttributeType(arg *CreateFederatedIdentityProviderResponseGetNameAttributeType, val CreateFederatedIdentityProviderResponseGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetNameRetType = string /* @@ -105,10 +132,16 @@ type CreateFederatedIdentityProviderResponseGetNameRetType = string */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetUpdatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetUpdatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseGetUpdatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderResponseGetUpdatedAtAttributeTypeOk(arg CreateFederatedIdentityProviderResponseGetUpdatedAtAttributeType) (ret CreateFederatedIdentityProviderResponseGetUpdatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -116,11 +149,13 @@ func getCreateFederatedIdentityProviderResponseGetUpdatedAtAttributeTypeOk(arg C return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderResponseGetUpdatedAtAttributeType(arg *CreateFederatedIdentityProviderResponseGetUpdatedAtAttributeType, val CreateFederatedIdentityProviderResponseGetUpdatedAtRetType) { *arg = &val } // CreateFederatedIdentityProviderResponse struct for CreateFederatedIdentityProviderResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponse struct { // list of assertions of the federated identity provider // REQUIRED @@ -139,12 +174,14 @@ type CreateFederatedIdentityProviderResponse struct { UpdatedAt CreateFederatedIdentityProviderResponseGetUpdatedAtAttributeType `json:"updatedAt" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateFederatedIdentityProviderResponse CreateFederatedIdentityProviderResponse // NewCreateFederatedIdentityProviderResponse instantiates a new CreateFederatedIdentityProviderResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateFederatedIdentityProviderResponse(assertions CreateFederatedIdentityProviderResponseGetAssertionsArgType, createdAt CreateFederatedIdentityProviderResponseGetCreatedAtArgType, issuer CreateFederatedIdentityProviderResponseGetIssuerArgType, name CreateFederatedIdentityProviderResponseGetNameArgType, updatedAt CreateFederatedIdentityProviderResponseGetUpdatedAtArgType) *CreateFederatedIdentityProviderResponse { this := CreateFederatedIdentityProviderResponse{} setCreateFederatedIdentityProviderResponseGetAssertionsAttributeType(&this.Assertions, assertions) @@ -158,12 +195,14 @@ func NewCreateFederatedIdentityProviderResponse(assertions CreateFederatedIdenti // NewCreateFederatedIdentityProviderResponseWithDefaults instantiates a new CreateFederatedIdentityProviderResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateFederatedIdentityProviderResponseWithDefaults() *CreateFederatedIdentityProviderResponse { this := CreateFederatedIdentityProviderResponse{} return &this } // GetAssertions returns the Assertions field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetAssertions() (ret CreateFederatedIdentityProviderResponseGetAssertionsRetType) { ret, _ = o.GetAssertionsOk() return ret @@ -171,16 +210,19 @@ func (o *CreateFederatedIdentityProviderResponse) GetAssertions() (ret CreateFed // GetAssertionsOk returns a tuple with the Assertions field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetAssertionsOk() (ret CreateFederatedIdentityProviderResponseGetAssertionsRetType, ok bool) { return getCreateFederatedIdentityProviderResponseGetAssertionsAttributeTypeOk(o.Assertions) } // SetAssertions sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) SetAssertions(v CreateFederatedIdentityProviderResponseGetAssertionsRetType) { setCreateFederatedIdentityProviderResponseGetAssertionsAttributeType(&o.Assertions, v) } // GetCreatedAt returns the CreatedAt field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetCreatedAt() (ret CreateFederatedIdentityProviderResponseGetCreatedAtRetType) { ret, _ = o.GetCreatedAtOk() return ret @@ -188,16 +230,19 @@ func (o *CreateFederatedIdentityProviderResponse) GetCreatedAt() (ret CreateFede // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetCreatedAtOk() (ret CreateFederatedIdentityProviderResponseGetCreatedAtRetType, ok bool) { return getCreateFederatedIdentityProviderResponseGetCreatedAtAttributeTypeOk(o.CreatedAt) } // SetCreatedAt sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) SetCreatedAt(v CreateFederatedIdentityProviderResponseGetCreatedAtRetType) { setCreateFederatedIdentityProviderResponseGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetIssuer returns the Issuer field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetIssuer() (ret CreateFederatedIdentityProviderResponseGetIssuerRetType) { ret, _ = o.GetIssuerOk() return ret @@ -205,16 +250,19 @@ func (o *CreateFederatedIdentityProviderResponse) GetIssuer() (ret CreateFederat // GetIssuerOk returns a tuple with the Issuer field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetIssuerOk() (ret CreateFederatedIdentityProviderResponseGetIssuerRetType, ok bool) { return getCreateFederatedIdentityProviderResponseGetIssuerAttributeTypeOk(o.Issuer) } // SetIssuer sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) SetIssuer(v CreateFederatedIdentityProviderResponseGetIssuerRetType) { setCreateFederatedIdentityProviderResponseGetIssuerAttributeType(&o.Issuer, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetName() (ret CreateFederatedIdentityProviderResponseGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -222,16 +270,19 @@ func (o *CreateFederatedIdentityProviderResponse) GetName() (ret CreateFederated // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetNameOk() (ret CreateFederatedIdentityProviderResponseGetNameRetType, ok bool) { return getCreateFederatedIdentityProviderResponseGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) SetName(v CreateFederatedIdentityProviderResponseGetNameRetType) { setCreateFederatedIdentityProviderResponseGetNameAttributeType(&o.Name, v) } // GetUpdatedAt returns the UpdatedAt field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetUpdatedAt() (ret CreateFederatedIdentityProviderResponseGetUpdatedAtRetType) { ret, _ = o.GetUpdatedAtOk() return ret @@ -239,15 +290,18 @@ func (o *CreateFederatedIdentityProviderResponse) GetUpdatedAt() (ret CreateFede // GetUpdatedAtOk returns a tuple with the UpdatedAt field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) GetUpdatedAtOk() (ret CreateFederatedIdentityProviderResponseGetUpdatedAtRetType, ok bool) { return getCreateFederatedIdentityProviderResponseGetUpdatedAtAttributeTypeOk(o.UpdatedAt) } // SetUpdatedAt sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponse) SetUpdatedAt(v CreateFederatedIdentityProviderResponseGetUpdatedAtRetType) { setCreateFederatedIdentityProviderResponseGetUpdatedAtAttributeType(&o.UpdatedAt, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateFederatedIdentityProviderResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateFederatedIdentityProviderResponseGetAssertionsAttributeTypeOk(o.Assertions); ok { @@ -268,37 +322,45 @@ func (o CreateFederatedIdentityProviderResponse) ToMap() (map[string]interface{} return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateFederatedIdentityProviderResponse struct { value *CreateFederatedIdentityProviderResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderResponse) Get() *CreateFederatedIdentityProviderResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderResponse) Set(val *CreateFederatedIdentityProviderResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateFederatedIdentityProviderResponse(val *CreateFederatedIdentityProviderResponse) *NullableCreateFederatedIdentityProviderResponse { return &NullableCreateFederatedIdentityProviderResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_federated_identity_provider_response_assertions_inner.go b/services/serviceaccount/model_create_federated_identity_provider_response_assertions_inner.go index b71dbea20..7b78dd543 100644 --- a/services/serviceaccount/model_create_federated_identity_provider_response_assertions_inner.go +++ b/services/serviceaccount/model_create_federated_identity_provider_response_assertions_inner.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateFederatedIdentityProviderResponseAssertionsInner{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeTypeOk(arg CreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeType) (ret CreateFederatedIdentityProviderResponseAssertionsInnerGetItemRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getCreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeType(arg *CreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeType, val CreateFederatedIdentityProviderResponseAssertionsInnerGetItemRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInnerGetItemArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInnerGetItemRetType = string /* @@ -43,8 +50,10 @@ type CreateFederatedIdentityProviderResponseAssertionsInnerGetItemRetType = stri */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorAttributeTypeOk(arg CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorAttributeType) (ret CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getCreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorAttribu return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorAttributeType(arg *CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorAttributeType, val CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorRetType = string /* @@ -64,8 +77,10 @@ type CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorRetType = */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInnerGetValueAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateFederatedIdentityProviderResponseAssertionsInnerGetValueAttributeTypeOk(arg CreateFederatedIdentityProviderResponseAssertionsInnerGetValueAttributeType) (ret CreateFederatedIdentityProviderResponseAssertionsInnerGetValueRetType, ok bool) { if arg == nil { return ret, false @@ -73,14 +88,19 @@ func getCreateFederatedIdentityProviderResponseAssertionsInnerGetValueAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateFederatedIdentityProviderResponseAssertionsInnerGetValueAttributeType(arg *CreateFederatedIdentityProviderResponseAssertionsInnerGetValueAttributeType, val CreateFederatedIdentityProviderResponseAssertionsInnerGetValueRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInnerGetValueArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInnerGetValueRetType = string // CreateFederatedIdentityProviderResponseAssertionsInner struct for CreateFederatedIdentityProviderResponseAssertionsInner +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateFederatedIdentityProviderResponseAssertionsInner struct { // Item to compare // REQUIRED @@ -93,12 +113,14 @@ type CreateFederatedIdentityProviderResponseAssertionsInner struct { Value CreateFederatedIdentityProviderResponseAssertionsInnerGetValueAttributeType `json:"value" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateFederatedIdentityProviderResponseAssertionsInner CreateFederatedIdentityProviderResponseAssertionsInner // NewCreateFederatedIdentityProviderResponseAssertionsInner instantiates a new CreateFederatedIdentityProviderResponseAssertionsInner 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateFederatedIdentityProviderResponseAssertionsInner(item CreateFederatedIdentityProviderResponseAssertionsInnerGetItemArgType, operator CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorArgType, value CreateFederatedIdentityProviderResponseAssertionsInnerGetValueArgType) *CreateFederatedIdentityProviderResponseAssertionsInner { this := CreateFederatedIdentityProviderResponseAssertionsInner{} setCreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeType(&this.Item, item) @@ -110,12 +132,14 @@ func NewCreateFederatedIdentityProviderResponseAssertionsInner(item CreateFedera // NewCreateFederatedIdentityProviderResponseAssertionsInnerWithDefaults instantiates a new CreateFederatedIdentityProviderResponseAssertionsInner 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateFederatedIdentityProviderResponseAssertionsInnerWithDefaults() *CreateFederatedIdentityProviderResponseAssertionsInner { this := CreateFederatedIdentityProviderResponseAssertionsInner{} return &this } // GetItem returns the Item field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetItem() (ret CreateFederatedIdentityProviderResponseAssertionsInnerGetItemRetType) { ret, _ = o.GetItemOk() return ret @@ -123,16 +147,19 @@ func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetItem() (ret // GetItemOk returns a tuple with the Item field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetItemOk() (ret CreateFederatedIdentityProviderResponseAssertionsInnerGetItemRetType, ok bool) { return getCreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeTypeOk(o.Item) } // SetItem sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponseAssertionsInner) SetItem(v CreateFederatedIdentityProviderResponseAssertionsInnerGetItemRetType) { setCreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeType(&o.Item, v) } // GetOperator returns the Operator field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetOperator() (ret CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorRetType) { ret, _ = o.GetOperatorOk() return ret @@ -140,16 +167,19 @@ func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetOperator() ( // GetOperatorOk returns a tuple with the Operator field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetOperatorOk() (ret CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorRetType, ok bool) { return getCreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorAttributeTypeOk(o.Operator) } // SetOperator sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponseAssertionsInner) SetOperator(v CreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorRetType) { setCreateFederatedIdentityProviderResponseAssertionsInnerGetOperatorAttributeType(&o.Operator, v) } // GetValue returns the Value field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetValue() (ret CreateFederatedIdentityProviderResponseAssertionsInnerGetValueRetType) { ret, _ = o.GetValueOk() return ret @@ -157,15 +187,18 @@ func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetValue() (ret // GetValueOk returns a tuple with the Value field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetValueOk() (ret CreateFederatedIdentityProviderResponseAssertionsInnerGetValueRetType, ok bool) { return getCreateFederatedIdentityProviderResponseAssertionsInnerGetValueAttributeTypeOk(o.Value) } // SetValue sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateFederatedIdentityProviderResponseAssertionsInner) SetValue(v CreateFederatedIdentityProviderResponseAssertionsInnerGetValueRetType) { setCreateFederatedIdentityProviderResponseAssertionsInnerGetValueAttributeType(&o.Value, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateFederatedIdentityProviderResponseAssertionsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateFederatedIdentityProviderResponseAssertionsInnerGetItemAttributeTypeOk(o.Item); ok { @@ -180,37 +213,45 @@ func (o CreateFederatedIdentityProviderResponseAssertionsInner) ToMap() (map[str return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateFederatedIdentityProviderResponseAssertionsInner struct { value *CreateFederatedIdentityProviderResponseAssertionsInner isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderResponseAssertionsInner) Get() *CreateFederatedIdentityProviderResponseAssertionsInner { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderResponseAssertionsInner) Set(val *CreateFederatedIdentityProviderResponseAssertionsInner) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderResponseAssertionsInner) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderResponseAssertionsInner) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateFederatedIdentityProviderResponseAssertionsInner(val *CreateFederatedIdentityProviderResponseAssertionsInner) *NullableCreateFederatedIdentityProviderResponseAssertionsInner { return &NullableCreateFederatedIdentityProviderResponseAssertionsInner{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateFederatedIdentityProviderResponseAssertionsInner) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateFederatedIdentityProviderResponseAssertionsInner) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_service_account_key_payload.go b/services/serviceaccount/model_create_service_account_key_payload.go index 46227a0a1..79858008c 100644 --- a/services/serviceaccount/model_create_service_account_key_payload.go +++ b/services/serviceaccount/model_create_service_account_key_payload.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -27,20 +28,25 @@ var _ MappedNullable = &CreateServiceAccountKeyPayload{} // CreateServiceAccountKeyPayloadAlgorithm Optional, key algorithm of the generated key-pair. Used only if publicKey attribute is not specified, otherwise the algorithm is derived from the public key. // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadAlgorithm string // List of Algorithm const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CREATESERVICEACCOUNTKEYPAYLOADALGORITHM__2048 CreateServiceAccountKeyPayloadAlgorithm = "RSA_2048" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CREATESERVICEACCOUNTKEYPAYLOADALGORITHM__4096 CreateServiceAccountKeyPayloadAlgorithm = "RSA_4096" ) // All allowed values of CreateServiceAccountKeyPayload enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedCreateServiceAccountKeyPayloadAlgorithmEnumValues = []CreateServiceAccountKeyPayloadAlgorithm{ "RSA_2048", "RSA_4096", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *CreateServiceAccountKeyPayloadAlgorithm) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -68,6 +74,7 @@ func (v *CreateServiceAccountKeyPayloadAlgorithm) UnmarshalJSON(src []byte) erro // NewCreateServiceAccountKeyPayloadAlgorithmFromValue returns a pointer to a valid CreateServiceAccountKeyPayloadAlgorithm // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyPayloadAlgorithmFromValue(v CreateServiceAccountKeyPayloadAlgorithm) (*CreateServiceAccountKeyPayloadAlgorithm, error) { ev := CreateServiceAccountKeyPayloadAlgorithm(v) if ev.IsValid() { @@ -78,6 +85,7 @@ func NewCreateServiceAccountKeyPayloadAlgorithmFromValue(v CreateServiceAccountK } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateServiceAccountKeyPayloadAlgorithm) IsValid() bool { for _, existing := range AllowedCreateServiceAccountKeyPayloadAlgorithmEnumValues { if existing == v { @@ -88,50 +96,65 @@ func (v CreateServiceAccountKeyPayloadAlgorithm) IsValid() bool { } // Ptr returns reference to AlgorithmAlgorithm value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateServiceAccountKeyPayloadAlgorithm) Ptr() *CreateServiceAccountKeyPayloadAlgorithm { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateServiceAccountKeyPayloadAlgorithm struct { value *CreateServiceAccountKeyPayloadAlgorithm isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyPayloadAlgorithm) Get() *CreateServiceAccountKeyPayloadAlgorithm { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyPayloadAlgorithm) Set(val *CreateServiceAccountKeyPayloadAlgorithm) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyPayloadAlgorithm) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyPayloadAlgorithm) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateServiceAccountKeyPayloadAlgorithm(val *CreateServiceAccountKeyPayloadAlgorithm) *NullableCreateServiceAccountKeyPayloadAlgorithm { return &NullableCreateServiceAccountKeyPayloadAlgorithm{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyPayloadAlgorithm) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyPayloadAlgorithm) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadGetAlgorithmAttributeType = *CreateServiceAccountKeyPayloadAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadGetAlgorithmArgType = CreateServiceAccountKeyPayloadAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadGetAlgorithmRetType = CreateServiceAccountKeyPayloadAlgorithm +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyPayloadGetAlgorithmAttributeTypeOk(arg CreateServiceAccountKeyPayloadGetAlgorithmAttributeType) (ret CreateServiceAccountKeyPayloadGetAlgorithmRetType, ok bool) { if arg == nil { return ret, false @@ -139,6 +162,7 @@ func getCreateServiceAccountKeyPayloadGetAlgorithmAttributeTypeOk(arg CreateServ return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyPayloadGetAlgorithmAttributeType(arg *CreateServiceAccountKeyPayloadGetAlgorithmAttributeType, val CreateServiceAccountKeyPayloadGetAlgorithmRetType) { *arg = &val } @@ -148,8 +172,10 @@ func setCreateServiceAccountKeyPayloadGetAlgorithmAttributeType(arg *CreateServi */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadGetPublicKeyAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyPayloadGetPublicKeyAttributeTypeOk(arg CreateServiceAccountKeyPayloadGetPublicKeyAttributeType) (ret CreateServiceAccountKeyPayloadGetPublicKeyRetType, ok bool) { if arg == nil { return ret, false @@ -157,11 +183,15 @@ func getCreateServiceAccountKeyPayloadGetPublicKeyAttributeTypeOk(arg CreateServ return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyPayloadGetPublicKeyAttributeType(arg *CreateServiceAccountKeyPayloadGetPublicKeyAttributeType, val CreateServiceAccountKeyPayloadGetPublicKeyRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadGetPublicKeyArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadGetPublicKeyRetType = string /* @@ -169,10 +199,16 @@ type CreateServiceAccountKeyPayloadGetPublicKeyRetType = string */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadGetValidUntilAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadGetValidUntilArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayloadGetValidUntilRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyPayloadGetValidUntilAttributeTypeOk(arg CreateServiceAccountKeyPayloadGetValidUntilAttributeType) (ret CreateServiceAccountKeyPayloadGetValidUntilRetType, ok bool) { if arg == nil { return ret, false @@ -180,11 +216,13 @@ func getCreateServiceAccountKeyPayloadGetValidUntilAttributeTypeOk(arg CreateSer return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyPayloadGetValidUntilAttributeType(arg *CreateServiceAccountKeyPayloadGetValidUntilAttributeType, val CreateServiceAccountKeyPayloadGetValidUntilRetType) { *arg = &val } // CreateServiceAccountKeyPayload struct for CreateServiceAccountKeyPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyPayload struct { // Optional, key algorithm of the generated key-pair. Used only if publicKey attribute is not specified, otherwise the algorithm is derived from the public key. Algorithm CreateServiceAccountKeyPayloadGetAlgorithmAttributeType `json:"algorithm,omitempty"` @@ -198,6 +236,7 @@ type CreateServiceAccountKeyPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyPayload() *CreateServiceAccountKeyPayload { this := CreateServiceAccountKeyPayload{} return &this @@ -206,12 +245,14 @@ func NewCreateServiceAccountKeyPayload() *CreateServiceAccountKeyPayload { // NewCreateServiceAccountKeyPayloadWithDefaults instantiates a new CreateServiceAccountKeyPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyPayloadWithDefaults() *CreateServiceAccountKeyPayload { this := CreateServiceAccountKeyPayload{} return &this } // GetAlgorithm returns the Algorithm field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) GetAlgorithm() (res CreateServiceAccountKeyPayloadGetAlgorithmRetType) { res, _ = o.GetAlgorithmOk() return @@ -219,22 +260,26 @@ func (o *CreateServiceAccountKeyPayload) GetAlgorithm() (res CreateServiceAccoun // GetAlgorithmOk returns a tuple with the Algorithm field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) GetAlgorithmOk() (ret CreateServiceAccountKeyPayloadGetAlgorithmRetType, ok bool) { return getCreateServiceAccountKeyPayloadGetAlgorithmAttributeTypeOk(o.Algorithm) } // HasAlgorithm returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) HasAlgorithm() bool { _, ok := o.GetAlgorithmOk() return ok } // SetAlgorithm gets a reference to the given string and assigns it to the Algorithm field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) SetAlgorithm(v CreateServiceAccountKeyPayloadGetAlgorithmRetType) { setCreateServiceAccountKeyPayloadGetAlgorithmAttributeType(&o.Algorithm, v) } // GetPublicKey returns the PublicKey field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) GetPublicKey() (res CreateServiceAccountKeyPayloadGetPublicKeyRetType) { res, _ = o.GetPublicKeyOk() return @@ -242,22 +287,26 @@ func (o *CreateServiceAccountKeyPayload) GetPublicKey() (res CreateServiceAccoun // GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) GetPublicKeyOk() (ret CreateServiceAccountKeyPayloadGetPublicKeyRetType, ok bool) { return getCreateServiceAccountKeyPayloadGetPublicKeyAttributeTypeOk(o.PublicKey) } // HasPublicKey returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) HasPublicKey() bool { _, ok := o.GetPublicKeyOk() return ok } // SetPublicKey gets a reference to the given string and assigns it to the PublicKey field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) SetPublicKey(v CreateServiceAccountKeyPayloadGetPublicKeyRetType) { setCreateServiceAccountKeyPayloadGetPublicKeyAttributeType(&o.PublicKey, v) } // GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) GetValidUntil() (res CreateServiceAccountKeyPayloadGetValidUntilRetType) { res, _ = o.GetValidUntilOk() return @@ -265,21 +314,25 @@ func (o *CreateServiceAccountKeyPayload) GetValidUntil() (res CreateServiceAccou // GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) GetValidUntilOk() (ret CreateServiceAccountKeyPayloadGetValidUntilRetType, ok bool) { return getCreateServiceAccountKeyPayloadGetValidUntilAttributeTypeOk(o.ValidUntil) } // HasValidUntil returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) HasValidUntil() bool { _, ok := o.GetValidUntilOk() return ok } // SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyPayload) SetValidUntil(v CreateServiceAccountKeyPayloadGetValidUntilRetType) { setCreateServiceAccountKeyPayloadGetValidUntilAttributeType(&o.ValidUntil, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateServiceAccountKeyPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateServiceAccountKeyPayloadGetAlgorithmAttributeTypeOk(o.Algorithm); ok { @@ -294,37 +347,45 @@ func (o CreateServiceAccountKeyPayload) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateServiceAccountKeyPayload struct { value *CreateServiceAccountKeyPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyPayload) Get() *CreateServiceAccountKeyPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyPayload) Set(val *CreateServiceAccountKeyPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateServiceAccountKeyPayload(val *CreateServiceAccountKeyPayload) *NullableCreateServiceAccountKeyPayload { return &NullableCreateServiceAccountKeyPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_service_account_key_response.go b/services/serviceaccount/model_create_service_account_key_response.go index 4b51203bb..a4213bd04 100644 --- a/services/serviceaccount/model_create_service_account_key_response.go +++ b/services/serviceaccount/model_create_service_account_key_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -24,10 +25,16 @@ var _ MappedNullable = &CreateServiceAccountKeyResponse{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponsegetActiveAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponsegetActiveArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponsegetActiveRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponsegetActiveAttributeTypeOk(arg CreateServiceAccountKeyResponsegetActiveAttributeType) (ret CreateServiceAccountKeyResponsegetActiveRetType, ok bool) { if arg == nil { return ret, false @@ -35,6 +42,7 @@ func getCreateServiceAccountKeyResponsegetActiveAttributeTypeOk(arg CreateServic return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponsegetActiveAttributeType(arg *CreateServiceAccountKeyResponsegetActiveAttributeType, val CreateServiceAccountKeyResponsegetActiveRetType) { *arg = &val } @@ -44,10 +52,16 @@ func setCreateServiceAccountKeyResponsegetActiveAttributeType(arg *CreateService */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseGetCreatedAtAttributeTypeOk(arg CreateServiceAccountKeyResponseGetCreatedAtAttributeType) (ret CreateServiceAccountKeyResponseGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +69,7 @@ func getCreateServiceAccountKeyResponseGetCreatedAtAttributeTypeOk(arg CreateSer return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseGetCreatedAtAttributeType(arg *CreateServiceAccountKeyResponseGetCreatedAtAttributeType, val CreateServiceAccountKeyResponseGetCreatedAtRetType) { *arg = &val } @@ -64,10 +79,16 @@ func setCreateServiceAccountKeyResponseGetCreatedAtAttributeType(arg *CreateServ */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetCredentialsAttributeType = *CreateServiceAccountKeyResponseCredentials + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetCredentialsArgType = CreateServiceAccountKeyResponseCredentials + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetCredentialsRetType = CreateServiceAccountKeyResponseCredentials +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseGetCredentialsAttributeTypeOk(arg CreateServiceAccountKeyResponseGetCredentialsAttributeType) (ret CreateServiceAccountKeyResponseGetCredentialsRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +96,7 @@ func getCreateServiceAccountKeyResponseGetCredentialsAttributeTypeOk(arg CreateS return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseGetCredentialsAttributeType(arg *CreateServiceAccountKeyResponseGetCredentialsAttributeType, val CreateServiceAccountKeyResponseGetCredentialsRetType) { *arg = &val } @@ -84,8 +106,10 @@ func setCreateServiceAccountKeyResponseGetCredentialsAttributeType(arg *CreateSe */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseGetIdAttributeTypeOk(arg CreateServiceAccountKeyResponseGetIdAttributeType) (ret CreateServiceAccountKeyResponseGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +117,15 @@ func getCreateServiceAccountKeyResponseGetIdAttributeTypeOk(arg CreateServiceAcc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseGetIdAttributeType(arg *CreateServiceAccountKeyResponseGetIdAttributeType, val CreateServiceAccountKeyResponseGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetIdRetType = string /* @@ -108,20 +136,25 @@ type CreateServiceAccountKeyResponseGetIdRetType = string // CreateServiceAccountKeyResponseKeyAlgorithm the model 'CreateServiceAccountKeyResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseKeyAlgorithm string // List of KeyAlgorithm const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CREATESERVICEACCOUNTKEYRESPONSEKEY_ALGORITHM__2048 CreateServiceAccountKeyResponseKeyAlgorithm = "RSA_2048" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CREATESERVICEACCOUNTKEYRESPONSEKEY_ALGORITHM__4096 CreateServiceAccountKeyResponseKeyAlgorithm = "RSA_4096" ) // All allowed values of CreateServiceAccountKeyResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedCreateServiceAccountKeyResponseKeyAlgorithmEnumValues = []CreateServiceAccountKeyResponseKeyAlgorithm{ "RSA_2048", "RSA_4096", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *CreateServiceAccountKeyResponseKeyAlgorithm) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -149,6 +182,7 @@ func (v *CreateServiceAccountKeyResponseKeyAlgorithm) UnmarshalJSON(src []byte) // NewCreateServiceAccountKeyResponseKeyAlgorithmFromValue returns a pointer to a valid CreateServiceAccountKeyResponseKeyAlgorithm // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyResponseKeyAlgorithmFromValue(v CreateServiceAccountKeyResponseKeyAlgorithm) (*CreateServiceAccountKeyResponseKeyAlgorithm, error) { ev := CreateServiceAccountKeyResponseKeyAlgorithm(v) if ev.IsValid() { @@ -159,6 +193,7 @@ func NewCreateServiceAccountKeyResponseKeyAlgorithmFromValue(v CreateServiceAcco } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateServiceAccountKeyResponseKeyAlgorithm) IsValid() bool { for _, existing := range AllowedCreateServiceAccountKeyResponseKeyAlgorithmEnumValues { if existing == v { @@ -169,50 +204,65 @@ func (v CreateServiceAccountKeyResponseKeyAlgorithm) IsValid() bool { } // Ptr returns reference to KeyAlgorithmKeyAlgorithm value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateServiceAccountKeyResponseKeyAlgorithm) Ptr() *CreateServiceAccountKeyResponseKeyAlgorithm { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateServiceAccountKeyResponseKeyAlgorithm struct { value *CreateServiceAccountKeyResponseKeyAlgorithm isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseKeyAlgorithm) Get() *CreateServiceAccountKeyResponseKeyAlgorithm { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseKeyAlgorithm) Set(val *CreateServiceAccountKeyResponseKeyAlgorithm) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseKeyAlgorithm) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseKeyAlgorithm) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateServiceAccountKeyResponseKeyAlgorithm(val *CreateServiceAccountKeyResponseKeyAlgorithm) *NullableCreateServiceAccountKeyResponseKeyAlgorithm { return &NullableCreateServiceAccountKeyResponseKeyAlgorithm{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseKeyAlgorithm) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseKeyAlgorithm) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetKeyAlgorithmAttributeType = *CreateServiceAccountKeyResponseKeyAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetKeyAlgorithmArgType = CreateServiceAccountKeyResponseKeyAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetKeyAlgorithmRetType = CreateServiceAccountKeyResponseKeyAlgorithm +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseGetKeyAlgorithmAttributeTypeOk(arg CreateServiceAccountKeyResponseGetKeyAlgorithmAttributeType) (ret CreateServiceAccountKeyResponseGetKeyAlgorithmRetType, ok bool) { if arg == nil { return ret, false @@ -220,6 +270,7 @@ func getCreateServiceAccountKeyResponseGetKeyAlgorithmAttributeTypeOk(arg Create return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseGetKeyAlgorithmAttributeType(arg *CreateServiceAccountKeyResponseGetKeyAlgorithmAttributeType, val CreateServiceAccountKeyResponseGetKeyAlgorithmRetType) { *arg = &val } @@ -232,20 +283,25 @@ func setCreateServiceAccountKeyResponseGetKeyAlgorithmAttributeType(arg *CreateS // CreateServiceAccountKeyResponseKeyOrigin the model 'CreateServiceAccountKeyResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseKeyOrigin string // List of KeyOrigin const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CREATESERVICEACCOUNTKEYRESPONSEKEY_ORIGIN_USER_PROVIDED CreateServiceAccountKeyResponseKeyOrigin = "USER_PROVIDED" - CREATESERVICEACCOUNTKEYRESPONSEKEY_ORIGIN_GENERATED CreateServiceAccountKeyResponseKeyOrigin = "GENERATED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CREATESERVICEACCOUNTKEYRESPONSEKEY_ORIGIN_GENERATED CreateServiceAccountKeyResponseKeyOrigin = "GENERATED" ) // All allowed values of CreateServiceAccountKeyResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedCreateServiceAccountKeyResponseKeyOriginEnumValues = []CreateServiceAccountKeyResponseKeyOrigin{ "USER_PROVIDED", "GENERATED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *CreateServiceAccountKeyResponseKeyOrigin) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -273,6 +329,7 @@ func (v *CreateServiceAccountKeyResponseKeyOrigin) UnmarshalJSON(src []byte) err // NewCreateServiceAccountKeyResponseKeyOriginFromValue returns a pointer to a valid CreateServiceAccountKeyResponseKeyOrigin // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyResponseKeyOriginFromValue(v CreateServiceAccountKeyResponseKeyOrigin) (*CreateServiceAccountKeyResponseKeyOrigin, error) { ev := CreateServiceAccountKeyResponseKeyOrigin(v) if ev.IsValid() { @@ -283,6 +340,7 @@ func NewCreateServiceAccountKeyResponseKeyOriginFromValue(v CreateServiceAccount } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateServiceAccountKeyResponseKeyOrigin) IsValid() bool { for _, existing := range AllowedCreateServiceAccountKeyResponseKeyOriginEnumValues { if existing == v { @@ -293,50 +351,65 @@ func (v CreateServiceAccountKeyResponseKeyOrigin) IsValid() bool { } // Ptr returns reference to KeyOriginKeyOrigin value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateServiceAccountKeyResponseKeyOrigin) Ptr() *CreateServiceAccountKeyResponseKeyOrigin { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateServiceAccountKeyResponseKeyOrigin struct { value *CreateServiceAccountKeyResponseKeyOrigin isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseKeyOrigin) Get() *CreateServiceAccountKeyResponseKeyOrigin { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseKeyOrigin) Set(val *CreateServiceAccountKeyResponseKeyOrigin) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseKeyOrigin) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseKeyOrigin) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateServiceAccountKeyResponseKeyOrigin(val *CreateServiceAccountKeyResponseKeyOrigin) *NullableCreateServiceAccountKeyResponseKeyOrigin { return &NullableCreateServiceAccountKeyResponseKeyOrigin{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseKeyOrigin) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseKeyOrigin) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetKeyOriginAttributeType = *CreateServiceAccountKeyResponseKeyOrigin + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetKeyOriginArgType = CreateServiceAccountKeyResponseKeyOrigin + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetKeyOriginRetType = CreateServiceAccountKeyResponseKeyOrigin +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseGetKeyOriginAttributeTypeOk(arg CreateServiceAccountKeyResponseGetKeyOriginAttributeType) (ret CreateServiceAccountKeyResponseGetKeyOriginRetType, ok bool) { if arg == nil { return ret, false @@ -344,6 +417,7 @@ func getCreateServiceAccountKeyResponseGetKeyOriginAttributeTypeOk(arg CreateSer return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseGetKeyOriginAttributeType(arg *CreateServiceAccountKeyResponseGetKeyOriginAttributeType, val CreateServiceAccountKeyResponseGetKeyOriginRetType) { *arg = &val } @@ -356,20 +430,25 @@ func setCreateServiceAccountKeyResponseGetKeyOriginAttributeType(arg *CreateServ // CreateServiceAccountKeyResponseKeyType the model 'CreateServiceAccountKeyResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseKeyType string // List of KeyType const ( - CREATESERVICEACCOUNTKEYRESPONSEKEY_TYPE_USER_MANAGED CreateServiceAccountKeyResponseKeyType = "USER_MANAGED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + CREATESERVICEACCOUNTKEYRESPONSEKEY_TYPE_USER_MANAGED CreateServiceAccountKeyResponseKeyType = "USER_MANAGED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CREATESERVICEACCOUNTKEYRESPONSEKEY_TYPE_SYSTEM_MANAGED CreateServiceAccountKeyResponseKeyType = "SYSTEM_MANAGED" ) // All allowed values of CreateServiceAccountKeyResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedCreateServiceAccountKeyResponseKeyTypeEnumValues = []CreateServiceAccountKeyResponseKeyType{ "USER_MANAGED", "SYSTEM_MANAGED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *CreateServiceAccountKeyResponseKeyType) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -397,6 +476,7 @@ func (v *CreateServiceAccountKeyResponseKeyType) UnmarshalJSON(src []byte) error // NewCreateServiceAccountKeyResponseKeyTypeFromValue returns a pointer to a valid CreateServiceAccountKeyResponseKeyType // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyResponseKeyTypeFromValue(v CreateServiceAccountKeyResponseKeyType) (*CreateServiceAccountKeyResponseKeyType, error) { ev := CreateServiceAccountKeyResponseKeyType(v) if ev.IsValid() { @@ -407,6 +487,7 @@ func NewCreateServiceAccountKeyResponseKeyTypeFromValue(v CreateServiceAccountKe } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateServiceAccountKeyResponseKeyType) IsValid() bool { for _, existing := range AllowedCreateServiceAccountKeyResponseKeyTypeEnumValues { if existing == v { @@ -417,50 +498,65 @@ func (v CreateServiceAccountKeyResponseKeyType) IsValid() bool { } // Ptr returns reference to KeyTypeKeyType value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateServiceAccountKeyResponseKeyType) Ptr() *CreateServiceAccountKeyResponseKeyType { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateServiceAccountKeyResponseKeyType struct { value *CreateServiceAccountKeyResponseKeyType isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseKeyType) Get() *CreateServiceAccountKeyResponseKeyType { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseKeyType) Set(val *CreateServiceAccountKeyResponseKeyType) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseKeyType) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseKeyType) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateServiceAccountKeyResponseKeyType(val *CreateServiceAccountKeyResponseKeyType) *NullableCreateServiceAccountKeyResponseKeyType { return &NullableCreateServiceAccountKeyResponseKeyType{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseKeyType) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseKeyType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetKeyTypeAttributeType = *CreateServiceAccountKeyResponseKeyType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetKeyTypeArgType = CreateServiceAccountKeyResponseKeyType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetKeyTypeRetType = CreateServiceAccountKeyResponseKeyType +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseGetKeyTypeAttributeTypeOk(arg CreateServiceAccountKeyResponseGetKeyTypeAttributeType) (ret CreateServiceAccountKeyResponseGetKeyTypeRetType, ok bool) { if arg == nil { return ret, false @@ -468,6 +564,7 @@ func getCreateServiceAccountKeyResponseGetKeyTypeAttributeTypeOk(arg CreateServi return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseGetKeyTypeAttributeType(arg *CreateServiceAccountKeyResponseGetKeyTypeAttributeType, val CreateServiceAccountKeyResponseGetKeyTypeRetType) { *arg = &val } @@ -477,8 +574,10 @@ func setCreateServiceAccountKeyResponseGetKeyTypeAttributeType(arg *CreateServic */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetPublicKeyAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseGetPublicKeyAttributeTypeOk(arg CreateServiceAccountKeyResponseGetPublicKeyAttributeType) (ret CreateServiceAccountKeyResponseGetPublicKeyRetType, ok bool) { if arg == nil { return ret, false @@ -486,11 +585,15 @@ func getCreateServiceAccountKeyResponseGetPublicKeyAttributeTypeOk(arg CreateSer return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseGetPublicKeyAttributeType(arg *CreateServiceAccountKeyResponseGetPublicKeyAttributeType, val CreateServiceAccountKeyResponseGetPublicKeyRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetPublicKeyArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetPublicKeyRetType = string /* @@ -498,10 +601,16 @@ type CreateServiceAccountKeyResponseGetPublicKeyRetType = string */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetValidUntilAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetValidUntilArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseGetValidUntilRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseGetValidUntilAttributeTypeOk(arg CreateServiceAccountKeyResponseGetValidUntilAttributeType) (ret CreateServiceAccountKeyResponseGetValidUntilRetType, ok bool) { if arg == nil { return ret, false @@ -509,11 +618,13 @@ func getCreateServiceAccountKeyResponseGetValidUntilAttributeTypeOk(arg CreateSe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseGetValidUntilAttributeType(arg *CreateServiceAccountKeyResponseGetValidUntilAttributeType, val CreateServiceAccountKeyResponseGetValidUntilRetType) { *arg = &val } // CreateServiceAccountKeyResponse struct for CreateServiceAccountKeyResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponse struct { // REQUIRED Active CreateServiceAccountKeyResponsegetActiveAttributeType `json:"active" required:"true"` @@ -538,12 +649,14 @@ type CreateServiceAccountKeyResponse struct { ValidUntil CreateServiceAccountKeyResponseGetValidUntilAttributeType `json:"validUntil,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateServiceAccountKeyResponse CreateServiceAccountKeyResponse // NewCreateServiceAccountKeyResponse instantiates a new CreateServiceAccountKeyResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyResponse(active CreateServiceAccountKeyResponsegetActiveArgType, createdAt CreateServiceAccountKeyResponseGetCreatedAtArgType, credentials CreateServiceAccountKeyResponseGetCredentialsArgType, id CreateServiceAccountKeyResponseGetIdArgType, keyAlgorithm CreateServiceAccountKeyResponseGetKeyAlgorithmArgType, keyOrigin CreateServiceAccountKeyResponseGetKeyOriginArgType, keyType CreateServiceAccountKeyResponseGetKeyTypeArgType, publicKey CreateServiceAccountKeyResponseGetPublicKeyArgType) *CreateServiceAccountKeyResponse { this := CreateServiceAccountKeyResponse{} setCreateServiceAccountKeyResponsegetActiveAttributeType(&this.Active, active) @@ -560,12 +673,14 @@ func NewCreateServiceAccountKeyResponse(active CreateServiceAccountKeyResponsege // NewCreateServiceAccountKeyResponseWithDefaults instantiates a new CreateServiceAccountKeyResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyResponseWithDefaults() *CreateServiceAccountKeyResponse { this := CreateServiceAccountKeyResponse{} return &this } // GetActive returns the Active field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetActive() (ret CreateServiceAccountKeyResponsegetActiveRetType) { ret, _ = o.GetActiveOk() return ret @@ -573,16 +688,19 @@ func (o *CreateServiceAccountKeyResponse) GetActive() (ret CreateServiceAccountK // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetActiveOk() (ret CreateServiceAccountKeyResponsegetActiveRetType, ok bool) { return getCreateServiceAccountKeyResponsegetActiveAttributeTypeOk(o.Active) } // SetActive sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) SetActive(v CreateServiceAccountKeyResponsegetActiveRetType) { setCreateServiceAccountKeyResponsegetActiveAttributeType(&o.Active, v) } // GetCreatedAt returns the CreatedAt field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetCreatedAt() (ret CreateServiceAccountKeyResponseGetCreatedAtRetType) { ret, _ = o.GetCreatedAtOk() return ret @@ -590,16 +708,19 @@ func (o *CreateServiceAccountKeyResponse) GetCreatedAt() (ret CreateServiceAccou // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetCreatedAtOk() (ret CreateServiceAccountKeyResponseGetCreatedAtRetType, ok bool) { return getCreateServiceAccountKeyResponseGetCreatedAtAttributeTypeOk(o.CreatedAt) } // SetCreatedAt sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) SetCreatedAt(v CreateServiceAccountKeyResponseGetCreatedAtRetType) { setCreateServiceAccountKeyResponseGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetCredentials returns the Credentials field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetCredentials() (ret CreateServiceAccountKeyResponseGetCredentialsRetType) { ret, _ = o.GetCredentialsOk() return ret @@ -607,16 +728,19 @@ func (o *CreateServiceAccountKeyResponse) GetCredentials() (ret CreateServiceAcc // GetCredentialsOk returns a tuple with the Credentials field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetCredentialsOk() (ret CreateServiceAccountKeyResponseGetCredentialsRetType, ok bool) { return getCreateServiceAccountKeyResponseGetCredentialsAttributeTypeOk(o.Credentials) } // SetCredentials sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) SetCredentials(v CreateServiceAccountKeyResponseGetCredentialsRetType) { setCreateServiceAccountKeyResponseGetCredentialsAttributeType(&o.Credentials, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetId() (ret CreateServiceAccountKeyResponseGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -624,16 +748,19 @@ func (o *CreateServiceAccountKeyResponse) GetId() (ret CreateServiceAccountKeyRe // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetIdOk() (ret CreateServiceAccountKeyResponseGetIdRetType, ok bool) { return getCreateServiceAccountKeyResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) SetId(v CreateServiceAccountKeyResponseGetIdRetType) { setCreateServiceAccountKeyResponseGetIdAttributeType(&o.Id, v) } // GetKeyAlgorithm returns the KeyAlgorithm field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetKeyAlgorithm() (ret CreateServiceAccountKeyResponseGetKeyAlgorithmRetType) { ret, _ = o.GetKeyAlgorithmOk() return ret @@ -641,16 +768,19 @@ func (o *CreateServiceAccountKeyResponse) GetKeyAlgorithm() (ret CreateServiceAc // GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetKeyAlgorithmOk() (ret CreateServiceAccountKeyResponseGetKeyAlgorithmRetType, ok bool) { return getCreateServiceAccountKeyResponseGetKeyAlgorithmAttributeTypeOk(o.KeyAlgorithm) } // SetKeyAlgorithm sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) SetKeyAlgorithm(v CreateServiceAccountKeyResponseGetKeyAlgorithmRetType) { setCreateServiceAccountKeyResponseGetKeyAlgorithmAttributeType(&o.KeyAlgorithm, v) } // GetKeyOrigin returns the KeyOrigin field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetKeyOrigin() (ret CreateServiceAccountKeyResponseGetKeyOriginRetType) { ret, _ = o.GetKeyOriginOk() return ret @@ -658,16 +788,19 @@ func (o *CreateServiceAccountKeyResponse) GetKeyOrigin() (ret CreateServiceAccou // GetKeyOriginOk returns a tuple with the KeyOrigin field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetKeyOriginOk() (ret CreateServiceAccountKeyResponseGetKeyOriginRetType, ok bool) { return getCreateServiceAccountKeyResponseGetKeyOriginAttributeTypeOk(o.KeyOrigin) } // SetKeyOrigin sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) SetKeyOrigin(v CreateServiceAccountKeyResponseGetKeyOriginRetType) { setCreateServiceAccountKeyResponseGetKeyOriginAttributeType(&o.KeyOrigin, v) } // GetKeyType returns the KeyType field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetKeyType() (ret CreateServiceAccountKeyResponseGetKeyTypeRetType) { ret, _ = o.GetKeyTypeOk() return ret @@ -675,16 +808,19 @@ func (o *CreateServiceAccountKeyResponse) GetKeyType() (ret CreateServiceAccount // GetKeyTypeOk returns a tuple with the KeyType field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetKeyTypeOk() (ret CreateServiceAccountKeyResponseGetKeyTypeRetType, ok bool) { return getCreateServiceAccountKeyResponseGetKeyTypeAttributeTypeOk(o.KeyType) } // SetKeyType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) SetKeyType(v CreateServiceAccountKeyResponseGetKeyTypeRetType) { setCreateServiceAccountKeyResponseGetKeyTypeAttributeType(&o.KeyType, v) } // GetPublicKey returns the PublicKey field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetPublicKey() (ret CreateServiceAccountKeyResponseGetPublicKeyRetType) { ret, _ = o.GetPublicKeyOk() return ret @@ -692,16 +828,19 @@ func (o *CreateServiceAccountKeyResponse) GetPublicKey() (ret CreateServiceAccou // GetPublicKeyOk returns a tuple with the PublicKey field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetPublicKeyOk() (ret CreateServiceAccountKeyResponseGetPublicKeyRetType, ok bool) { return getCreateServiceAccountKeyResponseGetPublicKeyAttributeTypeOk(o.PublicKey) } // SetPublicKey sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) SetPublicKey(v CreateServiceAccountKeyResponseGetPublicKeyRetType) { setCreateServiceAccountKeyResponseGetPublicKeyAttributeType(&o.PublicKey, v) } // GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetValidUntil() (res CreateServiceAccountKeyResponseGetValidUntilRetType) { res, _ = o.GetValidUntilOk() return @@ -709,21 +848,25 @@ func (o *CreateServiceAccountKeyResponse) GetValidUntil() (res CreateServiceAcco // GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) GetValidUntilOk() (ret CreateServiceAccountKeyResponseGetValidUntilRetType, ok bool) { return getCreateServiceAccountKeyResponseGetValidUntilAttributeTypeOk(o.ValidUntil) } // HasValidUntil returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) HasValidUntil() bool { _, ok := o.GetValidUntilOk() return ok } // SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponse) SetValidUntil(v CreateServiceAccountKeyResponseGetValidUntilRetType) { setCreateServiceAccountKeyResponseGetValidUntilAttributeType(&o.ValidUntil, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateServiceAccountKeyResponsegetActiveAttributeTypeOk(o.Active); ok { @@ -756,37 +899,45 @@ func (o CreateServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateServiceAccountKeyResponse struct { value *CreateServiceAccountKeyResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponse) Get() *CreateServiceAccountKeyResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponse) Set(val *CreateServiceAccountKeyResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateServiceAccountKeyResponse(val *CreateServiceAccountKeyResponse) *NullableCreateServiceAccountKeyResponse { return &NullableCreateServiceAccountKeyResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_service_account_key_response_credentials.go b/services/serviceaccount/model_create_service_account_key_response_credentials.go index b646d1ab7..d842222a9 100644 --- a/services/serviceaccount/model_create_service_account_key_response_credentials.go +++ b/services/serviceaccount/model_create_service_account_key_response_credentials.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateServiceAccountKeyResponseCredentials{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetAudAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseCredentialsGetAudAttributeTypeOk(arg CreateServiceAccountKeyResponseCredentialsGetAudAttributeType) (ret CreateServiceAccountKeyResponseCredentialsGetAudRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getCreateServiceAccountKeyResponseCredentialsGetAudAttributeTypeOk(arg Crea return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseCredentialsGetAudAttributeType(arg *CreateServiceAccountKeyResponseCredentialsGetAudAttributeType, val CreateServiceAccountKeyResponseCredentialsGetAudRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetAudArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetAudRetType = string /* @@ -43,8 +50,10 @@ type CreateServiceAccountKeyResponseCredentialsGetAudRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetIssAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseCredentialsGetIssAttributeTypeOk(arg CreateServiceAccountKeyResponseCredentialsGetIssAttributeType) (ret CreateServiceAccountKeyResponseCredentialsGetIssRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getCreateServiceAccountKeyResponseCredentialsGetIssAttributeTypeOk(arg Crea return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseCredentialsGetIssAttributeType(arg *CreateServiceAccountKeyResponseCredentialsGetIssAttributeType, val CreateServiceAccountKeyResponseCredentialsGetIssRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetIssArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetIssRetType = string /* @@ -64,8 +77,10 @@ type CreateServiceAccountKeyResponseCredentialsGetIssRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetKidAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseCredentialsGetKidAttributeTypeOk(arg CreateServiceAccountKeyResponseCredentialsGetKidAttributeType) (ret CreateServiceAccountKeyResponseCredentialsGetKidRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +88,15 @@ func getCreateServiceAccountKeyResponseCredentialsGetKidAttributeTypeOk(arg Crea return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseCredentialsGetKidAttributeType(arg *CreateServiceAccountKeyResponseCredentialsGetKidAttributeType, val CreateServiceAccountKeyResponseCredentialsGetKidRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetKidArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetKidRetType = string /* @@ -85,8 +104,10 @@ type CreateServiceAccountKeyResponseCredentialsGetKidRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetPrivateKeyAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseCredentialsGetPrivateKeyAttributeTypeOk(arg CreateServiceAccountKeyResponseCredentialsGetPrivateKeyAttributeType) (ret CreateServiceAccountKeyResponseCredentialsGetPrivateKeyRetType, ok bool) { if arg == nil { return ret, false @@ -94,11 +115,15 @@ func getCreateServiceAccountKeyResponseCredentialsGetPrivateKeyAttributeTypeOk(a return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseCredentialsGetPrivateKeyAttributeType(arg *CreateServiceAccountKeyResponseCredentialsGetPrivateKeyAttributeType, val CreateServiceAccountKeyResponseCredentialsGetPrivateKeyRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetPrivateKeyArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetPrivateKeyRetType = string /* @@ -106,8 +131,10 @@ type CreateServiceAccountKeyResponseCredentialsGetPrivateKeyRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetSubAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountKeyResponseCredentialsGetSubAttributeTypeOk(arg CreateServiceAccountKeyResponseCredentialsGetSubAttributeType) (ret CreateServiceAccountKeyResponseCredentialsGetSubRetType, ok bool) { if arg == nil { return ret, false @@ -115,14 +142,19 @@ func getCreateServiceAccountKeyResponseCredentialsGetSubAttributeTypeOk(arg Crea return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountKeyResponseCredentialsGetSubAttributeType(arg *CreateServiceAccountKeyResponseCredentialsGetSubAttributeType, val CreateServiceAccountKeyResponseCredentialsGetSubRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetSubArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentialsGetSubRetType = string // CreateServiceAccountKeyResponseCredentials struct for CreateServiceAccountKeyResponseCredentials +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountKeyResponseCredentials struct { // Audience - service account API URL // REQUIRED @@ -140,12 +172,14 @@ type CreateServiceAccountKeyResponseCredentials struct { Sub CreateServiceAccountKeyResponseCredentialsGetSubAttributeType `json:"sub" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateServiceAccountKeyResponseCredentials CreateServiceAccountKeyResponseCredentials // NewCreateServiceAccountKeyResponseCredentials instantiates a new CreateServiceAccountKeyResponseCredentials 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyResponseCredentials(aud CreateServiceAccountKeyResponseCredentialsGetAudArgType, iss CreateServiceAccountKeyResponseCredentialsGetIssArgType, kid CreateServiceAccountKeyResponseCredentialsGetKidArgType, sub CreateServiceAccountKeyResponseCredentialsGetSubArgType) *CreateServiceAccountKeyResponseCredentials { this := CreateServiceAccountKeyResponseCredentials{} setCreateServiceAccountKeyResponseCredentialsGetAudAttributeType(&this.Aud, aud) @@ -158,12 +192,14 @@ func NewCreateServiceAccountKeyResponseCredentials(aud CreateServiceAccountKeyRe // NewCreateServiceAccountKeyResponseCredentialsWithDefaults instantiates a new CreateServiceAccountKeyResponseCredentials 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountKeyResponseCredentialsWithDefaults() *CreateServiceAccountKeyResponseCredentials { this := CreateServiceAccountKeyResponseCredentials{} return &this } // GetAud returns the Aud field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetAud() (ret CreateServiceAccountKeyResponseCredentialsGetAudRetType) { ret, _ = o.GetAudOk() return ret @@ -171,16 +207,19 @@ func (o *CreateServiceAccountKeyResponseCredentials) GetAud() (ret CreateService // GetAudOk returns a tuple with the Aud field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetAudOk() (ret CreateServiceAccountKeyResponseCredentialsGetAudRetType, ok bool) { return getCreateServiceAccountKeyResponseCredentialsGetAudAttributeTypeOk(o.Aud) } // SetAud sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) SetAud(v CreateServiceAccountKeyResponseCredentialsGetAudRetType) { setCreateServiceAccountKeyResponseCredentialsGetAudAttributeType(&o.Aud, v) } // GetIss returns the Iss field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetIss() (ret CreateServiceAccountKeyResponseCredentialsGetIssRetType) { ret, _ = o.GetIssOk() return ret @@ -188,16 +227,19 @@ func (o *CreateServiceAccountKeyResponseCredentials) GetIss() (ret CreateService // GetIssOk returns a tuple with the Iss field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetIssOk() (ret CreateServiceAccountKeyResponseCredentialsGetIssRetType, ok bool) { return getCreateServiceAccountKeyResponseCredentialsGetIssAttributeTypeOk(o.Iss) } // SetIss sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) SetIss(v CreateServiceAccountKeyResponseCredentialsGetIssRetType) { setCreateServiceAccountKeyResponseCredentialsGetIssAttributeType(&o.Iss, v) } // GetKid returns the Kid field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetKid() (ret CreateServiceAccountKeyResponseCredentialsGetKidRetType) { ret, _ = o.GetKidOk() return ret @@ -205,16 +247,19 @@ func (o *CreateServiceAccountKeyResponseCredentials) GetKid() (ret CreateService // GetKidOk returns a tuple with the Kid field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetKidOk() (ret CreateServiceAccountKeyResponseCredentialsGetKidRetType, ok bool) { return getCreateServiceAccountKeyResponseCredentialsGetKidAttributeTypeOk(o.Kid) } // SetKid sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) SetKid(v CreateServiceAccountKeyResponseCredentialsGetKidRetType) { setCreateServiceAccountKeyResponseCredentialsGetKidAttributeType(&o.Kid, v) } // GetPrivateKey returns the PrivateKey field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetPrivateKey() (res CreateServiceAccountKeyResponseCredentialsGetPrivateKeyRetType) { res, _ = o.GetPrivateKeyOk() return @@ -222,22 +267,26 @@ func (o *CreateServiceAccountKeyResponseCredentials) GetPrivateKey() (res Create // GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetPrivateKeyOk() (ret CreateServiceAccountKeyResponseCredentialsGetPrivateKeyRetType, ok bool) { return getCreateServiceAccountKeyResponseCredentialsGetPrivateKeyAttributeTypeOk(o.PrivateKey) } // HasPrivateKey returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) HasPrivateKey() bool { _, ok := o.GetPrivateKeyOk() return ok } // SetPrivateKey gets a reference to the given string and assigns it to the PrivateKey field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) SetPrivateKey(v CreateServiceAccountKeyResponseCredentialsGetPrivateKeyRetType) { setCreateServiceAccountKeyResponseCredentialsGetPrivateKeyAttributeType(&o.PrivateKey, v) } // GetSub returns the Sub field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetSub() (ret CreateServiceAccountKeyResponseCredentialsGetSubRetType) { ret, _ = o.GetSubOk() return ret @@ -245,15 +294,18 @@ func (o *CreateServiceAccountKeyResponseCredentials) GetSub() (ret CreateService // GetSubOk returns a tuple with the Sub field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) GetSubOk() (ret CreateServiceAccountKeyResponseCredentialsGetSubRetType, ok bool) { return getCreateServiceAccountKeyResponseCredentialsGetSubAttributeTypeOk(o.Sub) } // SetSub sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountKeyResponseCredentials) SetSub(v CreateServiceAccountKeyResponseCredentialsGetSubRetType) { setCreateServiceAccountKeyResponseCredentialsGetSubAttributeType(&o.Sub, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateServiceAccountKeyResponseCredentials) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateServiceAccountKeyResponseCredentialsGetAudAttributeTypeOk(o.Aud); ok { @@ -274,37 +326,45 @@ func (o CreateServiceAccountKeyResponseCredentials) ToMap() (map[string]interfac return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateServiceAccountKeyResponseCredentials struct { value *CreateServiceAccountKeyResponseCredentials isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseCredentials) Get() *CreateServiceAccountKeyResponseCredentials { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseCredentials) Set(val *CreateServiceAccountKeyResponseCredentials) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseCredentials) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseCredentials) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateServiceAccountKeyResponseCredentials(val *CreateServiceAccountKeyResponseCredentials) *NullableCreateServiceAccountKeyResponseCredentials { return &NullableCreateServiceAccountKeyResponseCredentials{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountKeyResponseCredentials) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountKeyResponseCredentials) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_service_account_payload.go b/services/serviceaccount/model_create_service_account_payload.go index 82fd5b2ee..cbdb5be44 100644 --- a/services/serviceaccount/model_create_service_account_payload.go +++ b/services/serviceaccount/model_create_service_account_payload.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateServiceAccountPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountPayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateServiceAccountPayloadGetNameAttributeTypeOk(arg CreateServiceAccountPayloadGetNameAttributeType) (ret CreateServiceAccountPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -31,26 +34,33 @@ func getCreateServiceAccountPayloadGetNameAttributeTypeOk(arg CreateServiceAccou return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateServiceAccountPayloadGetNameAttributeType(arg *CreateServiceAccountPayloadGetNameAttributeType, val CreateServiceAccountPayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountPayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountPayloadGetNameRetType = string // CreateServiceAccountPayload struct for CreateServiceAccountPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServiceAccountPayload struct { // The requested name of the service account. The service will generate a unique email from this name. // REQUIRED Name CreateServiceAccountPayloadGetNameAttributeType `json:"name" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateServiceAccountPayload CreateServiceAccountPayload // NewCreateServiceAccountPayload instantiates a new CreateServiceAccountPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountPayload(name CreateServiceAccountPayloadGetNameArgType) *CreateServiceAccountPayload { this := CreateServiceAccountPayload{} setCreateServiceAccountPayloadGetNameAttributeType(&this.Name, name) @@ -60,12 +70,14 @@ func NewCreateServiceAccountPayload(name CreateServiceAccountPayloadGetNameArgTy // NewCreateServiceAccountPayloadWithDefaults instantiates a new CreateServiceAccountPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServiceAccountPayloadWithDefaults() *CreateServiceAccountPayload { this := CreateServiceAccountPayload{} return &this } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountPayload) GetName() (ret CreateServiceAccountPayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -73,15 +85,18 @@ func (o *CreateServiceAccountPayload) GetName() (ret CreateServiceAccountPayload // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountPayload) GetNameOk() (ret CreateServiceAccountPayloadGetNameRetType, ok bool) { return getCreateServiceAccountPayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServiceAccountPayload) SetName(v CreateServiceAccountPayloadGetNameRetType) { setCreateServiceAccountPayloadGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateServiceAccountPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateServiceAccountPayloadGetNameAttributeTypeOk(o.Name); ok { @@ -90,37 +105,45 @@ func (o CreateServiceAccountPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateServiceAccountPayload struct { value *CreateServiceAccountPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountPayload) Get() *CreateServiceAccountPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountPayload) Set(val *CreateServiceAccountPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateServiceAccountPayload(val *CreateServiceAccountPayload) *NullableCreateServiceAccountPayload { return &NullableCreateServiceAccountPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateServiceAccountPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateServiceAccountPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_create_short_lived_access_token_response.go b/services/serviceaccount/model_create_short_lived_access_token_response.go index 6cf39f7c8..1b766dbca 100644 --- a/services/serviceaccount/model_create_short_lived_access_token_response.go +++ b/services/serviceaccount/model_create_short_lived_access_token_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &CreateShortLivedAccessTokenResponse{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetAccessTokenAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShortLivedAccessTokenResponseGetAccessTokenAttributeTypeOk(arg CreateShortLivedAccessTokenResponseGetAccessTokenAttributeType) (ret CreateShortLivedAccessTokenResponseGetAccessTokenRetType, ok bool) { if arg == nil { return ret, false @@ -32,11 +35,15 @@ func getCreateShortLivedAccessTokenResponseGetAccessTokenAttributeTypeOk(arg Cre return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShortLivedAccessTokenResponseGetAccessTokenAttributeType(arg *CreateShortLivedAccessTokenResponseGetAccessTokenAttributeType, val CreateShortLivedAccessTokenResponseGetAccessTokenRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetAccessTokenArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetAccessTokenRetType = string /* @@ -44,10 +51,16 @@ type CreateShortLivedAccessTokenResponseGetAccessTokenRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetExpiresInAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetExpiresInArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetExpiresInRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShortLivedAccessTokenResponseGetExpiresInAttributeTypeOk(arg CreateShortLivedAccessTokenResponseGetExpiresInAttributeType) (ret CreateShortLivedAccessTokenResponseGetExpiresInRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +68,7 @@ func getCreateShortLivedAccessTokenResponseGetExpiresInAttributeTypeOk(arg Creat return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShortLivedAccessTokenResponseGetExpiresInAttributeType(arg *CreateShortLivedAccessTokenResponseGetExpiresInAttributeType, val CreateShortLivedAccessTokenResponseGetExpiresInRetType) { *arg = &val } @@ -64,8 +78,10 @@ func setCreateShortLivedAccessTokenResponseGetExpiresInAttributeType(arg *Create */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetRefreshTokenAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShortLivedAccessTokenResponseGetRefreshTokenAttributeTypeOk(arg CreateShortLivedAccessTokenResponseGetRefreshTokenAttributeType) (ret CreateShortLivedAccessTokenResponseGetRefreshTokenRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +89,15 @@ func getCreateShortLivedAccessTokenResponseGetRefreshTokenAttributeTypeOk(arg Cr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShortLivedAccessTokenResponseGetRefreshTokenAttributeType(arg *CreateShortLivedAccessTokenResponseGetRefreshTokenAttributeType, val CreateShortLivedAccessTokenResponseGetRefreshTokenRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetRefreshTokenArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetRefreshTokenRetType = string /* @@ -85,8 +105,10 @@ type CreateShortLivedAccessTokenResponseGetRefreshTokenRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetScopeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShortLivedAccessTokenResponseGetScopeAttributeTypeOk(arg CreateShortLivedAccessTokenResponseGetScopeAttributeType) (ret CreateShortLivedAccessTokenResponseGetScopeRetType, ok bool) { if arg == nil { return ret, false @@ -94,11 +116,15 @@ func getCreateShortLivedAccessTokenResponseGetScopeAttributeTypeOk(arg CreateSho return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShortLivedAccessTokenResponseGetScopeAttributeType(arg *CreateShortLivedAccessTokenResponseGetScopeAttributeType, val CreateShortLivedAccessTokenResponseGetScopeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetScopeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetScopeRetType = string /* @@ -109,18 +135,22 @@ type CreateShortLivedAccessTokenResponseGetScopeRetType = string // CreateShortLivedAccessTokenResponseTokenType the model 'CreateShortLivedAccessTokenResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseTokenType string // List of TokenType const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CREATESHORTLIVEDACCESSTOKENRESPONSETOKEN_TYPE_BEARER CreateShortLivedAccessTokenResponseTokenType = "Bearer" ) // All allowed values of CreateShortLivedAccessTokenResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedCreateShortLivedAccessTokenResponseTokenTypeEnumValues = []CreateShortLivedAccessTokenResponseTokenType{ "Bearer", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *CreateShortLivedAccessTokenResponseTokenType) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -148,6 +178,7 @@ func (v *CreateShortLivedAccessTokenResponseTokenType) UnmarshalJSON(src []byte) // NewCreateShortLivedAccessTokenResponseTokenTypeFromValue returns a pointer to a valid CreateShortLivedAccessTokenResponseTokenType // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShortLivedAccessTokenResponseTokenTypeFromValue(v CreateShortLivedAccessTokenResponseTokenType) (*CreateShortLivedAccessTokenResponseTokenType, error) { ev := CreateShortLivedAccessTokenResponseTokenType(v) if ev.IsValid() { @@ -158,6 +189,7 @@ func NewCreateShortLivedAccessTokenResponseTokenTypeFromValue(v CreateShortLived } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateShortLivedAccessTokenResponseTokenType) IsValid() bool { for _, existing := range AllowedCreateShortLivedAccessTokenResponseTokenTypeEnumValues { if existing == v { @@ -168,50 +200,65 @@ func (v CreateShortLivedAccessTokenResponseTokenType) IsValid() bool { } // Ptr returns reference to TokenTypeTokenType value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v CreateShortLivedAccessTokenResponseTokenType) Ptr() *CreateShortLivedAccessTokenResponseTokenType { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateShortLivedAccessTokenResponseTokenType struct { value *CreateShortLivedAccessTokenResponseTokenType isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShortLivedAccessTokenResponseTokenType) Get() *CreateShortLivedAccessTokenResponseTokenType { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShortLivedAccessTokenResponseTokenType) Set(val *CreateShortLivedAccessTokenResponseTokenType) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShortLivedAccessTokenResponseTokenType) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShortLivedAccessTokenResponseTokenType) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateShortLivedAccessTokenResponseTokenType(val *CreateShortLivedAccessTokenResponseTokenType) *NullableCreateShortLivedAccessTokenResponseTokenType { return &NullableCreateShortLivedAccessTokenResponseTokenType{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShortLivedAccessTokenResponseTokenType) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShortLivedAccessTokenResponseTokenType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetTokenTypeAttributeType = *CreateShortLivedAccessTokenResponseTokenType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetTokenTypeArgType = CreateShortLivedAccessTokenResponseTokenType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponseGetTokenTypeRetType = CreateShortLivedAccessTokenResponseTokenType +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShortLivedAccessTokenResponseGetTokenTypeAttributeTypeOk(arg CreateShortLivedAccessTokenResponseGetTokenTypeAttributeType) (ret CreateShortLivedAccessTokenResponseGetTokenTypeRetType, ok bool) { if arg == nil { return ret, false @@ -219,11 +266,13 @@ func getCreateShortLivedAccessTokenResponseGetTokenTypeAttributeTypeOk(arg Creat return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShortLivedAccessTokenResponseGetTokenTypeAttributeType(arg *CreateShortLivedAccessTokenResponseGetTokenTypeAttributeType, val CreateShortLivedAccessTokenResponseGetTokenTypeRetType) { *arg = &val } // CreateShortLivedAccessTokenResponse struct for CreateShortLivedAccessTokenResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShortLivedAccessTokenResponse struct { // The short lived token that can be used for API access // REQUIRED @@ -240,12 +289,14 @@ type CreateShortLivedAccessTokenResponse struct { TokenType CreateShortLivedAccessTokenResponseGetTokenTypeAttributeType `json:"token_type" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateShortLivedAccessTokenResponse CreateShortLivedAccessTokenResponse // NewCreateShortLivedAccessTokenResponse instantiates a new CreateShortLivedAccessTokenResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShortLivedAccessTokenResponse(accessToken CreateShortLivedAccessTokenResponseGetAccessTokenArgType, expiresIn CreateShortLivedAccessTokenResponseGetExpiresInArgType, refreshToken CreateShortLivedAccessTokenResponseGetRefreshTokenArgType, scope CreateShortLivedAccessTokenResponseGetScopeArgType, tokenType CreateShortLivedAccessTokenResponseGetTokenTypeArgType) *CreateShortLivedAccessTokenResponse { this := CreateShortLivedAccessTokenResponse{} setCreateShortLivedAccessTokenResponseGetAccessTokenAttributeType(&this.AccessToken, accessToken) @@ -259,12 +310,14 @@ func NewCreateShortLivedAccessTokenResponse(accessToken CreateShortLivedAccessTo // NewCreateShortLivedAccessTokenResponseWithDefaults instantiates a new CreateShortLivedAccessTokenResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShortLivedAccessTokenResponseWithDefaults() *CreateShortLivedAccessTokenResponse { this := CreateShortLivedAccessTokenResponse{} return &this } // GetAccessToken returns the AccessToken field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetAccessToken() (ret CreateShortLivedAccessTokenResponseGetAccessTokenRetType) { ret, _ = o.GetAccessTokenOk() return ret @@ -272,16 +325,19 @@ func (o *CreateShortLivedAccessTokenResponse) GetAccessToken() (ret CreateShortL // GetAccessTokenOk returns a tuple with the AccessToken field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetAccessTokenOk() (ret CreateShortLivedAccessTokenResponseGetAccessTokenRetType, ok bool) { return getCreateShortLivedAccessTokenResponseGetAccessTokenAttributeTypeOk(o.AccessToken) } // SetAccessToken sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) SetAccessToken(v CreateShortLivedAccessTokenResponseGetAccessTokenRetType) { setCreateShortLivedAccessTokenResponseGetAccessTokenAttributeType(&o.AccessToken, v) } // GetExpiresIn returns the ExpiresIn field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetExpiresIn() (ret CreateShortLivedAccessTokenResponseGetExpiresInRetType) { ret, _ = o.GetExpiresInOk() return ret @@ -289,16 +345,19 @@ func (o *CreateShortLivedAccessTokenResponse) GetExpiresIn() (ret CreateShortLiv // GetExpiresInOk returns a tuple with the ExpiresIn field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetExpiresInOk() (ret CreateShortLivedAccessTokenResponseGetExpiresInRetType, ok bool) { return getCreateShortLivedAccessTokenResponseGetExpiresInAttributeTypeOk(o.ExpiresIn) } // SetExpiresIn sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) SetExpiresIn(v CreateShortLivedAccessTokenResponseGetExpiresInRetType) { setCreateShortLivedAccessTokenResponseGetExpiresInAttributeType(&o.ExpiresIn, v) } // GetRefreshToken returns the RefreshToken field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetRefreshToken() (ret CreateShortLivedAccessTokenResponseGetRefreshTokenRetType) { ret, _ = o.GetRefreshTokenOk() return ret @@ -306,16 +365,19 @@ func (o *CreateShortLivedAccessTokenResponse) GetRefreshToken() (ret CreateShort // GetRefreshTokenOk returns a tuple with the RefreshToken field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetRefreshTokenOk() (ret CreateShortLivedAccessTokenResponseGetRefreshTokenRetType, ok bool) { return getCreateShortLivedAccessTokenResponseGetRefreshTokenAttributeTypeOk(o.RefreshToken) } // SetRefreshToken sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) SetRefreshToken(v CreateShortLivedAccessTokenResponseGetRefreshTokenRetType) { setCreateShortLivedAccessTokenResponseGetRefreshTokenAttributeType(&o.RefreshToken, v) } // GetScope returns the Scope field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetScope() (ret CreateShortLivedAccessTokenResponseGetScopeRetType) { ret, _ = o.GetScopeOk() return ret @@ -323,16 +385,19 @@ func (o *CreateShortLivedAccessTokenResponse) GetScope() (ret CreateShortLivedAc // GetScopeOk returns a tuple with the Scope field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetScopeOk() (ret CreateShortLivedAccessTokenResponseGetScopeRetType, ok bool) { return getCreateShortLivedAccessTokenResponseGetScopeAttributeTypeOk(o.Scope) } // SetScope sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) SetScope(v CreateShortLivedAccessTokenResponseGetScopeRetType) { setCreateShortLivedAccessTokenResponseGetScopeAttributeType(&o.Scope, v) } // GetTokenType returns the TokenType field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetTokenType() (ret CreateShortLivedAccessTokenResponseGetTokenTypeRetType) { ret, _ = o.GetTokenTypeOk() return ret @@ -340,15 +405,18 @@ func (o *CreateShortLivedAccessTokenResponse) GetTokenType() (ret CreateShortLiv // GetTokenTypeOk returns a tuple with the TokenType field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) GetTokenTypeOk() (ret CreateShortLivedAccessTokenResponseGetTokenTypeRetType, ok bool) { return getCreateShortLivedAccessTokenResponseGetTokenTypeAttributeTypeOk(o.TokenType) } // SetTokenType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShortLivedAccessTokenResponse) SetTokenType(v CreateShortLivedAccessTokenResponseGetTokenTypeRetType) { setCreateShortLivedAccessTokenResponseGetTokenTypeAttributeType(&o.TokenType, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateShortLivedAccessTokenResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateShortLivedAccessTokenResponseGetAccessTokenAttributeTypeOk(o.AccessToken); ok { @@ -369,37 +437,45 @@ func (o CreateShortLivedAccessTokenResponse) ToMap() (map[string]interface{}, er return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateShortLivedAccessTokenResponse struct { value *CreateShortLivedAccessTokenResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShortLivedAccessTokenResponse) Get() *CreateShortLivedAccessTokenResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShortLivedAccessTokenResponse) Set(val *CreateShortLivedAccessTokenResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShortLivedAccessTokenResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShortLivedAccessTokenResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateShortLivedAccessTokenResponse(val *CreateShortLivedAccessTokenResponse) *NullableCreateShortLivedAccessTokenResponse { return &NullableCreateShortLivedAccessTokenResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShortLivedAccessTokenResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShortLivedAccessTokenResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_error.go b/services/serviceaccount/model_error.go index 779940d42..b405c13fa 100644 --- a/services/serviceaccount/model_error.go +++ b/services/serviceaccount/model_error.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &Error{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetErrorAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetErrorAttributeTypeOk(arg ErrorGetErrorAttributeType) (ret ErrorGetErrorRetType, ok bool) { if arg == nil { return ret, false @@ -32,11 +35,15 @@ func getErrorGetErrorAttributeTypeOk(arg ErrorGetErrorAttributeType) (ret ErrorG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetErrorAttributeType(arg *ErrorGetErrorAttributeType, val ErrorGetErrorRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetErrorArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetErrorRetType = string /* @@ -44,8 +51,10 @@ type ErrorGetErrorRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetMessageAttributeTypeOk(arg ErrorGetMessageAttributeType) (ret ErrorGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +62,15 @@ func getErrorGetMessageAttributeTypeOk(arg ErrorGetMessageAttributeType) (ret Er return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetMessageAttributeType(arg *ErrorGetMessageAttributeType, val ErrorGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetMessageRetType = string /* @@ -65,8 +78,10 @@ type ErrorGetMessageRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetPathAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetPathAttributeTypeOk(arg ErrorGetPathAttributeType) (ret ErrorGetPathRetType, ok bool) { if arg == nil { return ret, false @@ -74,11 +89,15 @@ func getErrorGetPathAttributeTypeOk(arg ErrorGetPathAttributeType) (ret ErrorGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetPathAttributeType(arg *ErrorGetPathAttributeType, val ErrorGetPathRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetPathArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetPathRetType = string /* @@ -86,10 +105,16 @@ type ErrorGetPathRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetStatusAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetStatusArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetStatusRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetStatusAttributeTypeOk(arg ErrorGetStatusAttributeType) (ret ErrorGetStatusRetType, ok bool) { if arg == nil { return ret, false @@ -97,6 +122,7 @@ func getErrorGetStatusAttributeTypeOk(arg ErrorGetStatusAttributeType) (ret Erro return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetStatusAttributeType(arg *ErrorGetStatusAttributeType, val ErrorGetStatusRetType) { *arg = &val } @@ -106,10 +132,16 @@ func setErrorGetStatusAttributeType(arg *ErrorGetStatusAttributeType, val ErrorG */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetTimeStampAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetTimeStampArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetTimeStampRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetTimeStampAttributeTypeOk(arg ErrorGetTimeStampAttributeType) (ret ErrorGetTimeStampRetType, ok bool) { if arg == nil { return ret, false @@ -117,11 +149,13 @@ func getErrorGetTimeStampAttributeTypeOk(arg ErrorGetTimeStampAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetTimeStampAttributeType(arg *ErrorGetTimeStampAttributeType, val ErrorGetTimeStampRetType) { *arg = &val } // Error Contains error information. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Error struct { // REQUIRED Error ErrorGetErrorAttributeType `json:"error" required:"true"` @@ -135,12 +169,14 @@ type Error struct { TimeStamp ErrorGetTimeStampAttributeType `json:"timeStamp" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _Error 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewError(error_ ErrorGetErrorArgType, message ErrorGetMessageArgType, path ErrorGetPathArgType, status ErrorGetStatusArgType, timeStamp ErrorGetTimeStampArgType) *Error { this := Error{} setErrorGetErrorAttributeType(&this.Error, error_) @@ -154,12 +190,14 @@ func NewError(error_ ErrorGetErrorArgType, message ErrorGetMessageArgType, path // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewErrorWithDefaults() *Error { this := Error{} return &this } // GetError returns the Error field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetError() (ret ErrorGetErrorRetType) { ret, _ = o.GetErrorOk() return ret @@ -167,16 +205,19 @@ func (o *Error) GetError() (ret ErrorGetErrorRetType) { // GetErrorOk returns a tuple with the Error field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetErrorOk() (ret ErrorGetErrorRetType, ok bool) { return getErrorGetErrorAttributeTypeOk(o.Error) } // SetError sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) SetError(v ErrorGetErrorRetType) { setErrorGetErrorAttributeType(&o.Error, v) } // GetMessage returns the Message field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetMessage() (ret ErrorGetMessageRetType) { ret, _ = o.GetMessageOk() return ret @@ -184,16 +225,19 @@ func (o *Error) GetMessage() (ret ErrorGetMessageRetType) { // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetMessageOk() (ret ErrorGetMessageRetType, ok bool) { return getErrorGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) SetMessage(v ErrorGetMessageRetType) { setErrorGetMessageAttributeType(&o.Message, v) } // GetPath returns the Path field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetPath() (ret ErrorGetPathRetType) { ret, _ = o.GetPathOk() return ret @@ -201,16 +245,19 @@ func (o *Error) GetPath() (ret ErrorGetPathRetType) { // GetPathOk returns a tuple with the Path field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetPathOk() (ret ErrorGetPathRetType, ok bool) { return getErrorGetPathAttributeTypeOk(o.Path) } // SetPath sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) SetPath(v ErrorGetPathRetType) { setErrorGetPathAttributeType(&o.Path, v) } // GetStatus returns the Status field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetStatus() (ret ErrorGetStatusRetType) { ret, _ = o.GetStatusOk() return ret @@ -218,16 +265,19 @@ func (o *Error) GetStatus() (ret ErrorGetStatusRetType) { // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetStatusOk() (ret ErrorGetStatusRetType, ok bool) { return getErrorGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) SetStatus(v ErrorGetStatusRetType) { setErrorGetStatusAttributeType(&o.Status, v) } // GetTimeStamp returns the TimeStamp field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetTimeStamp() (ret ErrorGetTimeStampRetType) { ret, _ = o.GetTimeStampOk() return ret @@ -235,15 +285,18 @@ func (o *Error) GetTimeStamp() (ret ErrorGetTimeStampRetType) { // GetTimeStampOk returns a tuple with the TimeStamp field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetTimeStampOk() (ret ErrorGetTimeStampRetType, ok bool) { return getErrorGetTimeStampAttributeTypeOk(o.TimeStamp) } // SetTimeStamp sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) SetTimeStamp(v ErrorGetTimeStampRetType) { setErrorGetTimeStampAttributeType(&o.TimeStamp, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Error) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getErrorGetErrorAttributeTypeOk(o.Error); ok { @@ -264,37 +317,45 @@ func (o Error) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableError struct { value *Error isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableError) Get() *Error { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableError) Set(val *Error) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableError) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableError) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableError(val *Error) *NullableError { return &NullableError{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableError) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_federated_list_federated_identity_providers_response.go b/services/serviceaccount/model_federated_list_federated_identity_providers_response.go index c7f44f194..313decda0 100644 --- a/services/serviceaccount/model_federated_list_federated_identity_providers_response.go +++ b/services/serviceaccount/model_federated_list_federated_identity_providers_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &FederatedListFederatedIdentityProvidersResponse{} */ // isNumber +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetItemsPerPageArgType = float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetItemsPerPageRetType = float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getFederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeTypeOk(arg FederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeType) (ret FederatedListFederatedIdentityProvidersResponseGetItemsPerPageRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getFederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setFederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeType(arg *FederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeType, val FederatedListFederatedIdentityProvidersResponseGetItemsPerPageRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setFederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeT */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetResourcesAttributeType = *[]CreateFederatedIdentityProviderResponse + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetResourcesArgType = []CreateFederatedIdentityProviderResponse + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetResourcesRetType = []CreateFederatedIdentityProviderResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getFederatedListFederatedIdentityProvidersResponseGetResourcesAttributeTypeOk(arg FederatedListFederatedIdentityProvidersResponseGetResourcesAttributeType) (ret FederatedListFederatedIdentityProvidersResponseGetResourcesRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getFederatedListFederatedIdentityProvidersResponseGetResourcesAttributeType return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setFederatedListFederatedIdentityProvidersResponseGetResourcesAttributeType(arg *FederatedListFederatedIdentityProvidersResponseGetResourcesAttributeType, val FederatedListFederatedIdentityProvidersResponseGetResourcesRetType) { *arg = &val } @@ -62,10 +77,16 @@ func setFederatedListFederatedIdentityProvidersResponseGetResourcesAttributeType */ // isNumber +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetStartIndexAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetStartIndexArgType = float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetStartIndexRetType = float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getFederatedListFederatedIdentityProvidersResponseGetStartIndexAttributeTypeOk(arg FederatedListFederatedIdentityProvidersResponseGetStartIndexAttributeType) (ret FederatedListFederatedIdentityProvidersResponseGetStartIndexRetType, ok bool) { if arg == nil { return ret, false @@ -73,6 +94,7 @@ func getFederatedListFederatedIdentityProvidersResponseGetStartIndexAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setFederatedListFederatedIdentityProvidersResponseGetStartIndexAttributeType(arg *FederatedListFederatedIdentityProvidersResponseGetStartIndexAttributeType, val FederatedListFederatedIdentityProvidersResponseGetStartIndexRetType) { *arg = &val } @@ -82,10 +104,16 @@ func setFederatedListFederatedIdentityProvidersResponseGetStartIndexAttributeTyp */ // isNumber +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetTotalResultsAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetTotalResultsArgType = float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponseGetTotalResultsRetType = float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getFederatedListFederatedIdentityProvidersResponseGetTotalResultsAttributeTypeOk(arg FederatedListFederatedIdentityProvidersResponseGetTotalResultsAttributeType) (ret FederatedListFederatedIdentityProvidersResponseGetTotalResultsRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +121,13 @@ func getFederatedListFederatedIdentityProvidersResponseGetTotalResultsAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setFederatedListFederatedIdentityProvidersResponseGetTotalResultsAttributeType(arg *FederatedListFederatedIdentityProvidersResponseGetTotalResultsAttributeType, val FederatedListFederatedIdentityProvidersResponseGetTotalResultsRetType) { *arg = &val } // FederatedListFederatedIdentityProvidersResponse struct for FederatedListFederatedIdentityProvidersResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FederatedListFederatedIdentityProvidersResponse struct { // REQUIRED ItemsPerPage FederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeType `json:"itemsPerPage" required:"true"` @@ -109,12 +139,14 @@ type FederatedListFederatedIdentityProvidersResponse struct { TotalResults FederatedListFederatedIdentityProvidersResponseGetTotalResultsAttributeType `json:"totalResults" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _FederatedListFederatedIdentityProvidersResponse FederatedListFederatedIdentityProvidersResponse // NewFederatedListFederatedIdentityProvidersResponse instantiates a new FederatedListFederatedIdentityProvidersResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewFederatedListFederatedIdentityProvidersResponse(itemsPerPage FederatedListFederatedIdentityProvidersResponseGetItemsPerPageArgType, resources FederatedListFederatedIdentityProvidersResponseGetResourcesArgType, startIndex FederatedListFederatedIdentityProvidersResponseGetStartIndexArgType, totalResults FederatedListFederatedIdentityProvidersResponseGetTotalResultsArgType) *FederatedListFederatedIdentityProvidersResponse { this := FederatedListFederatedIdentityProvidersResponse{} setFederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeType(&this.ItemsPerPage, itemsPerPage) @@ -127,6 +159,7 @@ func NewFederatedListFederatedIdentityProvidersResponse(itemsPerPage FederatedLi // NewFederatedListFederatedIdentityProvidersResponseWithDefaults instantiates a new FederatedListFederatedIdentityProvidersResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewFederatedListFederatedIdentityProvidersResponseWithDefaults() *FederatedListFederatedIdentityProvidersResponse { this := FederatedListFederatedIdentityProvidersResponse{} var itemsPerPage float64 = 1 @@ -139,6 +172,7 @@ func NewFederatedListFederatedIdentityProvidersResponseWithDefaults() *Federated } // GetItemsPerPage returns the ItemsPerPage field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) GetItemsPerPage() (ret FederatedListFederatedIdentityProvidersResponseGetItemsPerPageRetType) { ret, _ = o.GetItemsPerPageOk() return ret @@ -146,16 +180,19 @@ func (o *FederatedListFederatedIdentityProvidersResponse) GetItemsPerPage() (ret // GetItemsPerPageOk returns a tuple with the ItemsPerPage field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) GetItemsPerPageOk() (ret FederatedListFederatedIdentityProvidersResponseGetItemsPerPageRetType, ok bool) { return getFederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeTypeOk(o.ItemsPerPage) } // SetItemsPerPage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) SetItemsPerPage(v FederatedListFederatedIdentityProvidersResponseGetItemsPerPageRetType) { setFederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeType(&o.ItemsPerPage, v) } // GetResources returns the Resources field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) GetResources() (ret FederatedListFederatedIdentityProvidersResponseGetResourcesRetType) { ret, _ = o.GetResourcesOk() return ret @@ -163,16 +200,19 @@ func (o *FederatedListFederatedIdentityProvidersResponse) GetResources() (ret Fe // GetResourcesOk returns a tuple with the Resources field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) GetResourcesOk() (ret FederatedListFederatedIdentityProvidersResponseGetResourcesRetType, ok bool) { return getFederatedListFederatedIdentityProvidersResponseGetResourcesAttributeTypeOk(o.Resources) } // SetResources sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) SetResources(v FederatedListFederatedIdentityProvidersResponseGetResourcesRetType) { setFederatedListFederatedIdentityProvidersResponseGetResourcesAttributeType(&o.Resources, v) } // GetStartIndex returns the StartIndex field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) GetStartIndex() (ret FederatedListFederatedIdentityProvidersResponseGetStartIndexRetType) { ret, _ = o.GetStartIndexOk() return ret @@ -180,16 +220,19 @@ func (o *FederatedListFederatedIdentityProvidersResponse) GetStartIndex() (ret F // GetStartIndexOk returns a tuple with the StartIndex field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) GetStartIndexOk() (ret FederatedListFederatedIdentityProvidersResponseGetStartIndexRetType, ok bool) { return getFederatedListFederatedIdentityProvidersResponseGetStartIndexAttributeTypeOk(o.StartIndex) } // SetStartIndex sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) SetStartIndex(v FederatedListFederatedIdentityProvidersResponseGetStartIndexRetType) { setFederatedListFederatedIdentityProvidersResponseGetStartIndexAttributeType(&o.StartIndex, v) } // GetTotalResults returns the TotalResults field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) GetTotalResults() (ret FederatedListFederatedIdentityProvidersResponseGetTotalResultsRetType) { ret, _ = o.GetTotalResultsOk() return ret @@ -197,15 +240,18 @@ func (o *FederatedListFederatedIdentityProvidersResponse) GetTotalResults() (ret // GetTotalResultsOk returns a tuple with the TotalResults field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) GetTotalResultsOk() (ret FederatedListFederatedIdentityProvidersResponseGetTotalResultsRetType, ok bool) { return getFederatedListFederatedIdentityProvidersResponseGetTotalResultsAttributeTypeOk(o.TotalResults) } // SetTotalResults sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *FederatedListFederatedIdentityProvidersResponse) SetTotalResults(v FederatedListFederatedIdentityProvidersResponseGetTotalResultsRetType) { setFederatedListFederatedIdentityProvidersResponseGetTotalResultsAttributeType(&o.TotalResults, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o FederatedListFederatedIdentityProvidersResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getFederatedListFederatedIdentityProvidersResponseGetItemsPerPageAttributeTypeOk(o.ItemsPerPage); ok { @@ -223,37 +269,45 @@ func (o FederatedListFederatedIdentityProvidersResponse) ToMap() (map[string]int return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableFederatedListFederatedIdentityProvidersResponse struct { value *FederatedListFederatedIdentityProvidersResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFederatedListFederatedIdentityProvidersResponse) Get() *FederatedListFederatedIdentityProvidersResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFederatedListFederatedIdentityProvidersResponse) Set(val *FederatedListFederatedIdentityProvidersResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFederatedListFederatedIdentityProvidersResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFederatedListFederatedIdentityProvidersResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableFederatedListFederatedIdentityProvidersResponse(val *FederatedListFederatedIdentityProvidersResponse) *NullableFederatedListFederatedIdentityProvidersResponse { return &NullableFederatedListFederatedIdentityProvidersResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFederatedListFederatedIdentityProvidersResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFederatedListFederatedIdentityProvidersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_get_service_account_key_response.go b/services/serviceaccount/model_get_service_account_key_response.go index 56a3c3459..5743f8878 100644 --- a/services/serviceaccount/model_get_service_account_key_response.go +++ b/services/serviceaccount/model_get_service_account_key_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -24,10 +25,16 @@ var _ MappedNullable = &GetServiceAccountKeyResponse{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponsegetActiveAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponsegetActiveArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponsegetActiveRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponsegetActiveAttributeTypeOk(arg GetServiceAccountKeyResponsegetActiveAttributeType) (ret GetServiceAccountKeyResponsegetActiveRetType, ok bool) { if arg == nil { return ret, false @@ -35,6 +42,7 @@ func getGetServiceAccountKeyResponsegetActiveAttributeTypeOk(arg GetServiceAccou return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponsegetActiveAttributeType(arg *GetServiceAccountKeyResponsegetActiveAttributeType, val GetServiceAccountKeyResponsegetActiveRetType) { *arg = &val } @@ -44,10 +52,16 @@ func setGetServiceAccountKeyResponsegetActiveAttributeType(arg *GetServiceAccoun */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseGetCreatedAtAttributeTypeOk(arg GetServiceAccountKeyResponseGetCreatedAtAttributeType) (ret GetServiceAccountKeyResponseGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +69,7 @@ func getGetServiceAccountKeyResponseGetCreatedAtAttributeTypeOk(arg GetServiceAc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseGetCreatedAtAttributeType(arg *GetServiceAccountKeyResponseGetCreatedAtAttributeType, val GetServiceAccountKeyResponseGetCreatedAtRetType) { *arg = &val } @@ -64,10 +79,16 @@ func setGetServiceAccountKeyResponseGetCreatedAtAttributeType(arg *GetServiceAcc */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetCredentialsAttributeType = *GetServiceAccountKeyResponseCredentials + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetCredentialsArgType = GetServiceAccountKeyResponseCredentials + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetCredentialsRetType = GetServiceAccountKeyResponseCredentials +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseGetCredentialsAttributeTypeOk(arg GetServiceAccountKeyResponseGetCredentialsAttributeType) (ret GetServiceAccountKeyResponseGetCredentialsRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +96,7 @@ func getGetServiceAccountKeyResponseGetCredentialsAttributeTypeOk(arg GetService return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseGetCredentialsAttributeType(arg *GetServiceAccountKeyResponseGetCredentialsAttributeType, val GetServiceAccountKeyResponseGetCredentialsRetType) { *arg = &val } @@ -84,8 +106,10 @@ func setGetServiceAccountKeyResponseGetCredentialsAttributeType(arg *GetServiceA */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseGetIdAttributeTypeOk(arg GetServiceAccountKeyResponseGetIdAttributeType) (ret GetServiceAccountKeyResponseGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +117,15 @@ func getGetServiceAccountKeyResponseGetIdAttributeTypeOk(arg GetServiceAccountKe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseGetIdAttributeType(arg *GetServiceAccountKeyResponseGetIdAttributeType, val GetServiceAccountKeyResponseGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetIdRetType = string /* @@ -108,20 +136,25 @@ type GetServiceAccountKeyResponseGetIdRetType = string // GetServiceAccountKeyResponseKeyAlgorithm the model 'GetServiceAccountKeyResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseKeyAlgorithm string // List of KeyAlgorithm const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead GETSERVICEACCOUNTKEYRESPONSEKEY_ALGORITHM__2048 GetServiceAccountKeyResponseKeyAlgorithm = "RSA_2048" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead GETSERVICEACCOUNTKEYRESPONSEKEY_ALGORITHM__4096 GetServiceAccountKeyResponseKeyAlgorithm = "RSA_4096" ) // All allowed values of GetServiceAccountKeyResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedGetServiceAccountKeyResponseKeyAlgorithmEnumValues = []GetServiceAccountKeyResponseKeyAlgorithm{ "RSA_2048", "RSA_4096", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *GetServiceAccountKeyResponseKeyAlgorithm) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -149,6 +182,7 @@ func (v *GetServiceAccountKeyResponseKeyAlgorithm) UnmarshalJSON(src []byte) err // NewGetServiceAccountKeyResponseKeyAlgorithmFromValue returns a pointer to a valid GetServiceAccountKeyResponseKeyAlgorithm // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetServiceAccountKeyResponseKeyAlgorithmFromValue(v GetServiceAccountKeyResponseKeyAlgorithm) (*GetServiceAccountKeyResponseKeyAlgorithm, error) { ev := GetServiceAccountKeyResponseKeyAlgorithm(v) if ev.IsValid() { @@ -159,6 +193,7 @@ func NewGetServiceAccountKeyResponseKeyAlgorithmFromValue(v GetServiceAccountKey } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v GetServiceAccountKeyResponseKeyAlgorithm) IsValid() bool { for _, existing := range AllowedGetServiceAccountKeyResponseKeyAlgorithmEnumValues { if existing == v { @@ -169,50 +204,65 @@ func (v GetServiceAccountKeyResponseKeyAlgorithm) IsValid() bool { } // Ptr returns reference to KeyAlgorithmKeyAlgorithm value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v GetServiceAccountKeyResponseKeyAlgorithm) Ptr() *GetServiceAccountKeyResponseKeyAlgorithm { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetServiceAccountKeyResponseKeyAlgorithm struct { value *GetServiceAccountKeyResponseKeyAlgorithm isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseKeyAlgorithm) Get() *GetServiceAccountKeyResponseKeyAlgorithm { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseKeyAlgorithm) Set(val *GetServiceAccountKeyResponseKeyAlgorithm) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseKeyAlgorithm) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseKeyAlgorithm) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetServiceAccountKeyResponseKeyAlgorithm(val *GetServiceAccountKeyResponseKeyAlgorithm) *NullableGetServiceAccountKeyResponseKeyAlgorithm { return &NullableGetServiceAccountKeyResponseKeyAlgorithm{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseKeyAlgorithm) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseKeyAlgorithm) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetKeyAlgorithmAttributeType = *GetServiceAccountKeyResponseKeyAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetKeyAlgorithmArgType = GetServiceAccountKeyResponseKeyAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetKeyAlgorithmRetType = GetServiceAccountKeyResponseKeyAlgorithm +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseGetKeyAlgorithmAttributeTypeOk(arg GetServiceAccountKeyResponseGetKeyAlgorithmAttributeType) (ret GetServiceAccountKeyResponseGetKeyAlgorithmRetType, ok bool) { if arg == nil { return ret, false @@ -220,6 +270,7 @@ func getGetServiceAccountKeyResponseGetKeyAlgorithmAttributeTypeOk(arg GetServic return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseGetKeyAlgorithmAttributeType(arg *GetServiceAccountKeyResponseGetKeyAlgorithmAttributeType, val GetServiceAccountKeyResponseGetKeyAlgorithmRetType) { *arg = &val } @@ -232,20 +283,25 @@ func setGetServiceAccountKeyResponseGetKeyAlgorithmAttributeType(arg *GetService // GetServiceAccountKeyResponseKeyOrigin the model 'GetServiceAccountKeyResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseKeyOrigin string // List of KeyOrigin const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead GETSERVICEACCOUNTKEYRESPONSEKEY_ORIGIN_USER_PROVIDED GetServiceAccountKeyResponseKeyOrigin = "USER_PROVIDED" - GETSERVICEACCOUNTKEYRESPONSEKEY_ORIGIN_GENERATED GetServiceAccountKeyResponseKeyOrigin = "GENERATED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + GETSERVICEACCOUNTKEYRESPONSEKEY_ORIGIN_GENERATED GetServiceAccountKeyResponseKeyOrigin = "GENERATED" ) // All allowed values of GetServiceAccountKeyResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedGetServiceAccountKeyResponseKeyOriginEnumValues = []GetServiceAccountKeyResponseKeyOrigin{ "USER_PROVIDED", "GENERATED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *GetServiceAccountKeyResponseKeyOrigin) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -273,6 +329,7 @@ func (v *GetServiceAccountKeyResponseKeyOrigin) UnmarshalJSON(src []byte) error // NewGetServiceAccountKeyResponseKeyOriginFromValue returns a pointer to a valid GetServiceAccountKeyResponseKeyOrigin // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetServiceAccountKeyResponseKeyOriginFromValue(v GetServiceAccountKeyResponseKeyOrigin) (*GetServiceAccountKeyResponseKeyOrigin, error) { ev := GetServiceAccountKeyResponseKeyOrigin(v) if ev.IsValid() { @@ -283,6 +340,7 @@ func NewGetServiceAccountKeyResponseKeyOriginFromValue(v GetServiceAccountKeyRes } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v GetServiceAccountKeyResponseKeyOrigin) IsValid() bool { for _, existing := range AllowedGetServiceAccountKeyResponseKeyOriginEnumValues { if existing == v { @@ -293,50 +351,65 @@ func (v GetServiceAccountKeyResponseKeyOrigin) IsValid() bool { } // Ptr returns reference to KeyOriginKeyOrigin value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v GetServiceAccountKeyResponseKeyOrigin) Ptr() *GetServiceAccountKeyResponseKeyOrigin { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetServiceAccountKeyResponseKeyOrigin struct { value *GetServiceAccountKeyResponseKeyOrigin isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseKeyOrigin) Get() *GetServiceAccountKeyResponseKeyOrigin { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseKeyOrigin) Set(val *GetServiceAccountKeyResponseKeyOrigin) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseKeyOrigin) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseKeyOrigin) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetServiceAccountKeyResponseKeyOrigin(val *GetServiceAccountKeyResponseKeyOrigin) *NullableGetServiceAccountKeyResponseKeyOrigin { return &NullableGetServiceAccountKeyResponseKeyOrigin{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseKeyOrigin) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseKeyOrigin) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetKeyOriginAttributeType = *GetServiceAccountKeyResponseKeyOrigin + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetKeyOriginArgType = GetServiceAccountKeyResponseKeyOrigin + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetKeyOriginRetType = GetServiceAccountKeyResponseKeyOrigin +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseGetKeyOriginAttributeTypeOk(arg GetServiceAccountKeyResponseGetKeyOriginAttributeType) (ret GetServiceAccountKeyResponseGetKeyOriginRetType, ok bool) { if arg == nil { return ret, false @@ -344,6 +417,7 @@ func getGetServiceAccountKeyResponseGetKeyOriginAttributeTypeOk(arg GetServiceAc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseGetKeyOriginAttributeType(arg *GetServiceAccountKeyResponseGetKeyOriginAttributeType, val GetServiceAccountKeyResponseGetKeyOriginRetType) { *arg = &val } @@ -356,20 +430,25 @@ func setGetServiceAccountKeyResponseGetKeyOriginAttributeType(arg *GetServiceAcc // GetServiceAccountKeyResponseKeyType the model 'GetServiceAccountKeyResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseKeyType string // List of KeyType const ( - GETSERVICEACCOUNTKEYRESPONSEKEY_TYPE_USER_MANAGED GetServiceAccountKeyResponseKeyType = "USER_MANAGED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + GETSERVICEACCOUNTKEYRESPONSEKEY_TYPE_USER_MANAGED GetServiceAccountKeyResponseKeyType = "USER_MANAGED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead GETSERVICEACCOUNTKEYRESPONSEKEY_TYPE_SYSTEM_MANAGED GetServiceAccountKeyResponseKeyType = "SYSTEM_MANAGED" ) // All allowed values of GetServiceAccountKeyResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedGetServiceAccountKeyResponseKeyTypeEnumValues = []GetServiceAccountKeyResponseKeyType{ "USER_MANAGED", "SYSTEM_MANAGED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *GetServiceAccountKeyResponseKeyType) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -397,6 +476,7 @@ func (v *GetServiceAccountKeyResponseKeyType) UnmarshalJSON(src []byte) error { // NewGetServiceAccountKeyResponseKeyTypeFromValue returns a pointer to a valid GetServiceAccountKeyResponseKeyType // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetServiceAccountKeyResponseKeyTypeFromValue(v GetServiceAccountKeyResponseKeyType) (*GetServiceAccountKeyResponseKeyType, error) { ev := GetServiceAccountKeyResponseKeyType(v) if ev.IsValid() { @@ -407,6 +487,7 @@ func NewGetServiceAccountKeyResponseKeyTypeFromValue(v GetServiceAccountKeyRespo } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v GetServiceAccountKeyResponseKeyType) IsValid() bool { for _, existing := range AllowedGetServiceAccountKeyResponseKeyTypeEnumValues { if existing == v { @@ -417,50 +498,65 @@ func (v GetServiceAccountKeyResponseKeyType) IsValid() bool { } // Ptr returns reference to KeyTypeKeyType value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v GetServiceAccountKeyResponseKeyType) Ptr() *GetServiceAccountKeyResponseKeyType { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetServiceAccountKeyResponseKeyType struct { value *GetServiceAccountKeyResponseKeyType isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseKeyType) Get() *GetServiceAccountKeyResponseKeyType { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseKeyType) Set(val *GetServiceAccountKeyResponseKeyType) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseKeyType) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseKeyType) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetServiceAccountKeyResponseKeyType(val *GetServiceAccountKeyResponseKeyType) *NullableGetServiceAccountKeyResponseKeyType { return &NullableGetServiceAccountKeyResponseKeyType{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseKeyType) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseKeyType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetKeyTypeAttributeType = *GetServiceAccountKeyResponseKeyType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetKeyTypeArgType = GetServiceAccountKeyResponseKeyType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetKeyTypeRetType = GetServiceAccountKeyResponseKeyType +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseGetKeyTypeAttributeTypeOk(arg GetServiceAccountKeyResponseGetKeyTypeAttributeType) (ret GetServiceAccountKeyResponseGetKeyTypeRetType, ok bool) { if arg == nil { return ret, false @@ -468,6 +564,7 @@ func getGetServiceAccountKeyResponseGetKeyTypeAttributeTypeOk(arg GetServiceAcco return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseGetKeyTypeAttributeType(arg *GetServiceAccountKeyResponseGetKeyTypeAttributeType, val GetServiceAccountKeyResponseGetKeyTypeRetType) { *arg = &val } @@ -477,8 +574,10 @@ func setGetServiceAccountKeyResponseGetKeyTypeAttributeType(arg *GetServiceAccou */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetPublicKeyAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseGetPublicKeyAttributeTypeOk(arg GetServiceAccountKeyResponseGetPublicKeyAttributeType) (ret GetServiceAccountKeyResponseGetPublicKeyRetType, ok bool) { if arg == nil { return ret, false @@ -486,11 +585,15 @@ func getGetServiceAccountKeyResponseGetPublicKeyAttributeTypeOk(arg GetServiceAc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseGetPublicKeyAttributeType(arg *GetServiceAccountKeyResponseGetPublicKeyAttributeType, val GetServiceAccountKeyResponseGetPublicKeyRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetPublicKeyArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetPublicKeyRetType = string /* @@ -498,10 +601,16 @@ type GetServiceAccountKeyResponseGetPublicKeyRetType = string */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetValidUntilAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetValidUntilArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseGetValidUntilRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseGetValidUntilAttributeTypeOk(arg GetServiceAccountKeyResponseGetValidUntilAttributeType) (ret GetServiceAccountKeyResponseGetValidUntilRetType, ok bool) { if arg == nil { return ret, false @@ -509,11 +618,13 @@ func getGetServiceAccountKeyResponseGetValidUntilAttributeTypeOk(arg GetServiceA return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseGetValidUntilAttributeType(arg *GetServiceAccountKeyResponseGetValidUntilAttributeType, val GetServiceAccountKeyResponseGetValidUntilRetType) { *arg = &val } // GetServiceAccountKeyResponse struct for GetServiceAccountKeyResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponse struct { // REQUIRED Active GetServiceAccountKeyResponsegetActiveAttributeType `json:"active" required:"true"` @@ -537,12 +648,14 @@ type GetServiceAccountKeyResponse struct { ValidUntil GetServiceAccountKeyResponseGetValidUntilAttributeType `json:"validUntil,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _GetServiceAccountKeyResponse GetServiceAccountKeyResponse // NewGetServiceAccountKeyResponse instantiates a new GetServiceAccountKeyResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetServiceAccountKeyResponse(active GetServiceAccountKeyResponsegetActiveArgType, createdAt GetServiceAccountKeyResponseGetCreatedAtArgType, credentials GetServiceAccountKeyResponseGetCredentialsArgType, id GetServiceAccountKeyResponseGetIdArgType, keyAlgorithm GetServiceAccountKeyResponseGetKeyAlgorithmArgType, keyOrigin GetServiceAccountKeyResponseGetKeyOriginArgType, keyType GetServiceAccountKeyResponseGetKeyTypeArgType) *GetServiceAccountKeyResponse { this := GetServiceAccountKeyResponse{} setGetServiceAccountKeyResponsegetActiveAttributeType(&this.Active, active) @@ -558,12 +671,14 @@ func NewGetServiceAccountKeyResponse(active GetServiceAccountKeyResponsegetActiv // NewGetServiceAccountKeyResponseWithDefaults instantiates a new GetServiceAccountKeyResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetServiceAccountKeyResponseWithDefaults() *GetServiceAccountKeyResponse { this := GetServiceAccountKeyResponse{} return &this } // GetActive returns the Active field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetActive() (ret GetServiceAccountKeyResponsegetActiveRetType) { ret, _ = o.GetActiveOk() return ret @@ -571,16 +686,19 @@ func (o *GetServiceAccountKeyResponse) GetActive() (ret GetServiceAccountKeyResp // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetActiveOk() (ret GetServiceAccountKeyResponsegetActiveRetType, ok bool) { return getGetServiceAccountKeyResponsegetActiveAttributeTypeOk(o.Active) } // SetActive sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) SetActive(v GetServiceAccountKeyResponsegetActiveRetType) { setGetServiceAccountKeyResponsegetActiveAttributeType(&o.Active, v) } // GetCreatedAt returns the CreatedAt field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetCreatedAt() (ret GetServiceAccountKeyResponseGetCreatedAtRetType) { ret, _ = o.GetCreatedAtOk() return ret @@ -588,16 +706,19 @@ func (o *GetServiceAccountKeyResponse) GetCreatedAt() (ret GetServiceAccountKeyR // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetCreatedAtOk() (ret GetServiceAccountKeyResponseGetCreatedAtRetType, ok bool) { return getGetServiceAccountKeyResponseGetCreatedAtAttributeTypeOk(o.CreatedAt) } // SetCreatedAt sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) SetCreatedAt(v GetServiceAccountKeyResponseGetCreatedAtRetType) { setGetServiceAccountKeyResponseGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetCredentials returns the Credentials field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetCredentials() (ret GetServiceAccountKeyResponseGetCredentialsRetType) { ret, _ = o.GetCredentialsOk() return ret @@ -605,16 +726,19 @@ func (o *GetServiceAccountKeyResponse) GetCredentials() (ret GetServiceAccountKe // GetCredentialsOk returns a tuple with the Credentials field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetCredentialsOk() (ret GetServiceAccountKeyResponseGetCredentialsRetType, ok bool) { return getGetServiceAccountKeyResponseGetCredentialsAttributeTypeOk(o.Credentials) } // SetCredentials sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) SetCredentials(v GetServiceAccountKeyResponseGetCredentialsRetType) { setGetServiceAccountKeyResponseGetCredentialsAttributeType(&o.Credentials, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetId() (ret GetServiceAccountKeyResponseGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -622,16 +746,19 @@ func (o *GetServiceAccountKeyResponse) GetId() (ret GetServiceAccountKeyResponse // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetIdOk() (ret GetServiceAccountKeyResponseGetIdRetType, ok bool) { return getGetServiceAccountKeyResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) SetId(v GetServiceAccountKeyResponseGetIdRetType) { setGetServiceAccountKeyResponseGetIdAttributeType(&o.Id, v) } // GetKeyAlgorithm returns the KeyAlgorithm field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetKeyAlgorithm() (ret GetServiceAccountKeyResponseGetKeyAlgorithmRetType) { ret, _ = o.GetKeyAlgorithmOk() return ret @@ -639,16 +766,19 @@ func (o *GetServiceAccountKeyResponse) GetKeyAlgorithm() (ret GetServiceAccountK // GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetKeyAlgorithmOk() (ret GetServiceAccountKeyResponseGetKeyAlgorithmRetType, ok bool) { return getGetServiceAccountKeyResponseGetKeyAlgorithmAttributeTypeOk(o.KeyAlgorithm) } // SetKeyAlgorithm sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) SetKeyAlgorithm(v GetServiceAccountKeyResponseGetKeyAlgorithmRetType) { setGetServiceAccountKeyResponseGetKeyAlgorithmAttributeType(&o.KeyAlgorithm, v) } // GetKeyOrigin returns the KeyOrigin field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetKeyOrigin() (ret GetServiceAccountKeyResponseGetKeyOriginRetType) { ret, _ = o.GetKeyOriginOk() return ret @@ -656,16 +786,19 @@ func (o *GetServiceAccountKeyResponse) GetKeyOrigin() (ret GetServiceAccountKeyR // GetKeyOriginOk returns a tuple with the KeyOrigin field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetKeyOriginOk() (ret GetServiceAccountKeyResponseGetKeyOriginRetType, ok bool) { return getGetServiceAccountKeyResponseGetKeyOriginAttributeTypeOk(o.KeyOrigin) } // SetKeyOrigin sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) SetKeyOrigin(v GetServiceAccountKeyResponseGetKeyOriginRetType) { setGetServiceAccountKeyResponseGetKeyOriginAttributeType(&o.KeyOrigin, v) } // GetKeyType returns the KeyType field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetKeyType() (ret GetServiceAccountKeyResponseGetKeyTypeRetType) { ret, _ = o.GetKeyTypeOk() return ret @@ -673,16 +806,19 @@ func (o *GetServiceAccountKeyResponse) GetKeyType() (ret GetServiceAccountKeyRes // GetKeyTypeOk returns a tuple with the KeyType field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetKeyTypeOk() (ret GetServiceAccountKeyResponseGetKeyTypeRetType, ok bool) { return getGetServiceAccountKeyResponseGetKeyTypeAttributeTypeOk(o.KeyType) } // SetKeyType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) SetKeyType(v GetServiceAccountKeyResponseGetKeyTypeRetType) { setGetServiceAccountKeyResponseGetKeyTypeAttributeType(&o.KeyType, v) } // GetPublicKey returns the PublicKey field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetPublicKey() (res GetServiceAccountKeyResponseGetPublicKeyRetType) { res, _ = o.GetPublicKeyOk() return @@ -690,22 +826,26 @@ func (o *GetServiceAccountKeyResponse) GetPublicKey() (res GetServiceAccountKeyR // GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetPublicKeyOk() (ret GetServiceAccountKeyResponseGetPublicKeyRetType, ok bool) { return getGetServiceAccountKeyResponseGetPublicKeyAttributeTypeOk(o.PublicKey) } // HasPublicKey returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) HasPublicKey() bool { _, ok := o.GetPublicKeyOk() return ok } // SetPublicKey gets a reference to the given string and assigns it to the PublicKey field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) SetPublicKey(v GetServiceAccountKeyResponseGetPublicKeyRetType) { setGetServiceAccountKeyResponseGetPublicKeyAttributeType(&o.PublicKey, v) } // GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetValidUntil() (res GetServiceAccountKeyResponseGetValidUntilRetType) { res, _ = o.GetValidUntilOk() return @@ -713,21 +853,25 @@ func (o *GetServiceAccountKeyResponse) GetValidUntil() (res GetServiceAccountKey // GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) GetValidUntilOk() (ret GetServiceAccountKeyResponseGetValidUntilRetType, ok bool) { return getGetServiceAccountKeyResponseGetValidUntilAttributeTypeOk(o.ValidUntil) } // HasValidUntil returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) HasValidUntil() bool { _, ok := o.GetValidUntilOk() return ok } // SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponse) SetValidUntil(v GetServiceAccountKeyResponseGetValidUntilRetType) { setGetServiceAccountKeyResponseGetValidUntilAttributeType(&o.ValidUntil, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetServiceAccountKeyResponsegetActiveAttributeTypeOk(o.Active); ok { @@ -760,37 +904,45 @@ func (o GetServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetServiceAccountKeyResponse struct { value *GetServiceAccountKeyResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponse) Get() *GetServiceAccountKeyResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponse) Set(val *GetServiceAccountKeyResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetServiceAccountKeyResponse(val *GetServiceAccountKeyResponse) *NullableGetServiceAccountKeyResponse { return &NullableGetServiceAccountKeyResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_get_service_account_key_response_credentials.go b/services/serviceaccount/model_get_service_account_key_response_credentials.go index c888e4b1f..c2665de05 100644 --- a/services/serviceaccount/model_get_service_account_key_response_credentials.go +++ b/services/serviceaccount/model_get_service_account_key_response_credentials.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &GetServiceAccountKeyResponseCredentials{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetAudAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseCredentialsGetAudAttributeTypeOk(arg GetServiceAccountKeyResponseCredentialsGetAudAttributeType) (ret GetServiceAccountKeyResponseCredentialsGetAudRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getGetServiceAccountKeyResponseCredentialsGetAudAttributeTypeOk(arg GetServ return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseCredentialsGetAudAttributeType(arg *GetServiceAccountKeyResponseCredentialsGetAudAttributeType, val GetServiceAccountKeyResponseCredentialsGetAudRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetAudArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetAudRetType = string /* @@ -43,8 +50,10 @@ type GetServiceAccountKeyResponseCredentialsGetAudRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetIssAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseCredentialsGetIssAttributeTypeOk(arg GetServiceAccountKeyResponseCredentialsGetIssAttributeType) (ret GetServiceAccountKeyResponseCredentialsGetIssRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getGetServiceAccountKeyResponseCredentialsGetIssAttributeTypeOk(arg GetServ return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseCredentialsGetIssAttributeType(arg *GetServiceAccountKeyResponseCredentialsGetIssAttributeType, val GetServiceAccountKeyResponseCredentialsGetIssRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetIssArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetIssRetType = string /* @@ -64,8 +77,10 @@ type GetServiceAccountKeyResponseCredentialsGetIssRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetKidAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseCredentialsGetKidAttributeTypeOk(arg GetServiceAccountKeyResponseCredentialsGetKidAttributeType) (ret GetServiceAccountKeyResponseCredentialsGetKidRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +88,15 @@ func getGetServiceAccountKeyResponseCredentialsGetKidAttributeTypeOk(arg GetServ return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseCredentialsGetKidAttributeType(arg *GetServiceAccountKeyResponseCredentialsGetKidAttributeType, val GetServiceAccountKeyResponseCredentialsGetKidRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetKidArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetKidRetType = string /* @@ -85,8 +104,10 @@ type GetServiceAccountKeyResponseCredentialsGetKidRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetSubAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetServiceAccountKeyResponseCredentialsGetSubAttributeTypeOk(arg GetServiceAccountKeyResponseCredentialsGetSubAttributeType) (ret GetServiceAccountKeyResponseCredentialsGetSubRetType, ok bool) { if arg == nil { return ret, false @@ -94,14 +115,19 @@ func getGetServiceAccountKeyResponseCredentialsGetSubAttributeTypeOk(arg GetServ return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetServiceAccountKeyResponseCredentialsGetSubAttributeType(arg *GetServiceAccountKeyResponseCredentialsGetSubAttributeType, val GetServiceAccountKeyResponseCredentialsGetSubRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetSubArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentialsGetSubRetType = string // GetServiceAccountKeyResponseCredentials struct for GetServiceAccountKeyResponseCredentials +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetServiceAccountKeyResponseCredentials struct { // Audience - service account API URL // REQUIRED @@ -117,12 +143,14 @@ type GetServiceAccountKeyResponseCredentials struct { Sub GetServiceAccountKeyResponseCredentialsGetSubAttributeType `json:"sub" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _GetServiceAccountKeyResponseCredentials GetServiceAccountKeyResponseCredentials // NewGetServiceAccountKeyResponseCredentials instantiates a new GetServiceAccountKeyResponseCredentials 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetServiceAccountKeyResponseCredentials(aud GetServiceAccountKeyResponseCredentialsGetAudArgType, iss GetServiceAccountKeyResponseCredentialsGetIssArgType, kid GetServiceAccountKeyResponseCredentialsGetKidArgType, sub GetServiceAccountKeyResponseCredentialsGetSubArgType) *GetServiceAccountKeyResponseCredentials { this := GetServiceAccountKeyResponseCredentials{} setGetServiceAccountKeyResponseCredentialsGetAudAttributeType(&this.Aud, aud) @@ -135,12 +163,14 @@ func NewGetServiceAccountKeyResponseCredentials(aud GetServiceAccountKeyResponse // NewGetServiceAccountKeyResponseCredentialsWithDefaults instantiates a new GetServiceAccountKeyResponseCredentials 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetServiceAccountKeyResponseCredentialsWithDefaults() *GetServiceAccountKeyResponseCredentials { this := GetServiceAccountKeyResponseCredentials{} return &this } // GetAud returns the Aud field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) GetAud() (ret GetServiceAccountKeyResponseCredentialsGetAudRetType) { ret, _ = o.GetAudOk() return ret @@ -148,16 +178,19 @@ func (o *GetServiceAccountKeyResponseCredentials) GetAud() (ret GetServiceAccoun // GetAudOk returns a tuple with the Aud field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) GetAudOk() (ret GetServiceAccountKeyResponseCredentialsGetAudRetType, ok bool) { return getGetServiceAccountKeyResponseCredentialsGetAudAttributeTypeOk(o.Aud) } // SetAud sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) SetAud(v GetServiceAccountKeyResponseCredentialsGetAudRetType) { setGetServiceAccountKeyResponseCredentialsGetAudAttributeType(&o.Aud, v) } // GetIss returns the Iss field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) GetIss() (ret GetServiceAccountKeyResponseCredentialsGetIssRetType) { ret, _ = o.GetIssOk() return ret @@ -165,16 +198,19 @@ func (o *GetServiceAccountKeyResponseCredentials) GetIss() (ret GetServiceAccoun // GetIssOk returns a tuple with the Iss field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) GetIssOk() (ret GetServiceAccountKeyResponseCredentialsGetIssRetType, ok bool) { return getGetServiceAccountKeyResponseCredentialsGetIssAttributeTypeOk(o.Iss) } // SetIss sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) SetIss(v GetServiceAccountKeyResponseCredentialsGetIssRetType) { setGetServiceAccountKeyResponseCredentialsGetIssAttributeType(&o.Iss, v) } // GetKid returns the Kid field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) GetKid() (ret GetServiceAccountKeyResponseCredentialsGetKidRetType) { ret, _ = o.GetKidOk() return ret @@ -182,16 +218,19 @@ func (o *GetServiceAccountKeyResponseCredentials) GetKid() (ret GetServiceAccoun // GetKidOk returns a tuple with the Kid field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) GetKidOk() (ret GetServiceAccountKeyResponseCredentialsGetKidRetType, ok bool) { return getGetServiceAccountKeyResponseCredentialsGetKidAttributeTypeOk(o.Kid) } // SetKid sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) SetKid(v GetServiceAccountKeyResponseCredentialsGetKidRetType) { setGetServiceAccountKeyResponseCredentialsGetKidAttributeType(&o.Kid, v) } // GetSub returns the Sub field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) GetSub() (ret GetServiceAccountKeyResponseCredentialsGetSubRetType) { ret, _ = o.GetSubOk() return ret @@ -199,15 +238,18 @@ func (o *GetServiceAccountKeyResponseCredentials) GetSub() (ret GetServiceAccoun // GetSubOk returns a tuple with the Sub field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) GetSubOk() (ret GetServiceAccountKeyResponseCredentialsGetSubRetType, ok bool) { return getGetServiceAccountKeyResponseCredentialsGetSubAttributeTypeOk(o.Sub) } // SetSub sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetServiceAccountKeyResponseCredentials) SetSub(v GetServiceAccountKeyResponseCredentialsGetSubRetType) { setGetServiceAccountKeyResponseCredentialsGetSubAttributeType(&o.Sub, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetServiceAccountKeyResponseCredentials) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetServiceAccountKeyResponseCredentialsGetAudAttributeTypeOk(o.Aud); ok { @@ -225,37 +267,45 @@ func (o GetServiceAccountKeyResponseCredentials) ToMap() (map[string]interface{} return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetServiceAccountKeyResponseCredentials struct { value *GetServiceAccountKeyResponseCredentials isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseCredentials) Get() *GetServiceAccountKeyResponseCredentials { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseCredentials) Set(val *GetServiceAccountKeyResponseCredentials) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseCredentials) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseCredentials) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetServiceAccountKeyResponseCredentials(val *GetServiceAccountKeyResponseCredentials) *NullableGetServiceAccountKeyResponseCredentials { return &NullableGetServiceAccountKeyResponseCredentials{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetServiceAccountKeyResponseCredentials) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetServiceAccountKeyResponseCredentials) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_jwk.go b/services/serviceaccount/model_jwk.go index fa0554009..3434ec293 100644 --- a/services/serviceaccount/model_jwk.go +++ b/services/serviceaccount/model_jwk.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &JWK{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetAlgAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetAlgAttributeTypeOk(arg JWKGetAlgAttributeType) (ret JWKGetAlgRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getJWKGetAlgAttributeTypeOk(arg JWKGetAlgAttributeType) (ret JWKGetAlgRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetAlgAttributeType(arg *JWKGetAlgAttributeType, val JWKGetAlgRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetAlgArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetAlgRetType = string /* @@ -43,8 +50,10 @@ type JWKGetAlgRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetEAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetEAttributeTypeOk(arg JWKGetEAttributeType) (ret JWKGetERetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getJWKGetEAttributeTypeOk(arg JWKGetEAttributeType) (ret JWKGetERetType, ok return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetEAttributeType(arg *JWKGetEAttributeType, val JWKGetERetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetEArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetERetType = string /* @@ -64,8 +77,10 @@ type JWKGetERetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetKidAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetKidAttributeTypeOk(arg JWKGetKidAttributeType) (ret JWKGetKidRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +88,15 @@ func getJWKGetKidAttributeTypeOk(arg JWKGetKidAttributeType) (ret JWKGetKidRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetKidAttributeType(arg *JWKGetKidAttributeType, val JWKGetKidRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetKidArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetKidRetType = string /* @@ -85,8 +104,10 @@ type JWKGetKidRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetKsAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetKsAttributeTypeOk(arg JWKGetKsAttributeType) (ret JWKGetKsRetType, ok bool) { if arg == nil { return ret, false @@ -94,11 +115,15 @@ func getJWKGetKsAttributeTypeOk(arg JWKGetKsAttributeType) (ret JWKGetKsRetType, return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetKsAttributeType(arg *JWKGetKsAttributeType, val JWKGetKsRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetKsArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetKsRetType = string /* @@ -106,8 +131,10 @@ type JWKGetKsRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetNAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetNAttributeTypeOk(arg JWKGetNAttributeType) (ret JWKGetNRetType, ok bool) { if arg == nil { return ret, false @@ -115,11 +142,15 @@ func getJWKGetNAttributeTypeOk(arg JWKGetNAttributeType) (ret JWKGetNRetType, ok return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetNAttributeType(arg *JWKGetNAttributeType, val JWKGetNRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetNArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetNRetType = string /* @@ -127,8 +158,10 @@ type JWKGetNRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetOpsAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetOpsAttributeTypeOk(arg JWKGetOpsAttributeType) (ret JWKGetOpsRetType, ok bool) { if arg == nil { return ret, false @@ -136,11 +169,15 @@ func getJWKGetOpsAttributeTypeOk(arg JWKGetOpsAttributeType) (ret JWKGetOpsRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetOpsAttributeType(arg *JWKGetOpsAttributeType, val JWKGetOpsRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetOpsArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetOpsRetType = string /* @@ -148,8 +185,10 @@ type JWKGetOpsRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetUseAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetUseAttributeTypeOk(arg JWKGetUseAttributeType) (ret JWKGetUseRetType, ok bool) { if arg == nil { return ret, false @@ -157,11 +196,15 @@ func getJWKGetUseAttributeTypeOk(arg JWKGetUseAttributeType) (ret JWKGetUseRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetUseAttributeType(arg *JWKGetUseAttributeType, val JWKGetUseRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetUseArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetUseRetType = string /* @@ -169,8 +212,10 @@ type JWKGetUseRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5cAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetX5cAttributeTypeOk(arg JWKGetX5cAttributeType) (ret JWKGetX5cRetType, ok bool) { if arg == nil { return ret, false @@ -178,11 +223,15 @@ func getJWKGetX5cAttributeTypeOk(arg JWKGetX5cAttributeType) (ret JWKGetX5cRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetX5cAttributeType(arg *JWKGetX5cAttributeType, val JWKGetX5cRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5cArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5cRetType = string /* @@ -190,8 +239,10 @@ type JWKGetX5cRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5tAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetX5tAttributeTypeOk(arg JWKGetX5tAttributeType) (ret JWKGetX5tRetType, ok bool) { if arg == nil { return ret, false @@ -199,11 +250,15 @@ func getJWKGetX5tAttributeTypeOk(arg JWKGetX5tAttributeType) (ret JWKGetX5tRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetX5tAttributeType(arg *JWKGetX5tAttributeType, val JWKGetX5tRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5tArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5tRetType = string /* @@ -211,8 +266,10 @@ type JWKGetX5tRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5t256AttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetX5t256AttributeTypeOk(arg JWKGetX5t256AttributeType) (ret JWKGetX5t256RetType, ok bool) { if arg == nil { return ret, false @@ -220,11 +277,15 @@ func getJWKGetX5t256AttributeTypeOk(arg JWKGetX5t256AttributeType) (ret JWKGetX5 return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetX5t256AttributeType(arg *JWKGetX5t256AttributeType, val JWKGetX5t256RetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5t256ArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5t256RetType = string /* @@ -232,8 +293,10 @@ type JWKGetX5t256RetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5uAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKGetX5uAttributeTypeOk(arg JWKGetX5uAttributeType) (ret JWKGetX5uRetType, ok bool) { if arg == nil { return ret, false @@ -241,14 +304,19 @@ func getJWKGetX5uAttributeTypeOk(arg JWKGetX5uAttributeType) (ret JWKGetX5uRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKGetX5uAttributeType(arg *JWKGetX5uAttributeType, val JWKGetX5uRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5uArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKGetX5uRetType = string // JWK JSON Web Key according to https://datatracker.ietf.org/doc/html/rfc7517#section-4 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWK struct { Alg JWKGetAlgAttributeType `json:"alg,omitempty"` // REQUIRED @@ -265,12 +333,14 @@ type JWK struct { X5u JWKGetX5uAttributeType `json:"x5u,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _JWK JWK // NewJWK instantiates a new JWK 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewJWK(e JWKGetEArgType, n JWKGetNArgType) *JWK { this := JWK{} setJWKGetEAttributeType(&this.E, e) @@ -281,12 +351,14 @@ func NewJWK(e JWKGetEArgType, n JWKGetNArgType) *JWK { // NewJWKWithDefaults instantiates a new JWK 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewJWKWithDefaults() *JWK { this := JWK{} return &this } // GetAlg returns the Alg field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetAlg() (res JWKGetAlgRetType) { res, _ = o.GetAlgOk() return @@ -294,22 +366,26 @@ func (o *JWK) GetAlg() (res JWKGetAlgRetType) { // GetAlgOk returns a tuple with the Alg field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetAlgOk() (ret JWKGetAlgRetType, ok bool) { return getJWKGetAlgAttributeTypeOk(o.Alg) } // HasAlg returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) HasAlg() bool { _, ok := o.GetAlgOk() return ok } // SetAlg gets a reference to the given string and assigns it to the Alg field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetAlg(v JWKGetAlgRetType) { setJWKGetAlgAttributeType(&o.Alg, v) } // GetE returns the E field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetE() (ret JWKGetERetType) { ret, _ = o.GetEOk() return ret @@ -317,16 +393,19 @@ func (o *JWK) GetE() (ret JWKGetERetType) { // GetEOk returns a tuple with the E field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetEOk() (ret JWKGetERetType, ok bool) { return getJWKGetEAttributeTypeOk(o.E) } // SetE sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetE(v JWKGetERetType) { setJWKGetEAttributeType(&o.E, v) } // GetKid returns the Kid field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetKid() (res JWKGetKidRetType) { res, _ = o.GetKidOk() return @@ -334,22 +413,26 @@ func (o *JWK) GetKid() (res JWKGetKidRetType) { // GetKidOk returns a tuple with the Kid field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetKidOk() (ret JWKGetKidRetType, ok bool) { return getJWKGetKidAttributeTypeOk(o.Kid) } // HasKid returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) HasKid() bool { _, ok := o.GetKidOk() return ok } // SetKid gets a reference to the given string and assigns it to the Kid field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetKid(v JWKGetKidRetType) { setJWKGetKidAttributeType(&o.Kid, v) } // GetKs returns the Ks field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetKs() (res JWKGetKsRetType) { res, _ = o.GetKsOk() return @@ -357,22 +440,26 @@ func (o *JWK) GetKs() (res JWKGetKsRetType) { // GetKsOk returns a tuple with the Ks field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetKsOk() (ret JWKGetKsRetType, ok bool) { return getJWKGetKsAttributeTypeOk(o.Ks) } // HasKs returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) HasKs() bool { _, ok := o.GetKsOk() return ok } // SetKs gets a reference to the given string and assigns it to the Ks field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetKs(v JWKGetKsRetType) { setJWKGetKsAttributeType(&o.Ks, v) } // GetN returns the N field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetN() (ret JWKGetNRetType) { ret, _ = o.GetNOk() return ret @@ -380,16 +467,19 @@ func (o *JWK) GetN() (ret JWKGetNRetType) { // GetNOk returns a tuple with the N field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetNOk() (ret JWKGetNRetType, ok bool) { return getJWKGetNAttributeTypeOk(o.N) } // SetN sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetN(v JWKGetNRetType) { setJWKGetNAttributeType(&o.N, v) } // GetOps returns the Ops field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetOps() (res JWKGetOpsRetType) { res, _ = o.GetOpsOk() return @@ -397,22 +487,26 @@ func (o *JWK) GetOps() (res JWKGetOpsRetType) { // GetOpsOk returns a tuple with the Ops field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetOpsOk() (ret JWKGetOpsRetType, ok bool) { return getJWKGetOpsAttributeTypeOk(o.Ops) } // HasOps returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) HasOps() bool { _, ok := o.GetOpsOk() return ok } // SetOps gets a reference to the given string and assigns it to the Ops field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetOps(v JWKGetOpsRetType) { setJWKGetOpsAttributeType(&o.Ops, v) } // GetUse returns the Use field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetUse() (res JWKGetUseRetType) { res, _ = o.GetUseOk() return @@ -420,22 +514,26 @@ func (o *JWK) GetUse() (res JWKGetUseRetType) { // GetUseOk returns a tuple with the Use field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetUseOk() (ret JWKGetUseRetType, ok bool) { return getJWKGetUseAttributeTypeOk(o.Use) } // HasUse returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) HasUse() bool { _, ok := o.GetUseOk() return ok } // SetUse gets a reference to the given string and assigns it to the Use field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetUse(v JWKGetUseRetType) { setJWKGetUseAttributeType(&o.Use, v) } // GetX5c returns the X5c field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetX5c() (res JWKGetX5cRetType) { res, _ = o.GetX5cOk() return @@ -443,22 +541,26 @@ func (o *JWK) GetX5c() (res JWKGetX5cRetType) { // GetX5cOk returns a tuple with the X5c field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetX5cOk() (ret JWKGetX5cRetType, ok bool) { return getJWKGetX5cAttributeTypeOk(o.X5c) } // HasX5c returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) HasX5c() bool { _, ok := o.GetX5cOk() return ok } // SetX5c gets a reference to the given string and assigns it to the X5c field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetX5c(v JWKGetX5cRetType) { setJWKGetX5cAttributeType(&o.X5c, v) } // GetX5t returns the X5t field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetX5t() (res JWKGetX5tRetType) { res, _ = o.GetX5tOk() return @@ -466,22 +568,26 @@ func (o *JWK) GetX5t() (res JWKGetX5tRetType) { // GetX5tOk returns a tuple with the X5t field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetX5tOk() (ret JWKGetX5tRetType, ok bool) { return getJWKGetX5tAttributeTypeOk(o.X5t) } // HasX5t returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) HasX5t() bool { _, ok := o.GetX5tOk() return ok } // SetX5t gets a reference to the given string and assigns it to the X5t field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetX5t(v JWKGetX5tRetType) { setJWKGetX5tAttributeType(&o.X5t, v) } // GetX5t256 returns the X5t256 field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetX5t256() (res JWKGetX5t256RetType) { res, _ = o.GetX5t256Ok() return @@ -489,22 +595,26 @@ func (o *JWK) GetX5t256() (res JWKGetX5t256RetType) { // GetX5t256Ok returns a tuple with the X5t256 field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetX5t256Ok() (ret JWKGetX5t256RetType, ok bool) { return getJWKGetX5t256AttributeTypeOk(o.X5t256) } // HasX5t256 returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) HasX5t256() bool { _, ok := o.GetX5t256Ok() return ok } // SetX5t256 gets a reference to the given string and assigns it to the X5t256 field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetX5t256(v JWKGetX5t256RetType) { setJWKGetX5t256AttributeType(&o.X5t256, v) } // GetX5u returns the X5u field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetX5u() (res JWKGetX5uRetType) { res, _ = o.GetX5uOk() return @@ -512,21 +622,25 @@ func (o *JWK) GetX5u() (res JWKGetX5uRetType) { // GetX5uOk returns a tuple with the X5u field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) GetX5uOk() (ret JWKGetX5uRetType, ok bool) { return getJWKGetX5uAttributeTypeOk(o.X5u) } // HasX5u returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) HasX5u() bool { _, ok := o.GetX5uOk() return ok } // SetX5u gets a reference to the given string and assigns it to the X5u field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWK) SetX5u(v JWKGetX5uRetType) { setJWKGetX5uAttributeType(&o.X5u, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o JWK) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getJWKGetAlgAttributeTypeOk(o.Alg); ok { @@ -565,37 +679,45 @@ func (o JWK) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableJWK struct { value *JWK isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableJWK) Get() *JWK { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableJWK) Set(val *JWK) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableJWK) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableJWK) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableJWK(val *JWK) *NullableJWK { return &NullableJWK{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableJWK) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableJWK) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_jwks.go b/services/serviceaccount/model_jwks.go index 56ee9b913..0b476c8c1 100644 --- a/services/serviceaccount/model_jwks.go +++ b/services/serviceaccount/model_jwks.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &JWKS{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKSGetKeysAttributeType = *[]JWK + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKSGetKeysArgType = []JWK + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKSGetKeysRetType = []JWK +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getJWKSGetKeysAttributeTypeOk(arg JWKSGetKeysAttributeType) (ret JWKSGetKeysRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getJWKSGetKeysAttributeTypeOk(arg JWKSGetKeysAttributeType) (ret JWKSGetKey return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setJWKSGetKeysAttributeType(arg *JWKSGetKeysAttributeType, val JWKSGetKeysRetType) { *arg = &val } // JWKS struct for JWKS +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type JWKS struct { // REQUIRED Keys JWKSGetKeysAttributeType `json:"keys" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _JWKS JWKS // NewJWKS instantiates a new JWKS 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewJWKS(keys JWKSGetKeysArgType) *JWKS { this := JWKS{} setJWKSGetKeysAttributeType(&this.Keys, keys) @@ -58,12 +69,14 @@ func NewJWKS(keys JWKSGetKeysArgType) *JWKS { // NewJWKSWithDefaults instantiates a new JWKS 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewJWKSWithDefaults() *JWKS { this := JWKS{} return &this } // GetKeys returns the Keys field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWKS) GetKeys() (ret JWKSGetKeysRetType) { ret, _ = o.GetKeysOk() return ret @@ -71,15 +84,18 @@ func (o *JWKS) GetKeys() (ret JWKSGetKeysRetType) { // GetKeysOk returns a tuple with the Keys field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWKS) GetKeysOk() (ret JWKSGetKeysRetType, ok bool) { return getJWKSGetKeysAttributeTypeOk(o.Keys) } // SetKeys sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *JWKS) SetKeys(v JWKSGetKeysRetType) { setJWKSGetKeysAttributeType(&o.Keys, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o JWKS) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getJWKSGetKeysAttributeTypeOk(o.Keys); ok { @@ -88,37 +104,45 @@ func (o JWKS) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableJWKS struct { value *JWKS isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableJWKS) Get() *JWKS { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableJWKS) Set(val *JWKS) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableJWKS) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableJWKS) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableJWKS(val *JWKS) *NullableJWKS { return &NullableJWKS{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableJWKS) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableJWKS) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_list_access_tokens_response.go b/services/serviceaccount/model_list_access_tokens_response.go index 498b91bae..d19c50042 100644 --- a/services/serviceaccount/model_list_access_tokens_response.go +++ b/services/serviceaccount/model_list_access_tokens_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListAccessTokensResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListAccessTokensResponseGetItemsAttributeType = *[]AccessTokenMetadata + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListAccessTokensResponseGetItemsArgType = []AccessTokenMetadata + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListAccessTokensResponseGetItemsRetType = []AccessTokenMetadata +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListAccessTokensResponseGetItemsAttributeTypeOk(arg ListAccessTokensResponseGetItemsAttributeType) (ret ListAccessTokensResponseGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListAccessTokensResponseGetItemsAttributeTypeOk(arg ListAccessTokensResp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListAccessTokensResponseGetItemsAttributeType(arg *ListAccessTokensResponseGetItemsAttributeType, val ListAccessTokensResponseGetItemsRetType) { *arg = &val } // ListAccessTokensResponse struct for ListAccessTokensResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListAccessTokensResponse struct { Items ListAccessTokensResponseGetItemsAttributeType `json:"items,omitempty"` } @@ -46,6 +55,7 @@ type ListAccessTokensResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListAccessTokensResponse() *ListAccessTokensResponse { this := ListAccessTokensResponse{} return &this @@ -54,12 +64,14 @@ func NewListAccessTokensResponse() *ListAccessTokensResponse { // NewListAccessTokensResponseWithDefaults instantiates a new ListAccessTokensResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListAccessTokensResponseWithDefaults() *ListAccessTokensResponse { this := ListAccessTokensResponse{} return &this } // GetItems returns the Items field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListAccessTokensResponse) GetItems() (res ListAccessTokensResponseGetItemsRetType) { res, _ = o.GetItemsOk() return @@ -67,21 +79,25 @@ func (o *ListAccessTokensResponse) GetItems() (res ListAccessTokensResponseGetIt // GetItemsOk returns a tuple with the Items field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListAccessTokensResponse) GetItemsOk() (ret ListAccessTokensResponseGetItemsRetType, ok bool) { return getListAccessTokensResponseGetItemsAttributeTypeOk(o.Items) } // HasItems returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListAccessTokensResponse) HasItems() bool { _, ok := o.GetItemsOk() return ok } // SetItems gets a reference to the given []AccessTokenMetadata and assigns it to the Items field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListAccessTokensResponse) SetItems(v ListAccessTokensResponseGetItemsRetType) { setListAccessTokensResponseGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListAccessTokensResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListAccessTokensResponseGetItemsAttributeTypeOk(o.Items); ok { @@ -90,37 +106,45 @@ func (o ListAccessTokensResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListAccessTokensResponse struct { value *ListAccessTokensResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListAccessTokensResponse) Get() *ListAccessTokensResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListAccessTokensResponse) Set(val *ListAccessTokensResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListAccessTokensResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListAccessTokensResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListAccessTokensResponse(val *ListAccessTokensResponse) *NullableListAccessTokensResponse { return &NullableListAccessTokensResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListAccessTokensResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListAccessTokensResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_list_service_account_keys_response.go b/services/serviceaccount/model_list_service_account_keys_response.go index b2409bc29..9f3217be0 100644 --- a/services/serviceaccount/model_list_service_account_keys_response.go +++ b/services/serviceaccount/model_list_service_account_keys_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListServiceAccountKeysResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountKeysResponseGetItemsAttributeType = *[]ServiceAccountKeyListResponse + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountKeysResponseGetItemsArgType = []ServiceAccountKeyListResponse + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountKeysResponseGetItemsRetType = []ServiceAccountKeyListResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListServiceAccountKeysResponseGetItemsAttributeTypeOk(arg ListServiceAccountKeysResponseGetItemsAttributeType) (ret ListServiceAccountKeysResponseGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getListServiceAccountKeysResponseGetItemsAttributeTypeOk(arg ListServiceAcc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListServiceAccountKeysResponseGetItemsAttributeType(arg *ListServiceAccountKeysResponseGetItemsAttributeType, val ListServiceAccountKeysResponseGetItemsRetType) { *arg = &val } // ListServiceAccountKeysResponse struct for ListServiceAccountKeysResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountKeysResponse struct { // REQUIRED Items ListServiceAccountKeysResponseGetItemsAttributeType `json:"items" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _ListServiceAccountKeysResponse ListServiceAccountKeysResponse // NewListServiceAccountKeysResponse instantiates a new ListServiceAccountKeysResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListServiceAccountKeysResponse(items ListServiceAccountKeysResponseGetItemsArgType) *ListServiceAccountKeysResponse { this := ListServiceAccountKeysResponse{} setListServiceAccountKeysResponseGetItemsAttributeType(&this.Items, items) @@ -58,12 +69,14 @@ func NewListServiceAccountKeysResponse(items ListServiceAccountKeysResponseGetIt // NewListServiceAccountKeysResponseWithDefaults instantiates a new ListServiceAccountKeysResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListServiceAccountKeysResponseWithDefaults() *ListServiceAccountKeysResponse { this := ListServiceAccountKeysResponse{} return &this } // GetItems returns the Items field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListServiceAccountKeysResponse) GetItems() (ret ListServiceAccountKeysResponseGetItemsRetType) { ret, _ = o.GetItemsOk() return ret @@ -71,15 +84,18 @@ func (o *ListServiceAccountKeysResponse) GetItems() (ret ListServiceAccountKeysR // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListServiceAccountKeysResponse) GetItemsOk() (ret ListServiceAccountKeysResponseGetItemsRetType, ok bool) { return getListServiceAccountKeysResponseGetItemsAttributeTypeOk(o.Items) } // SetItems sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListServiceAccountKeysResponse) SetItems(v ListServiceAccountKeysResponseGetItemsRetType) { setListServiceAccountKeysResponseGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListServiceAccountKeysResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListServiceAccountKeysResponseGetItemsAttributeTypeOk(o.Items); ok { @@ -88,37 +104,45 @@ func (o ListServiceAccountKeysResponse) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListServiceAccountKeysResponse struct { value *ListServiceAccountKeysResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListServiceAccountKeysResponse) Get() *ListServiceAccountKeysResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListServiceAccountKeysResponse) Set(val *ListServiceAccountKeysResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListServiceAccountKeysResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListServiceAccountKeysResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListServiceAccountKeysResponse(val *ListServiceAccountKeysResponse) *NullableListServiceAccountKeysResponse { return &NullableListServiceAccountKeysResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListServiceAccountKeysResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListServiceAccountKeysResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_list_service_accounts_response.go b/services/serviceaccount/model_list_service_accounts_response.go index 792af983b..928cba0f2 100644 --- a/services/serviceaccount/model_list_service_accounts_response.go +++ b/services/serviceaccount/model_list_service_accounts_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListServiceAccountsResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountsResponseGetItemsAttributeType = *[]ServiceAccount + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountsResponseGetItemsArgType = []ServiceAccount + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountsResponseGetItemsRetType = []ServiceAccount +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListServiceAccountsResponseGetItemsAttributeTypeOk(arg ListServiceAccountsResponseGetItemsAttributeType) (ret ListServiceAccountsResponseGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getListServiceAccountsResponseGetItemsAttributeTypeOk(arg ListServiceAccoun return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListServiceAccountsResponseGetItemsAttributeType(arg *ListServiceAccountsResponseGetItemsAttributeType, val ListServiceAccountsResponseGetItemsRetType) { *arg = &val } // ListServiceAccountsResponse struct for ListServiceAccountsResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListServiceAccountsResponse struct { // REQUIRED Items ListServiceAccountsResponseGetItemsAttributeType `json:"items" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _ListServiceAccountsResponse ListServiceAccountsResponse // NewListServiceAccountsResponse instantiates a new ListServiceAccountsResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListServiceAccountsResponse(items ListServiceAccountsResponseGetItemsArgType) *ListServiceAccountsResponse { this := ListServiceAccountsResponse{} setListServiceAccountsResponseGetItemsAttributeType(&this.Items, items) @@ -58,12 +69,14 @@ func NewListServiceAccountsResponse(items ListServiceAccountsResponseGetItemsArg // NewListServiceAccountsResponseWithDefaults instantiates a new ListServiceAccountsResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListServiceAccountsResponseWithDefaults() *ListServiceAccountsResponse { this := ListServiceAccountsResponse{} return &this } // GetItems returns the Items field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListServiceAccountsResponse) GetItems() (ret ListServiceAccountsResponseGetItemsRetType) { ret, _ = o.GetItemsOk() return ret @@ -71,15 +84,18 @@ func (o *ListServiceAccountsResponse) GetItems() (ret ListServiceAccountsRespons // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListServiceAccountsResponse) GetItemsOk() (ret ListServiceAccountsResponseGetItemsRetType, ok bool) { return getListServiceAccountsResponseGetItemsAttributeTypeOk(o.Items) } // SetItems sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListServiceAccountsResponse) SetItems(v ListServiceAccountsResponseGetItemsRetType) { setListServiceAccountsResponseGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListServiceAccountsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListServiceAccountsResponseGetItemsAttributeTypeOk(o.Items); ok { @@ -88,37 +104,45 @@ func (o ListServiceAccountsResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListServiceAccountsResponse struct { value *ListServiceAccountsResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListServiceAccountsResponse) Get() *ListServiceAccountsResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListServiceAccountsResponse) Set(val *ListServiceAccountsResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListServiceAccountsResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListServiceAccountsResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListServiceAccountsResponse(val *ListServiceAccountsResponse) *NullableListServiceAccountsResponse { return &NullableListServiceAccountsResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListServiceAccountsResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListServiceAccountsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_partial_update_service_account_federated_identity_provider_payload.go b/services/serviceaccount/model_partial_update_service_account_federated_identity_provider_payload.go index aa00f536c..c93c25882 100644 --- a/services/serviceaccount/model_partial_update_service_account_federated_identity_provider_payload.go +++ b/services/serviceaccount/model_partial_update_service_account_federated_identity_provider_payload.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &PartialUpdateServiceAccountFederatedIdentityProviderPayl */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsAttributeType = *[]CreateFederatedIdentityProviderPayloadAssertionsInner + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsArgType = []CreateFederatedIdentityProviderPayloadAssertionsInner + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsRetType = []CreateFederatedIdentityProviderPayloadAssertionsInner +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsAttributeTypeOk(arg PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsAttributeType) (ret PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertions return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsAttributeType(arg *PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsAttributeType, val PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertions */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerAttributeTypeOk(arg PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerAttributeType) (ret PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerAttributeType(arg *PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerAttributeType, val PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerRetType = string /* @@ -63,8 +77,10 @@ type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerRetType */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameAttributeTypeOk(arg PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameAttributeType) (ret PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -72,14 +88,19 @@ func getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameAttributeType(arg *PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameAttributeType, val PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameRetType = string // PartialUpdateServiceAccountFederatedIdentityProviderPayload struct for PartialUpdateServiceAccountFederatedIdentityProviderPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountFederatedIdentityProviderPayload struct { // list of assertions of the federated identity provider Assertions PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsAttributeType `json:"assertions,omitempty"` @@ -91,12 +112,14 @@ type PartialUpdateServiceAccountFederatedIdentityProviderPayload struct { Name PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameAttributeType `json:"name" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _PartialUpdateServiceAccountFederatedIdentityProviderPayload PartialUpdateServiceAccountFederatedIdentityProviderPayload // NewPartialUpdateServiceAccountFederatedIdentityProviderPayload instantiates a new PartialUpdateServiceAccountFederatedIdentityProviderPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateServiceAccountFederatedIdentityProviderPayload(issuer PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerArgType, name PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameArgType) *PartialUpdateServiceAccountFederatedIdentityProviderPayload { this := PartialUpdateServiceAccountFederatedIdentityProviderPayload{} setPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerAttributeType(&this.Issuer, issuer) @@ -107,12 +130,14 @@ func NewPartialUpdateServiceAccountFederatedIdentityProviderPayload(issuer Parti // NewPartialUpdateServiceAccountFederatedIdentityProviderPayloadWithDefaults instantiates a new PartialUpdateServiceAccountFederatedIdentityProviderPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateServiceAccountFederatedIdentityProviderPayloadWithDefaults() *PartialUpdateServiceAccountFederatedIdentityProviderPayload { this := PartialUpdateServiceAccountFederatedIdentityProviderPayload{} return &this } // GetAssertions returns the Assertions field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetAssertions() (res PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsRetType) { res, _ = o.GetAssertionsOk() return @@ -120,22 +145,26 @@ func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetAsserti // GetAssertionsOk returns a tuple with the Assertions field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetAssertionsOk() (ret PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsRetType, ok bool) { return getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsAttributeTypeOk(o.Assertions) } // HasAssertions returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) HasAssertions() bool { _, ok := o.GetAssertionsOk() return ok } // SetAssertions gets a reference to the given []CreateFederatedIdentityProviderPayloadAssertionsInner and assigns it to the Assertions field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) SetAssertions(v PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsRetType) { setPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsAttributeType(&o.Assertions, v) } // GetIssuer returns the Issuer field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetIssuer() (ret PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerRetType) { ret, _ = o.GetIssuerOk() return ret @@ -143,16 +172,19 @@ func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetIssuer( // GetIssuerOk returns a tuple with the Issuer field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetIssuerOk() (ret PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerRetType, ok bool) { return getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerAttributeTypeOk(o.Issuer) } // SetIssuer sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) SetIssuer(v PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerRetType) { setPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetIssuerAttributeType(&o.Issuer, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetName() (ret PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -160,15 +192,18 @@ func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetName() // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetNameOk() (ret PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameRetType, ok bool) { return getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) SetName(v PartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameRetType) { setPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PartialUpdateServiceAccountFederatedIdentityProviderPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getPartialUpdateServiceAccountFederatedIdentityProviderPayloadGetAssertionsAttributeTypeOk(o.Assertions); ok { @@ -183,37 +218,45 @@ func (o PartialUpdateServiceAccountFederatedIdentityProviderPayload) ToMap() (ma return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload struct { value *PartialUpdateServiceAccountFederatedIdentityProviderPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) Get() *PartialUpdateServiceAccountFederatedIdentityProviderPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) Set(val *PartialUpdateServiceAccountFederatedIdentityProviderPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullablePartialUpdateServiceAccountFederatedIdentityProviderPayload(val *PartialUpdateServiceAccountFederatedIdentityProviderPayload) *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload { return &NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_partial_update_service_account_key_payload.go b/services/serviceaccount/model_partial_update_service_account_key_payload.go index bbd6e2966..21368bb1c 100644 --- a/services/serviceaccount/model_partial_update_service_account_key_payload.go +++ b/services/serviceaccount/model_partial_update_service_account_key_payload.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &PartialUpdateServiceAccountKeyPayload{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyPayloadgetActiveAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyPayloadgetActiveArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyPayloadgetActiveRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountKeyPayloadgetActiveAttributeTypeOk(arg PartialUpdateServiceAccountKeyPayloadgetActiveAttributeType) (ret PartialUpdateServiceAccountKeyPayloadgetActiveRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getPartialUpdateServiceAccountKeyPayloadgetActiveAttributeTypeOk(arg Partia return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountKeyPayloadgetActiveAttributeType(arg *PartialUpdateServiceAccountKeyPayloadgetActiveAttributeType, val PartialUpdateServiceAccountKeyPayloadgetActiveRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setPartialUpdateServiceAccountKeyPayloadgetActiveAttributeType(arg *Partial */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyPayloadGetValidUntilAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyPayloadGetValidUntilArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyPayloadGetValidUntilRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountKeyPayloadGetValidUntilAttributeTypeOk(arg PartialUpdateServiceAccountKeyPayloadGetValidUntilAttributeType) (ret PartialUpdateServiceAccountKeyPayloadGetValidUntilRetType, ok bool) { if arg == nil { return ret, false @@ -54,11 +68,13 @@ func getPartialUpdateServiceAccountKeyPayloadGetValidUntilAttributeTypeOk(arg Pa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountKeyPayloadGetValidUntilAttributeType(arg *PartialUpdateServiceAccountKeyPayloadGetValidUntilAttributeType, val PartialUpdateServiceAccountKeyPayloadGetValidUntilRetType) { *arg = &val } // PartialUpdateServiceAccountKeyPayload struct for PartialUpdateServiceAccountKeyPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyPayload struct { // Active keys are valid, while inactive keys are temporarily deactivated. Active PartialUpdateServiceAccountKeyPayloadgetActiveAttributeType `json:"active,omitempty"` @@ -70,6 +86,7 @@ type PartialUpdateServiceAccountKeyPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateServiceAccountKeyPayload() *PartialUpdateServiceAccountKeyPayload { this := PartialUpdateServiceAccountKeyPayload{} return &this @@ -78,12 +95,14 @@ func NewPartialUpdateServiceAccountKeyPayload() *PartialUpdateServiceAccountKeyP // NewPartialUpdateServiceAccountKeyPayloadWithDefaults instantiates a new PartialUpdateServiceAccountKeyPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateServiceAccountKeyPayloadWithDefaults() *PartialUpdateServiceAccountKeyPayload { this := PartialUpdateServiceAccountKeyPayload{} return &this } // GetActive returns the Active field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyPayload) GetActive() (res PartialUpdateServiceAccountKeyPayloadgetActiveRetType) { res, _ = o.GetActiveOk() return @@ -91,22 +110,26 @@ func (o *PartialUpdateServiceAccountKeyPayload) GetActive() (res PartialUpdateSe // GetActiveOk returns a tuple with the Active field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyPayload) GetActiveOk() (ret PartialUpdateServiceAccountKeyPayloadgetActiveRetType, ok bool) { return getPartialUpdateServiceAccountKeyPayloadgetActiveAttributeTypeOk(o.Active) } // HasActive returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyPayload) HasActive() bool { _, ok := o.GetActiveOk() return ok } // SetActive gets a reference to the given bool and assigns it to the Active field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyPayload) SetActive(v PartialUpdateServiceAccountKeyPayloadgetActiveRetType) { setPartialUpdateServiceAccountKeyPayloadgetActiveAttributeType(&o.Active, v) } // GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyPayload) GetValidUntil() (res PartialUpdateServiceAccountKeyPayloadGetValidUntilRetType) { res, _ = o.GetValidUntilOk() return @@ -114,21 +137,25 @@ func (o *PartialUpdateServiceAccountKeyPayload) GetValidUntil() (res PartialUpda // GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyPayload) GetValidUntilOk() (ret PartialUpdateServiceAccountKeyPayloadGetValidUntilRetType, ok bool) { return getPartialUpdateServiceAccountKeyPayloadGetValidUntilAttributeTypeOk(o.ValidUntil) } // HasValidUntil returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyPayload) HasValidUntil() bool { _, ok := o.GetValidUntilOk() return ok } // SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyPayload) SetValidUntil(v PartialUpdateServiceAccountKeyPayloadGetValidUntilRetType) { setPartialUpdateServiceAccountKeyPayloadGetValidUntilAttributeType(&o.ValidUntil, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PartialUpdateServiceAccountKeyPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getPartialUpdateServiceAccountKeyPayloadgetActiveAttributeTypeOk(o.Active); ok { @@ -140,37 +167,45 @@ func (o PartialUpdateServiceAccountKeyPayload) ToMap() (map[string]interface{}, return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullablePartialUpdateServiceAccountKeyPayload struct { value *PartialUpdateServiceAccountKeyPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyPayload) Get() *PartialUpdateServiceAccountKeyPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyPayload) Set(val *PartialUpdateServiceAccountKeyPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullablePartialUpdateServiceAccountKeyPayload(val *PartialUpdateServiceAccountKeyPayload) *NullablePartialUpdateServiceAccountKeyPayload { return &NullablePartialUpdateServiceAccountKeyPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_partial_update_service_account_key_response.go b/services/serviceaccount/model_partial_update_service_account_key_response.go index 2b2ee012b..52fc11292 100644 --- a/services/serviceaccount/model_partial_update_service_account_key_response.go +++ b/services/serviceaccount/model_partial_update_service_account_key_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -24,10 +25,16 @@ var _ MappedNullable = &PartialUpdateServiceAccountKeyResponse{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponsegetActiveAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponsegetActiveArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponsegetActiveRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountKeyResponsegetActiveAttributeTypeOk(arg PartialUpdateServiceAccountKeyResponsegetActiveAttributeType) (ret PartialUpdateServiceAccountKeyResponsegetActiveRetType, ok bool) { if arg == nil { return ret, false @@ -35,6 +42,7 @@ func getPartialUpdateServiceAccountKeyResponsegetActiveAttributeTypeOk(arg Parti return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountKeyResponsegetActiveAttributeType(arg *PartialUpdateServiceAccountKeyResponsegetActiveAttributeType, val PartialUpdateServiceAccountKeyResponsegetActiveRetType) { *arg = &val } @@ -44,10 +52,16 @@ func setPartialUpdateServiceAccountKeyResponsegetActiveAttributeType(arg *Partia */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountKeyResponseGetCreatedAtAttributeTypeOk(arg PartialUpdateServiceAccountKeyResponseGetCreatedAtAttributeType) (ret PartialUpdateServiceAccountKeyResponseGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +69,7 @@ func getPartialUpdateServiceAccountKeyResponseGetCreatedAtAttributeTypeOk(arg Pa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountKeyResponseGetCreatedAtAttributeType(arg *PartialUpdateServiceAccountKeyResponseGetCreatedAtAttributeType, val PartialUpdateServiceAccountKeyResponseGetCreatedAtRetType) { *arg = &val } @@ -64,8 +79,10 @@ func setPartialUpdateServiceAccountKeyResponseGetCreatedAtAttributeType(arg *Par */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountKeyResponseGetIdAttributeTypeOk(arg PartialUpdateServiceAccountKeyResponseGetIdAttributeType) (ret PartialUpdateServiceAccountKeyResponseGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +90,15 @@ func getPartialUpdateServiceAccountKeyResponseGetIdAttributeTypeOk(arg PartialUp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountKeyResponseGetIdAttributeType(arg *PartialUpdateServiceAccountKeyResponseGetIdAttributeType, val PartialUpdateServiceAccountKeyResponseGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetIdRetType = string /* @@ -88,20 +109,25 @@ type PartialUpdateServiceAccountKeyResponseGetIdRetType = string // PartialUpdateServiceAccountKeyResponseKeyAlgorithm the model 'PartialUpdateServiceAccountKeyResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseKeyAlgorithm string // List of KeyAlgorithm const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead PARTIALUPDATESERVICEACCOUNTKEYRESPONSEKEY_ALGORITHM__2048 PartialUpdateServiceAccountKeyResponseKeyAlgorithm = "RSA_2048" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead PARTIALUPDATESERVICEACCOUNTKEYRESPONSEKEY_ALGORITHM__4096 PartialUpdateServiceAccountKeyResponseKeyAlgorithm = "RSA_4096" ) // All allowed values of PartialUpdateServiceAccountKeyResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedPartialUpdateServiceAccountKeyResponseKeyAlgorithmEnumValues = []PartialUpdateServiceAccountKeyResponseKeyAlgorithm{ "RSA_2048", "RSA_4096", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *PartialUpdateServiceAccountKeyResponseKeyAlgorithm) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -129,6 +155,7 @@ func (v *PartialUpdateServiceAccountKeyResponseKeyAlgorithm) UnmarshalJSON(src [ // NewPartialUpdateServiceAccountKeyResponseKeyAlgorithmFromValue returns a pointer to a valid PartialUpdateServiceAccountKeyResponseKeyAlgorithm // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateServiceAccountKeyResponseKeyAlgorithmFromValue(v PartialUpdateServiceAccountKeyResponseKeyAlgorithm) (*PartialUpdateServiceAccountKeyResponseKeyAlgorithm, error) { ev := PartialUpdateServiceAccountKeyResponseKeyAlgorithm(v) if ev.IsValid() { @@ -139,6 +166,7 @@ func NewPartialUpdateServiceAccountKeyResponseKeyAlgorithmFromValue(v PartialUpd } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v PartialUpdateServiceAccountKeyResponseKeyAlgorithm) IsValid() bool { for _, existing := range AllowedPartialUpdateServiceAccountKeyResponseKeyAlgorithmEnumValues { if existing == v { @@ -149,50 +177,65 @@ func (v PartialUpdateServiceAccountKeyResponseKeyAlgorithm) IsValid() bool { } // Ptr returns reference to KeyAlgorithmKeyAlgorithm value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v PartialUpdateServiceAccountKeyResponseKeyAlgorithm) Ptr() *PartialUpdateServiceAccountKeyResponseKeyAlgorithm { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm struct { value *PartialUpdateServiceAccountKeyResponseKeyAlgorithm isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm) Get() *PartialUpdateServiceAccountKeyResponseKeyAlgorithm { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm) Set(val *PartialUpdateServiceAccountKeyResponseKeyAlgorithm) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm(val *PartialUpdateServiceAccountKeyResponseKeyAlgorithm) *NullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm { return &NullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponseKeyAlgorithm) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmAttributeType = *PartialUpdateServiceAccountKeyResponseKeyAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmArgType = PartialUpdateServiceAccountKeyResponseKeyAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmRetType = PartialUpdateServiceAccountKeyResponseKeyAlgorithm +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountKeyResponseGetKeyAlgorithmAttributeTypeOk(arg PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmAttributeType) (ret PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmRetType, ok bool) { if arg == nil { return ret, false @@ -200,6 +243,7 @@ func getPartialUpdateServiceAccountKeyResponseGetKeyAlgorithmAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountKeyResponseGetKeyAlgorithmAttributeType(arg *PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmAttributeType, val PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmRetType) { *arg = &val } @@ -212,20 +256,25 @@ func setPartialUpdateServiceAccountKeyResponseGetKeyAlgorithmAttributeType(arg * // PartialUpdateServiceAccountKeyResponseKeyOrigin the model 'PartialUpdateServiceAccountKeyResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseKeyOrigin string // List of KeyOrigin const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead PARTIALUPDATESERVICEACCOUNTKEYRESPONSEKEY_ORIGIN_USER_PROVIDED PartialUpdateServiceAccountKeyResponseKeyOrigin = "USER_PROVIDED" - PARTIALUPDATESERVICEACCOUNTKEYRESPONSEKEY_ORIGIN_GENERATED PartialUpdateServiceAccountKeyResponseKeyOrigin = "GENERATED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + PARTIALUPDATESERVICEACCOUNTKEYRESPONSEKEY_ORIGIN_GENERATED PartialUpdateServiceAccountKeyResponseKeyOrigin = "GENERATED" ) // All allowed values of PartialUpdateServiceAccountKeyResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedPartialUpdateServiceAccountKeyResponseKeyOriginEnumValues = []PartialUpdateServiceAccountKeyResponseKeyOrigin{ "USER_PROVIDED", "GENERATED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *PartialUpdateServiceAccountKeyResponseKeyOrigin) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -253,6 +302,7 @@ func (v *PartialUpdateServiceAccountKeyResponseKeyOrigin) UnmarshalJSON(src []by // NewPartialUpdateServiceAccountKeyResponseKeyOriginFromValue returns a pointer to a valid PartialUpdateServiceAccountKeyResponseKeyOrigin // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateServiceAccountKeyResponseKeyOriginFromValue(v PartialUpdateServiceAccountKeyResponseKeyOrigin) (*PartialUpdateServiceAccountKeyResponseKeyOrigin, error) { ev := PartialUpdateServiceAccountKeyResponseKeyOrigin(v) if ev.IsValid() { @@ -263,6 +313,7 @@ func NewPartialUpdateServiceAccountKeyResponseKeyOriginFromValue(v PartialUpdate } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v PartialUpdateServiceAccountKeyResponseKeyOrigin) IsValid() bool { for _, existing := range AllowedPartialUpdateServiceAccountKeyResponseKeyOriginEnumValues { if existing == v { @@ -273,50 +324,65 @@ func (v PartialUpdateServiceAccountKeyResponseKeyOrigin) IsValid() bool { } // Ptr returns reference to KeyOriginKeyOrigin value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v PartialUpdateServiceAccountKeyResponseKeyOrigin) Ptr() *PartialUpdateServiceAccountKeyResponseKeyOrigin { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullablePartialUpdateServiceAccountKeyResponseKeyOrigin struct { value *PartialUpdateServiceAccountKeyResponseKeyOrigin isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponseKeyOrigin) Get() *PartialUpdateServiceAccountKeyResponseKeyOrigin { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponseKeyOrigin) Set(val *PartialUpdateServiceAccountKeyResponseKeyOrigin) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponseKeyOrigin) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponseKeyOrigin) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullablePartialUpdateServiceAccountKeyResponseKeyOrigin(val *PartialUpdateServiceAccountKeyResponseKeyOrigin) *NullablePartialUpdateServiceAccountKeyResponseKeyOrigin { return &NullablePartialUpdateServiceAccountKeyResponseKeyOrigin{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponseKeyOrigin) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponseKeyOrigin) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetKeyOriginAttributeType = *PartialUpdateServiceAccountKeyResponseKeyOrigin + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetKeyOriginArgType = PartialUpdateServiceAccountKeyResponseKeyOrigin + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetKeyOriginRetType = PartialUpdateServiceAccountKeyResponseKeyOrigin +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountKeyResponseGetKeyOriginAttributeTypeOk(arg PartialUpdateServiceAccountKeyResponseGetKeyOriginAttributeType) (ret PartialUpdateServiceAccountKeyResponseGetKeyOriginRetType, ok bool) { if arg == nil { return ret, false @@ -324,6 +390,7 @@ func getPartialUpdateServiceAccountKeyResponseGetKeyOriginAttributeTypeOk(arg Pa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountKeyResponseGetKeyOriginAttributeType(arg *PartialUpdateServiceAccountKeyResponseGetKeyOriginAttributeType, val PartialUpdateServiceAccountKeyResponseGetKeyOriginRetType) { *arg = &val } @@ -336,20 +403,25 @@ func setPartialUpdateServiceAccountKeyResponseGetKeyOriginAttributeType(arg *Par // PartialUpdateServiceAccountKeyResponseKeyType the model 'PartialUpdateServiceAccountKeyResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseKeyType string // List of KeyType const ( - PARTIALUPDATESERVICEACCOUNTKEYRESPONSEKEY_TYPE_USER_MANAGED PartialUpdateServiceAccountKeyResponseKeyType = "USER_MANAGED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + PARTIALUPDATESERVICEACCOUNTKEYRESPONSEKEY_TYPE_USER_MANAGED PartialUpdateServiceAccountKeyResponseKeyType = "USER_MANAGED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead PARTIALUPDATESERVICEACCOUNTKEYRESPONSEKEY_TYPE_SYSTEM_MANAGED PartialUpdateServiceAccountKeyResponseKeyType = "SYSTEM_MANAGED" ) // All allowed values of PartialUpdateServiceAccountKeyResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedPartialUpdateServiceAccountKeyResponseKeyTypeEnumValues = []PartialUpdateServiceAccountKeyResponseKeyType{ "USER_MANAGED", "SYSTEM_MANAGED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *PartialUpdateServiceAccountKeyResponseKeyType) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -377,6 +449,7 @@ func (v *PartialUpdateServiceAccountKeyResponseKeyType) UnmarshalJSON(src []byte // NewPartialUpdateServiceAccountKeyResponseKeyTypeFromValue returns a pointer to a valid PartialUpdateServiceAccountKeyResponseKeyType // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateServiceAccountKeyResponseKeyTypeFromValue(v PartialUpdateServiceAccountKeyResponseKeyType) (*PartialUpdateServiceAccountKeyResponseKeyType, error) { ev := PartialUpdateServiceAccountKeyResponseKeyType(v) if ev.IsValid() { @@ -387,6 +460,7 @@ func NewPartialUpdateServiceAccountKeyResponseKeyTypeFromValue(v PartialUpdateSe } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v PartialUpdateServiceAccountKeyResponseKeyType) IsValid() bool { for _, existing := range AllowedPartialUpdateServiceAccountKeyResponseKeyTypeEnumValues { if existing == v { @@ -397,50 +471,65 @@ func (v PartialUpdateServiceAccountKeyResponseKeyType) IsValid() bool { } // Ptr returns reference to KeyTypeKeyType value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v PartialUpdateServiceAccountKeyResponseKeyType) Ptr() *PartialUpdateServiceAccountKeyResponseKeyType { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullablePartialUpdateServiceAccountKeyResponseKeyType struct { value *PartialUpdateServiceAccountKeyResponseKeyType isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponseKeyType) Get() *PartialUpdateServiceAccountKeyResponseKeyType { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponseKeyType) Set(val *PartialUpdateServiceAccountKeyResponseKeyType) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponseKeyType) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponseKeyType) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullablePartialUpdateServiceAccountKeyResponseKeyType(val *PartialUpdateServiceAccountKeyResponseKeyType) *NullablePartialUpdateServiceAccountKeyResponseKeyType { return &NullablePartialUpdateServiceAccountKeyResponseKeyType{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponseKeyType) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponseKeyType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetKeyTypeAttributeType = *PartialUpdateServiceAccountKeyResponseKeyType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetKeyTypeArgType = PartialUpdateServiceAccountKeyResponseKeyType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetKeyTypeRetType = PartialUpdateServiceAccountKeyResponseKeyType +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountKeyResponseGetKeyTypeAttributeTypeOk(arg PartialUpdateServiceAccountKeyResponseGetKeyTypeAttributeType) (ret PartialUpdateServiceAccountKeyResponseGetKeyTypeRetType, ok bool) { if arg == nil { return ret, false @@ -448,6 +537,7 @@ func getPartialUpdateServiceAccountKeyResponseGetKeyTypeAttributeTypeOk(arg Part return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountKeyResponseGetKeyTypeAttributeType(arg *PartialUpdateServiceAccountKeyResponseGetKeyTypeAttributeType, val PartialUpdateServiceAccountKeyResponseGetKeyTypeRetType) { *arg = &val } @@ -457,10 +547,16 @@ func setPartialUpdateServiceAccountKeyResponseGetKeyTypeAttributeType(arg *Parti */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetValidUntilAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetValidUntilArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponseGetValidUntilRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateServiceAccountKeyResponseGetValidUntilAttributeTypeOk(arg PartialUpdateServiceAccountKeyResponseGetValidUntilAttributeType) (ret PartialUpdateServiceAccountKeyResponseGetValidUntilRetType, ok bool) { if arg == nil { return ret, false @@ -468,11 +564,13 @@ func getPartialUpdateServiceAccountKeyResponseGetValidUntilAttributeTypeOk(arg P return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateServiceAccountKeyResponseGetValidUntilAttributeType(arg *PartialUpdateServiceAccountKeyResponseGetValidUntilAttributeType, val PartialUpdateServiceAccountKeyResponseGetValidUntilRetType) { *arg = &val } // PartialUpdateServiceAccountKeyResponse struct for PartialUpdateServiceAccountKeyResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateServiceAccountKeyResponse struct { // REQUIRED Active PartialUpdateServiceAccountKeyResponsegetActiveAttributeType `json:"active" required:"true"` @@ -492,12 +590,14 @@ type PartialUpdateServiceAccountKeyResponse struct { ValidUntil PartialUpdateServiceAccountKeyResponseGetValidUntilAttributeType `json:"validUntil,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _PartialUpdateServiceAccountKeyResponse PartialUpdateServiceAccountKeyResponse // NewPartialUpdateServiceAccountKeyResponse instantiates a new PartialUpdateServiceAccountKeyResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateServiceAccountKeyResponse(active PartialUpdateServiceAccountKeyResponsegetActiveArgType, createdAt PartialUpdateServiceAccountKeyResponseGetCreatedAtArgType, id PartialUpdateServiceAccountKeyResponseGetIdArgType, keyAlgorithm PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmArgType, keyOrigin PartialUpdateServiceAccountKeyResponseGetKeyOriginArgType, keyType PartialUpdateServiceAccountKeyResponseGetKeyTypeArgType) *PartialUpdateServiceAccountKeyResponse { this := PartialUpdateServiceAccountKeyResponse{} setPartialUpdateServiceAccountKeyResponsegetActiveAttributeType(&this.Active, active) @@ -512,12 +612,14 @@ func NewPartialUpdateServiceAccountKeyResponse(active PartialUpdateServiceAccoun // NewPartialUpdateServiceAccountKeyResponseWithDefaults instantiates a new PartialUpdateServiceAccountKeyResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateServiceAccountKeyResponseWithDefaults() *PartialUpdateServiceAccountKeyResponse { this := PartialUpdateServiceAccountKeyResponse{} return &this } // GetActive returns the Active field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetActive() (ret PartialUpdateServiceAccountKeyResponsegetActiveRetType) { ret, _ = o.GetActiveOk() return ret @@ -525,16 +627,19 @@ func (o *PartialUpdateServiceAccountKeyResponse) GetActive() (ret PartialUpdateS // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetActiveOk() (ret PartialUpdateServiceAccountKeyResponsegetActiveRetType, ok bool) { return getPartialUpdateServiceAccountKeyResponsegetActiveAttributeTypeOk(o.Active) } // SetActive sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) SetActive(v PartialUpdateServiceAccountKeyResponsegetActiveRetType) { setPartialUpdateServiceAccountKeyResponsegetActiveAttributeType(&o.Active, v) } // GetCreatedAt returns the CreatedAt field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetCreatedAt() (ret PartialUpdateServiceAccountKeyResponseGetCreatedAtRetType) { ret, _ = o.GetCreatedAtOk() return ret @@ -542,16 +647,19 @@ func (o *PartialUpdateServiceAccountKeyResponse) GetCreatedAt() (ret PartialUpda // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetCreatedAtOk() (ret PartialUpdateServiceAccountKeyResponseGetCreatedAtRetType, ok bool) { return getPartialUpdateServiceAccountKeyResponseGetCreatedAtAttributeTypeOk(o.CreatedAt) } // SetCreatedAt sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) SetCreatedAt(v PartialUpdateServiceAccountKeyResponseGetCreatedAtRetType) { setPartialUpdateServiceAccountKeyResponseGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetId() (ret PartialUpdateServiceAccountKeyResponseGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -559,16 +667,19 @@ func (o *PartialUpdateServiceAccountKeyResponse) GetId() (ret PartialUpdateServi // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetIdOk() (ret PartialUpdateServiceAccountKeyResponseGetIdRetType, ok bool) { return getPartialUpdateServiceAccountKeyResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) SetId(v PartialUpdateServiceAccountKeyResponseGetIdRetType) { setPartialUpdateServiceAccountKeyResponseGetIdAttributeType(&o.Id, v) } // GetKeyAlgorithm returns the KeyAlgorithm field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetKeyAlgorithm() (ret PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmRetType) { ret, _ = o.GetKeyAlgorithmOk() return ret @@ -576,16 +687,19 @@ func (o *PartialUpdateServiceAccountKeyResponse) GetKeyAlgorithm() (ret PartialU // GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetKeyAlgorithmOk() (ret PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmRetType, ok bool) { return getPartialUpdateServiceAccountKeyResponseGetKeyAlgorithmAttributeTypeOk(o.KeyAlgorithm) } // SetKeyAlgorithm sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) SetKeyAlgorithm(v PartialUpdateServiceAccountKeyResponseGetKeyAlgorithmRetType) { setPartialUpdateServiceAccountKeyResponseGetKeyAlgorithmAttributeType(&o.KeyAlgorithm, v) } // GetKeyOrigin returns the KeyOrigin field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetKeyOrigin() (ret PartialUpdateServiceAccountKeyResponseGetKeyOriginRetType) { ret, _ = o.GetKeyOriginOk() return ret @@ -593,16 +707,19 @@ func (o *PartialUpdateServiceAccountKeyResponse) GetKeyOrigin() (ret PartialUpda // GetKeyOriginOk returns a tuple with the KeyOrigin field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetKeyOriginOk() (ret PartialUpdateServiceAccountKeyResponseGetKeyOriginRetType, ok bool) { return getPartialUpdateServiceAccountKeyResponseGetKeyOriginAttributeTypeOk(o.KeyOrigin) } // SetKeyOrigin sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) SetKeyOrigin(v PartialUpdateServiceAccountKeyResponseGetKeyOriginRetType) { setPartialUpdateServiceAccountKeyResponseGetKeyOriginAttributeType(&o.KeyOrigin, v) } // GetKeyType returns the KeyType field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetKeyType() (ret PartialUpdateServiceAccountKeyResponseGetKeyTypeRetType) { ret, _ = o.GetKeyTypeOk() return ret @@ -610,16 +727,19 @@ func (o *PartialUpdateServiceAccountKeyResponse) GetKeyType() (ret PartialUpdate // GetKeyTypeOk returns a tuple with the KeyType field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetKeyTypeOk() (ret PartialUpdateServiceAccountKeyResponseGetKeyTypeRetType, ok bool) { return getPartialUpdateServiceAccountKeyResponseGetKeyTypeAttributeTypeOk(o.KeyType) } // SetKeyType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) SetKeyType(v PartialUpdateServiceAccountKeyResponseGetKeyTypeRetType) { setPartialUpdateServiceAccountKeyResponseGetKeyTypeAttributeType(&o.KeyType, v) } // GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetValidUntil() (res PartialUpdateServiceAccountKeyResponseGetValidUntilRetType) { res, _ = o.GetValidUntilOk() return @@ -627,21 +747,25 @@ func (o *PartialUpdateServiceAccountKeyResponse) GetValidUntil() (res PartialUpd // GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) GetValidUntilOk() (ret PartialUpdateServiceAccountKeyResponseGetValidUntilRetType, ok bool) { return getPartialUpdateServiceAccountKeyResponseGetValidUntilAttributeTypeOk(o.ValidUntil) } // HasValidUntil returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) HasValidUntil() bool { _, ok := o.GetValidUntilOk() return ok } // SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateServiceAccountKeyResponse) SetValidUntil(v PartialUpdateServiceAccountKeyResponseGetValidUntilRetType) { setPartialUpdateServiceAccountKeyResponseGetValidUntilAttributeType(&o.ValidUntil, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PartialUpdateServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getPartialUpdateServiceAccountKeyResponsegetActiveAttributeTypeOk(o.Active); ok { @@ -668,37 +792,45 @@ func (o PartialUpdateServiceAccountKeyResponse) ToMap() (map[string]interface{}, return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullablePartialUpdateServiceAccountKeyResponse struct { value *PartialUpdateServiceAccountKeyResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponse) Get() *PartialUpdateServiceAccountKeyResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponse) Set(val *PartialUpdateServiceAccountKeyResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullablePartialUpdateServiceAccountKeyResponse(val *PartialUpdateServiceAccountKeyResponse) *NullablePartialUpdateServiceAccountKeyResponse { return &NullablePartialUpdateServiceAccountKeyResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateServiceAccountKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_service_account.go b/services/serviceaccount/model_service_account.go index d3f0085ec..20c690ac5 100644 --- a/services/serviceaccount/model_service_account.go +++ b/services/serviceaccount/model_service_account.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &ServiceAccount{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetEmailAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountGetEmailAttributeTypeOk(arg ServiceAccountGetEmailAttributeType) (ret ServiceAccountGetEmailRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getServiceAccountGetEmailAttributeTypeOk(arg ServiceAccountGetEmailAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountGetEmailAttributeType(arg *ServiceAccountGetEmailAttributeType, val ServiceAccountGetEmailRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetEmailArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetEmailRetType = string /* @@ -43,8 +50,10 @@ type ServiceAccountGetEmailRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountGetIdAttributeTypeOk(arg ServiceAccountGetIdAttributeType) (ret ServiceAccountGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getServiceAccountGetIdAttributeTypeOk(arg ServiceAccountGetIdAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountGetIdAttributeType(arg *ServiceAccountGetIdAttributeType, val ServiceAccountGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetIdRetType = string /* @@ -64,10 +77,16 @@ type ServiceAccountGetIdRetType = string */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountgetInternalAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountgetInternalArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountgetInternalRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountgetInternalAttributeTypeOk(arg ServiceAccountgetInternalAttributeType) (ret ServiceAccountgetInternalRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +94,7 @@ func getServiceAccountgetInternalAttributeTypeOk(arg ServiceAccountgetInternalAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountgetInternalAttributeType(arg *ServiceAccountgetInternalAttributeType, val ServiceAccountgetInternalRetType) { *arg = &val } @@ -84,8 +104,10 @@ func setServiceAccountgetInternalAttributeType(arg *ServiceAccountgetInternalAtt */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetProjectIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountGetProjectIdAttributeTypeOk(arg ServiceAccountGetProjectIdAttributeType) (ret ServiceAccountGetProjectIdRetType, ok bool) { if arg == nil { return ret, false @@ -93,14 +115,19 @@ func getServiceAccountGetProjectIdAttributeTypeOk(arg ServiceAccountGetProjectId return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountGetProjectIdAttributeType(arg *ServiceAccountGetProjectIdAttributeType, val ServiceAccountGetProjectIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetProjectIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetProjectIdRetType = string // ServiceAccount struct for ServiceAccount +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccount struct { // Unique identifier of the service account in format of an email address generated by the service containing the prefix provided by the user during creation. // REQUIRED @@ -116,12 +143,14 @@ type ServiceAccount struct { ProjectId ServiceAccountGetProjectIdAttributeType `json:"projectId" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _ServiceAccount ServiceAccount // NewServiceAccount instantiates a new ServiceAccount 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewServiceAccount(email ServiceAccountGetEmailArgType, id ServiceAccountGetIdArgType, internal ServiceAccountgetInternalArgType, projectId ServiceAccountGetProjectIdArgType) *ServiceAccount { this := ServiceAccount{} setServiceAccountGetEmailAttributeType(&this.Email, email) @@ -134,12 +163,14 @@ func NewServiceAccount(email ServiceAccountGetEmailArgType, id ServiceAccountGet // NewServiceAccountWithDefaults instantiates a new ServiceAccount 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewServiceAccountWithDefaults() *ServiceAccount { this := ServiceAccount{} return &this } // GetEmail returns the Email field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) GetEmail() (ret ServiceAccountGetEmailRetType) { ret, _ = o.GetEmailOk() return ret @@ -147,16 +178,19 @@ func (o *ServiceAccount) GetEmail() (ret ServiceAccountGetEmailRetType) { // GetEmailOk returns a tuple with the Email field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) GetEmailOk() (ret ServiceAccountGetEmailRetType, ok bool) { return getServiceAccountGetEmailAttributeTypeOk(o.Email) } // SetEmail sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) SetEmail(v ServiceAccountGetEmailRetType) { setServiceAccountGetEmailAttributeType(&o.Email, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) GetId() (ret ServiceAccountGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -164,16 +198,19 @@ func (o *ServiceAccount) GetId() (ret ServiceAccountGetIdRetType) { // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) GetIdOk() (ret ServiceAccountGetIdRetType, ok bool) { return getServiceAccountGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) SetId(v ServiceAccountGetIdRetType) { setServiceAccountGetIdAttributeType(&o.Id, v) } // GetInternal returns the Internal field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) GetInternal() (ret ServiceAccountgetInternalRetType) { ret, _ = o.GetInternalOk() return ret @@ -181,16 +218,19 @@ func (o *ServiceAccount) GetInternal() (ret ServiceAccountgetInternalRetType) { // GetInternalOk returns a tuple with the Internal field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) GetInternalOk() (ret ServiceAccountgetInternalRetType, ok bool) { return getServiceAccountgetInternalAttributeTypeOk(o.Internal) } // SetInternal sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) SetInternal(v ServiceAccountgetInternalRetType) { setServiceAccountgetInternalAttributeType(&o.Internal, v) } // GetProjectId returns the ProjectId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) GetProjectId() (ret ServiceAccountGetProjectIdRetType) { ret, _ = o.GetProjectIdOk() return ret @@ -198,15 +238,18 @@ func (o *ServiceAccount) GetProjectId() (ret ServiceAccountGetProjectIdRetType) // GetProjectIdOk returns a tuple with the ProjectId field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) GetProjectIdOk() (ret ServiceAccountGetProjectIdRetType, ok bool) { return getServiceAccountGetProjectIdAttributeTypeOk(o.ProjectId) } // SetProjectId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccount) SetProjectId(v ServiceAccountGetProjectIdRetType) { setServiceAccountGetProjectIdAttributeType(&o.ProjectId, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ServiceAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getServiceAccountGetEmailAttributeTypeOk(o.Email); ok { @@ -224,37 +267,45 @@ func (o ServiceAccount) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableServiceAccount struct { value *ServiceAccount isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccount) Get() *ServiceAccount { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccount) Set(val *ServiceAccount) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccount) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccount) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableServiceAccount(val *ServiceAccount) *NullableServiceAccount { return &NullableServiceAccount{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccount) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccount) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/model_service_account_key_list_response.go b/services/serviceaccount/model_service_account_key_list_response.go index 33d1bdfaa..09e49808d 100644 --- a/services/serviceaccount/model_service_account_key_list_response.go +++ b/services/serviceaccount/model_service_account_key_list_response.go @@ -8,6 +8,7 @@ API version: 2.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package serviceaccount import ( @@ -24,10 +25,16 @@ var _ MappedNullable = &ServiceAccountKeyListResponse{} */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponsegetActiveAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponsegetActiveArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponsegetActiveRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountKeyListResponsegetActiveAttributeTypeOk(arg ServiceAccountKeyListResponsegetActiveAttributeType) (ret ServiceAccountKeyListResponsegetActiveRetType, ok bool) { if arg == nil { return ret, false @@ -35,6 +42,7 @@ func getServiceAccountKeyListResponsegetActiveAttributeTypeOk(arg ServiceAccount return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountKeyListResponsegetActiveAttributeType(arg *ServiceAccountKeyListResponsegetActiveAttributeType, val ServiceAccountKeyListResponsegetActiveRetType) { *arg = &val } @@ -44,10 +52,16 @@ func setServiceAccountKeyListResponsegetActiveAttributeType(arg *ServiceAccountK */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountKeyListResponseGetCreatedAtAttributeTypeOk(arg ServiceAccountKeyListResponseGetCreatedAtAttributeType) (ret ServiceAccountKeyListResponseGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +69,7 @@ func getServiceAccountKeyListResponseGetCreatedAtAttributeTypeOk(arg ServiceAcco return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountKeyListResponseGetCreatedAtAttributeType(arg *ServiceAccountKeyListResponseGetCreatedAtAttributeType, val ServiceAccountKeyListResponseGetCreatedAtRetType) { *arg = &val } @@ -64,8 +79,10 @@ func setServiceAccountKeyListResponseGetCreatedAtAttributeType(arg *ServiceAccou */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountKeyListResponseGetIdAttributeTypeOk(arg ServiceAccountKeyListResponseGetIdAttributeType) (ret ServiceAccountKeyListResponseGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +90,15 @@ func getServiceAccountKeyListResponseGetIdAttributeTypeOk(arg ServiceAccountKeyL return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountKeyListResponseGetIdAttributeType(arg *ServiceAccountKeyListResponseGetIdAttributeType, val ServiceAccountKeyListResponseGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetIdRetType = string /* @@ -88,20 +109,25 @@ type ServiceAccountKeyListResponseGetIdRetType = string // ServiceAccountKeyListResponseKeyAlgorithm the model 'ServiceAccountKeyListResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseKeyAlgorithm string // List of KeyAlgorithm const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead SERVICEACCOUNTKEYLISTRESPONSEKEY_ALGORITHM__2048 ServiceAccountKeyListResponseKeyAlgorithm = "RSA_2048" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead SERVICEACCOUNTKEYLISTRESPONSEKEY_ALGORITHM__4096 ServiceAccountKeyListResponseKeyAlgorithm = "RSA_4096" ) // All allowed values of ServiceAccountKeyListResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedServiceAccountKeyListResponseKeyAlgorithmEnumValues = []ServiceAccountKeyListResponseKeyAlgorithm{ "RSA_2048", "RSA_4096", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *ServiceAccountKeyListResponseKeyAlgorithm) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -129,6 +155,7 @@ func (v *ServiceAccountKeyListResponseKeyAlgorithm) UnmarshalJSON(src []byte) er // NewServiceAccountKeyListResponseKeyAlgorithmFromValue returns a pointer to a valid ServiceAccountKeyListResponseKeyAlgorithm // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewServiceAccountKeyListResponseKeyAlgorithmFromValue(v ServiceAccountKeyListResponseKeyAlgorithm) (*ServiceAccountKeyListResponseKeyAlgorithm, error) { ev := ServiceAccountKeyListResponseKeyAlgorithm(v) if ev.IsValid() { @@ -139,6 +166,7 @@ func NewServiceAccountKeyListResponseKeyAlgorithmFromValue(v ServiceAccountKeyLi } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v ServiceAccountKeyListResponseKeyAlgorithm) IsValid() bool { for _, existing := range AllowedServiceAccountKeyListResponseKeyAlgorithmEnumValues { if existing == v { @@ -149,50 +177,65 @@ func (v ServiceAccountKeyListResponseKeyAlgorithm) IsValid() bool { } // Ptr returns reference to KeyAlgorithmKeyAlgorithm value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v ServiceAccountKeyListResponseKeyAlgorithm) Ptr() *ServiceAccountKeyListResponseKeyAlgorithm { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableServiceAccountKeyListResponseKeyAlgorithm struct { value *ServiceAccountKeyListResponseKeyAlgorithm isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponseKeyAlgorithm) Get() *ServiceAccountKeyListResponseKeyAlgorithm { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponseKeyAlgorithm) Set(val *ServiceAccountKeyListResponseKeyAlgorithm) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponseKeyAlgorithm) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponseKeyAlgorithm) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableServiceAccountKeyListResponseKeyAlgorithm(val *ServiceAccountKeyListResponseKeyAlgorithm) *NullableServiceAccountKeyListResponseKeyAlgorithm { return &NullableServiceAccountKeyListResponseKeyAlgorithm{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponseKeyAlgorithm) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponseKeyAlgorithm) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetKeyAlgorithmAttributeType = *ServiceAccountKeyListResponseKeyAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetKeyAlgorithmArgType = ServiceAccountKeyListResponseKeyAlgorithm + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetKeyAlgorithmRetType = ServiceAccountKeyListResponseKeyAlgorithm +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountKeyListResponseGetKeyAlgorithmAttributeTypeOk(arg ServiceAccountKeyListResponseGetKeyAlgorithmAttributeType) (ret ServiceAccountKeyListResponseGetKeyAlgorithmRetType, ok bool) { if arg == nil { return ret, false @@ -200,6 +243,7 @@ func getServiceAccountKeyListResponseGetKeyAlgorithmAttributeTypeOk(arg ServiceA return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountKeyListResponseGetKeyAlgorithmAttributeType(arg *ServiceAccountKeyListResponseGetKeyAlgorithmAttributeType, val ServiceAccountKeyListResponseGetKeyAlgorithmRetType) { *arg = &val } @@ -212,20 +256,25 @@ func setServiceAccountKeyListResponseGetKeyAlgorithmAttributeType(arg *ServiceAc // ServiceAccountKeyListResponseKeyOrigin the model 'ServiceAccountKeyListResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseKeyOrigin string // List of KeyOrigin const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead SERVICEACCOUNTKEYLISTRESPONSEKEY_ORIGIN_USER_PROVIDED ServiceAccountKeyListResponseKeyOrigin = "USER_PROVIDED" - SERVICEACCOUNTKEYLISTRESPONSEKEY_ORIGIN_GENERATED ServiceAccountKeyListResponseKeyOrigin = "GENERATED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + SERVICEACCOUNTKEYLISTRESPONSEKEY_ORIGIN_GENERATED ServiceAccountKeyListResponseKeyOrigin = "GENERATED" ) // All allowed values of ServiceAccountKeyListResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedServiceAccountKeyListResponseKeyOriginEnumValues = []ServiceAccountKeyListResponseKeyOrigin{ "USER_PROVIDED", "GENERATED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *ServiceAccountKeyListResponseKeyOrigin) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -253,6 +302,7 @@ func (v *ServiceAccountKeyListResponseKeyOrigin) UnmarshalJSON(src []byte) error // NewServiceAccountKeyListResponseKeyOriginFromValue returns a pointer to a valid ServiceAccountKeyListResponseKeyOrigin // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewServiceAccountKeyListResponseKeyOriginFromValue(v ServiceAccountKeyListResponseKeyOrigin) (*ServiceAccountKeyListResponseKeyOrigin, error) { ev := ServiceAccountKeyListResponseKeyOrigin(v) if ev.IsValid() { @@ -263,6 +313,7 @@ func NewServiceAccountKeyListResponseKeyOriginFromValue(v ServiceAccountKeyListR } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v ServiceAccountKeyListResponseKeyOrigin) IsValid() bool { for _, existing := range AllowedServiceAccountKeyListResponseKeyOriginEnumValues { if existing == v { @@ -273,50 +324,65 @@ func (v ServiceAccountKeyListResponseKeyOrigin) IsValid() bool { } // Ptr returns reference to KeyOriginKeyOrigin value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v ServiceAccountKeyListResponseKeyOrigin) Ptr() *ServiceAccountKeyListResponseKeyOrigin { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableServiceAccountKeyListResponseKeyOrigin struct { value *ServiceAccountKeyListResponseKeyOrigin isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponseKeyOrigin) Get() *ServiceAccountKeyListResponseKeyOrigin { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponseKeyOrigin) Set(val *ServiceAccountKeyListResponseKeyOrigin) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponseKeyOrigin) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponseKeyOrigin) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableServiceAccountKeyListResponseKeyOrigin(val *ServiceAccountKeyListResponseKeyOrigin) *NullableServiceAccountKeyListResponseKeyOrigin { return &NullableServiceAccountKeyListResponseKeyOrigin{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponseKeyOrigin) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponseKeyOrigin) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetKeyOriginAttributeType = *ServiceAccountKeyListResponseKeyOrigin + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetKeyOriginArgType = ServiceAccountKeyListResponseKeyOrigin + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetKeyOriginRetType = ServiceAccountKeyListResponseKeyOrigin +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountKeyListResponseGetKeyOriginAttributeTypeOk(arg ServiceAccountKeyListResponseGetKeyOriginAttributeType) (ret ServiceAccountKeyListResponseGetKeyOriginRetType, ok bool) { if arg == nil { return ret, false @@ -324,6 +390,7 @@ func getServiceAccountKeyListResponseGetKeyOriginAttributeTypeOk(arg ServiceAcco return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountKeyListResponseGetKeyOriginAttributeType(arg *ServiceAccountKeyListResponseGetKeyOriginAttributeType, val ServiceAccountKeyListResponseGetKeyOriginRetType) { *arg = &val } @@ -336,20 +403,25 @@ func setServiceAccountKeyListResponseGetKeyOriginAttributeType(arg *ServiceAccou // ServiceAccountKeyListResponseKeyType the model 'ServiceAccountKeyListResponse' // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseKeyType string // List of KeyType const ( - SERVICEACCOUNTKEYLISTRESPONSEKEY_TYPE_USER_MANAGED ServiceAccountKeyListResponseKeyType = "USER_MANAGED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + SERVICEACCOUNTKEYLISTRESPONSEKEY_TYPE_USER_MANAGED ServiceAccountKeyListResponseKeyType = "USER_MANAGED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead SERVICEACCOUNTKEYLISTRESPONSEKEY_TYPE_SYSTEM_MANAGED ServiceAccountKeyListResponseKeyType = "SYSTEM_MANAGED" ) // All allowed values of ServiceAccountKeyListResponse enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedServiceAccountKeyListResponseKeyTypeEnumValues = []ServiceAccountKeyListResponseKeyType{ "USER_MANAGED", "SYSTEM_MANAGED", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *ServiceAccountKeyListResponseKeyType) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -377,6 +449,7 @@ func (v *ServiceAccountKeyListResponseKeyType) UnmarshalJSON(src []byte) error { // NewServiceAccountKeyListResponseKeyTypeFromValue returns a pointer to a valid ServiceAccountKeyListResponseKeyType // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewServiceAccountKeyListResponseKeyTypeFromValue(v ServiceAccountKeyListResponseKeyType) (*ServiceAccountKeyListResponseKeyType, error) { ev := ServiceAccountKeyListResponseKeyType(v) if ev.IsValid() { @@ -387,6 +460,7 @@ func NewServiceAccountKeyListResponseKeyTypeFromValue(v ServiceAccountKeyListRes } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v ServiceAccountKeyListResponseKeyType) IsValid() bool { for _, existing := range AllowedServiceAccountKeyListResponseKeyTypeEnumValues { if existing == v { @@ -397,50 +471,65 @@ func (v ServiceAccountKeyListResponseKeyType) IsValid() bool { } // Ptr returns reference to KeyTypeKeyType value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v ServiceAccountKeyListResponseKeyType) Ptr() *ServiceAccountKeyListResponseKeyType { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableServiceAccountKeyListResponseKeyType struct { value *ServiceAccountKeyListResponseKeyType isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponseKeyType) Get() *ServiceAccountKeyListResponseKeyType { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponseKeyType) Set(val *ServiceAccountKeyListResponseKeyType) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponseKeyType) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponseKeyType) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableServiceAccountKeyListResponseKeyType(val *ServiceAccountKeyListResponseKeyType) *NullableServiceAccountKeyListResponseKeyType { return &NullableServiceAccountKeyListResponseKeyType{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponseKeyType) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponseKeyType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetKeyTypeAttributeType = *ServiceAccountKeyListResponseKeyType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetKeyTypeArgType = ServiceAccountKeyListResponseKeyType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetKeyTypeRetType = ServiceAccountKeyListResponseKeyType +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountKeyListResponseGetKeyTypeAttributeTypeOk(arg ServiceAccountKeyListResponseGetKeyTypeAttributeType) (ret ServiceAccountKeyListResponseGetKeyTypeRetType, ok bool) { if arg == nil { return ret, false @@ -448,6 +537,7 @@ func getServiceAccountKeyListResponseGetKeyTypeAttributeTypeOk(arg ServiceAccoun return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountKeyListResponseGetKeyTypeAttributeType(arg *ServiceAccountKeyListResponseGetKeyTypeAttributeType, val ServiceAccountKeyListResponseGetKeyTypeRetType) { *arg = &val } @@ -457,10 +547,16 @@ func setServiceAccountKeyListResponseGetKeyTypeAttributeType(arg *ServiceAccount */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetValidUntilAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetValidUntilArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponseGetValidUntilRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getServiceAccountKeyListResponseGetValidUntilAttributeTypeOk(arg ServiceAccountKeyListResponseGetValidUntilAttributeType) (ret ServiceAccountKeyListResponseGetValidUntilRetType, ok bool) { if arg == nil { return ret, false @@ -468,11 +564,13 @@ func getServiceAccountKeyListResponseGetValidUntilAttributeTypeOk(arg ServiceAcc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setServiceAccountKeyListResponseGetValidUntilAttributeType(arg *ServiceAccountKeyListResponseGetValidUntilAttributeType, val ServiceAccountKeyListResponseGetValidUntilRetType) { *arg = &val } // ServiceAccountKeyListResponse struct for ServiceAccountKeyListResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountKeyListResponse struct { // REQUIRED Active ServiceAccountKeyListResponsegetActiveAttributeType `json:"active" required:"true"` @@ -492,12 +590,14 @@ type ServiceAccountKeyListResponse struct { ValidUntil ServiceAccountKeyListResponseGetValidUntilAttributeType `json:"validUntil,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _ServiceAccountKeyListResponse ServiceAccountKeyListResponse // NewServiceAccountKeyListResponse instantiates a new ServiceAccountKeyListResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewServiceAccountKeyListResponse(active ServiceAccountKeyListResponsegetActiveArgType, createdAt ServiceAccountKeyListResponseGetCreatedAtArgType, id ServiceAccountKeyListResponseGetIdArgType, keyAlgorithm ServiceAccountKeyListResponseGetKeyAlgorithmArgType, keyOrigin ServiceAccountKeyListResponseGetKeyOriginArgType, keyType ServiceAccountKeyListResponseGetKeyTypeArgType) *ServiceAccountKeyListResponse { this := ServiceAccountKeyListResponse{} setServiceAccountKeyListResponsegetActiveAttributeType(&this.Active, active) @@ -512,12 +612,14 @@ func NewServiceAccountKeyListResponse(active ServiceAccountKeyListResponsegetAct // NewServiceAccountKeyListResponseWithDefaults instantiates a new ServiceAccountKeyListResponse 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewServiceAccountKeyListResponseWithDefaults() *ServiceAccountKeyListResponse { this := ServiceAccountKeyListResponse{} return &this } // GetActive returns the Active field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetActive() (ret ServiceAccountKeyListResponsegetActiveRetType) { ret, _ = o.GetActiveOk() return ret @@ -525,16 +627,19 @@ func (o *ServiceAccountKeyListResponse) GetActive() (ret ServiceAccountKeyListRe // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetActiveOk() (ret ServiceAccountKeyListResponsegetActiveRetType, ok bool) { return getServiceAccountKeyListResponsegetActiveAttributeTypeOk(o.Active) } // SetActive sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) SetActive(v ServiceAccountKeyListResponsegetActiveRetType) { setServiceAccountKeyListResponsegetActiveAttributeType(&o.Active, v) } // GetCreatedAt returns the CreatedAt field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetCreatedAt() (ret ServiceAccountKeyListResponseGetCreatedAtRetType) { ret, _ = o.GetCreatedAtOk() return ret @@ -542,16 +647,19 @@ func (o *ServiceAccountKeyListResponse) GetCreatedAt() (ret ServiceAccountKeyLis // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetCreatedAtOk() (ret ServiceAccountKeyListResponseGetCreatedAtRetType, ok bool) { return getServiceAccountKeyListResponseGetCreatedAtAttributeTypeOk(o.CreatedAt) } // SetCreatedAt sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) SetCreatedAt(v ServiceAccountKeyListResponseGetCreatedAtRetType) { setServiceAccountKeyListResponseGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetId() (ret ServiceAccountKeyListResponseGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -559,16 +667,19 @@ func (o *ServiceAccountKeyListResponse) GetId() (ret ServiceAccountKeyListRespon // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetIdOk() (ret ServiceAccountKeyListResponseGetIdRetType, ok bool) { return getServiceAccountKeyListResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) SetId(v ServiceAccountKeyListResponseGetIdRetType) { setServiceAccountKeyListResponseGetIdAttributeType(&o.Id, v) } // GetKeyAlgorithm returns the KeyAlgorithm field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetKeyAlgorithm() (ret ServiceAccountKeyListResponseGetKeyAlgorithmRetType) { ret, _ = o.GetKeyAlgorithmOk() return ret @@ -576,16 +687,19 @@ func (o *ServiceAccountKeyListResponse) GetKeyAlgorithm() (ret ServiceAccountKey // GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetKeyAlgorithmOk() (ret ServiceAccountKeyListResponseGetKeyAlgorithmRetType, ok bool) { return getServiceAccountKeyListResponseGetKeyAlgorithmAttributeTypeOk(o.KeyAlgorithm) } // SetKeyAlgorithm sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) SetKeyAlgorithm(v ServiceAccountKeyListResponseGetKeyAlgorithmRetType) { setServiceAccountKeyListResponseGetKeyAlgorithmAttributeType(&o.KeyAlgorithm, v) } // GetKeyOrigin returns the KeyOrigin field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetKeyOrigin() (ret ServiceAccountKeyListResponseGetKeyOriginRetType) { ret, _ = o.GetKeyOriginOk() return ret @@ -593,16 +707,19 @@ func (o *ServiceAccountKeyListResponse) GetKeyOrigin() (ret ServiceAccountKeyLis // GetKeyOriginOk returns a tuple with the KeyOrigin field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetKeyOriginOk() (ret ServiceAccountKeyListResponseGetKeyOriginRetType, ok bool) { return getServiceAccountKeyListResponseGetKeyOriginAttributeTypeOk(o.KeyOrigin) } // SetKeyOrigin sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) SetKeyOrigin(v ServiceAccountKeyListResponseGetKeyOriginRetType) { setServiceAccountKeyListResponseGetKeyOriginAttributeType(&o.KeyOrigin, v) } // GetKeyType returns the KeyType field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetKeyType() (ret ServiceAccountKeyListResponseGetKeyTypeRetType) { ret, _ = o.GetKeyTypeOk() return ret @@ -610,16 +727,19 @@ func (o *ServiceAccountKeyListResponse) GetKeyType() (ret ServiceAccountKeyListR // GetKeyTypeOk returns a tuple with the KeyType field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetKeyTypeOk() (ret ServiceAccountKeyListResponseGetKeyTypeRetType, ok bool) { return getServiceAccountKeyListResponseGetKeyTypeAttributeTypeOk(o.KeyType) } // SetKeyType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) SetKeyType(v ServiceAccountKeyListResponseGetKeyTypeRetType) { setServiceAccountKeyListResponseGetKeyTypeAttributeType(&o.KeyType, v) } // GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetValidUntil() (res ServiceAccountKeyListResponseGetValidUntilRetType) { res, _ = o.GetValidUntilOk() return @@ -627,21 +747,25 @@ func (o *ServiceAccountKeyListResponse) GetValidUntil() (res ServiceAccountKeyLi // GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) GetValidUntilOk() (ret ServiceAccountKeyListResponseGetValidUntilRetType, ok bool) { return getServiceAccountKeyListResponseGetValidUntilAttributeTypeOk(o.ValidUntil) } // HasValidUntil returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) HasValidUntil() bool { _, ok := o.GetValidUntilOk() return ok } // SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ServiceAccountKeyListResponse) SetValidUntil(v ServiceAccountKeyListResponseGetValidUntilRetType) { setServiceAccountKeyListResponseGetValidUntilAttributeType(&o.ValidUntil, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ServiceAccountKeyListResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getServiceAccountKeyListResponsegetActiveAttributeTypeOk(o.Active); ok { @@ -668,37 +792,45 @@ func (o ServiceAccountKeyListResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableServiceAccountKeyListResponse struct { value *ServiceAccountKeyListResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponse) Get() *ServiceAccountKeyListResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponse) Set(val *ServiceAccountKeyListResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableServiceAccountKeyListResponse(val *ServiceAccountKeyListResponse) *NullableServiceAccountKeyListResponse { return &NullableServiceAccountKeyListResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableServiceAccountKeyListResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableServiceAccountKeyListResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/serviceaccount/oas_commit b/services/serviceaccount/oas_commit index 1568ca803..853627d06 100644 --- a/services/serviceaccount/oas_commit +++ b/services/serviceaccount/oas_commit @@ -1 +1 @@ -de08988e74d198707fe9def2236c63562e5ad6df +335aa32af4d6c0d2a036b8567773da2f051f7efb diff --git a/services/serviceaccount/utils.go b/services/serviceaccount/utils.go index 61e2f8227..c12e56393 100644 --- a/services/serviceaccount/utils.go +++ b/services/serviceaccount/utils.go @@ -18,341 +18,419 @@ import ( ) // PtrBool is a helper routine that returns a pointer to given boolean value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrBool(v bool) *bool { return &v } // PtrInt is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt(v int) *int { return &v } // PtrInt32 is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt32(v int32) *int32 { return &v } // PtrInt64 is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt64(v int64) *int64 { return &v } // PtrFloat32 is a helper routine that returns a pointer to given float value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrFloat32(v float32) *float32 { return &v } // PtrFloat64 is a helper routine that returns a pointer to given float value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrFloat64(v float64) *float64 { return &v } // PtrString is a helper routine that returns a pointer to given string value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrTime(v time.Time) *time.Time { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableValue[T any] struct { value *T isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValue[T]) Get() *T { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValue[T]) Set(val *T) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValue[T]) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValue[T]) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableBool struct { value *bool isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) Get() *bool { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) Set(val *bool) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableBool(val *bool) *NullableBool { return &NullableBool{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt struct { value *int isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) Get() *int { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) Set(val *int) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInt(val *int) *NullableInt { return &NullableInt{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt32 struct { value *int32 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) Get() *int32 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) Set(val *int32) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInt32(val *int32) *NullableInt32 { return &NullableInt32{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt64 struct { value *int64 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) Get() *int64 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) Set(val *int64) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInt64(val *int64) *NullableInt64 { return &NullableInt64{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableFloat32 struct { value *float32 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) Get() *float32 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) Set(val *float32) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableFloat32(val *float32) *NullableFloat32 { return &NullableFloat32{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableFloat64 struct { value *float64 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) Get() *float64 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) Set(val *float64) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableFloat64(val *float64) *NullableFloat64 { return &NullableFloat64{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableString struct { value *string isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) Get() *string { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) Set(val *string) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableString(val *string) *NullableString { return &NullableString{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableTime struct { value *time.Time isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) Get() *time.Time { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) Set(val *time.Time) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableTime(val *time.Time) *NullableTime { return &NullableTime{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) MarshalJSON() ([]byte, error) { return v.value.MarshalJSON() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } // IsNil checks if an input is nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func IsNil(i interface{}) bool { if i == nil { return true @@ -369,13 +447,16 @@ func IsNil(i interface{}) bool { return false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MappedNullable interface { ToMap() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // randString returns a random string with a specified length. It panics if n <= 0. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func randString(n int) string { b := make([]byte, n) for i := range b { diff --git a/services/serviceaccount/v2api/api_default.go b/services/serviceaccount/v2api/api_default.go new file mode 100644 index 000000000..04e805e61 --- /dev/null +++ b/services/serviceaccount/v2api/api_default.go @@ -0,0 +1,3089 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v2api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + CreateAccessToken Create a new Access Token + + Create an Access Token for a Service Account. The service token can be then used for API calls. Save the response token, as it is not recoverable later. Token metadata can be requested until the token is not expired. A token cannot be created using another token from the same service account. Consider using service account keys instead as a more secure and automation friendly solution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the Service Account. + @return ApiCreateAccessTokenRequest + */ + CreateAccessToken(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateAccessTokenRequest + + // CreateAccessTokenExecute executes the request + // @return AccessToken + CreateAccessTokenExecute(r ApiCreateAccessTokenRequest) (*AccessToken, error) + + /* + CreateFederatedIdentityProvider Create a new Federated Identity Provider + + Federate the service account with an identity provider. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @return ApiCreateFederatedIdentityProviderRequest + */ + CreateFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateFederatedIdentityProviderRequest + + // CreateFederatedIdentityProviderExecute executes the request + // @return CreateFederatedIdentityProviderResponse + CreateFederatedIdentityProviderExecute(r ApiCreateFederatedIdentityProviderRequest) (*CreateFederatedIdentityProviderResponse, error) + + /* + CreateServiceAccount Create a new Service Account + + Create a new Service Account in a project. The service account only resides in the project, and initially has no roles or permissions on any resources. After creation, the service account can be assigned to this project, other projects in the parent organization or to the parent organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @return ApiCreateServiceAccountRequest + */ + CreateServiceAccount(ctx context.Context, projectId string) ApiCreateServiceAccountRequest + + // CreateServiceAccountExecute executes the request + // @return ServiceAccount + CreateServiceAccountExecute(r ApiCreateServiceAccountRequest) (*ServiceAccount, error) + + /* + CreateServiceAccountKey Create a new Service Account key + + Create a new key to the service account. You can generate an RSA keypair, and post the PUBLIC part of the keypair, or leave empty, then the service will generate a pair. Maximum of 10 key can be added. A new key cannot be created using the same service account (authenticated using the short lived token of another key of the same service account). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @return ApiCreateServiceAccountKeyRequest + */ + CreateServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateServiceAccountKeyRequest + + // CreateServiceAccountKeyExecute executes the request + // @return CreateServiceAccountKeyResponse + CreateServiceAccountKeyExecute(r ApiCreateServiceAccountKeyRequest) (*CreateServiceAccountKeyResponse, error) + + /* + CreateShortLivedAccessToken Request short lived API access token (OAUTH2). + + Request a short lived API access token with OAUTH2. Compatible with [Using JWTs as Authorization Grants](https://www.rfc-editor.org/rfc/rfc7523.html#section-2.1) + You can request a token with a self signed token, or with a refresh token. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateShortLivedAccessTokenRequest + */ + CreateShortLivedAccessToken(ctx context.Context) ApiCreateShortLivedAccessTokenRequest + + // CreateShortLivedAccessTokenExecute executes the request + // @return CreateShortLivedAccessTokenResponse + CreateShortLivedAccessTokenExecute(r ApiCreateShortLivedAccessTokenRequest) (*CreateShortLivedAccessTokenResponse, error) + + /* + DeleteAccessToken Revoke Access Token + + Revoke an Access Token. The access token is instantly revoked, any following calls with the token will be unauthorized. The token metadata is still stored until the expiration time. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The ID of the Service Account. + @param accessTokenId The ID of the Access Token. + @return ApiDeleteAccessTokenRequest + */ + DeleteAccessToken(ctx context.Context, projectId string, serviceAccountEmail string, accessTokenId string) ApiDeleteAccessTokenRequest + + // DeleteAccessTokenExecute executes the request + DeleteAccessTokenExecute(r ApiDeleteAccessTokenRequest) error + + /* + DeleteServiceAccount Delete Service Account + + Delete a Service Account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the Service Account. + @return ApiDeleteServiceAccountRequest + */ + DeleteServiceAccount(ctx context.Context, projectId string, serviceAccountEmail string) ApiDeleteServiceAccountRequest + + // DeleteServiceAccountExecute executes the request + DeleteServiceAccountExecute(r ApiDeleteServiceAccountRequest) error + + /* + DeleteServiceAccountKey Delete a service account key + + Delete a key + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param keyId ID of the key. + @return ApiDeleteServiceAccountKeyRequest + */ + DeleteServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiDeleteServiceAccountKeyRequest + + // DeleteServiceAccountKeyExecute executes the request + DeleteServiceAccountKeyExecute(r ApiDeleteServiceAccountKeyRequest) error + + /* + DeleteServiceFederatedIdentityProvider Delete a service account Federated Identity Provider + + Delete a Federated Identity Provider + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param federationId ID of the Federated Identity Provider. + @return ApiDeleteServiceFederatedIdentityProviderRequest + */ + DeleteServiceFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) ApiDeleteServiceFederatedIdentityProviderRequest + + // DeleteServiceFederatedIdentityProviderExecute executes the request + DeleteServiceFederatedIdentityProviderExecute(r ApiDeleteServiceFederatedIdentityProviderRequest) error + + /* + GetJWKS Get JSON Web Key set of the service account + + Get JSON Web Key set of the service account + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceAccountEmail The email of the service account. + @return ApiGetJWKSRequest + */ + GetJWKS(ctx context.Context, serviceAccountEmail string) ApiGetJWKSRequest + + // GetJWKSExecute executes the request + // @return JWKS + GetJWKSExecute(r ApiGetJWKSRequest) (*JWKS, error) + + /* + GetServiceAccountKey Get service account key details + + Get key details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param keyId ID of the key. + @return ApiGetServiceAccountKeyRequest + */ + GetServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiGetServiceAccountKeyRequest + + // GetServiceAccountKeyExecute executes the request + // @return GetServiceAccountKeyResponse + GetServiceAccountKeyExecute(r ApiGetServiceAccountKeyRequest) (*GetServiceAccountKeyResponse, error) + + /* + ListAccessTokens List Access Tokens of Service Account + + Get all Access Tokens of a Service Account. The token itself is not returned, only the metadata about the access tokens. Access tokens are listed until they are expired. Revoked tokens are returned until expired. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the Service Account. + @return ApiListAccessTokensRequest + */ + ListAccessTokens(ctx context.Context, projectId string, serviceAccountEmail string) ApiListAccessTokensRequest + + // ListAccessTokensExecute executes the request + // @return ListAccessTokensResponse + ListAccessTokensExecute(r ApiListAccessTokensRequest) (*ListAccessTokensResponse, error) + + /* + ListFederatedIdentityProviders List all federated identity providers + + List all the identity providers the service account is federated with. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @return ApiListFederatedIdentityProvidersRequest + */ + ListFederatedIdentityProviders(ctx context.Context, projectId string, serviceAccountEmail string) ApiListFederatedIdentityProvidersRequest + + // ListFederatedIdentityProvidersExecute executes the request + // @return FederatedListFederatedIdentityProvidersResponse + ListFederatedIdentityProvidersExecute(r ApiListFederatedIdentityProvidersRequest) (*FederatedListFederatedIdentityProvidersResponse, error) + + /* + ListServiceAccountKeys List all keys that belong to the service account + + List all keys that belong to the service account + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @return ApiListServiceAccountKeysRequest + */ + ListServiceAccountKeys(ctx context.Context, projectId string, serviceAccountEmail string) ApiListServiceAccountKeysRequest + + // ListServiceAccountKeysExecute executes the request + // @return ListServiceAccountKeysResponse + ListServiceAccountKeysExecute(r ApiListServiceAccountKeysRequest) (*ListServiceAccountKeysResponse, error) + + /* + ListServiceAccounts List all Service Accounts + + List all Service Account resources in a project. Returns the service account resources, not the service accounts that has access to the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @return ApiListServiceAccountsRequest + */ + ListServiceAccounts(ctx context.Context, projectId string) ApiListServiceAccountsRequest + + // ListServiceAccountsExecute executes the request + // @return ListServiceAccountsResponse + ListServiceAccountsExecute(r ApiListServiceAccountsRequest) (*ListServiceAccountsResponse, error) + + /* + PartialUpdateServiceAccountFederatedIdentityProvider Update Service Account Federated Identity Provider + + Update a Federated Identity Provider. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param federationId ID of the Federated Identity Provider. + @return ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest + */ + PartialUpdateServiceAccountFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest + + // PartialUpdateServiceAccountFederatedIdentityProviderExecute executes the request + // @return CreateFederatedIdentityProviderResponse + PartialUpdateServiceAccountFederatedIdentityProviderExecute(r ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest) (*CreateFederatedIdentityProviderResponse, error) + + /* + PartialUpdateServiceAccountKey Update Service Account key + + Update a key. You can activate or deactivate a key, or set/delete validUntil. The key cannot be updated using the same service account (authenticated using the short lived token of the key). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param keyId ID of the key. + @return ApiPartialUpdateServiceAccountKeyRequest + */ + PartialUpdateServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiPartialUpdateServiceAccountKeyRequest + + // PartialUpdateServiceAccountKeyExecute executes the request + // @return PartialUpdateServiceAccountKeyResponse + PartialUpdateServiceAccountKeyExecute(r ApiPartialUpdateServiceAccountKeyRequest) (*PartialUpdateServiceAccountKeyResponse, error) +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCreateAccessTokenRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string + createAccessTokenPayload *CreateAccessTokenPayload +} + +// Token request. Optional. If not specified the access token will be valid for 90days. +func (r ApiCreateAccessTokenRequest) CreateAccessTokenPayload(createAccessTokenPayload CreateAccessTokenPayload) ApiCreateAccessTokenRequest { + r.createAccessTokenPayload = &createAccessTokenPayload + return r +} + +func (r ApiCreateAccessTokenRequest) Execute() (*AccessToken, error) { + return r.ApiService.CreateAccessTokenExecute(r) +} + +/* +CreateAccessToken Create a new Access Token + +Create an Access Token for a Service Account. The service token can be then used for API calls. Save the response token, as it is not recoverable later. Token metadata can be requested until the token is not expired. A token cannot be created using another token from the same service account. Consider using service account keys instead as a more secure and automation friendly solution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the Service Account. + @return ApiCreateAccessTokenRequest +*/ +func (a *DefaultAPIService) CreateAccessToken(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateAccessTokenRequest { + return ApiCreateAccessTokenRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// Execute executes the request +// +// @return AccessToken +func (a *DefaultAPIService) CreateAccessTokenExecute(r ApiCreateAccessTokenRequest) (*AccessToken, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateAccessToken") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/access-tokens" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.createAccessTokenPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateFederatedIdentityProviderRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string + createFederatedIdentityProviderPayload *CreateFederatedIdentityProviderPayload +} + +// Federated identity provider request +func (r ApiCreateFederatedIdentityProviderRequest) CreateFederatedIdentityProviderPayload(createFederatedIdentityProviderPayload CreateFederatedIdentityProviderPayload) ApiCreateFederatedIdentityProviderRequest { + r.createFederatedIdentityProviderPayload = &createFederatedIdentityProviderPayload + return r +} + +func (r ApiCreateFederatedIdentityProviderRequest) Execute() (*CreateFederatedIdentityProviderResponse, error) { + return r.ApiService.CreateFederatedIdentityProviderExecute(r) +} + +/* +CreateFederatedIdentityProvider Create a new Federated Identity Provider + +Federate the service account with an identity provider. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @return ApiCreateFederatedIdentityProviderRequest +*/ +func (a *DefaultAPIService) CreateFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateFederatedIdentityProviderRequest { + return ApiCreateFederatedIdentityProviderRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// Execute executes the request +// +// @return CreateFederatedIdentityProviderResponse +func (a *DefaultAPIService) CreateFederatedIdentityProviderExecute(r ApiCreateFederatedIdentityProviderRequest) (*CreateFederatedIdentityProviderResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateFederatedIdentityProviderResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateFederatedIdentityProvider") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/federations" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.createFederatedIdentityProviderPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateServiceAccountRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + createServiceAccountPayload *CreateServiceAccountPayload +} + +// Service account request +func (r ApiCreateServiceAccountRequest) CreateServiceAccountPayload(createServiceAccountPayload CreateServiceAccountPayload) ApiCreateServiceAccountRequest { + r.createServiceAccountPayload = &createServiceAccountPayload + return r +} + +func (r ApiCreateServiceAccountRequest) Execute() (*ServiceAccount, error) { + return r.ApiService.CreateServiceAccountExecute(r) +} + +/* +CreateServiceAccount Create a new Service Account + +Create a new Service Account in a project. The service account only resides in the project, and initially has no roles or permissions on any resources. After creation, the service account can be assigned to this project, other projects in the parent organization or to the parent organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @return ApiCreateServiceAccountRequest +*/ +func (a *DefaultAPIService) CreateServiceAccount(ctx context.Context, projectId string) ApiCreateServiceAccountRequest { + return ApiCreateServiceAccountRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ServiceAccount +func (a *DefaultAPIService) CreateServiceAccountExecute(r ApiCreateServiceAccountRequest) (*ServiceAccount, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateServiceAccount") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.createServiceAccountPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateServiceAccountKeyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string + createServiceAccountKeyPayload *CreateServiceAccountKeyPayload +} + +// Service account request +func (r ApiCreateServiceAccountKeyRequest) CreateServiceAccountKeyPayload(createServiceAccountKeyPayload CreateServiceAccountKeyPayload) ApiCreateServiceAccountKeyRequest { + r.createServiceAccountKeyPayload = &createServiceAccountKeyPayload + return r +} + +func (r ApiCreateServiceAccountKeyRequest) Execute() (*CreateServiceAccountKeyResponse, error) { + return r.ApiService.CreateServiceAccountKeyExecute(r) +} + +/* +CreateServiceAccountKey Create a new Service Account key + +Create a new key to the service account. You can generate an RSA keypair, and post the PUBLIC part of the keypair, or leave empty, then the service will generate a pair. Maximum of 10 key can be added. A new key cannot be created using the same service account (authenticated using the short lived token of another key of the same service account). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @return ApiCreateServiceAccountKeyRequest +*/ +func (a *DefaultAPIService) CreateServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateServiceAccountKeyRequest { + return ApiCreateServiceAccountKeyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// Execute executes the request +// +// @return CreateServiceAccountKeyResponse +func (a *DefaultAPIService) CreateServiceAccountKeyExecute(r ApiCreateServiceAccountKeyRequest) (*CreateServiceAccountKeyResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateServiceAccountKeyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateServiceAccountKey") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/keys" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.createServiceAccountKeyPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateShortLivedAccessTokenRequest struct { + ctx context.Context + ApiService DefaultAPI + grantType *string + assertion *string + refreshToken *string +} + +// Always use URL encoded values. E.g. urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer +func (r ApiCreateShortLivedAccessTokenRequest) GrantType(grantType string) ApiCreateShortLivedAccessTokenRequest { + r.grantType = &grantType + return r +} + +// The self signed JWT. Must be given when grant_type is urn:ietf:params:oauth:grant-type:jwt-bearer +func (r ApiCreateShortLivedAccessTokenRequest) Assertion(assertion string) ApiCreateShortLivedAccessTokenRequest { + r.assertion = &assertion + return r +} + +// Refresh token provided by a previous call with a self signed token. Must be given when grant_type is refresh_token +func (r ApiCreateShortLivedAccessTokenRequest) RefreshToken(refreshToken string) ApiCreateShortLivedAccessTokenRequest { + r.refreshToken = &refreshToken + return r +} + +func (r ApiCreateShortLivedAccessTokenRequest) Execute() (*CreateShortLivedAccessTokenResponse, error) { + return r.ApiService.CreateShortLivedAccessTokenExecute(r) +} + +/* +CreateShortLivedAccessToken Request short lived API access token (OAUTH2). + +Request a short lived API access token with OAUTH2. Compatible with [Using JWTs as Authorization Grants](https://www.rfc-editor.org/rfc/rfc7523.html#section-2.1) +You can request a token with a self signed token, or with a refresh token. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateShortLivedAccessTokenRequest +*/ +func (a *DefaultAPIService) CreateShortLivedAccessToken(ctx context.Context) ApiCreateShortLivedAccessTokenRequest { + return ApiCreateShortLivedAccessTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CreateShortLivedAccessTokenResponse +func (a *DefaultAPIService) CreateShortLivedAccessTokenExecute(r ApiCreateShortLivedAccessTokenRequest) (*CreateShortLivedAccessTokenResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateShortLivedAccessTokenResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateShortLivedAccessToken") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.grantType == nil { + return localVarReturnValue, reportError("grantType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // 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.assertion != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "assertion", r.assertion, "", "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "grant_type", r.grantType, "", "") + if r.refreshToken != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "refresh_token", r.refreshToken, "", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteAccessTokenRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string + accessTokenId string +} + +func (r ApiDeleteAccessTokenRequest) Execute() error { + return r.ApiService.DeleteAccessTokenExecute(r) +} + +/* +DeleteAccessToken Revoke Access Token + +Revoke an Access Token. The access token is instantly revoked, any following calls with the token will be unauthorized. The token metadata is still stored until the expiration time. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The ID of the Service Account. + @param accessTokenId The ID of the Access Token. + @return ApiDeleteAccessTokenRequest +*/ +func (a *DefaultAPIService) DeleteAccessToken(ctx context.Context, projectId string, serviceAccountEmail string, accessTokenId string) ApiDeleteAccessTokenRequest { + return ApiDeleteAccessTokenRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + accessTokenId: accessTokenId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteAccessTokenExecute(r ApiDeleteAccessTokenRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteAccessToken") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/access-tokens/{accessTokenId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"accessTokenId"+"}", url.PathEscape(parameterValueToString(r.accessTokenId, "accessTokenId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiDeleteServiceAccountRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string +} + +func (r ApiDeleteServiceAccountRequest) Execute() error { + return r.ApiService.DeleteServiceAccountExecute(r) +} + +/* +DeleteServiceAccount Delete Service Account + +Delete a Service Account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the Service Account. + @return ApiDeleteServiceAccountRequest +*/ +func (a *DefaultAPIService) DeleteServiceAccount(ctx context.Context, projectId string, serviceAccountEmail string) ApiDeleteServiceAccountRequest { + return ApiDeleteServiceAccountRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteServiceAccountExecute(r ApiDeleteServiceAccountRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteServiceAccount") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiDeleteServiceAccountKeyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string + keyId string +} + +func (r ApiDeleteServiceAccountKeyRequest) Execute() error { + return r.ApiService.DeleteServiceAccountKeyExecute(r) +} + +/* +DeleteServiceAccountKey Delete a service account key + +Delete a key + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param keyId ID of the key. + @return ApiDeleteServiceAccountKeyRequest +*/ +func (a *DefaultAPIService) DeleteServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiDeleteServiceAccountKeyRequest { + return ApiDeleteServiceAccountKeyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + keyId: keyId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteServiceAccountKeyExecute(r ApiDeleteServiceAccountKeyRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteServiceAccountKey") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/keys/{keyId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"keyId"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiDeleteServiceFederatedIdentityProviderRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string + federationId string +} + +func (r ApiDeleteServiceFederatedIdentityProviderRequest) Execute() error { + return r.ApiService.DeleteServiceFederatedIdentityProviderExecute(r) +} + +/* +DeleteServiceFederatedIdentityProvider Delete a service account Federated Identity Provider + +Delete a Federated Identity Provider + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param federationId ID of the Federated Identity Provider. + @return ApiDeleteServiceFederatedIdentityProviderRequest +*/ +func (a *DefaultAPIService) DeleteServiceFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) ApiDeleteServiceFederatedIdentityProviderRequest { + return ApiDeleteServiceFederatedIdentityProviderRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + federationId: federationId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteServiceFederatedIdentityProviderExecute(r ApiDeleteServiceFederatedIdentityProviderRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteServiceFederatedIdentityProvider") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/federations/{federationId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"federationId"+"}", url.PathEscape(parameterValueToString(r.federationId, "federationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiGetJWKSRequest struct { + ctx context.Context + ApiService DefaultAPI + serviceAccountEmail string +} + +func (r ApiGetJWKSRequest) Execute() (*JWKS, error) { + return r.ApiService.GetJWKSExecute(r) +} + +/* +GetJWKS Get JSON Web Key set of the service account + +Get JSON Web Key set of the service account + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceAccountEmail The email of the service account. + @return ApiGetJWKSRequest +*/ +func (a *DefaultAPIService) GetJWKS(ctx context.Context, serviceAccountEmail string) ApiGetJWKSRequest { + return ApiGetJWKSRequest{ + ApiService: a, + ctx: ctx, + serviceAccountEmail: serviceAccountEmail, + } +} + +// Execute executes the request +// +// @return JWKS +func (a *DefaultAPIService) GetJWKSExecute(r ApiGetJWKSRequest) (*JWKS, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *JWKS + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetJWKS") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/service-accounts/public/jwk/{serviceAccountEmail}" + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetServiceAccountKeyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string + keyId string + format *string +} + +// Requested format for the public key +func (r ApiGetServiceAccountKeyRequest) Format(format string) ApiGetServiceAccountKeyRequest { + r.format = &format + return r +} + +func (r ApiGetServiceAccountKeyRequest) Execute() (*GetServiceAccountKeyResponse, error) { + return r.ApiService.GetServiceAccountKeyExecute(r) +} + +/* +GetServiceAccountKey Get service account key details + +Get key details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param keyId ID of the key. + @return ApiGetServiceAccountKeyRequest +*/ +func (a *DefaultAPIService) GetServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiGetServiceAccountKeyRequest { + return ApiGetServiceAccountKeyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + keyId: keyId, + } +} + +// Execute executes the request +// +// @return GetServiceAccountKeyResponse +func (a *DefaultAPIService) GetServiceAccountKeyExecute(r ApiGetServiceAccountKeyRequest) (*GetServiceAccountKeyResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetServiceAccountKeyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetServiceAccountKey") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/keys/{keyId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"keyId"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.format != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "format", r.format, "form", "") + } else { + var defaultValue string = "X509_PEM" + parameterAddToHeaderOrQuery(localVarQueryParams, "format", defaultValue, "form", "") + r.format = &defaultValue + } + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListAccessTokensRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string +} + +func (r ApiListAccessTokensRequest) Execute() (*ListAccessTokensResponse, error) { + return r.ApiService.ListAccessTokensExecute(r) +} + +/* +ListAccessTokens List Access Tokens of Service Account + +Get all Access Tokens of a Service Account. The token itself is not returned, only the metadata about the access tokens. Access tokens are listed until they are expired. Revoked tokens are returned until expired. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the Service Account. + @return ApiListAccessTokensRequest +*/ +func (a *DefaultAPIService) ListAccessTokens(ctx context.Context, projectId string, serviceAccountEmail string) ApiListAccessTokensRequest { + return ApiListAccessTokensRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// Execute executes the request +// +// @return ListAccessTokensResponse +func (a *DefaultAPIService) ListAccessTokensExecute(r ApiListAccessTokensRequest) (*ListAccessTokensResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAccessTokensResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListAccessTokens") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/access-tokens" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListFederatedIdentityProvidersRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string +} + +func (r ApiListFederatedIdentityProvidersRequest) Execute() (*FederatedListFederatedIdentityProvidersResponse, error) { + return r.ApiService.ListFederatedIdentityProvidersExecute(r) +} + +/* +ListFederatedIdentityProviders List all federated identity providers + +List all the identity providers the service account is federated with. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @return ApiListFederatedIdentityProvidersRequest +*/ +func (a *DefaultAPIService) ListFederatedIdentityProviders(ctx context.Context, projectId string, serviceAccountEmail string) ApiListFederatedIdentityProvidersRequest { + return ApiListFederatedIdentityProvidersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// Execute executes the request +// +// @return FederatedListFederatedIdentityProvidersResponse +func (a *DefaultAPIService) ListFederatedIdentityProvidersExecute(r ApiListFederatedIdentityProvidersRequest) (*FederatedListFederatedIdentityProvidersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FederatedListFederatedIdentityProvidersResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListFederatedIdentityProviders") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/federations" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListServiceAccountKeysRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string +} + +func (r ApiListServiceAccountKeysRequest) Execute() (*ListServiceAccountKeysResponse, error) { + return r.ApiService.ListServiceAccountKeysExecute(r) +} + +/* +ListServiceAccountKeys List all keys that belong to the service account + +List all keys that belong to the service account + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @return ApiListServiceAccountKeysRequest +*/ +func (a *DefaultAPIService) ListServiceAccountKeys(ctx context.Context, projectId string, serviceAccountEmail string) ApiListServiceAccountKeysRequest { + return ApiListServiceAccountKeysRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// Execute executes the request +// +// @return ListServiceAccountKeysResponse +func (a *DefaultAPIService) ListServiceAccountKeysExecute(r ApiListServiceAccountKeysRequest) (*ListServiceAccountKeysResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListServiceAccountKeysResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListServiceAccountKeys") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/keys" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListServiceAccountsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiListServiceAccountsRequest) Execute() (*ListServiceAccountsResponse, error) { + return r.ApiService.ListServiceAccountsExecute(r) +} + +/* +ListServiceAccounts List all Service Accounts + +List all Service Account resources in a project. Returns the service account resources, not the service accounts that has access to the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @return ApiListServiceAccountsRequest +*/ +func (a *DefaultAPIService) ListServiceAccounts(ctx context.Context, projectId string) ApiListServiceAccountsRequest { + return ApiListServiceAccountsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListServiceAccountsResponse +func (a *DefaultAPIService) ListServiceAccountsExecute(r ApiListServiceAccountsRequest) (*ListServiceAccountsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListServiceAccountsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListServiceAccounts") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string + federationId string + partialUpdateServiceAccountFederatedIdentityProviderPayload *PartialUpdateServiceAccountFederatedIdentityProviderPayload +} + +// Delete a Federated Identity Provider +func (r ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest) PartialUpdateServiceAccountFederatedIdentityProviderPayload(partialUpdateServiceAccountFederatedIdentityProviderPayload PartialUpdateServiceAccountFederatedIdentityProviderPayload) ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest { + r.partialUpdateServiceAccountFederatedIdentityProviderPayload = &partialUpdateServiceAccountFederatedIdentityProviderPayload + return r +} + +func (r ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest) Execute() (*CreateFederatedIdentityProviderResponse, error) { + return r.ApiService.PartialUpdateServiceAccountFederatedIdentityProviderExecute(r) +} + +/* +PartialUpdateServiceAccountFederatedIdentityProvider Update Service Account Federated Identity Provider + +Update a Federated Identity Provider. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param federationId ID of the Federated Identity Provider. + @return ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest +*/ +func (a *DefaultAPIService) PartialUpdateServiceAccountFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest { + return ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + federationId: federationId, + } +} + +// Execute executes the request +// +// @return CreateFederatedIdentityProviderResponse +func (a *DefaultAPIService) PartialUpdateServiceAccountFederatedIdentityProviderExecute(r ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest) (*CreateFederatedIdentityProviderResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateFederatedIdentityProviderResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PartialUpdateServiceAccountFederatedIdentityProvider") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/federations/{federationId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"federationId"+"}", url.PathEscape(parameterValueToString(r.federationId, "federationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.partialUpdateServiceAccountFederatedIdentityProviderPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiPartialUpdateServiceAccountKeyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + serviceAccountEmail string + keyId string + partialUpdateServiceAccountKeyPayload *PartialUpdateServiceAccountKeyPayload +} + +// Service account request +func (r ApiPartialUpdateServiceAccountKeyRequest) PartialUpdateServiceAccountKeyPayload(partialUpdateServiceAccountKeyPayload PartialUpdateServiceAccountKeyPayload) ApiPartialUpdateServiceAccountKeyRequest { + r.partialUpdateServiceAccountKeyPayload = &partialUpdateServiceAccountKeyPayload + return r +} + +func (r ApiPartialUpdateServiceAccountKeyRequest) Execute() (*PartialUpdateServiceAccountKeyResponse, error) { + return r.ApiService.PartialUpdateServiceAccountKeyExecute(r) +} + +/* +PartialUpdateServiceAccountKey Update Service Account key + +Update a key. You can activate or deactivate a key, or set/delete validUntil. The key cannot be updated using the same service account (authenticated using the short lived token of the key). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The ID of the project. + @param serviceAccountEmail The email of the service account. + @param keyId ID of the key. + @return ApiPartialUpdateServiceAccountKeyRequest +*/ +func (a *DefaultAPIService) PartialUpdateServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiPartialUpdateServiceAccountKeyRequest { + return ApiPartialUpdateServiceAccountKeyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + keyId: keyId, + } +} + +// Execute executes the request +// +// @return PartialUpdateServiceAccountKeyResponse +func (a *DefaultAPIService) PartialUpdateServiceAccountKeyExecute(r ApiPartialUpdateServiceAccountKeyRequest) (*PartialUpdateServiceAccountKeyResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PartialUpdateServiceAccountKeyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PartialUpdateServiceAccountKey") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/keys/{keyId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serviceAccountEmail"+"}", url.PathEscape(parameterValueToString(r.serviceAccountEmail, "serviceAccountEmail")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"keyId"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // 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 + } + // body params + localVarPostBody = r.partialUpdateServiceAccountKeyPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/services/serviceaccount/v2api/api_default_mock.go b/services/serviceaccount/v2api/api_default_mock.go new file mode 100644 index 000000000..85de14c08 --- /dev/null +++ b/services/serviceaccount/v2api/api_default_mock.go @@ -0,0 +1,377 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "context" +) + +// assert the implementation matches the interface +var _ DefaultAPI = &DefaultAPIServiceMock{} + +// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. +// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. +type DefaultAPIServiceMock struct { + // CreateAccessTokenExecuteMock can be populated to implement the behavior of the CreateAccessTokenExecute function of this mock + CreateAccessTokenExecuteMock *func(r ApiCreateAccessTokenRequest) (*AccessToken, error) + // CreateFederatedIdentityProviderExecuteMock can be populated to implement the behavior of the CreateFederatedIdentityProviderExecute function of this mock + CreateFederatedIdentityProviderExecuteMock *func(r ApiCreateFederatedIdentityProviderRequest) (*CreateFederatedIdentityProviderResponse, error) + // CreateServiceAccountExecuteMock can be populated to implement the behavior of the CreateServiceAccountExecute function of this mock + CreateServiceAccountExecuteMock *func(r ApiCreateServiceAccountRequest) (*ServiceAccount, error) + // CreateServiceAccountKeyExecuteMock can be populated to implement the behavior of the CreateServiceAccountKeyExecute function of this mock + CreateServiceAccountKeyExecuteMock *func(r ApiCreateServiceAccountKeyRequest) (*CreateServiceAccountKeyResponse, error) + // CreateShortLivedAccessTokenExecuteMock can be populated to implement the behavior of the CreateShortLivedAccessTokenExecute function of this mock + CreateShortLivedAccessTokenExecuteMock *func(r ApiCreateShortLivedAccessTokenRequest) (*CreateShortLivedAccessTokenResponse, error) + // DeleteAccessTokenExecuteMock can be populated to implement the behavior of the DeleteAccessTokenExecute function of this mock + DeleteAccessTokenExecuteMock *func(r ApiDeleteAccessTokenRequest) error + // DeleteServiceAccountExecuteMock can be populated to implement the behavior of the DeleteServiceAccountExecute function of this mock + DeleteServiceAccountExecuteMock *func(r ApiDeleteServiceAccountRequest) error + // DeleteServiceAccountKeyExecuteMock can be populated to implement the behavior of the DeleteServiceAccountKeyExecute function of this mock + DeleteServiceAccountKeyExecuteMock *func(r ApiDeleteServiceAccountKeyRequest) error + // DeleteServiceFederatedIdentityProviderExecuteMock can be populated to implement the behavior of the DeleteServiceFederatedIdentityProviderExecute function of this mock + DeleteServiceFederatedIdentityProviderExecuteMock *func(r ApiDeleteServiceFederatedIdentityProviderRequest) error + // GetJWKSExecuteMock can be populated to implement the behavior of the GetJWKSExecute function of this mock + GetJWKSExecuteMock *func(r ApiGetJWKSRequest) (*JWKS, error) + // GetServiceAccountKeyExecuteMock can be populated to implement the behavior of the GetServiceAccountKeyExecute function of this mock + GetServiceAccountKeyExecuteMock *func(r ApiGetServiceAccountKeyRequest) (*GetServiceAccountKeyResponse, error) + // ListAccessTokensExecuteMock can be populated to implement the behavior of the ListAccessTokensExecute function of this mock + ListAccessTokensExecuteMock *func(r ApiListAccessTokensRequest) (*ListAccessTokensResponse, error) + // ListFederatedIdentityProvidersExecuteMock can be populated to implement the behavior of the ListFederatedIdentityProvidersExecute function of this mock + ListFederatedIdentityProvidersExecuteMock *func(r ApiListFederatedIdentityProvidersRequest) (*FederatedListFederatedIdentityProvidersResponse, error) + // ListServiceAccountKeysExecuteMock can be populated to implement the behavior of the ListServiceAccountKeysExecute function of this mock + ListServiceAccountKeysExecuteMock *func(r ApiListServiceAccountKeysRequest) (*ListServiceAccountKeysResponse, error) + // ListServiceAccountsExecuteMock can be populated to implement the behavior of the ListServiceAccountsExecute function of this mock + ListServiceAccountsExecuteMock *func(r ApiListServiceAccountsRequest) (*ListServiceAccountsResponse, error) + // PartialUpdateServiceAccountFederatedIdentityProviderExecuteMock can be populated to implement the behavior of the PartialUpdateServiceAccountFederatedIdentityProviderExecute function of this mock + PartialUpdateServiceAccountFederatedIdentityProviderExecuteMock *func(r ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest) (*CreateFederatedIdentityProviderResponse, error) + // PartialUpdateServiceAccountKeyExecuteMock can be populated to implement the behavior of the PartialUpdateServiceAccountKeyExecute function of this mock + PartialUpdateServiceAccountKeyExecuteMock *func(r ApiPartialUpdateServiceAccountKeyRequest) (*PartialUpdateServiceAccountKeyResponse, error) +} + +func (a DefaultAPIServiceMock) CreateAccessToken(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateAccessTokenRequest { + return ApiCreateAccessTokenRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// CreateAccessTokenExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateAccessTokenExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateAccessTokenExecute(r ApiCreateAccessTokenRequest) (*AccessToken, error) { + if a.CreateAccessTokenExecuteMock == nil { + var localVarReturnValue *AccessToken + return localVarReturnValue, nil + } + + return (*a.CreateAccessTokenExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateFederatedIdentityProviderRequest { + return ApiCreateFederatedIdentityProviderRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// CreateFederatedIdentityProviderExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateFederatedIdentityProviderExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateFederatedIdentityProviderExecute(r ApiCreateFederatedIdentityProviderRequest) (*CreateFederatedIdentityProviderResponse, error) { + if a.CreateFederatedIdentityProviderExecuteMock == nil { + var localVarReturnValue *CreateFederatedIdentityProviderResponse + return localVarReturnValue, nil + } + + return (*a.CreateFederatedIdentityProviderExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateServiceAccount(ctx context.Context, projectId string) ApiCreateServiceAccountRequest { + return ApiCreateServiceAccountRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// CreateServiceAccountExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateServiceAccountExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateServiceAccountExecute(r ApiCreateServiceAccountRequest) (*ServiceAccount, error) { + if a.CreateServiceAccountExecuteMock == nil { + var localVarReturnValue *ServiceAccount + return localVarReturnValue, nil + } + + return (*a.CreateServiceAccountExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string) ApiCreateServiceAccountKeyRequest { + return ApiCreateServiceAccountKeyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// CreateServiceAccountKeyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateServiceAccountKeyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateServiceAccountKeyExecute(r ApiCreateServiceAccountKeyRequest) (*CreateServiceAccountKeyResponse, error) { + if a.CreateServiceAccountKeyExecuteMock == nil { + var localVarReturnValue *CreateServiceAccountKeyResponse + return localVarReturnValue, nil + } + + return (*a.CreateServiceAccountKeyExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateShortLivedAccessToken(ctx context.Context) ApiCreateShortLivedAccessTokenRequest { + return ApiCreateShortLivedAccessTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// CreateShortLivedAccessTokenExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateShortLivedAccessTokenExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateShortLivedAccessTokenExecute(r ApiCreateShortLivedAccessTokenRequest) (*CreateShortLivedAccessTokenResponse, error) { + if a.CreateShortLivedAccessTokenExecuteMock == nil { + var localVarReturnValue *CreateShortLivedAccessTokenResponse + return localVarReturnValue, nil + } + + return (*a.CreateShortLivedAccessTokenExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteAccessToken(ctx context.Context, projectId string, serviceAccountEmail string, accessTokenId string) ApiDeleteAccessTokenRequest { + return ApiDeleteAccessTokenRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + accessTokenId: accessTokenId, + } +} + +// DeleteAccessTokenExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteAccessTokenExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteAccessTokenExecute(r ApiDeleteAccessTokenRequest) error { + if a.DeleteAccessTokenExecuteMock == nil { + return nil + } + + return (*a.DeleteAccessTokenExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteServiceAccount(ctx context.Context, projectId string, serviceAccountEmail string) ApiDeleteServiceAccountRequest { + return ApiDeleteServiceAccountRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// DeleteServiceAccountExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteServiceAccountExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteServiceAccountExecute(r ApiDeleteServiceAccountRequest) error { + if a.DeleteServiceAccountExecuteMock == nil { + return nil + } + + return (*a.DeleteServiceAccountExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiDeleteServiceAccountKeyRequest { + return ApiDeleteServiceAccountKeyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + keyId: keyId, + } +} + +// DeleteServiceAccountKeyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteServiceAccountKeyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteServiceAccountKeyExecute(r ApiDeleteServiceAccountKeyRequest) error { + if a.DeleteServiceAccountKeyExecuteMock == nil { + return nil + } + + return (*a.DeleteServiceAccountKeyExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteServiceFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) ApiDeleteServiceFederatedIdentityProviderRequest { + return ApiDeleteServiceFederatedIdentityProviderRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + federationId: federationId, + } +} + +// DeleteServiceFederatedIdentityProviderExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteServiceFederatedIdentityProviderExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteServiceFederatedIdentityProviderExecute(r ApiDeleteServiceFederatedIdentityProviderRequest) error { + if a.DeleteServiceFederatedIdentityProviderExecuteMock == nil { + return nil + } + + return (*a.DeleteServiceFederatedIdentityProviderExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetJWKS(ctx context.Context, serviceAccountEmail string) ApiGetJWKSRequest { + return ApiGetJWKSRequest{ + ApiService: a, + ctx: ctx, + serviceAccountEmail: serviceAccountEmail, + } +} + +// GetJWKSExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetJWKSExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetJWKSExecute(r ApiGetJWKSRequest) (*JWKS, error) { + if a.GetJWKSExecuteMock == nil { + var localVarReturnValue *JWKS + return localVarReturnValue, nil + } + + return (*a.GetJWKSExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiGetServiceAccountKeyRequest { + return ApiGetServiceAccountKeyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + keyId: keyId, + } +} + +// GetServiceAccountKeyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetServiceAccountKeyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetServiceAccountKeyExecute(r ApiGetServiceAccountKeyRequest) (*GetServiceAccountKeyResponse, error) { + if a.GetServiceAccountKeyExecuteMock == nil { + var localVarReturnValue *GetServiceAccountKeyResponse + return localVarReturnValue, nil + } + + return (*a.GetServiceAccountKeyExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListAccessTokens(ctx context.Context, projectId string, serviceAccountEmail string) ApiListAccessTokensRequest { + return ApiListAccessTokensRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// ListAccessTokensExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListAccessTokensExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListAccessTokensExecute(r ApiListAccessTokensRequest) (*ListAccessTokensResponse, error) { + if a.ListAccessTokensExecuteMock == nil { + var localVarReturnValue *ListAccessTokensResponse + return localVarReturnValue, nil + } + + return (*a.ListAccessTokensExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListFederatedIdentityProviders(ctx context.Context, projectId string, serviceAccountEmail string) ApiListFederatedIdentityProvidersRequest { + return ApiListFederatedIdentityProvidersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// ListFederatedIdentityProvidersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListFederatedIdentityProvidersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListFederatedIdentityProvidersExecute(r ApiListFederatedIdentityProvidersRequest) (*FederatedListFederatedIdentityProvidersResponse, error) { + if a.ListFederatedIdentityProvidersExecuteMock == nil { + var localVarReturnValue *FederatedListFederatedIdentityProvidersResponse + return localVarReturnValue, nil + } + + return (*a.ListFederatedIdentityProvidersExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListServiceAccountKeys(ctx context.Context, projectId string, serviceAccountEmail string) ApiListServiceAccountKeysRequest { + return ApiListServiceAccountKeysRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + } +} + +// ListServiceAccountKeysExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListServiceAccountKeysExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListServiceAccountKeysExecute(r ApiListServiceAccountKeysRequest) (*ListServiceAccountKeysResponse, error) { + if a.ListServiceAccountKeysExecuteMock == nil { + var localVarReturnValue *ListServiceAccountKeysResponse + return localVarReturnValue, nil + } + + return (*a.ListServiceAccountKeysExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListServiceAccounts(ctx context.Context, projectId string) ApiListServiceAccountsRequest { + return ApiListServiceAccountsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListServiceAccountsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListServiceAccountsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListServiceAccountsExecute(r ApiListServiceAccountsRequest) (*ListServiceAccountsResponse, error) { + if a.ListServiceAccountsExecuteMock == nil { + var localVarReturnValue *ListServiceAccountsResponse + return localVarReturnValue, nil + } + + return (*a.ListServiceAccountsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) PartialUpdateServiceAccountFederatedIdentityProvider(ctx context.Context, projectId string, serviceAccountEmail string, federationId string) ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest { + return ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + federationId: federationId, + } +} + +// PartialUpdateServiceAccountFederatedIdentityProviderExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the PartialUpdateServiceAccountFederatedIdentityProviderExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) PartialUpdateServiceAccountFederatedIdentityProviderExecute(r ApiPartialUpdateServiceAccountFederatedIdentityProviderRequest) (*CreateFederatedIdentityProviderResponse, error) { + if a.PartialUpdateServiceAccountFederatedIdentityProviderExecuteMock == nil { + var localVarReturnValue *CreateFederatedIdentityProviderResponse + return localVarReturnValue, nil + } + + return (*a.PartialUpdateServiceAccountFederatedIdentityProviderExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) PartialUpdateServiceAccountKey(ctx context.Context, projectId string, serviceAccountEmail string, keyId string) ApiPartialUpdateServiceAccountKeyRequest { + return ApiPartialUpdateServiceAccountKeyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + keyId: keyId, + } +} + +// PartialUpdateServiceAccountKeyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the PartialUpdateServiceAccountKeyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) PartialUpdateServiceAccountKeyExecute(r ApiPartialUpdateServiceAccountKeyRequest) (*PartialUpdateServiceAccountKeyResponse, error) { + if a.PartialUpdateServiceAccountKeyExecuteMock == nil { + var localVarReturnValue *PartialUpdateServiceAccountKeyResponse + return localVarReturnValue, nil + } + + return (*a.PartialUpdateServiceAccountKeyExecuteMock)(r) +} diff --git a/services/serviceaccount/v2api/client.go b/services/serviceaccount/v2api/client.go new file mode 100644 index 000000000..ad1c3619e --- /dev/null +++ b/services/serviceaccount/v2api/client.go @@ -0,0 +1,658 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v2api + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "github.com/stackitcloud/stackit-sdk-go/core/auth" + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the Service Account API API v2.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *config.Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + DefaultAPI DefaultAPI +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { + cfg := NewConfiguration() + + for _, option := range opts { + err := option(cfg) + if err != nil { + return nil, fmt.Errorf("configuring the client: %w", err) + } + } + + err := config.ConfigureRegion(cfg) + if err != nil { + return nil, fmt.Errorf("configuring region: %w", err) + } + + if cfg.HTTPClient == nil { + cfg.HTTPClient = &http.Client{} + } + + authRoundTripper, err := auth.SetupAuth(cfg) + if err != nil { + return nil, fmt.Errorf("setting up authentication: %w", err) + } + + roundTripper := authRoundTripper + if cfg.Middleware != nil { + roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) + } + + cfg.HTTPClient.Transport = roundTripper + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.DefaultAPI = (*DefaultAPIService)(&c.common) + + return c, nil +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + 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{}, style string, 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, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, 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) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, 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(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, 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 + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *config.Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + 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 { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/services/serviceaccount/v2api/configuration.go b/services/serviceaccount/v2api/configuration.go new file mode 100644 index 000000000..5288bdaf0 --- /dev/null +++ b/services/serviceaccount/v2api/configuration.go @@ -0,0 +1,37 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v2api + +import ( + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *config.Configuration { + cfg := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "stackit-sdk-go/serviceaccount", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://service-account.api.stackit.cloud", + Description: "No description provided", + Variables: map[string]config.ServerVariable{ + "region": { + Description: "No description provided", + DefaultValue: "global", + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + return cfg +} diff --git a/services/serviceaccount/v2api/model_access_token.go b/services/serviceaccount/v2api/model_access_token.go new file mode 100644 index 000000000..17dc77f7d --- /dev/null +++ b/services/serviceaccount/v2api/model_access_token.go @@ -0,0 +1,274 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the AccessToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccessToken{} + +// AccessToken Contains token metadata and actual token. +type AccessToken struct { + // Newly created access tokens are valid, and can be revoked if needed. + Active bool `json:"active"` + // Creation time of the access token. + CreatedAt time.Time `json:"createdAt"` + // Unique ID of the access token. Also used as JTI field. + Id string `json:"id"` + // The access token in JWT format. Use this with `Bearer` prefix for API calls. Store it, as it is not recoverable later. + Token string `json:"token"` + // Approximate expiration time of the access token. Check the JWT for actual validity date. + ValidUntil time.Time `json:"validUntil"` +} + +type _AccessToken AccessToken + +// NewAccessToken instantiates a new AccessToken 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 NewAccessToken(active bool, createdAt time.Time, id string, token string, validUntil time.Time) *AccessToken { + this := AccessToken{} + this.Active = active + this.CreatedAt = createdAt + this.Id = id + this.Token = token + this.ValidUntil = validUntil + return &this +} + +// NewAccessTokenWithDefaults instantiates a new AccessToken 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 NewAccessTokenWithDefaults() *AccessToken { + this := AccessToken{} + return &this +} + +// GetActive returns the Active field value +func (o *AccessToken) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *AccessToken) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *AccessToken) SetActive(v bool) { + o.Active = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *AccessToken) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *AccessToken) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *AccessToken) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetId returns the Id field value +func (o *AccessToken) 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 *AccessToken) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *AccessToken) SetId(v string) { + o.Id = v +} + +// GetToken returns the Token field value +func (o *AccessToken) 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 *AccessToken) GetTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Token, true +} + +// SetToken sets field value +func (o *AccessToken) SetToken(v string) { + o.Token = v +} + +// GetValidUntil returns the ValidUntil field value +func (o *AccessToken) GetValidUntil() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value +// and a boolean to check if the value has been set. +func (o *AccessToken) GetValidUntilOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.ValidUntil, true +} + +// SetValidUntil sets field value +func (o *AccessToken) SetValidUntil(v time.Time) { + o.ValidUntil = v +} + +func (o AccessToken) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccessToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["active"] = o.Active + toSerialize["createdAt"] = o.CreatedAt + toSerialize["id"] = o.Id + toSerialize["token"] = o.Token + toSerialize["validUntil"] = o.ValidUntil + return toSerialize, nil +} + +func (o *AccessToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "active", + "createdAt", + "id", + "token", + "validUntil", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAccessToken := _AccessToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAccessToken) + + if err != nil { + return err + } + + *o = AccessToken(varAccessToken) + + return err +} + +type NullableAccessToken struct { + value *AccessToken + isSet bool +} + +func (v NullableAccessToken) Get() *AccessToken { + return v.value +} + +func (v *NullableAccessToken) Set(val *AccessToken) { + v.value = val + v.isSet = true +} + +func (v NullableAccessToken) IsSet() bool { + return v.isSet +} + +func (v *NullableAccessToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccessToken(val *AccessToken) *NullableAccessToken { + return &NullableAccessToken{value: val, isSet: true} +} + +func (v NullableAccessToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccessToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_access_token_metadata.go b/services/serviceaccount/v2api/model_access_token_metadata.go new file mode 100644 index 000000000..04598e45e --- /dev/null +++ b/services/serviceaccount/v2api/model_access_token_metadata.go @@ -0,0 +1,245 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the AccessTokenMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccessTokenMetadata{} + +// AccessTokenMetadata Does not contain the actual token. +type AccessTokenMetadata struct { + // If true, access token can be used for authorized API calls, if false, the token is not usable anymore. + Active bool `json:"active"` + // Creation time of the access token. + CreatedAt time.Time `json:"createdAt"` + // Unique ID of the access token. Also used as JTI field. + Id string `json:"id"` + // Approximate expiration time of the access token. Check the JWT for actual validity date. + ValidUntil time.Time `json:"validUntil"` +} + +type _AccessTokenMetadata AccessTokenMetadata + +// NewAccessTokenMetadata instantiates a new AccessTokenMetadata 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 NewAccessTokenMetadata(active bool, createdAt time.Time, id string, validUntil time.Time) *AccessTokenMetadata { + this := AccessTokenMetadata{} + this.Active = active + this.CreatedAt = createdAt + this.Id = id + this.ValidUntil = validUntil + return &this +} + +// NewAccessTokenMetadataWithDefaults instantiates a new AccessTokenMetadata 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 NewAccessTokenMetadataWithDefaults() *AccessTokenMetadata { + this := AccessTokenMetadata{} + return &this +} + +// GetActive returns the Active field value +func (o *AccessTokenMetadata) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *AccessTokenMetadata) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *AccessTokenMetadata) SetActive(v bool) { + o.Active = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *AccessTokenMetadata) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *AccessTokenMetadata) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *AccessTokenMetadata) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetId returns the Id field value +func (o *AccessTokenMetadata) 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 *AccessTokenMetadata) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *AccessTokenMetadata) SetId(v string) { + o.Id = v +} + +// GetValidUntil returns the ValidUntil field value +func (o *AccessTokenMetadata) GetValidUntil() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value +// and a boolean to check if the value has been set. +func (o *AccessTokenMetadata) GetValidUntilOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.ValidUntil, true +} + +// SetValidUntil sets field value +func (o *AccessTokenMetadata) SetValidUntil(v time.Time) { + o.ValidUntil = v +} + +func (o AccessTokenMetadata) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccessTokenMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["active"] = o.Active + toSerialize["createdAt"] = o.CreatedAt + toSerialize["id"] = o.Id + toSerialize["validUntil"] = o.ValidUntil + return toSerialize, nil +} + +func (o *AccessTokenMetadata) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "active", + "createdAt", + "id", + "validUntil", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAccessTokenMetadata := _AccessTokenMetadata{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAccessTokenMetadata) + + if err != nil { + return err + } + + *o = AccessTokenMetadata(varAccessTokenMetadata) + + return err +} + +type NullableAccessTokenMetadata struct { + value *AccessTokenMetadata + isSet bool +} + +func (v NullableAccessTokenMetadata) Get() *AccessTokenMetadata { + return v.value +} + +func (v *NullableAccessTokenMetadata) Set(val *AccessTokenMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableAccessTokenMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableAccessTokenMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccessTokenMetadata(val *AccessTokenMetadata) *NullableAccessTokenMetadata { + return &NullableAccessTokenMetadata{value: val, isSet: true} +} + +func (v NullableAccessTokenMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccessTokenMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_auth_error.go b/services/serviceaccount/v2api/model_auth_error.go new file mode 100644 index 000000000..024ecd761 --- /dev/null +++ b/services/serviceaccount/v2api/model_auth_error.go @@ -0,0 +1,156 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AuthError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthError{} + +// AuthError struct for AuthError +type AuthError struct { + Error AuthErrorError `json:"error"` +} + +type _AuthError AuthError + +// NewAuthError instantiates a new AuthError 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 NewAuthError(error_ AuthErrorError) *AuthError { + this := AuthError{} + this.Error = error_ + return &this +} + +// NewAuthErrorWithDefaults instantiates a new AuthError 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 NewAuthErrorWithDefaults() *AuthError { + this := AuthError{} + return &this +} + +// GetError returns the Error field value +func (o *AuthError) GetError() AuthErrorError { + if o == nil { + var ret AuthErrorError + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *AuthError) GetErrorOk() (*AuthErrorError, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *AuthError) SetError(v AuthErrorError) { + o.Error = v +} + +func (o AuthError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error"] = o.Error + return toSerialize, nil +} + +func (o *AuthError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "error", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAuthError := _AuthError{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAuthError) + + if err != nil { + return err + } + + *o = AuthError(varAuthError) + + return err +} + +type NullableAuthError struct { + value *AuthError + isSet bool +} + +func (v NullableAuthError) Get() *AuthError { + return v.value +} + +func (v *NullableAuthError) Set(val *AuthError) { + v.value = val + v.isSet = true +} + +func (v NullableAuthError) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthError(val *AuthError) *NullableAuthError { + return &NullableAuthError{value: val, isSet: true} +} + +func (v NullableAuthError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_auth_error_error.go b/services/serviceaccount/v2api/model_auth_error_error.go new file mode 100644 index 000000000..ea9c01219 --- /dev/null +++ b/services/serviceaccount/v2api/model_auth_error_error.go @@ -0,0 +1,212 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AuthErrorError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthErrorError{} + +// AuthErrorError struct for AuthErrorError +type AuthErrorError struct { + Code int32 `json:"code"` + Message string `json:"message"` + Status string `json:"status"` +} + +type _AuthErrorError AuthErrorError + +// NewAuthErrorError instantiates a new AuthErrorError 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 NewAuthErrorError(code int32, message string, status string) *AuthErrorError { + this := AuthErrorError{} + this.Code = code + this.Message = message + this.Status = status + return &this +} + +// NewAuthErrorErrorWithDefaults instantiates a new AuthErrorError 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 NewAuthErrorErrorWithDefaults() *AuthErrorError { + this := AuthErrorError{} + return &this +} + +// GetCode returns the Code field value +func (o *AuthErrorError) GetCode() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *AuthErrorError) GetCodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *AuthErrorError) SetCode(v int32) { + o.Code = v +} + +// GetMessage returns the Message field value +func (o *AuthErrorError) GetMessage() string { + if o == 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. +func (o *AuthErrorError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *AuthErrorError) SetMessage(v string) { + o.Message = v +} + +// GetStatus returns the Status field value +func (o *AuthErrorError) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *AuthErrorError) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *AuthErrorError) SetStatus(v string) { + o.Status = v +} + +func (o AuthErrorError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthErrorError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + toSerialize["message"] = o.Message + toSerialize["status"] = o.Status + return toSerialize, nil +} + +func (o *AuthErrorError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + "message", + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAuthErrorError := _AuthErrorError{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAuthErrorError) + + if err != nil { + return err + } + + *o = AuthErrorError(varAuthErrorError) + + return err +} + +type NullableAuthErrorError struct { + value *AuthErrorError + isSet bool +} + +func (v NullableAuthErrorError) Get() *AuthErrorError { + return v.value +} + +func (v *NullableAuthErrorError) Set(val *AuthErrorError) { + v.value = val + v.isSet = true +} + +func (v NullableAuthErrorError) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthErrorError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthErrorError(val *AuthErrorError) *NullableAuthErrorError { + return &NullableAuthErrorError{value: val, isSet: true} +} + +func (v NullableAuthErrorError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthErrorError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_access_token_payload.go b/services/serviceaccount/v2api/model_create_access_token_payload.go new file mode 100644 index 000000000..d4492d954 --- /dev/null +++ b/services/serviceaccount/v2api/model_create_access_token_payload.go @@ -0,0 +1,157 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateAccessTokenPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateAccessTokenPayload{} + +// CreateAccessTokenPayload struct for CreateAccessTokenPayload +type CreateAccessTokenPayload struct { + // The duration in days for how long the new Access Token should be valid. + TtlDays int32 `json:"ttlDays"` +} + +type _CreateAccessTokenPayload CreateAccessTokenPayload + +// NewCreateAccessTokenPayload instantiates a new CreateAccessTokenPayload 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 NewCreateAccessTokenPayload(ttlDays int32) *CreateAccessTokenPayload { + this := CreateAccessTokenPayload{} + this.TtlDays = ttlDays + return &this +} + +// NewCreateAccessTokenPayloadWithDefaults instantiates a new CreateAccessTokenPayload 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 NewCreateAccessTokenPayloadWithDefaults() *CreateAccessTokenPayload { + this := CreateAccessTokenPayload{} + return &this +} + +// GetTtlDays returns the TtlDays field value +func (o *CreateAccessTokenPayload) GetTtlDays() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TtlDays +} + +// GetTtlDaysOk returns a tuple with the TtlDays field value +// and a boolean to check if the value has been set. +func (o *CreateAccessTokenPayload) GetTtlDaysOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TtlDays, true +} + +// SetTtlDays sets field value +func (o *CreateAccessTokenPayload) SetTtlDays(v int32) { + o.TtlDays = v +} + +func (o CreateAccessTokenPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateAccessTokenPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ttlDays"] = o.TtlDays + return toSerialize, nil +} + +func (o *CreateAccessTokenPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ttlDays", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateAccessTokenPayload := _CreateAccessTokenPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateAccessTokenPayload) + + if err != nil { + return err + } + + *o = CreateAccessTokenPayload(varCreateAccessTokenPayload) + + return err +} + +type NullableCreateAccessTokenPayload struct { + value *CreateAccessTokenPayload + isSet bool +} + +func (v NullableCreateAccessTokenPayload) Get() *CreateAccessTokenPayload { + return v.value +} + +func (v *NullableCreateAccessTokenPayload) Set(val *CreateAccessTokenPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAccessTokenPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAccessTokenPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAccessTokenPayload(val *CreateAccessTokenPayload) *NullableCreateAccessTokenPayload { + return &NullableCreateAccessTokenPayload{value: val, isSet: true} +} + +func (v NullableCreateAccessTokenPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAccessTokenPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_federated_identity_provider_payload.go b/services/serviceaccount/v2api/model_create_federated_identity_provider_payload.go new file mode 100644 index 000000000..e2304e7ea --- /dev/null +++ b/services/serviceaccount/v2api/model_create_federated_identity_provider_payload.go @@ -0,0 +1,223 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateFederatedIdentityProviderPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateFederatedIdentityProviderPayload{} + +// CreateFederatedIdentityProviderPayload struct for CreateFederatedIdentityProviderPayload +type CreateFederatedIdentityProviderPayload struct { + // list of assertions of the federated identity provider + Assertions []CreateFederatedIdentityProviderPayloadAssertionsInner `json:"assertions,omitempty"` + // Issuer of the federated identity provider. + Issuer string `json:"issuer"` + // Unique name used as identifier of the federated identity provider. + Name string `json:"name"` +} + +type _CreateFederatedIdentityProviderPayload CreateFederatedIdentityProviderPayload + +// NewCreateFederatedIdentityProviderPayload instantiates a new CreateFederatedIdentityProviderPayload 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 NewCreateFederatedIdentityProviderPayload(issuer string, name string) *CreateFederatedIdentityProviderPayload { + this := CreateFederatedIdentityProviderPayload{} + this.Issuer = issuer + this.Name = name + return &this +} + +// NewCreateFederatedIdentityProviderPayloadWithDefaults instantiates a new CreateFederatedIdentityProviderPayload 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 NewCreateFederatedIdentityProviderPayloadWithDefaults() *CreateFederatedIdentityProviderPayload { + this := CreateFederatedIdentityProviderPayload{} + return &this +} + +// GetAssertions returns the Assertions field value if set, zero value otherwise. +func (o *CreateFederatedIdentityProviderPayload) GetAssertions() []CreateFederatedIdentityProviderPayloadAssertionsInner { + if o == nil || IsNil(o.Assertions) { + var ret []CreateFederatedIdentityProviderPayloadAssertionsInner + return ret + } + return o.Assertions +} + +// GetAssertionsOk returns a tuple with the Assertions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderPayload) GetAssertionsOk() ([]CreateFederatedIdentityProviderPayloadAssertionsInner, bool) { + if o == nil || IsNil(o.Assertions) { + return nil, false + } + return o.Assertions, true +} + +// HasAssertions returns a boolean if a field has been set. +func (o *CreateFederatedIdentityProviderPayload) HasAssertions() bool { + if o != nil && !IsNil(o.Assertions) { + return true + } + + return false +} + +// SetAssertions gets a reference to the given []CreateFederatedIdentityProviderPayloadAssertionsInner and assigns it to the Assertions field. +func (o *CreateFederatedIdentityProviderPayload) SetAssertions(v []CreateFederatedIdentityProviderPayloadAssertionsInner) { + o.Assertions = v +} + +// GetIssuer returns the Issuer field value +func (o *CreateFederatedIdentityProviderPayload) GetIssuer() string { + if o == nil { + var ret string + return ret + } + + return o.Issuer +} + +// GetIssuerOk returns a tuple with the Issuer field value +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderPayload) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Issuer, true +} + +// SetIssuer sets field value +func (o *CreateFederatedIdentityProviderPayload) SetIssuer(v string) { + o.Issuer = v +} + +// GetName returns the Name field value +func (o *CreateFederatedIdentityProviderPayload) 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 *CreateFederatedIdentityProviderPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateFederatedIdentityProviderPayload) SetName(v string) { + o.Name = v +} + +func (o CreateFederatedIdentityProviderPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateFederatedIdentityProviderPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Assertions) { + toSerialize["assertions"] = o.Assertions + } + toSerialize["issuer"] = o.Issuer + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *CreateFederatedIdentityProviderPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "issuer", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateFederatedIdentityProviderPayload := _CreateFederatedIdentityProviderPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateFederatedIdentityProviderPayload) + + if err != nil { + return err + } + + *o = CreateFederatedIdentityProviderPayload(varCreateFederatedIdentityProviderPayload) + + return err +} + +type NullableCreateFederatedIdentityProviderPayload struct { + value *CreateFederatedIdentityProviderPayload + isSet bool +} + +func (v NullableCreateFederatedIdentityProviderPayload) Get() *CreateFederatedIdentityProviderPayload { + return v.value +} + +func (v *NullableCreateFederatedIdentityProviderPayload) Set(val *CreateFederatedIdentityProviderPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateFederatedIdentityProviderPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateFederatedIdentityProviderPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateFederatedIdentityProviderPayload(val *CreateFederatedIdentityProviderPayload) *NullableCreateFederatedIdentityProviderPayload { + return &NullableCreateFederatedIdentityProviderPayload{value: val, isSet: true} +} + +func (v NullableCreateFederatedIdentityProviderPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateFederatedIdentityProviderPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_federated_identity_provider_payload_assertions_inner.go b/services/serviceaccount/v2api/model_create_federated_identity_provider_payload_assertions_inner.go new file mode 100644 index 000000000..deba9a16d --- /dev/null +++ b/services/serviceaccount/v2api/model_create_federated_identity_provider_payload_assertions_inner.go @@ -0,0 +1,199 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the CreateFederatedIdentityProviderPayloadAssertionsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateFederatedIdentityProviderPayloadAssertionsInner{} + +// CreateFederatedIdentityProviderPayloadAssertionsInner struct for CreateFederatedIdentityProviderPayloadAssertionsInner +type CreateFederatedIdentityProviderPayloadAssertionsInner struct { + // Item to compare + Item *string `json:"item,omitempty"` + // Operator for the comparison + Operator *string `json:"operator,omitempty"` + // Value which the item is compared to + Value *string `json:"value,omitempty"` +} + +// NewCreateFederatedIdentityProviderPayloadAssertionsInner instantiates a new CreateFederatedIdentityProviderPayloadAssertionsInner 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 NewCreateFederatedIdentityProviderPayloadAssertionsInner() *CreateFederatedIdentityProviderPayloadAssertionsInner { + this := CreateFederatedIdentityProviderPayloadAssertionsInner{} + return &this +} + +// NewCreateFederatedIdentityProviderPayloadAssertionsInnerWithDefaults instantiates a new CreateFederatedIdentityProviderPayloadAssertionsInner 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 NewCreateFederatedIdentityProviderPayloadAssertionsInnerWithDefaults() *CreateFederatedIdentityProviderPayloadAssertionsInner { + this := CreateFederatedIdentityProviderPayloadAssertionsInner{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetItem() string { + if o == nil || IsNil(o.Item) { + var ret string + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetItemOk() (*string, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given string and assigns it to the Item field. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) SetItem(v string) { + o.Item = &v +} + +// GetOperator returns the Operator field value if set, zero value otherwise. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetOperator() string { + if o == nil || IsNil(o.Operator) { + var ret string + return ret + } + return *o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetOperatorOk() (*string, bool) { + if o == nil || IsNil(o.Operator) { + return nil, false + } + return o.Operator, true +} + +// HasOperator returns a boolean if a field has been set. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) HasOperator() bool { + if o != nil && !IsNil(o.Operator) { + return true + } + + return false +} + +// SetOperator gets a reference to the given string and assigns it to the Operator field. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) SetOperator(v string) { + o.Operator = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetValue() string { + if o == nil || IsNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *CreateFederatedIdentityProviderPayloadAssertionsInner) SetValue(v string) { + o.Value = &v +} + +func (o CreateFederatedIdentityProviderPayloadAssertionsInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateFederatedIdentityProviderPayloadAssertionsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + if !IsNil(o.Operator) { + toSerialize["operator"] = o.Operator + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableCreateFederatedIdentityProviderPayloadAssertionsInner struct { + value *CreateFederatedIdentityProviderPayloadAssertionsInner + isSet bool +} + +func (v NullableCreateFederatedIdentityProviderPayloadAssertionsInner) Get() *CreateFederatedIdentityProviderPayloadAssertionsInner { + return v.value +} + +func (v *NullableCreateFederatedIdentityProviderPayloadAssertionsInner) Set(val *CreateFederatedIdentityProviderPayloadAssertionsInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateFederatedIdentityProviderPayloadAssertionsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateFederatedIdentityProviderPayloadAssertionsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateFederatedIdentityProviderPayloadAssertionsInner(val *CreateFederatedIdentityProviderPayloadAssertionsInner) *NullableCreateFederatedIdentityProviderPayloadAssertionsInner { + return &NullableCreateFederatedIdentityProviderPayloadAssertionsInner{value: val, isSet: true} +} + +func (v NullableCreateFederatedIdentityProviderPayloadAssertionsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateFederatedIdentityProviderPayloadAssertionsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_federated_identity_provider_response.go b/services/serviceaccount/v2api/model_create_federated_identity_provider_response.go new file mode 100644 index 000000000..f15ac4f60 --- /dev/null +++ b/services/serviceaccount/v2api/model_create_federated_identity_provider_response.go @@ -0,0 +1,274 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CreateFederatedIdentityProviderResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateFederatedIdentityProviderResponse{} + +// CreateFederatedIdentityProviderResponse struct for CreateFederatedIdentityProviderResponse +type CreateFederatedIdentityProviderResponse struct { + // list of assertions of the federated identity provider + Assertions []CreateFederatedIdentityProviderResponseAssertionsInner `json:"assertions"` + // Creation time of the federated identity provider. + CreatedAt time.Time `json:"createdAt"` + // Issuer of the federated identity provider. + Issuer string `json:"issuer"` + // Unique name of the federated identity provider. + Name string `json:"name"` + // Last update time of the federated identity provider. + UpdatedAt time.Time `json:"updatedAt"` +} + +type _CreateFederatedIdentityProviderResponse CreateFederatedIdentityProviderResponse + +// NewCreateFederatedIdentityProviderResponse instantiates a new CreateFederatedIdentityProviderResponse 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 NewCreateFederatedIdentityProviderResponse(assertions []CreateFederatedIdentityProviderResponseAssertionsInner, createdAt time.Time, issuer string, name string, updatedAt time.Time) *CreateFederatedIdentityProviderResponse { + this := CreateFederatedIdentityProviderResponse{} + this.Assertions = assertions + this.CreatedAt = createdAt + this.Issuer = issuer + this.Name = name + this.UpdatedAt = updatedAt + return &this +} + +// NewCreateFederatedIdentityProviderResponseWithDefaults instantiates a new CreateFederatedIdentityProviderResponse 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 NewCreateFederatedIdentityProviderResponseWithDefaults() *CreateFederatedIdentityProviderResponse { + this := CreateFederatedIdentityProviderResponse{} + return &this +} + +// GetAssertions returns the Assertions field value +func (o *CreateFederatedIdentityProviderResponse) GetAssertions() []CreateFederatedIdentityProviderResponseAssertionsInner { + if o == nil { + var ret []CreateFederatedIdentityProviderResponseAssertionsInner + return ret + } + + return o.Assertions +} + +// GetAssertionsOk returns a tuple with the Assertions field value +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderResponse) GetAssertionsOk() ([]CreateFederatedIdentityProviderResponseAssertionsInner, bool) { + if o == nil { + return nil, false + } + return o.Assertions, true +} + +// SetAssertions sets field value +func (o *CreateFederatedIdentityProviderResponse) SetAssertions(v []CreateFederatedIdentityProviderResponseAssertionsInner) { + o.Assertions = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreateFederatedIdentityProviderResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreateFederatedIdentityProviderResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetIssuer returns the Issuer field value +func (o *CreateFederatedIdentityProviderResponse) GetIssuer() string { + if o == nil { + var ret string + return ret + } + + return o.Issuer +} + +// GetIssuerOk returns a tuple with the Issuer field value +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderResponse) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Issuer, true +} + +// SetIssuer sets field value +func (o *CreateFederatedIdentityProviderResponse) SetIssuer(v string) { + o.Issuer = v +} + +// GetName returns the Name field value +func (o *CreateFederatedIdentityProviderResponse) 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 *CreateFederatedIdentityProviderResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateFederatedIdentityProviderResponse) SetName(v string) { + o.Name = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreateFederatedIdentityProviderResponse) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreateFederatedIdentityProviderResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +func (o CreateFederatedIdentityProviderResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateFederatedIdentityProviderResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["assertions"] = o.Assertions + toSerialize["createdAt"] = o.CreatedAt + toSerialize["issuer"] = o.Issuer + toSerialize["name"] = o.Name + toSerialize["updatedAt"] = o.UpdatedAt + return toSerialize, nil +} + +func (o *CreateFederatedIdentityProviderResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "assertions", + "createdAt", + "issuer", + "name", + "updatedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateFederatedIdentityProviderResponse := _CreateFederatedIdentityProviderResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateFederatedIdentityProviderResponse) + + if err != nil { + return err + } + + *o = CreateFederatedIdentityProviderResponse(varCreateFederatedIdentityProviderResponse) + + return err +} + +type NullableCreateFederatedIdentityProviderResponse struct { + value *CreateFederatedIdentityProviderResponse + isSet bool +} + +func (v NullableCreateFederatedIdentityProviderResponse) Get() *CreateFederatedIdentityProviderResponse { + return v.value +} + +func (v *NullableCreateFederatedIdentityProviderResponse) Set(val *CreateFederatedIdentityProviderResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateFederatedIdentityProviderResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateFederatedIdentityProviderResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateFederatedIdentityProviderResponse(val *CreateFederatedIdentityProviderResponse) *NullableCreateFederatedIdentityProviderResponse { + return &NullableCreateFederatedIdentityProviderResponse{value: val, isSet: true} +} + +func (v NullableCreateFederatedIdentityProviderResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateFederatedIdentityProviderResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_federated_identity_provider_response_assertions_inner.go b/services/serviceaccount/v2api/model_create_federated_identity_provider_response_assertions_inner.go new file mode 100644 index 000000000..c97c881c2 --- /dev/null +++ b/services/serviceaccount/v2api/model_create_federated_identity_provider_response_assertions_inner.go @@ -0,0 +1,215 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateFederatedIdentityProviderResponseAssertionsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateFederatedIdentityProviderResponseAssertionsInner{} + +// CreateFederatedIdentityProviderResponseAssertionsInner struct for CreateFederatedIdentityProviderResponseAssertionsInner +type CreateFederatedIdentityProviderResponseAssertionsInner struct { + // Item to compare + Item string `json:"item"` + // Operator for the comparison + Operator string `json:"operator"` + // Value which the item is compared to + Value string `json:"value"` +} + +type _CreateFederatedIdentityProviderResponseAssertionsInner CreateFederatedIdentityProviderResponseAssertionsInner + +// NewCreateFederatedIdentityProviderResponseAssertionsInner instantiates a new CreateFederatedIdentityProviderResponseAssertionsInner 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 NewCreateFederatedIdentityProviderResponseAssertionsInner(item string, operator string, value string) *CreateFederatedIdentityProviderResponseAssertionsInner { + this := CreateFederatedIdentityProviderResponseAssertionsInner{} + this.Item = item + this.Operator = operator + this.Value = value + return &this +} + +// NewCreateFederatedIdentityProviderResponseAssertionsInnerWithDefaults instantiates a new CreateFederatedIdentityProviderResponseAssertionsInner 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 NewCreateFederatedIdentityProviderResponseAssertionsInnerWithDefaults() *CreateFederatedIdentityProviderResponseAssertionsInner { + this := CreateFederatedIdentityProviderResponseAssertionsInner{} + return &this +} + +// GetItem returns the Item field value +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetItem() string { + if o == nil { + var ret string + return ret + } + + return o.Item +} + +// GetItemOk returns a tuple with the Item field value +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetItemOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Item, true +} + +// SetItem sets field value +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) SetItem(v string) { + o.Item = v +} + +// GetOperator returns the Operator field value +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetOperator() string { + if o == nil { + var ret string + return ret + } + + return o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetOperatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operator, true +} + +// SetOperator sets field value +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) SetOperator(v string) { + o.Operator = v +} + +// GetValue returns the Value field value +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) SetValue(v string) { + o.Value = v +} + +func (o CreateFederatedIdentityProviderResponseAssertionsInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateFederatedIdentityProviderResponseAssertionsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["item"] = o.Item + toSerialize["operator"] = o.Operator + toSerialize["value"] = o.Value + return toSerialize, nil +} + +func (o *CreateFederatedIdentityProviderResponseAssertionsInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "item", + "operator", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateFederatedIdentityProviderResponseAssertionsInner := _CreateFederatedIdentityProviderResponseAssertionsInner{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateFederatedIdentityProviderResponseAssertionsInner) + + if err != nil { + return err + } + + *o = CreateFederatedIdentityProviderResponseAssertionsInner(varCreateFederatedIdentityProviderResponseAssertionsInner) + + return err +} + +type NullableCreateFederatedIdentityProviderResponseAssertionsInner struct { + value *CreateFederatedIdentityProviderResponseAssertionsInner + isSet bool +} + +func (v NullableCreateFederatedIdentityProviderResponseAssertionsInner) Get() *CreateFederatedIdentityProviderResponseAssertionsInner { + return v.value +} + +func (v *NullableCreateFederatedIdentityProviderResponseAssertionsInner) Set(val *CreateFederatedIdentityProviderResponseAssertionsInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateFederatedIdentityProviderResponseAssertionsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateFederatedIdentityProviderResponseAssertionsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateFederatedIdentityProviderResponseAssertionsInner(val *CreateFederatedIdentityProviderResponseAssertionsInner) *NullableCreateFederatedIdentityProviderResponseAssertionsInner { + return &NullableCreateFederatedIdentityProviderResponseAssertionsInner{value: val, isSet: true} +} + +func (v NullableCreateFederatedIdentityProviderResponseAssertionsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateFederatedIdentityProviderResponseAssertionsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_service_account_key_payload.go b/services/serviceaccount/v2api/model_create_service_account_key_payload.go new file mode 100644 index 000000000..3c501c602 --- /dev/null +++ b/services/serviceaccount/v2api/model_create_service_account_key_payload.go @@ -0,0 +1,200 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" + "time" +) + +// checks if the CreateServiceAccountKeyPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServiceAccountKeyPayload{} + +// CreateServiceAccountKeyPayload struct for CreateServiceAccountKeyPayload +type CreateServiceAccountKeyPayload struct { + // Optional, key algorithm of the generated key-pair. Used only if publicKey attribute is not specified, otherwise the algorithm is derived from the public key. + Algorithm *string `json:"algorithm,omitempty"` + // Optional, public key part of the user generated RSA key-pair wrapped in a [X.509 v3 certificate](https://www.rfc-editor.org/rfc/rfc5280) + PublicKey *string `json:"publicKey,omitempty"` + // Optional, date of key expiration. When omitted, key is valid until deleted + ValidUntil *time.Time `json:"validUntil,omitempty"` +} + +// NewCreateServiceAccountKeyPayload instantiates a new CreateServiceAccountKeyPayload 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 NewCreateServiceAccountKeyPayload() *CreateServiceAccountKeyPayload { + this := CreateServiceAccountKeyPayload{} + return &this +} + +// NewCreateServiceAccountKeyPayloadWithDefaults instantiates a new CreateServiceAccountKeyPayload 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 NewCreateServiceAccountKeyPayloadWithDefaults() *CreateServiceAccountKeyPayload { + this := CreateServiceAccountKeyPayload{} + return &this +} + +// GetAlgorithm returns the Algorithm field value if set, zero value otherwise. +func (o *CreateServiceAccountKeyPayload) GetAlgorithm() string { + if o == nil || IsNil(o.Algorithm) { + var ret string + return ret + } + return *o.Algorithm +} + +// GetAlgorithmOk returns a tuple with the Algorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyPayload) GetAlgorithmOk() (*string, bool) { + if o == nil || IsNil(o.Algorithm) { + return nil, false + } + return o.Algorithm, true +} + +// HasAlgorithm returns a boolean if a field has been set. +func (o *CreateServiceAccountKeyPayload) HasAlgorithm() bool { + if o != nil && !IsNil(o.Algorithm) { + return true + } + + return false +} + +// SetAlgorithm gets a reference to the given string and assigns it to the Algorithm field. +func (o *CreateServiceAccountKeyPayload) SetAlgorithm(v string) { + o.Algorithm = &v +} + +// GetPublicKey returns the PublicKey field value if set, zero value otherwise. +func (o *CreateServiceAccountKeyPayload) GetPublicKey() string { + if o == nil || IsNil(o.PublicKey) { + var ret string + return ret + } + return *o.PublicKey +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyPayload) GetPublicKeyOk() (*string, bool) { + if o == nil || IsNil(o.PublicKey) { + return nil, false + } + return o.PublicKey, true +} + +// HasPublicKey returns a boolean if a field has been set. +func (o *CreateServiceAccountKeyPayload) HasPublicKey() bool { + if o != nil && !IsNil(o.PublicKey) { + return true + } + + return false +} + +// SetPublicKey gets a reference to the given string and assigns it to the PublicKey field. +func (o *CreateServiceAccountKeyPayload) SetPublicKey(v string) { + o.PublicKey = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *CreateServiceAccountKeyPayload) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyPayload) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *CreateServiceAccountKeyPayload) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *CreateServiceAccountKeyPayload) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +func (o CreateServiceAccountKeyPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateServiceAccountKeyPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Algorithm) { + toSerialize["algorithm"] = o.Algorithm + } + if !IsNil(o.PublicKey) { + toSerialize["publicKey"] = o.PublicKey + } + if !IsNil(o.ValidUntil) { + toSerialize["validUntil"] = o.ValidUntil + } + return toSerialize, nil +} + +type NullableCreateServiceAccountKeyPayload struct { + value *CreateServiceAccountKeyPayload + isSet bool +} + +func (v NullableCreateServiceAccountKeyPayload) Get() *CreateServiceAccountKeyPayload { + return v.value +} + +func (v *NullableCreateServiceAccountKeyPayload) Set(val *CreateServiceAccountKeyPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServiceAccountKeyPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServiceAccountKeyPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServiceAccountKeyPayload(val *CreateServiceAccountKeyPayload) *NullableCreateServiceAccountKeyPayload { + return &NullableCreateServiceAccountKeyPayload{value: val, isSet: true} +} + +func (v NullableCreateServiceAccountKeyPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServiceAccountKeyPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_service_account_key_response.go b/services/serviceaccount/v2api/model_create_service_account_key_response.go new file mode 100644 index 000000000..7cfa4a993 --- /dev/null +++ b/services/serviceaccount/v2api/model_create_service_account_key_response.go @@ -0,0 +1,393 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CreateServiceAccountKeyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServiceAccountKeyResponse{} + +// CreateServiceAccountKeyResponse struct for CreateServiceAccountKeyResponse +type CreateServiceAccountKeyResponse struct { + Active bool `json:"active"` + // Creation time of the key + CreatedAt time.Time `json:"createdAt"` + Credentials CreateServiceAccountKeyResponseCredentials `json:"credentials"` + // Unique ID of the key. + Id string `json:"id"` + KeyAlgorithm string `json:"keyAlgorithm"` + KeyOrigin string `json:"keyOrigin"` + KeyType string `json:"keyType"` + // Public key, that was provider, or was generated by the service account API + PublicKey string `json:"publicKey"` + // If specified, the timestamp until the key is active. May be null + ValidUntil *time.Time `json:"validUntil,omitempty"` +} + +type _CreateServiceAccountKeyResponse CreateServiceAccountKeyResponse + +// NewCreateServiceAccountKeyResponse instantiates a new CreateServiceAccountKeyResponse 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 NewCreateServiceAccountKeyResponse(active bool, createdAt time.Time, credentials CreateServiceAccountKeyResponseCredentials, id string, keyAlgorithm string, keyOrigin string, keyType string, publicKey string) *CreateServiceAccountKeyResponse { + this := CreateServiceAccountKeyResponse{} + this.Active = active + this.CreatedAt = createdAt + this.Credentials = credentials + this.Id = id + this.KeyAlgorithm = keyAlgorithm + this.KeyOrigin = keyOrigin + this.KeyType = keyType + this.PublicKey = publicKey + return &this +} + +// NewCreateServiceAccountKeyResponseWithDefaults instantiates a new CreateServiceAccountKeyResponse 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 NewCreateServiceAccountKeyResponseWithDefaults() *CreateServiceAccountKeyResponse { + this := CreateServiceAccountKeyResponse{} + return &this +} + +// GetActive returns the Active field value +func (o *CreateServiceAccountKeyResponse) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponse) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *CreateServiceAccountKeyResponse) SetActive(v bool) { + o.Active = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreateServiceAccountKeyResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreateServiceAccountKeyResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetCredentials returns the Credentials field value +func (o *CreateServiceAccountKeyResponse) GetCredentials() CreateServiceAccountKeyResponseCredentials { + if o == nil { + var ret CreateServiceAccountKeyResponseCredentials + 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. +func (o *CreateServiceAccountKeyResponse) GetCredentialsOk() (*CreateServiceAccountKeyResponseCredentials, bool) { + if o == nil { + return nil, false + } + return &o.Credentials, true +} + +// SetCredentials sets field value +func (o *CreateServiceAccountKeyResponse) SetCredentials(v CreateServiceAccountKeyResponseCredentials) { + o.Credentials = v +} + +// GetId returns the Id field value +func (o *CreateServiceAccountKeyResponse) 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 *CreateServiceAccountKeyResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreateServiceAccountKeyResponse) SetId(v string) { + o.Id = v +} + +// GetKeyAlgorithm returns the KeyAlgorithm field value +func (o *CreateServiceAccountKeyResponse) GetKeyAlgorithm() string { + if o == nil { + var ret string + return ret + } + + return o.KeyAlgorithm +} + +// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponse) GetKeyAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyAlgorithm, true +} + +// SetKeyAlgorithm sets field value +func (o *CreateServiceAccountKeyResponse) SetKeyAlgorithm(v string) { + o.KeyAlgorithm = v +} + +// GetKeyOrigin returns the KeyOrigin field value +func (o *CreateServiceAccountKeyResponse) GetKeyOrigin() string { + if o == nil { + var ret string + return ret + } + + return o.KeyOrigin +} + +// GetKeyOriginOk returns a tuple with the KeyOrigin field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponse) GetKeyOriginOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyOrigin, true +} + +// SetKeyOrigin sets field value +func (o *CreateServiceAccountKeyResponse) SetKeyOrigin(v string) { + o.KeyOrigin = v +} + +// GetKeyType returns the KeyType field value +func (o *CreateServiceAccountKeyResponse) GetKeyType() string { + if o == nil { + var ret string + return ret + } + + return o.KeyType +} + +// GetKeyTypeOk returns a tuple with the KeyType field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponse) GetKeyTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyType, true +} + +// SetKeyType sets field value +func (o *CreateServiceAccountKeyResponse) SetKeyType(v string) { + o.KeyType = v +} + +// GetPublicKey returns the PublicKey field value +func (o *CreateServiceAccountKeyResponse) GetPublicKey() string { + if o == nil { + var ret string + return ret + } + + return o.PublicKey +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponse) GetPublicKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PublicKey, true +} + +// SetPublicKey sets field value +func (o *CreateServiceAccountKeyResponse) SetPublicKey(v string) { + o.PublicKey = v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *CreateServiceAccountKeyResponse) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponse) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *CreateServiceAccountKeyResponse) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *CreateServiceAccountKeyResponse) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +func (o CreateServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["active"] = o.Active + toSerialize["createdAt"] = o.CreatedAt + toSerialize["credentials"] = o.Credentials + toSerialize["id"] = o.Id + toSerialize["keyAlgorithm"] = o.KeyAlgorithm + toSerialize["keyOrigin"] = o.KeyOrigin + toSerialize["keyType"] = o.KeyType + toSerialize["publicKey"] = o.PublicKey + if !IsNil(o.ValidUntil) { + toSerialize["validUntil"] = o.ValidUntil + } + return toSerialize, nil +} + +func (o *CreateServiceAccountKeyResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "active", + "createdAt", + "credentials", + "id", + "keyAlgorithm", + "keyOrigin", + "keyType", + "publicKey", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateServiceAccountKeyResponse := _CreateServiceAccountKeyResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateServiceAccountKeyResponse) + + if err != nil { + return err + } + + *o = CreateServiceAccountKeyResponse(varCreateServiceAccountKeyResponse) + + return err +} + +type NullableCreateServiceAccountKeyResponse struct { + value *CreateServiceAccountKeyResponse + isSet bool +} + +func (v NullableCreateServiceAccountKeyResponse) Get() *CreateServiceAccountKeyResponse { + return v.value +} + +func (v *NullableCreateServiceAccountKeyResponse) Set(val *CreateServiceAccountKeyResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServiceAccountKeyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServiceAccountKeyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServiceAccountKeyResponse(val *CreateServiceAccountKeyResponse) *NullableCreateServiceAccountKeyResponse { + return &NullableCreateServiceAccountKeyResponse{value: val, isSet: true} +} + +func (v NullableCreateServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServiceAccountKeyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_service_account_key_response_credentials.go b/services/serviceaccount/v2api/model_create_service_account_key_response_credentials.go new file mode 100644 index 000000000..77d9b805a --- /dev/null +++ b/services/serviceaccount/v2api/model_create_service_account_key_response_credentials.go @@ -0,0 +1,281 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateServiceAccountKeyResponseCredentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServiceAccountKeyResponseCredentials{} + +// CreateServiceAccountKeyResponseCredentials struct for CreateServiceAccountKeyResponseCredentials +type CreateServiceAccountKeyResponseCredentials struct { + // Audience - service account API URL + Aud string `json:"aud"` + // Service account email + Iss string `json:"iss"` + // Key id to use + Kid string `json:"kid"` + // Private key. Only present, if the service account API was generating the key. Not recoverable later. + PrivateKey *string `json:"privateKey,omitempty"` + // Service account id + Sub string `json:"sub"` +} + +type _CreateServiceAccountKeyResponseCredentials CreateServiceAccountKeyResponseCredentials + +// NewCreateServiceAccountKeyResponseCredentials instantiates a new CreateServiceAccountKeyResponseCredentials 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 NewCreateServiceAccountKeyResponseCredentials(aud string, iss string, kid string, sub string) *CreateServiceAccountKeyResponseCredentials { + this := CreateServiceAccountKeyResponseCredentials{} + this.Aud = aud + this.Iss = iss + this.Kid = kid + this.Sub = sub + return &this +} + +// NewCreateServiceAccountKeyResponseCredentialsWithDefaults instantiates a new CreateServiceAccountKeyResponseCredentials 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 NewCreateServiceAccountKeyResponseCredentialsWithDefaults() *CreateServiceAccountKeyResponseCredentials { + this := CreateServiceAccountKeyResponseCredentials{} + return &this +} + +// GetAud returns the Aud field value +func (o *CreateServiceAccountKeyResponseCredentials) GetAud() string { + if o == nil { + var ret string + return ret + } + + return o.Aud +} + +// GetAudOk returns a tuple with the Aud field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponseCredentials) GetAudOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Aud, true +} + +// SetAud sets field value +func (o *CreateServiceAccountKeyResponseCredentials) SetAud(v string) { + o.Aud = v +} + +// GetIss returns the Iss field value +func (o *CreateServiceAccountKeyResponseCredentials) GetIss() string { + if o == nil { + var ret string + return ret + } + + return o.Iss +} + +// GetIssOk returns a tuple with the Iss field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponseCredentials) GetIssOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Iss, true +} + +// SetIss sets field value +func (o *CreateServiceAccountKeyResponseCredentials) SetIss(v string) { + o.Iss = v +} + +// GetKid returns the Kid field value +func (o *CreateServiceAccountKeyResponseCredentials) GetKid() string { + if o == nil { + var ret string + return ret + } + + return o.Kid +} + +// GetKidOk returns a tuple with the Kid field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponseCredentials) GetKidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kid, true +} + +// SetKid sets field value +func (o *CreateServiceAccountKeyResponseCredentials) SetKid(v string) { + o.Kid = v +} + +// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise. +func (o *CreateServiceAccountKeyResponseCredentials) GetPrivateKey() string { + if o == nil || IsNil(o.PrivateKey) { + var ret string + return ret + } + return *o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponseCredentials) GetPrivateKeyOk() (*string, bool) { + if o == nil || IsNil(o.PrivateKey) { + return nil, false + } + return o.PrivateKey, true +} + +// HasPrivateKey returns a boolean if a field has been set. +func (o *CreateServiceAccountKeyResponseCredentials) HasPrivateKey() bool { + if o != nil && !IsNil(o.PrivateKey) { + return true + } + + return false +} + +// SetPrivateKey gets a reference to the given string and assigns it to the PrivateKey field. +func (o *CreateServiceAccountKeyResponseCredentials) SetPrivateKey(v string) { + o.PrivateKey = &v +} + +// GetSub returns the Sub field value +func (o *CreateServiceAccountKeyResponseCredentials) GetSub() string { + if o == nil { + var ret string + return ret + } + + return o.Sub +} + +// GetSubOk returns a tuple with the Sub field value +// and a boolean to check if the value has been set. +func (o *CreateServiceAccountKeyResponseCredentials) GetSubOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Sub, true +} + +// SetSub sets field value +func (o *CreateServiceAccountKeyResponseCredentials) SetSub(v string) { + o.Sub = v +} + +func (o CreateServiceAccountKeyResponseCredentials) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateServiceAccountKeyResponseCredentials) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["aud"] = o.Aud + toSerialize["iss"] = o.Iss + toSerialize["kid"] = o.Kid + if !IsNil(o.PrivateKey) { + toSerialize["privateKey"] = o.PrivateKey + } + toSerialize["sub"] = o.Sub + return toSerialize, nil +} + +func (o *CreateServiceAccountKeyResponseCredentials) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "aud", + "iss", + "kid", + "sub", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateServiceAccountKeyResponseCredentials := _CreateServiceAccountKeyResponseCredentials{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateServiceAccountKeyResponseCredentials) + + if err != nil { + return err + } + + *o = CreateServiceAccountKeyResponseCredentials(varCreateServiceAccountKeyResponseCredentials) + + return err +} + +type NullableCreateServiceAccountKeyResponseCredentials struct { + value *CreateServiceAccountKeyResponseCredentials + isSet bool +} + +func (v NullableCreateServiceAccountKeyResponseCredentials) Get() *CreateServiceAccountKeyResponseCredentials { + return v.value +} + +func (v *NullableCreateServiceAccountKeyResponseCredentials) Set(val *CreateServiceAccountKeyResponseCredentials) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServiceAccountKeyResponseCredentials) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServiceAccountKeyResponseCredentials) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServiceAccountKeyResponseCredentials(val *CreateServiceAccountKeyResponseCredentials) *NullableCreateServiceAccountKeyResponseCredentials { + return &NullableCreateServiceAccountKeyResponseCredentials{value: val, isSet: true} +} + +func (v NullableCreateServiceAccountKeyResponseCredentials) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServiceAccountKeyResponseCredentials) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_service_account_payload.go b/services/serviceaccount/v2api/model_create_service_account_payload.go new file mode 100644 index 000000000..7f6276d7b --- /dev/null +++ b/services/serviceaccount/v2api/model_create_service_account_payload.go @@ -0,0 +1,157 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateServiceAccountPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServiceAccountPayload{} + +// CreateServiceAccountPayload struct for CreateServiceAccountPayload +type CreateServiceAccountPayload struct { + // The requested name of the service account. The service will generate a unique email from this name. + Name string `json:"name" validate:"regexp=^[a-z](?:-?[a-z0-9]+)*$"` +} + +type _CreateServiceAccountPayload CreateServiceAccountPayload + +// NewCreateServiceAccountPayload instantiates a new CreateServiceAccountPayload 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 NewCreateServiceAccountPayload(name string) *CreateServiceAccountPayload { + this := CreateServiceAccountPayload{} + this.Name = name + return &this +} + +// NewCreateServiceAccountPayloadWithDefaults instantiates a new CreateServiceAccountPayload 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 NewCreateServiceAccountPayloadWithDefaults() *CreateServiceAccountPayload { + this := CreateServiceAccountPayload{} + return &this +} + +// GetName returns the Name field value +func (o *CreateServiceAccountPayload) 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 *CreateServiceAccountPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateServiceAccountPayload) SetName(v string) { + o.Name = v +} + +func (o CreateServiceAccountPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateServiceAccountPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *CreateServiceAccountPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateServiceAccountPayload := _CreateServiceAccountPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateServiceAccountPayload) + + if err != nil { + return err + } + + *o = CreateServiceAccountPayload(varCreateServiceAccountPayload) + + return err +} + +type NullableCreateServiceAccountPayload struct { + value *CreateServiceAccountPayload + isSet bool +} + +func (v NullableCreateServiceAccountPayload) Get() *CreateServiceAccountPayload { + return v.value +} + +func (v *NullableCreateServiceAccountPayload) Set(val *CreateServiceAccountPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServiceAccountPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServiceAccountPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServiceAccountPayload(val *CreateServiceAccountPayload) *NullableCreateServiceAccountPayload { + return &NullableCreateServiceAccountPayload{value: val, isSet: true} +} + +func (v NullableCreateServiceAccountPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServiceAccountPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_create_short_lived_access_token_response.go b/services/serviceaccount/v2api/model_create_short_lived_access_token_response.go new file mode 100644 index 000000000..a2d950625 --- /dev/null +++ b/services/serviceaccount/v2api/model_create_short_lived_access_token_response.go @@ -0,0 +1,271 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateShortLivedAccessTokenResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateShortLivedAccessTokenResponse{} + +// CreateShortLivedAccessTokenResponse struct for CreateShortLivedAccessTokenResponse +type CreateShortLivedAccessTokenResponse struct { + // The short lived token that can be used for API access + AccessToken string `json:"access_token"` + ExpiresIn int32 `json:"expires_in"` + // Refresh token that can be used to request a new access token when it expires (and before refresh token expires). Tokens are rotated. + RefreshToken string `json:"refresh_token"` + // scope field of the self signed token + Scope string `json:"scope"` + TokenType string `json:"token_type"` +} + +type _CreateShortLivedAccessTokenResponse CreateShortLivedAccessTokenResponse + +// NewCreateShortLivedAccessTokenResponse instantiates a new CreateShortLivedAccessTokenResponse 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 NewCreateShortLivedAccessTokenResponse(accessToken string, expiresIn int32, refreshToken string, scope string, tokenType string) *CreateShortLivedAccessTokenResponse { + this := CreateShortLivedAccessTokenResponse{} + this.AccessToken = accessToken + this.ExpiresIn = expiresIn + this.RefreshToken = refreshToken + this.Scope = scope + this.TokenType = tokenType + return &this +} + +// NewCreateShortLivedAccessTokenResponseWithDefaults instantiates a new CreateShortLivedAccessTokenResponse 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 NewCreateShortLivedAccessTokenResponseWithDefaults() *CreateShortLivedAccessTokenResponse { + this := CreateShortLivedAccessTokenResponse{} + return &this +} + +// GetAccessToken returns the AccessToken field value +func (o *CreateShortLivedAccessTokenResponse) GetAccessToken() string { + if o == nil { + var ret string + return ret + } + + return o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value +// and a boolean to check if the value has been set. +func (o *CreateShortLivedAccessTokenResponse) GetAccessTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessToken, true +} + +// SetAccessToken sets field value +func (o *CreateShortLivedAccessTokenResponse) SetAccessToken(v string) { + o.AccessToken = v +} + +// GetExpiresIn returns the ExpiresIn field value +func (o *CreateShortLivedAccessTokenResponse) GetExpiresIn() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value +// and a boolean to check if the value has been set. +func (o *CreateShortLivedAccessTokenResponse) GetExpiresInOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ExpiresIn, true +} + +// SetExpiresIn sets field value +func (o *CreateShortLivedAccessTokenResponse) SetExpiresIn(v int32) { + o.ExpiresIn = v +} + +// GetRefreshToken returns the RefreshToken field value +func (o *CreateShortLivedAccessTokenResponse) GetRefreshToken() string { + if o == nil { + var ret string + return ret + } + + return o.RefreshToken +} + +// GetRefreshTokenOk returns a tuple with the RefreshToken field value +// and a boolean to check if the value has been set. +func (o *CreateShortLivedAccessTokenResponse) GetRefreshTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RefreshToken, true +} + +// SetRefreshToken sets field value +func (o *CreateShortLivedAccessTokenResponse) SetRefreshToken(v string) { + o.RefreshToken = v +} + +// GetScope returns the Scope field value +func (o *CreateShortLivedAccessTokenResponse) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *CreateShortLivedAccessTokenResponse) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *CreateShortLivedAccessTokenResponse) SetScope(v string) { + o.Scope = v +} + +// GetTokenType returns the TokenType field value +func (o *CreateShortLivedAccessTokenResponse) GetTokenType() string { + if o == nil { + var ret string + return ret + } + + return o.TokenType +} + +// GetTokenTypeOk returns a tuple with the TokenType field value +// and a boolean to check if the value has been set. +func (o *CreateShortLivedAccessTokenResponse) GetTokenTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenType, true +} + +// SetTokenType sets field value +func (o *CreateShortLivedAccessTokenResponse) SetTokenType(v string) { + o.TokenType = v +} + +func (o CreateShortLivedAccessTokenResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateShortLivedAccessTokenResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_token"] = o.AccessToken + toSerialize["expires_in"] = o.ExpiresIn + toSerialize["refresh_token"] = o.RefreshToken + toSerialize["scope"] = o.Scope + toSerialize["token_type"] = o.TokenType + return toSerialize, nil +} + +func (o *CreateShortLivedAccessTokenResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_token", + "expires_in", + "refresh_token", + "scope", + "token_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateShortLivedAccessTokenResponse := _CreateShortLivedAccessTokenResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateShortLivedAccessTokenResponse) + + if err != nil { + return err + } + + *o = CreateShortLivedAccessTokenResponse(varCreateShortLivedAccessTokenResponse) + + return err +} + +type NullableCreateShortLivedAccessTokenResponse struct { + value *CreateShortLivedAccessTokenResponse + isSet bool +} + +func (v NullableCreateShortLivedAccessTokenResponse) Get() *CreateShortLivedAccessTokenResponse { + return v.value +} + +func (v *NullableCreateShortLivedAccessTokenResponse) Set(val *CreateShortLivedAccessTokenResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateShortLivedAccessTokenResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateShortLivedAccessTokenResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateShortLivedAccessTokenResponse(val *CreateShortLivedAccessTokenResponse) *NullableCreateShortLivedAccessTokenResponse { + return &NullableCreateShortLivedAccessTokenResponse{value: val, isSet: true} +} + +func (v NullableCreateShortLivedAccessTokenResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateShortLivedAccessTokenResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_error.go b/services/serviceaccount/v2api/model_error.go new file mode 100644 index 000000000..80e821db8 --- /dev/null +++ b/services/serviceaccount/v2api/model_error.go @@ -0,0 +1,269 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + +// Error Contains error information. +type Error struct { + Error string `json:"error"` + Message string `json:"message"` + Path string `json:"path"` + Status int32 `json:"status"` + TimeStamp time.Time `json:"timeStamp"` +} + +type _Error 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 +func NewError(error_ string, message string, path string, status int32, timeStamp time.Time) *Error { + this := Error{} + this.Error = error_ + this.Message = message + this.Path = path + this.Status = status + this.TimeStamp = timeStamp + 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 +} + +// GetError returns the Error field value +func (o *Error) GetError() string { + if o == nil { + var ret string + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *Error) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *Error) SetError(v string) { + o.Error = v +} + +// GetMessage returns the Message field value +func (o *Error) GetMessage() string { + if o == 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. +func (o *Error) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *Error) SetMessage(v string) { + o.Message = v +} + +// GetPath returns the Path field value +func (o *Error) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *Error) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *Error) SetPath(v string) { + o.Path = v +} + +// GetStatus returns the Status field value +func (o *Error) GetStatus() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Error) GetStatusOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *Error) SetStatus(v int32) { + o.Status = v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *Error) GetTimeStamp() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *Error) GetTimeStampOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *Error) SetTimeStamp(v time.Time) { + o.TimeStamp = v +} + +func (o Error) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error"] = o.Error + toSerialize["message"] = o.Message + toSerialize["path"] = o.Path + toSerialize["status"] = o.Status + toSerialize["timeStamp"] = o.TimeStamp + return toSerialize, nil +} + +func (o *Error) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "error", + "message", + "path", + "status", + "timeStamp", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varError := _Error{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varError) + + if err != nil { + return err + } + + *o = Error(varError) + + return err +} + +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/services/serviceaccount/v2api/model_federated_list_federated_identity_providers_response.go b/services/serviceaccount/v2api/model_federated_list_federated_identity_providers_response.go new file mode 100644 index 000000000..c5e7fe61a --- /dev/null +++ b/services/serviceaccount/v2api/model_federated_list_federated_identity_providers_response.go @@ -0,0 +1,246 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FederatedListFederatedIdentityProvidersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FederatedListFederatedIdentityProvidersResponse{} + +// FederatedListFederatedIdentityProvidersResponse struct for FederatedListFederatedIdentityProvidersResponse +type FederatedListFederatedIdentityProvidersResponse struct { + ItemsPerPage float32 `json:"itemsPerPage"` + Resources []CreateFederatedIdentityProviderResponse `json:"resources"` + StartIndex float32 `json:"startIndex"` + TotalResults float32 `json:"totalResults"` +} + +type _FederatedListFederatedIdentityProvidersResponse FederatedListFederatedIdentityProvidersResponse + +// NewFederatedListFederatedIdentityProvidersResponse instantiates a new FederatedListFederatedIdentityProvidersResponse 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 NewFederatedListFederatedIdentityProvidersResponse(itemsPerPage float32, resources []CreateFederatedIdentityProviderResponse, startIndex float32, totalResults float32) *FederatedListFederatedIdentityProvidersResponse { + this := FederatedListFederatedIdentityProvidersResponse{} + this.ItemsPerPage = itemsPerPage + this.Resources = resources + this.StartIndex = startIndex + this.TotalResults = totalResults + return &this +} + +// NewFederatedListFederatedIdentityProvidersResponseWithDefaults instantiates a new FederatedListFederatedIdentityProvidersResponse 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 NewFederatedListFederatedIdentityProvidersResponseWithDefaults() *FederatedListFederatedIdentityProvidersResponse { + this := FederatedListFederatedIdentityProvidersResponse{} + var itemsPerPage float32 = 1 + this.ItemsPerPage = itemsPerPage + var startIndex float32 = 1 + this.StartIndex = startIndex + var totalResults float32 = 0 + this.TotalResults = totalResults + return &this +} + +// GetItemsPerPage returns the ItemsPerPage field value +func (o *FederatedListFederatedIdentityProvidersResponse) GetItemsPerPage() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.ItemsPerPage +} + +// GetItemsPerPageOk returns a tuple with the ItemsPerPage field value +// and a boolean to check if the value has been set. +func (o *FederatedListFederatedIdentityProvidersResponse) GetItemsPerPageOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.ItemsPerPage, true +} + +// SetItemsPerPage sets field value +func (o *FederatedListFederatedIdentityProvidersResponse) SetItemsPerPage(v float32) { + o.ItemsPerPage = v +} + +// GetResources returns the Resources field value +func (o *FederatedListFederatedIdentityProvidersResponse) GetResources() []CreateFederatedIdentityProviderResponse { + if o == nil { + var ret []CreateFederatedIdentityProviderResponse + return ret + } + + return o.Resources +} + +// GetResourcesOk returns a tuple with the Resources field value +// and a boolean to check if the value has been set. +func (o *FederatedListFederatedIdentityProvidersResponse) GetResourcesOk() ([]CreateFederatedIdentityProviderResponse, bool) { + if o == nil { + return nil, false + } + return o.Resources, true +} + +// SetResources sets field value +func (o *FederatedListFederatedIdentityProvidersResponse) SetResources(v []CreateFederatedIdentityProviderResponse) { + o.Resources = v +} + +// GetStartIndex returns the StartIndex field value +func (o *FederatedListFederatedIdentityProvidersResponse) GetStartIndex() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.StartIndex +} + +// GetStartIndexOk returns a tuple with the StartIndex field value +// and a boolean to check if the value has been set. +func (o *FederatedListFederatedIdentityProvidersResponse) GetStartIndexOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.StartIndex, true +} + +// SetStartIndex sets field value +func (o *FederatedListFederatedIdentityProvidersResponse) SetStartIndex(v float32) { + o.StartIndex = v +} + +// GetTotalResults returns the TotalResults field value +func (o *FederatedListFederatedIdentityProvidersResponse) GetTotalResults() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.TotalResults +} + +// GetTotalResultsOk returns a tuple with the TotalResults field value +// and a boolean to check if the value has been set. +func (o *FederatedListFederatedIdentityProvidersResponse) GetTotalResultsOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.TotalResults, true +} + +// SetTotalResults sets field value +func (o *FederatedListFederatedIdentityProvidersResponse) SetTotalResults(v float32) { + o.TotalResults = v +} + +func (o FederatedListFederatedIdentityProvidersResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FederatedListFederatedIdentityProvidersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["itemsPerPage"] = o.ItemsPerPage + toSerialize["resources"] = o.Resources + toSerialize["startIndex"] = o.StartIndex + toSerialize["totalResults"] = o.TotalResults + return toSerialize, nil +} + +func (o *FederatedListFederatedIdentityProvidersResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "itemsPerPage", + "resources", + "startIndex", + "totalResults", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFederatedListFederatedIdentityProvidersResponse := _FederatedListFederatedIdentityProvidersResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFederatedListFederatedIdentityProvidersResponse) + + if err != nil { + return err + } + + *o = FederatedListFederatedIdentityProvidersResponse(varFederatedListFederatedIdentityProvidersResponse) + + return err +} + +type NullableFederatedListFederatedIdentityProvidersResponse struct { + value *FederatedListFederatedIdentityProvidersResponse + isSet bool +} + +func (v NullableFederatedListFederatedIdentityProvidersResponse) Get() *FederatedListFederatedIdentityProvidersResponse { + return v.value +} + +func (v *NullableFederatedListFederatedIdentityProvidersResponse) Set(val *FederatedListFederatedIdentityProvidersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFederatedListFederatedIdentityProvidersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFederatedListFederatedIdentityProvidersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFederatedListFederatedIdentityProvidersResponse(val *FederatedListFederatedIdentityProvidersResponse) *NullableFederatedListFederatedIdentityProvidersResponse { + return &NullableFederatedListFederatedIdentityProvidersResponse{value: val, isSet: true} +} + +func (v NullableFederatedListFederatedIdentityProvidersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFederatedListFederatedIdentityProvidersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_get_service_account_key_response.go b/services/serviceaccount/v2api/model_get_service_account_key_response.go new file mode 100644 index 000000000..2a0431e47 --- /dev/null +++ b/services/serviceaccount/v2api/model_get_service_account_key_response.go @@ -0,0 +1,401 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the GetServiceAccountKeyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetServiceAccountKeyResponse{} + +// GetServiceAccountKeyResponse struct for GetServiceAccountKeyResponse +type GetServiceAccountKeyResponse struct { + Active bool `json:"active"` + // Creation time of the key + CreatedAt time.Time `json:"createdAt"` + Credentials GetServiceAccountKeyResponseCredentials `json:"credentials"` + // Unique ID of the key. + Id string `json:"id"` + KeyAlgorithm string `json:"keyAlgorithm"` + KeyOrigin string `json:"keyOrigin"` + KeyType string `json:"keyType"` + // Public key, in the requested format + PublicKey *string `json:"publicKey,omitempty"` + // If specified, the timestamp until the key is active. May be null + ValidUntil *time.Time `json:"validUntil,omitempty"` +} + +type _GetServiceAccountKeyResponse GetServiceAccountKeyResponse + +// NewGetServiceAccountKeyResponse instantiates a new GetServiceAccountKeyResponse 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 NewGetServiceAccountKeyResponse(active bool, createdAt time.Time, credentials GetServiceAccountKeyResponseCredentials, id string, keyAlgorithm string, keyOrigin string, keyType string) *GetServiceAccountKeyResponse { + this := GetServiceAccountKeyResponse{} + this.Active = active + this.CreatedAt = createdAt + this.Credentials = credentials + this.Id = id + this.KeyAlgorithm = keyAlgorithm + this.KeyOrigin = keyOrigin + this.KeyType = keyType + return &this +} + +// NewGetServiceAccountKeyResponseWithDefaults instantiates a new GetServiceAccountKeyResponse 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 NewGetServiceAccountKeyResponseWithDefaults() *GetServiceAccountKeyResponse { + this := GetServiceAccountKeyResponse{} + return &this +} + +// GetActive returns the Active field value +func (o *GetServiceAccountKeyResponse) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponse) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *GetServiceAccountKeyResponse) SetActive(v bool) { + o.Active = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *GetServiceAccountKeyResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *GetServiceAccountKeyResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetCredentials returns the Credentials field value +func (o *GetServiceAccountKeyResponse) GetCredentials() GetServiceAccountKeyResponseCredentials { + if o == nil { + var ret GetServiceAccountKeyResponseCredentials + 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. +func (o *GetServiceAccountKeyResponse) GetCredentialsOk() (*GetServiceAccountKeyResponseCredentials, bool) { + if o == nil { + return nil, false + } + return &o.Credentials, true +} + +// SetCredentials sets field value +func (o *GetServiceAccountKeyResponse) SetCredentials(v GetServiceAccountKeyResponseCredentials) { + o.Credentials = v +} + +// GetId returns the Id field value +func (o *GetServiceAccountKeyResponse) 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 *GetServiceAccountKeyResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GetServiceAccountKeyResponse) SetId(v string) { + o.Id = v +} + +// GetKeyAlgorithm returns the KeyAlgorithm field value +func (o *GetServiceAccountKeyResponse) GetKeyAlgorithm() string { + if o == nil { + var ret string + return ret + } + + return o.KeyAlgorithm +} + +// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponse) GetKeyAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyAlgorithm, true +} + +// SetKeyAlgorithm sets field value +func (o *GetServiceAccountKeyResponse) SetKeyAlgorithm(v string) { + o.KeyAlgorithm = v +} + +// GetKeyOrigin returns the KeyOrigin field value +func (o *GetServiceAccountKeyResponse) GetKeyOrigin() string { + if o == nil { + var ret string + return ret + } + + return o.KeyOrigin +} + +// GetKeyOriginOk returns a tuple with the KeyOrigin field value +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponse) GetKeyOriginOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyOrigin, true +} + +// SetKeyOrigin sets field value +func (o *GetServiceAccountKeyResponse) SetKeyOrigin(v string) { + o.KeyOrigin = v +} + +// GetKeyType returns the KeyType field value +func (o *GetServiceAccountKeyResponse) GetKeyType() string { + if o == nil { + var ret string + return ret + } + + return o.KeyType +} + +// GetKeyTypeOk returns a tuple with the KeyType field value +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponse) GetKeyTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyType, true +} + +// SetKeyType sets field value +func (o *GetServiceAccountKeyResponse) SetKeyType(v string) { + o.KeyType = v +} + +// GetPublicKey returns the PublicKey field value if set, zero value otherwise. +func (o *GetServiceAccountKeyResponse) GetPublicKey() string { + if o == nil || IsNil(o.PublicKey) { + var ret string + return ret + } + return *o.PublicKey +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponse) GetPublicKeyOk() (*string, bool) { + if o == nil || IsNil(o.PublicKey) { + return nil, false + } + return o.PublicKey, true +} + +// HasPublicKey returns a boolean if a field has been set. +func (o *GetServiceAccountKeyResponse) HasPublicKey() bool { + if o != nil && !IsNil(o.PublicKey) { + return true + } + + return false +} + +// SetPublicKey gets a reference to the given string and assigns it to the PublicKey field. +func (o *GetServiceAccountKeyResponse) SetPublicKey(v string) { + o.PublicKey = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *GetServiceAccountKeyResponse) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponse) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *GetServiceAccountKeyResponse) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *GetServiceAccountKeyResponse) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +func (o GetServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["active"] = o.Active + toSerialize["createdAt"] = o.CreatedAt + toSerialize["credentials"] = o.Credentials + toSerialize["id"] = o.Id + toSerialize["keyAlgorithm"] = o.KeyAlgorithm + toSerialize["keyOrigin"] = o.KeyOrigin + toSerialize["keyType"] = o.KeyType + if !IsNil(o.PublicKey) { + toSerialize["publicKey"] = o.PublicKey + } + if !IsNil(o.ValidUntil) { + toSerialize["validUntil"] = o.ValidUntil + } + return toSerialize, nil +} + +func (o *GetServiceAccountKeyResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "active", + "createdAt", + "credentials", + "id", + "keyAlgorithm", + "keyOrigin", + "keyType", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetServiceAccountKeyResponse := _GetServiceAccountKeyResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGetServiceAccountKeyResponse) + + if err != nil { + return err + } + + *o = GetServiceAccountKeyResponse(varGetServiceAccountKeyResponse) + + return err +} + +type NullableGetServiceAccountKeyResponse struct { + value *GetServiceAccountKeyResponse + isSet bool +} + +func (v NullableGetServiceAccountKeyResponse) Get() *GetServiceAccountKeyResponse { + return v.value +} + +func (v *NullableGetServiceAccountKeyResponse) Set(val *GetServiceAccountKeyResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetServiceAccountKeyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetServiceAccountKeyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetServiceAccountKeyResponse(val *GetServiceAccountKeyResponse) *NullableGetServiceAccountKeyResponse { + return &NullableGetServiceAccountKeyResponse{value: val, isSet: true} +} + +func (v NullableGetServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetServiceAccountKeyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_get_service_account_key_response_credentials.go b/services/serviceaccount/v2api/model_get_service_account_key_response_credentials.go new file mode 100644 index 000000000..000d0b49a --- /dev/null +++ b/services/serviceaccount/v2api/model_get_service_account_key_response_credentials.go @@ -0,0 +1,244 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GetServiceAccountKeyResponseCredentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetServiceAccountKeyResponseCredentials{} + +// GetServiceAccountKeyResponseCredentials struct for GetServiceAccountKeyResponseCredentials +type GetServiceAccountKeyResponseCredentials struct { + // Audience - service account API URL + Aud string `json:"aud"` + // Service account email + Iss string `json:"iss"` + // Key id to use + Kid string `json:"kid"` + // Service account id + Sub string `json:"sub"` +} + +type _GetServiceAccountKeyResponseCredentials GetServiceAccountKeyResponseCredentials + +// NewGetServiceAccountKeyResponseCredentials instantiates a new GetServiceAccountKeyResponseCredentials 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 NewGetServiceAccountKeyResponseCredentials(aud string, iss string, kid string, sub string) *GetServiceAccountKeyResponseCredentials { + this := GetServiceAccountKeyResponseCredentials{} + this.Aud = aud + this.Iss = iss + this.Kid = kid + this.Sub = sub + return &this +} + +// NewGetServiceAccountKeyResponseCredentialsWithDefaults instantiates a new GetServiceAccountKeyResponseCredentials 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 NewGetServiceAccountKeyResponseCredentialsWithDefaults() *GetServiceAccountKeyResponseCredentials { + this := GetServiceAccountKeyResponseCredentials{} + return &this +} + +// GetAud returns the Aud field value +func (o *GetServiceAccountKeyResponseCredentials) GetAud() string { + if o == nil { + var ret string + return ret + } + + return o.Aud +} + +// GetAudOk returns a tuple with the Aud field value +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponseCredentials) GetAudOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Aud, true +} + +// SetAud sets field value +func (o *GetServiceAccountKeyResponseCredentials) SetAud(v string) { + o.Aud = v +} + +// GetIss returns the Iss field value +func (o *GetServiceAccountKeyResponseCredentials) GetIss() string { + if o == nil { + var ret string + return ret + } + + return o.Iss +} + +// GetIssOk returns a tuple with the Iss field value +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponseCredentials) GetIssOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Iss, true +} + +// SetIss sets field value +func (o *GetServiceAccountKeyResponseCredentials) SetIss(v string) { + o.Iss = v +} + +// GetKid returns the Kid field value +func (o *GetServiceAccountKeyResponseCredentials) GetKid() string { + if o == nil { + var ret string + return ret + } + + return o.Kid +} + +// GetKidOk returns a tuple with the Kid field value +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponseCredentials) GetKidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kid, true +} + +// SetKid sets field value +func (o *GetServiceAccountKeyResponseCredentials) SetKid(v string) { + o.Kid = v +} + +// GetSub returns the Sub field value +func (o *GetServiceAccountKeyResponseCredentials) GetSub() string { + if o == nil { + var ret string + return ret + } + + return o.Sub +} + +// GetSubOk returns a tuple with the Sub field value +// and a boolean to check if the value has been set. +func (o *GetServiceAccountKeyResponseCredentials) GetSubOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Sub, true +} + +// SetSub sets field value +func (o *GetServiceAccountKeyResponseCredentials) SetSub(v string) { + o.Sub = v +} + +func (o GetServiceAccountKeyResponseCredentials) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetServiceAccountKeyResponseCredentials) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["aud"] = o.Aud + toSerialize["iss"] = o.Iss + toSerialize["kid"] = o.Kid + toSerialize["sub"] = o.Sub + return toSerialize, nil +} + +func (o *GetServiceAccountKeyResponseCredentials) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "aud", + "iss", + "kid", + "sub", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetServiceAccountKeyResponseCredentials := _GetServiceAccountKeyResponseCredentials{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGetServiceAccountKeyResponseCredentials) + + if err != nil { + return err + } + + *o = GetServiceAccountKeyResponseCredentials(varGetServiceAccountKeyResponseCredentials) + + return err +} + +type NullableGetServiceAccountKeyResponseCredentials struct { + value *GetServiceAccountKeyResponseCredentials + isSet bool +} + +func (v NullableGetServiceAccountKeyResponseCredentials) Get() *GetServiceAccountKeyResponseCredentials { + return v.value +} + +func (v *NullableGetServiceAccountKeyResponseCredentials) Set(val *GetServiceAccountKeyResponseCredentials) { + v.value = val + v.isSet = true +} + +func (v NullableGetServiceAccountKeyResponseCredentials) IsSet() bool { + return v.isSet +} + +func (v *NullableGetServiceAccountKeyResponseCredentials) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetServiceAccountKeyResponseCredentials(val *GetServiceAccountKeyResponseCredentials) *NullableGetServiceAccountKeyResponseCredentials { + return &NullableGetServiceAccountKeyResponseCredentials{value: val, isSet: true} +} + +func (v NullableGetServiceAccountKeyResponseCredentials) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetServiceAccountKeyResponseCredentials) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_jwk.go b/services/serviceaccount/v2api/model_jwk.go new file mode 100644 index 000000000..872edd2b6 --- /dev/null +++ b/services/serviceaccount/v2api/model_jwk.go @@ -0,0 +1,508 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the JWK type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JWK{} + +// JWK JSON Web Key according to https://datatracker.ietf.org/doc/html/rfc7517#section-4 +type JWK struct { + Alg *string `json:"alg,omitempty"` + E string `json:"e"` + Kid *string `json:"kid,omitempty"` + Ks *string `json:"ks,omitempty"` + N string `json:"n"` + Ops *string `json:"ops,omitempty"` + Use *string `json:"use,omitempty"` + X5c *string `json:"x5c,omitempty"` + X5t *string `json:"x5t,omitempty"` + X5t256 *string `json:"x5t256,omitempty"` + X5u *string `json:"x5u,omitempty"` +} + +type _JWK JWK + +// NewJWK instantiates a new JWK 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 NewJWK(e string, n string) *JWK { + this := JWK{} + this.E = e + this.N = n + return &this +} + +// NewJWKWithDefaults instantiates a new JWK 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 NewJWKWithDefaults() *JWK { + this := JWK{} + return &this +} + +// GetAlg returns the Alg field value if set, zero value otherwise. +func (o *JWK) GetAlg() string { + if o == nil || IsNil(o.Alg) { + var ret string + return ret + } + return *o.Alg +} + +// GetAlgOk returns a tuple with the Alg field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JWK) GetAlgOk() (*string, bool) { + if o == nil || IsNil(o.Alg) { + return nil, false + } + return o.Alg, true +} + +// HasAlg returns a boolean if a field has been set. +func (o *JWK) HasAlg() bool { + if o != nil && !IsNil(o.Alg) { + return true + } + + return false +} + +// SetAlg gets a reference to the given string and assigns it to the Alg field. +func (o *JWK) SetAlg(v string) { + o.Alg = &v +} + +// GetE returns the E field value +func (o *JWK) GetE() string { + if o == nil { + var ret string + return ret + } + + return o.E +} + +// GetEOk returns a tuple with the E field value +// and a boolean to check if the value has been set. +func (o *JWK) GetEOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.E, true +} + +// SetE sets field value +func (o *JWK) SetE(v string) { + o.E = v +} + +// GetKid returns the Kid field value if set, zero value otherwise. +func (o *JWK) GetKid() string { + if o == nil || IsNil(o.Kid) { + var ret string + return ret + } + return *o.Kid +} + +// GetKidOk returns a tuple with the Kid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JWK) GetKidOk() (*string, bool) { + if o == nil || IsNil(o.Kid) { + return nil, false + } + return o.Kid, true +} + +// HasKid returns a boolean if a field has been set. +func (o *JWK) HasKid() bool { + if o != nil && !IsNil(o.Kid) { + return true + } + + return false +} + +// SetKid gets a reference to the given string and assigns it to the Kid field. +func (o *JWK) SetKid(v string) { + o.Kid = &v +} + +// GetKs returns the Ks field value if set, zero value otherwise. +func (o *JWK) GetKs() string { + if o == nil || IsNil(o.Ks) { + var ret string + return ret + } + return *o.Ks +} + +// GetKsOk returns a tuple with the Ks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JWK) GetKsOk() (*string, bool) { + if o == nil || IsNil(o.Ks) { + return nil, false + } + return o.Ks, true +} + +// HasKs returns a boolean if a field has been set. +func (o *JWK) HasKs() bool { + if o != nil && !IsNil(o.Ks) { + return true + } + + return false +} + +// SetKs gets a reference to the given string and assigns it to the Ks field. +func (o *JWK) SetKs(v string) { + o.Ks = &v +} + +// GetN returns the N field value +func (o *JWK) GetN() string { + if o == nil { + var ret string + return ret + } + + return o.N +} + +// GetNOk returns a tuple with the N field value +// and a boolean to check if the value has been set. +func (o *JWK) GetNOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.N, true +} + +// SetN sets field value +func (o *JWK) SetN(v string) { + o.N = v +} + +// GetOps returns the Ops field value if set, zero value otherwise. +func (o *JWK) GetOps() string { + if o == nil || IsNil(o.Ops) { + var ret string + return ret + } + return *o.Ops +} + +// GetOpsOk returns a tuple with the Ops field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JWK) GetOpsOk() (*string, bool) { + if o == nil || IsNil(o.Ops) { + return nil, false + } + return o.Ops, true +} + +// HasOps returns a boolean if a field has been set. +func (o *JWK) HasOps() bool { + if o != nil && !IsNil(o.Ops) { + return true + } + + return false +} + +// SetOps gets a reference to the given string and assigns it to the Ops field. +func (o *JWK) SetOps(v string) { + o.Ops = &v +} + +// GetUse returns the Use field value if set, zero value otherwise. +func (o *JWK) GetUse() string { + if o == nil || IsNil(o.Use) { + var ret string + return ret + } + return *o.Use +} + +// GetUseOk returns a tuple with the Use field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JWK) GetUseOk() (*string, bool) { + if o == nil || IsNil(o.Use) { + return nil, false + } + return o.Use, true +} + +// HasUse returns a boolean if a field has been set. +func (o *JWK) HasUse() bool { + if o != nil && !IsNil(o.Use) { + return true + } + + return false +} + +// SetUse gets a reference to the given string and assigns it to the Use field. +func (o *JWK) SetUse(v string) { + o.Use = &v +} + +// GetX5c returns the X5c field value if set, zero value otherwise. +func (o *JWK) GetX5c() string { + if o == nil || IsNil(o.X5c) { + var ret string + return ret + } + return *o.X5c +} + +// GetX5cOk returns a tuple with the X5c field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JWK) GetX5cOk() (*string, bool) { + if o == nil || IsNil(o.X5c) { + return nil, false + } + return o.X5c, true +} + +// HasX5c returns a boolean if a field has been set. +func (o *JWK) HasX5c() bool { + if o != nil && !IsNil(o.X5c) { + return true + } + + return false +} + +// SetX5c gets a reference to the given string and assigns it to the X5c field. +func (o *JWK) SetX5c(v string) { + o.X5c = &v +} + +// GetX5t returns the X5t field value if set, zero value otherwise. +func (o *JWK) GetX5t() string { + if o == nil || IsNil(o.X5t) { + var ret string + return ret + } + return *o.X5t +} + +// GetX5tOk returns a tuple with the X5t field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JWK) GetX5tOk() (*string, bool) { + if o == nil || IsNil(o.X5t) { + return nil, false + } + return o.X5t, true +} + +// HasX5t returns a boolean if a field has been set. +func (o *JWK) HasX5t() bool { + if o != nil && !IsNil(o.X5t) { + return true + } + + return false +} + +// SetX5t gets a reference to the given string and assigns it to the X5t field. +func (o *JWK) SetX5t(v string) { + o.X5t = &v +} + +// GetX5t256 returns the X5t256 field value if set, zero value otherwise. +func (o *JWK) GetX5t256() string { + if o == nil || IsNil(o.X5t256) { + var ret string + return ret + } + return *o.X5t256 +} + +// GetX5t256Ok returns a tuple with the X5t256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JWK) GetX5t256Ok() (*string, bool) { + if o == nil || IsNil(o.X5t256) { + return nil, false + } + return o.X5t256, true +} + +// HasX5t256 returns a boolean if a field has been set. +func (o *JWK) HasX5t256() bool { + if o != nil && !IsNil(o.X5t256) { + return true + } + + return false +} + +// SetX5t256 gets a reference to the given string and assigns it to the X5t256 field. +func (o *JWK) SetX5t256(v string) { + o.X5t256 = &v +} + +// GetX5u returns the X5u field value if set, zero value otherwise. +func (o *JWK) GetX5u() string { + if o == nil || IsNil(o.X5u) { + var ret string + return ret + } + return *o.X5u +} + +// GetX5uOk returns a tuple with the X5u field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JWK) GetX5uOk() (*string, bool) { + if o == nil || IsNil(o.X5u) { + return nil, false + } + return o.X5u, true +} + +// HasX5u returns a boolean if a field has been set. +func (o *JWK) HasX5u() bool { + if o != nil && !IsNil(o.X5u) { + return true + } + + return false +} + +// SetX5u gets a reference to the given string and assigns it to the X5u field. +func (o *JWK) SetX5u(v string) { + o.X5u = &v +} + +func (o JWK) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JWK) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Alg) { + toSerialize["alg"] = o.Alg + } + toSerialize["e"] = o.E + if !IsNil(o.Kid) { + toSerialize["kid"] = o.Kid + } + if !IsNil(o.Ks) { + toSerialize["ks"] = o.Ks + } + toSerialize["n"] = o.N + if !IsNil(o.Ops) { + toSerialize["ops"] = o.Ops + } + if !IsNil(o.Use) { + toSerialize["use"] = o.Use + } + if !IsNil(o.X5c) { + toSerialize["x5c"] = o.X5c + } + if !IsNil(o.X5t) { + toSerialize["x5t"] = o.X5t + } + if !IsNil(o.X5t256) { + toSerialize["x5t256"] = o.X5t256 + } + if !IsNil(o.X5u) { + toSerialize["x5u"] = o.X5u + } + return toSerialize, nil +} + +func (o *JWK) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "e", + "n", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varJWK := _JWK{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varJWK) + + if err != nil { + return err + } + + *o = JWK(varJWK) + + return err +} + +type NullableJWK struct { + value *JWK + isSet bool +} + +func (v NullableJWK) Get() *JWK { + return v.value +} + +func (v *NullableJWK) Set(val *JWK) { + v.value = val + v.isSet = true +} + +func (v NullableJWK) IsSet() bool { + return v.isSet +} + +func (v *NullableJWK) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJWK(val *JWK) *NullableJWK { + return &NullableJWK{value: val, isSet: true} +} + +func (v NullableJWK) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJWK) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_jwks.go b/services/serviceaccount/v2api/model_jwks.go new file mode 100644 index 000000000..8515c2845 --- /dev/null +++ b/services/serviceaccount/v2api/model_jwks.go @@ -0,0 +1,156 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the JWKS type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JWKS{} + +// JWKS struct for JWKS +type JWKS struct { + Keys []JWK `json:"keys"` +} + +type _JWKS JWKS + +// NewJWKS instantiates a new JWKS 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 NewJWKS(keys []JWK) *JWKS { + this := JWKS{} + this.Keys = keys + return &this +} + +// NewJWKSWithDefaults instantiates a new JWKS 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 NewJWKSWithDefaults() *JWKS { + this := JWKS{} + return &this +} + +// GetKeys returns the Keys field value +func (o *JWKS) GetKeys() []JWK { + if o == nil { + var ret []JWK + return ret + } + + return o.Keys +} + +// GetKeysOk returns a tuple with the Keys field value +// and a boolean to check if the value has been set. +func (o *JWKS) GetKeysOk() ([]JWK, bool) { + if o == nil { + return nil, false + } + return o.Keys, true +} + +// SetKeys sets field value +func (o *JWKS) SetKeys(v []JWK) { + o.Keys = v +} + +func (o JWKS) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JWKS) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["keys"] = o.Keys + return toSerialize, nil +} + +func (o *JWKS) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "keys", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varJWKS := _JWKS{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varJWKS) + + if err != nil { + return err + } + + *o = JWKS(varJWKS) + + return err +} + +type NullableJWKS struct { + value *JWKS + isSet bool +} + +func (v NullableJWKS) Get() *JWKS { + return v.value +} + +func (v *NullableJWKS) Set(val *JWKS) { + v.value = val + v.isSet = true +} + +func (v NullableJWKS) IsSet() bool { + return v.isSet +} + +func (v *NullableJWKS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJWKS(val *JWKS) *NullableJWKS { + return &NullableJWKS{value: val, isSet: true} +} + +func (v NullableJWKS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJWKS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_list_access_tokens_response.go b/services/serviceaccount/v2api/model_list_access_tokens_response.go new file mode 100644 index 000000000..8b88061b1 --- /dev/null +++ b/services/serviceaccount/v2api/model_list_access_tokens_response.go @@ -0,0 +1,124 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListAccessTokensResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListAccessTokensResponse{} + +// ListAccessTokensResponse struct for ListAccessTokensResponse +type ListAccessTokensResponse struct { + Items []AccessTokenMetadata `json:"items,omitempty"` +} + +// NewListAccessTokensResponse instantiates a new ListAccessTokensResponse 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 NewListAccessTokensResponse() *ListAccessTokensResponse { + this := ListAccessTokensResponse{} + return &this +} + +// NewListAccessTokensResponseWithDefaults instantiates a new ListAccessTokensResponse 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 NewListAccessTokensResponseWithDefaults() *ListAccessTokensResponse { + this := ListAccessTokensResponse{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListAccessTokensResponse) GetItems() []AccessTokenMetadata { + if o == nil || IsNil(o.Items) { + var ret []AccessTokenMetadata + 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 *ListAccessTokensResponse) GetItemsOk() ([]AccessTokenMetadata, 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 *ListAccessTokensResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []AccessTokenMetadata and assigns it to the Items field. +func (o *ListAccessTokensResponse) SetItems(v []AccessTokenMetadata) { + o.Items = v +} + +func (o ListAccessTokensResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListAccessTokensResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListAccessTokensResponse struct { + value *ListAccessTokensResponse + isSet bool +} + +func (v NullableListAccessTokensResponse) Get() *ListAccessTokensResponse { + return v.value +} + +func (v *NullableListAccessTokensResponse) Set(val *ListAccessTokensResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListAccessTokensResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListAccessTokensResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAccessTokensResponse(val *ListAccessTokensResponse) *NullableListAccessTokensResponse { + return &NullableListAccessTokensResponse{value: val, isSet: true} +} + +func (v NullableListAccessTokensResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAccessTokensResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_list_service_account_keys_response.go b/services/serviceaccount/v2api/model_list_service_account_keys_response.go new file mode 100644 index 000000000..ee036124e --- /dev/null +++ b/services/serviceaccount/v2api/model_list_service_account_keys_response.go @@ -0,0 +1,156 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListServiceAccountKeysResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListServiceAccountKeysResponse{} + +// ListServiceAccountKeysResponse struct for ListServiceAccountKeysResponse +type ListServiceAccountKeysResponse struct { + Items []ServiceAccountKeyListResponse `json:"items"` +} + +type _ListServiceAccountKeysResponse ListServiceAccountKeysResponse + +// NewListServiceAccountKeysResponse instantiates a new ListServiceAccountKeysResponse 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 NewListServiceAccountKeysResponse(items []ServiceAccountKeyListResponse) *ListServiceAccountKeysResponse { + this := ListServiceAccountKeysResponse{} + this.Items = items + return &this +} + +// NewListServiceAccountKeysResponseWithDefaults instantiates a new ListServiceAccountKeysResponse 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 NewListServiceAccountKeysResponseWithDefaults() *ListServiceAccountKeysResponse { + this := ListServiceAccountKeysResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *ListServiceAccountKeysResponse) GetItems() []ServiceAccountKeyListResponse { + if o == nil { + var ret []ServiceAccountKeyListResponse + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ListServiceAccountKeysResponse) GetItemsOk() ([]ServiceAccountKeyListResponse, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ListServiceAccountKeysResponse) SetItems(v []ServiceAccountKeyListResponse) { + o.Items = v +} + +func (o ListServiceAccountKeysResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListServiceAccountKeysResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +func (o *ListServiceAccountKeysResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListServiceAccountKeysResponse := _ListServiceAccountKeysResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListServiceAccountKeysResponse) + + if err != nil { + return err + } + + *o = ListServiceAccountKeysResponse(varListServiceAccountKeysResponse) + + return err +} + +type NullableListServiceAccountKeysResponse struct { + value *ListServiceAccountKeysResponse + isSet bool +} + +func (v NullableListServiceAccountKeysResponse) Get() *ListServiceAccountKeysResponse { + return v.value +} + +func (v *NullableListServiceAccountKeysResponse) Set(val *ListServiceAccountKeysResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListServiceAccountKeysResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListServiceAccountKeysResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListServiceAccountKeysResponse(val *ListServiceAccountKeysResponse) *NullableListServiceAccountKeysResponse { + return &NullableListServiceAccountKeysResponse{value: val, isSet: true} +} + +func (v NullableListServiceAccountKeysResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListServiceAccountKeysResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_list_service_accounts_response.go b/services/serviceaccount/v2api/model_list_service_accounts_response.go new file mode 100644 index 000000000..cf928d612 --- /dev/null +++ b/services/serviceaccount/v2api/model_list_service_accounts_response.go @@ -0,0 +1,156 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListServiceAccountsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListServiceAccountsResponse{} + +// ListServiceAccountsResponse struct for ListServiceAccountsResponse +type ListServiceAccountsResponse struct { + Items []ServiceAccount `json:"items"` +} + +type _ListServiceAccountsResponse ListServiceAccountsResponse + +// NewListServiceAccountsResponse instantiates a new ListServiceAccountsResponse 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 NewListServiceAccountsResponse(items []ServiceAccount) *ListServiceAccountsResponse { + this := ListServiceAccountsResponse{} + this.Items = items + return &this +} + +// NewListServiceAccountsResponseWithDefaults instantiates a new ListServiceAccountsResponse 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 NewListServiceAccountsResponseWithDefaults() *ListServiceAccountsResponse { + this := ListServiceAccountsResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *ListServiceAccountsResponse) GetItems() []ServiceAccount { + if o == nil { + var ret []ServiceAccount + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ListServiceAccountsResponse) GetItemsOk() ([]ServiceAccount, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ListServiceAccountsResponse) SetItems(v []ServiceAccount) { + o.Items = v +} + +func (o ListServiceAccountsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListServiceAccountsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +func (o *ListServiceAccountsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListServiceAccountsResponse := _ListServiceAccountsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListServiceAccountsResponse) + + if err != nil { + return err + } + + *o = ListServiceAccountsResponse(varListServiceAccountsResponse) + + return err +} + +type NullableListServiceAccountsResponse struct { + value *ListServiceAccountsResponse + isSet bool +} + +func (v NullableListServiceAccountsResponse) Get() *ListServiceAccountsResponse { + return v.value +} + +func (v *NullableListServiceAccountsResponse) Set(val *ListServiceAccountsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListServiceAccountsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListServiceAccountsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListServiceAccountsResponse(val *ListServiceAccountsResponse) *NullableListServiceAccountsResponse { + return &NullableListServiceAccountsResponse{value: val, isSet: true} +} + +func (v NullableListServiceAccountsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListServiceAccountsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_partial_update_service_account_federated_identity_provider_payload.go b/services/serviceaccount/v2api/model_partial_update_service_account_federated_identity_provider_payload.go new file mode 100644 index 000000000..ae7d3f016 --- /dev/null +++ b/services/serviceaccount/v2api/model_partial_update_service_account_federated_identity_provider_payload.go @@ -0,0 +1,223 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PartialUpdateServiceAccountFederatedIdentityProviderPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateServiceAccountFederatedIdentityProviderPayload{} + +// PartialUpdateServiceAccountFederatedIdentityProviderPayload struct for PartialUpdateServiceAccountFederatedIdentityProviderPayload +type PartialUpdateServiceAccountFederatedIdentityProviderPayload struct { + // list of assertions of the federated identity provider + Assertions []PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner `json:"assertions,omitempty"` + // Issuer of the federated identity provider. + Issuer string `json:"issuer"` + // Unique name used as identifier of the federated identity provider. + Name string `json:"name"` +} + +type _PartialUpdateServiceAccountFederatedIdentityProviderPayload PartialUpdateServiceAccountFederatedIdentityProviderPayload + +// NewPartialUpdateServiceAccountFederatedIdentityProviderPayload instantiates a new PartialUpdateServiceAccountFederatedIdentityProviderPayload 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 NewPartialUpdateServiceAccountFederatedIdentityProviderPayload(issuer string, name string) *PartialUpdateServiceAccountFederatedIdentityProviderPayload { + this := PartialUpdateServiceAccountFederatedIdentityProviderPayload{} + this.Issuer = issuer + this.Name = name + return &this +} + +// NewPartialUpdateServiceAccountFederatedIdentityProviderPayloadWithDefaults instantiates a new PartialUpdateServiceAccountFederatedIdentityProviderPayload 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 NewPartialUpdateServiceAccountFederatedIdentityProviderPayloadWithDefaults() *PartialUpdateServiceAccountFederatedIdentityProviderPayload { + this := PartialUpdateServiceAccountFederatedIdentityProviderPayload{} + return &this +} + +// GetAssertions returns the Assertions field value if set, zero value otherwise. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetAssertions() []PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner { + if o == nil || IsNil(o.Assertions) { + var ret []PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner + return ret + } + return o.Assertions +} + +// GetAssertionsOk returns a tuple with the Assertions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetAssertionsOk() ([]PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner, bool) { + if o == nil || IsNil(o.Assertions) { + return nil, false + } + return o.Assertions, true +} + +// HasAssertions returns a boolean if a field has been set. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) HasAssertions() bool { + if o != nil && !IsNil(o.Assertions) { + return true + } + + return false +} + +// SetAssertions gets a reference to the given []PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner and assigns it to the Assertions field. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) SetAssertions(v []PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) { + o.Assertions = v +} + +// GetIssuer returns the Issuer field value +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetIssuer() string { + if o == nil { + var ret string + return ret + } + + return o.Issuer +} + +// GetIssuerOk returns a tuple with the Issuer field value +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Issuer, true +} + +// SetIssuer sets field value +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) SetIssuer(v string) { + o.Issuer = v +} + +// GetName returns the Name field value +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) 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 *PartialUpdateServiceAccountFederatedIdentityProviderPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) SetName(v string) { + o.Name = v +} + +func (o PartialUpdateServiceAccountFederatedIdentityProviderPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateServiceAccountFederatedIdentityProviderPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Assertions) { + toSerialize["assertions"] = o.Assertions + } + toSerialize["issuer"] = o.Issuer + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "issuer", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPartialUpdateServiceAccountFederatedIdentityProviderPayload := _PartialUpdateServiceAccountFederatedIdentityProviderPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPartialUpdateServiceAccountFederatedIdentityProviderPayload) + + if err != nil { + return err + } + + *o = PartialUpdateServiceAccountFederatedIdentityProviderPayload(varPartialUpdateServiceAccountFederatedIdentityProviderPayload) + + return err +} + +type NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload struct { + value *PartialUpdateServiceAccountFederatedIdentityProviderPayload + isSet bool +} + +func (v NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) Get() *PartialUpdateServiceAccountFederatedIdentityProviderPayload { + return v.value +} + +func (v *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) Set(val *PartialUpdateServiceAccountFederatedIdentityProviderPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateServiceAccountFederatedIdentityProviderPayload(val *PartialUpdateServiceAccountFederatedIdentityProviderPayload) *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload { + return &NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_partial_update_service_account_federated_identity_provider_payload_assertions_inner.go b/services/serviceaccount/v2api/model_partial_update_service_account_federated_identity_provider_payload_assertions_inner.go new file mode 100644 index 000000000..dbba3f50a --- /dev/null +++ b/services/serviceaccount/v2api/model_partial_update_service_account_federated_identity_provider_payload_assertions_inner.go @@ -0,0 +1,199 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner{} + +// PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner struct for PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner +type PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner struct { + // Item to compare + Item *string `json:"item,omitempty"` + // Operator for the comparison + Operator *string `json:"operator,omitempty"` + // Value which the item is compared to + Value *string `json:"value,omitempty"` +} + +// NewPartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner instantiates a new PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner 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 NewPartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner() *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner { + this := PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner{} + return &this +} + +// NewPartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInnerWithDefaults instantiates a new PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner 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 NewPartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInnerWithDefaults() *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner { + this := PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) GetItem() string { + if o == nil || IsNil(o.Item) { + var ret string + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) GetItemOk() (*string, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given string and assigns it to the Item field. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) SetItem(v string) { + o.Item = &v +} + +// GetOperator returns the Operator field value if set, zero value otherwise. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) GetOperator() string { + if o == nil || IsNil(o.Operator) { + var ret string + return ret + } + return *o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) GetOperatorOk() (*string, bool) { + if o == nil || IsNil(o.Operator) { + return nil, false + } + return o.Operator, true +} + +// HasOperator returns a boolean if a field has been set. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) HasOperator() bool { + if o != nil && !IsNil(o.Operator) { + return true + } + + return false +} + +// SetOperator gets a reference to the given string and assigns it to the Operator field. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) SetOperator(v string) { + o.Operator = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) GetValue() string { + if o == nil || IsNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) SetValue(v string) { + o.Value = &v +} + +func (o PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + if !IsNil(o.Operator) { + toSerialize["operator"] = o.Operator + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner struct { + value *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner + isSet bool +} + +func (v NullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) Get() *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner { + return v.value +} + +func (v *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) Set(val *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner(val *PartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner { + return &NullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner{value: val, isSet: true} +} + +func (v NullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateServiceAccountFederatedIdentityProviderPayloadAssertionsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_partial_update_service_account_key_payload.go b/services/serviceaccount/v2api/model_partial_update_service_account_key_payload.go new file mode 100644 index 000000000..687dea532 --- /dev/null +++ b/services/serviceaccount/v2api/model_partial_update_service_account_key_payload.go @@ -0,0 +1,163 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" + "time" +) + +// checks if the PartialUpdateServiceAccountKeyPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateServiceAccountKeyPayload{} + +// PartialUpdateServiceAccountKeyPayload struct for PartialUpdateServiceAccountKeyPayload +type PartialUpdateServiceAccountKeyPayload struct { + // Active keys are valid, while inactive keys are temporarily deactivated. + Active *bool `json:"active,omitempty"` + // Optional, date of key expiration. To disable, set time to \"9999-01-01T01:01:01Z\" + ValidUntil *time.Time `json:"validUntil,omitempty"` +} + +// NewPartialUpdateServiceAccountKeyPayload instantiates a new PartialUpdateServiceAccountKeyPayload 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 NewPartialUpdateServiceAccountKeyPayload() *PartialUpdateServiceAccountKeyPayload { + this := PartialUpdateServiceAccountKeyPayload{} + return &this +} + +// NewPartialUpdateServiceAccountKeyPayloadWithDefaults instantiates a new PartialUpdateServiceAccountKeyPayload 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 NewPartialUpdateServiceAccountKeyPayloadWithDefaults() *PartialUpdateServiceAccountKeyPayload { + this := PartialUpdateServiceAccountKeyPayload{} + return &this +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PartialUpdateServiceAccountKeyPayload) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountKeyPayload) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PartialUpdateServiceAccountKeyPayload) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PartialUpdateServiceAccountKeyPayload) SetActive(v bool) { + o.Active = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *PartialUpdateServiceAccountKeyPayload) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountKeyPayload) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *PartialUpdateServiceAccountKeyPayload) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *PartialUpdateServiceAccountKeyPayload) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +func (o PartialUpdateServiceAccountKeyPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateServiceAccountKeyPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.ValidUntil) { + toSerialize["validUntil"] = o.ValidUntil + } + return toSerialize, nil +} + +type NullablePartialUpdateServiceAccountKeyPayload struct { + value *PartialUpdateServiceAccountKeyPayload + isSet bool +} + +func (v NullablePartialUpdateServiceAccountKeyPayload) Get() *PartialUpdateServiceAccountKeyPayload { + return v.value +} + +func (v *NullablePartialUpdateServiceAccountKeyPayload) Set(val *PartialUpdateServiceAccountKeyPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateServiceAccountKeyPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateServiceAccountKeyPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateServiceAccountKeyPayload(val *PartialUpdateServiceAccountKeyPayload) *NullablePartialUpdateServiceAccountKeyPayload { + return &NullablePartialUpdateServiceAccountKeyPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateServiceAccountKeyPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateServiceAccountKeyPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_partial_update_service_account_key_response.go b/services/serviceaccount/v2api/model_partial_update_service_account_key_response.go new file mode 100644 index 000000000..8b60119ce --- /dev/null +++ b/services/serviceaccount/v2api/model_partial_update_service_account_key_response.go @@ -0,0 +1,336 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the PartialUpdateServiceAccountKeyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateServiceAccountKeyResponse{} + +// PartialUpdateServiceAccountKeyResponse struct for PartialUpdateServiceAccountKeyResponse +type PartialUpdateServiceAccountKeyResponse struct { + Active bool `json:"active"` + // Creation time of the key + CreatedAt time.Time `json:"createdAt"` + // Unique ID of the key. + Id string `json:"id"` + KeyAlgorithm string `json:"keyAlgorithm"` + KeyOrigin string `json:"keyOrigin"` + KeyType string `json:"keyType"` + // If specified, the timestamp until the key is active. May be null + ValidUntil *time.Time `json:"validUntil,omitempty"` +} + +type _PartialUpdateServiceAccountKeyResponse PartialUpdateServiceAccountKeyResponse + +// NewPartialUpdateServiceAccountKeyResponse instantiates a new PartialUpdateServiceAccountKeyResponse 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 NewPartialUpdateServiceAccountKeyResponse(active bool, createdAt time.Time, id string, keyAlgorithm string, keyOrigin string, keyType string) *PartialUpdateServiceAccountKeyResponse { + this := PartialUpdateServiceAccountKeyResponse{} + this.Active = active + this.CreatedAt = createdAt + this.Id = id + this.KeyAlgorithm = keyAlgorithm + this.KeyOrigin = keyOrigin + this.KeyType = keyType + return &this +} + +// NewPartialUpdateServiceAccountKeyResponseWithDefaults instantiates a new PartialUpdateServiceAccountKeyResponse 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 NewPartialUpdateServiceAccountKeyResponseWithDefaults() *PartialUpdateServiceAccountKeyResponse { + this := PartialUpdateServiceAccountKeyResponse{} + return &this +} + +// GetActive returns the Active field value +func (o *PartialUpdateServiceAccountKeyResponse) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountKeyResponse) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *PartialUpdateServiceAccountKeyResponse) SetActive(v bool) { + o.Active = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *PartialUpdateServiceAccountKeyResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountKeyResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *PartialUpdateServiceAccountKeyResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetId returns the Id field value +func (o *PartialUpdateServiceAccountKeyResponse) 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 *PartialUpdateServiceAccountKeyResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *PartialUpdateServiceAccountKeyResponse) SetId(v string) { + o.Id = v +} + +// GetKeyAlgorithm returns the KeyAlgorithm field value +func (o *PartialUpdateServiceAccountKeyResponse) GetKeyAlgorithm() string { + if o == nil { + var ret string + return ret + } + + return o.KeyAlgorithm +} + +// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountKeyResponse) GetKeyAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyAlgorithm, true +} + +// SetKeyAlgorithm sets field value +func (o *PartialUpdateServiceAccountKeyResponse) SetKeyAlgorithm(v string) { + o.KeyAlgorithm = v +} + +// GetKeyOrigin returns the KeyOrigin field value +func (o *PartialUpdateServiceAccountKeyResponse) GetKeyOrigin() string { + if o == nil { + var ret string + return ret + } + + return o.KeyOrigin +} + +// GetKeyOriginOk returns a tuple with the KeyOrigin field value +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountKeyResponse) GetKeyOriginOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyOrigin, true +} + +// SetKeyOrigin sets field value +func (o *PartialUpdateServiceAccountKeyResponse) SetKeyOrigin(v string) { + o.KeyOrigin = v +} + +// GetKeyType returns the KeyType field value +func (o *PartialUpdateServiceAccountKeyResponse) GetKeyType() string { + if o == nil { + var ret string + return ret + } + + return o.KeyType +} + +// GetKeyTypeOk returns a tuple with the KeyType field value +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountKeyResponse) GetKeyTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyType, true +} + +// SetKeyType sets field value +func (o *PartialUpdateServiceAccountKeyResponse) SetKeyType(v string) { + o.KeyType = v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *PartialUpdateServiceAccountKeyResponse) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateServiceAccountKeyResponse) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *PartialUpdateServiceAccountKeyResponse) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *PartialUpdateServiceAccountKeyResponse) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +func (o PartialUpdateServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["active"] = o.Active + toSerialize["createdAt"] = o.CreatedAt + toSerialize["id"] = o.Id + toSerialize["keyAlgorithm"] = o.KeyAlgorithm + toSerialize["keyOrigin"] = o.KeyOrigin + toSerialize["keyType"] = o.KeyType + if !IsNil(o.ValidUntil) { + toSerialize["validUntil"] = o.ValidUntil + } + return toSerialize, nil +} + +func (o *PartialUpdateServiceAccountKeyResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "active", + "createdAt", + "id", + "keyAlgorithm", + "keyOrigin", + "keyType", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPartialUpdateServiceAccountKeyResponse := _PartialUpdateServiceAccountKeyResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPartialUpdateServiceAccountKeyResponse) + + if err != nil { + return err + } + + *o = PartialUpdateServiceAccountKeyResponse(varPartialUpdateServiceAccountKeyResponse) + + return err +} + +type NullablePartialUpdateServiceAccountKeyResponse struct { + value *PartialUpdateServiceAccountKeyResponse + isSet bool +} + +func (v NullablePartialUpdateServiceAccountKeyResponse) Get() *PartialUpdateServiceAccountKeyResponse { + return v.value +} + +func (v *NullablePartialUpdateServiceAccountKeyResponse) Set(val *PartialUpdateServiceAccountKeyResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateServiceAccountKeyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateServiceAccountKeyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateServiceAccountKeyResponse(val *PartialUpdateServiceAccountKeyResponse) *NullablePartialUpdateServiceAccountKeyResponse { + return &NullablePartialUpdateServiceAccountKeyResponse{value: val, isSet: true} +} + +func (v NullablePartialUpdateServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateServiceAccountKeyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_service_account.go b/services/serviceaccount/v2api/model_service_account.go new file mode 100644 index 000000000..41666c69b --- /dev/null +++ b/services/serviceaccount/v2api/model_service_account.go @@ -0,0 +1,244 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ServiceAccount type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceAccount{} + +// ServiceAccount struct for ServiceAccount +type ServiceAccount struct { + // Unique identifier of the service account in format of an email address generated by the service containing the prefix provided by the user during creation. + Email string `json:"email"` + // Unique ID of the service account. It is also used in the 'sub' field of the service accounts access tokens. + Id string `json:"id"` + // Flag indicating internal service accounts + Internal bool `json:"internal"` + // ID of the related project + ProjectId string `json:"projectId"` +} + +type _ServiceAccount ServiceAccount + +// NewServiceAccount instantiates a new ServiceAccount 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 NewServiceAccount(email string, id string, internal bool, projectId string) *ServiceAccount { + this := ServiceAccount{} + this.Email = email + this.Id = id + this.Internal = internal + this.ProjectId = projectId + return &this +} + +// NewServiceAccountWithDefaults instantiates a new ServiceAccount 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 NewServiceAccountWithDefaults() *ServiceAccount { + this := ServiceAccount{} + return &this +} + +// GetEmail returns the Email field value +func (o *ServiceAccount) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *ServiceAccount) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *ServiceAccount) SetEmail(v string) { + o.Email = v +} + +// GetId returns the Id field value +func (o *ServiceAccount) 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 *ServiceAccount) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ServiceAccount) SetId(v string) { + o.Id = v +} + +// GetInternal returns the Internal field value +func (o *ServiceAccount) GetInternal() bool { + if o == nil { + var ret bool + return ret + } + + return o.Internal +} + +// GetInternalOk returns a tuple with the Internal field value +// and a boolean to check if the value has been set. +func (o *ServiceAccount) GetInternalOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Internal, true +} + +// SetInternal sets field value +func (o *ServiceAccount) SetInternal(v bool) { + o.Internal = v +} + +// GetProjectId returns the ProjectId field value +func (o *ServiceAccount) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *ServiceAccount) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *ServiceAccount) SetProjectId(v string) { + o.ProjectId = v +} + +func (o ServiceAccount) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceAccount) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["email"] = o.Email + toSerialize["id"] = o.Id + toSerialize["internal"] = o.Internal + toSerialize["projectId"] = o.ProjectId + return toSerialize, nil +} + +func (o *ServiceAccount) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "email", + "id", + "internal", + "projectId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceAccount := _ServiceAccount{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceAccount) + + if err != nil { + return err + } + + *o = ServiceAccount(varServiceAccount) + + return err +} + +type NullableServiceAccount struct { + value *ServiceAccount + isSet bool +} + +func (v NullableServiceAccount) Get() *ServiceAccount { + return v.value +} + +func (v *NullableServiceAccount) Set(val *ServiceAccount) { + v.value = val + v.isSet = true +} + +func (v NullableServiceAccount) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceAccount) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceAccount(val *ServiceAccount) *NullableServiceAccount { + return &NullableServiceAccount{value: val, isSet: true} +} + +func (v NullableServiceAccount) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceAccount) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/model_service_account_key_list_response.go b/services/serviceaccount/v2api/model_service_account_key_list_response.go new file mode 100644 index 000000000..925b611a5 --- /dev/null +++ b/services/serviceaccount/v2api/model_service_account_key_list_response.go @@ -0,0 +1,336 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ServiceAccountKeyListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceAccountKeyListResponse{} + +// ServiceAccountKeyListResponse struct for ServiceAccountKeyListResponse +type ServiceAccountKeyListResponse struct { + Active bool `json:"active"` + // Creation time of the key + CreatedAt time.Time `json:"createdAt"` + // Unique ID of the key. + Id string `json:"id"` + KeyAlgorithm string `json:"keyAlgorithm"` + KeyOrigin string `json:"keyOrigin"` + KeyType string `json:"keyType"` + // If specified, the timestamp until the key is active. May be null + ValidUntil *time.Time `json:"validUntil,omitempty"` +} + +type _ServiceAccountKeyListResponse ServiceAccountKeyListResponse + +// NewServiceAccountKeyListResponse instantiates a new ServiceAccountKeyListResponse 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 NewServiceAccountKeyListResponse(active bool, createdAt time.Time, id string, keyAlgorithm string, keyOrigin string, keyType string) *ServiceAccountKeyListResponse { + this := ServiceAccountKeyListResponse{} + this.Active = active + this.CreatedAt = createdAt + this.Id = id + this.KeyAlgorithm = keyAlgorithm + this.KeyOrigin = keyOrigin + this.KeyType = keyType + return &this +} + +// NewServiceAccountKeyListResponseWithDefaults instantiates a new ServiceAccountKeyListResponse 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 NewServiceAccountKeyListResponseWithDefaults() *ServiceAccountKeyListResponse { + this := ServiceAccountKeyListResponse{} + return &this +} + +// GetActive returns the Active field value +func (o *ServiceAccountKeyListResponse) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *ServiceAccountKeyListResponse) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *ServiceAccountKeyListResponse) SetActive(v bool) { + o.Active = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ServiceAccountKeyListResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ServiceAccountKeyListResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ServiceAccountKeyListResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetId returns the Id field value +func (o *ServiceAccountKeyListResponse) 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 *ServiceAccountKeyListResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ServiceAccountKeyListResponse) SetId(v string) { + o.Id = v +} + +// GetKeyAlgorithm returns the KeyAlgorithm field value +func (o *ServiceAccountKeyListResponse) GetKeyAlgorithm() string { + if o == nil { + var ret string + return ret + } + + return o.KeyAlgorithm +} + +// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value +// and a boolean to check if the value has been set. +func (o *ServiceAccountKeyListResponse) GetKeyAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyAlgorithm, true +} + +// SetKeyAlgorithm sets field value +func (o *ServiceAccountKeyListResponse) SetKeyAlgorithm(v string) { + o.KeyAlgorithm = v +} + +// GetKeyOrigin returns the KeyOrigin field value +func (o *ServiceAccountKeyListResponse) GetKeyOrigin() string { + if o == nil { + var ret string + return ret + } + + return o.KeyOrigin +} + +// GetKeyOriginOk returns a tuple with the KeyOrigin field value +// and a boolean to check if the value has been set. +func (o *ServiceAccountKeyListResponse) GetKeyOriginOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyOrigin, true +} + +// SetKeyOrigin sets field value +func (o *ServiceAccountKeyListResponse) SetKeyOrigin(v string) { + o.KeyOrigin = v +} + +// GetKeyType returns the KeyType field value +func (o *ServiceAccountKeyListResponse) GetKeyType() string { + if o == nil { + var ret string + return ret + } + + return o.KeyType +} + +// GetKeyTypeOk returns a tuple with the KeyType field value +// and a boolean to check if the value has been set. +func (o *ServiceAccountKeyListResponse) GetKeyTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyType, true +} + +// SetKeyType sets field value +func (o *ServiceAccountKeyListResponse) SetKeyType(v string) { + o.KeyType = v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *ServiceAccountKeyListResponse) GetValidUntil() time.Time { + if o == nil || IsNil(o.ValidUntil) { + var ret time.Time + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceAccountKeyListResponse) GetValidUntilOk() (*time.Time, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *ServiceAccountKeyListResponse) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. +func (o *ServiceAccountKeyListResponse) SetValidUntil(v time.Time) { + o.ValidUntil = &v +} + +func (o ServiceAccountKeyListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceAccountKeyListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["active"] = o.Active + toSerialize["createdAt"] = o.CreatedAt + toSerialize["id"] = o.Id + toSerialize["keyAlgorithm"] = o.KeyAlgorithm + toSerialize["keyOrigin"] = o.KeyOrigin + toSerialize["keyType"] = o.KeyType + if !IsNil(o.ValidUntil) { + toSerialize["validUntil"] = o.ValidUntil + } + return toSerialize, nil +} + +func (o *ServiceAccountKeyListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "active", + "createdAt", + "id", + "keyAlgorithm", + "keyOrigin", + "keyType", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceAccountKeyListResponse := _ServiceAccountKeyListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceAccountKeyListResponse) + + if err != nil { + return err + } + + *o = ServiceAccountKeyListResponse(varServiceAccountKeyListResponse) + + return err +} + +type NullableServiceAccountKeyListResponse struct { + value *ServiceAccountKeyListResponse + isSet bool +} + +func (v NullableServiceAccountKeyListResponse) Get() *ServiceAccountKeyListResponse { + return v.value +} + +func (v *NullableServiceAccountKeyListResponse) Set(val *ServiceAccountKeyListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableServiceAccountKeyListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceAccountKeyListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceAccountKeyListResponse(val *ServiceAccountKeyListResponse) *NullableServiceAccountKeyListResponse { + return &NullableServiceAccountKeyListResponse{value: val, isSet: true} +} + +func (v NullableServiceAccountKeyListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceAccountKeyListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/serviceaccount/v2api/response.go b/services/serviceaccount/v2api/response.go new file mode 100644 index 000000000..945969644 --- /dev/null +++ b/services/serviceaccount/v2api/response.go @@ -0,0 +1,47 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/services/serviceaccount/v2api/utils.go b/services/serviceaccount/v2api/utils.go new file mode 100644 index 000000000..f69f7e5ab --- /dev/null +++ b/services/serviceaccount/v2api/utils.go @@ -0,0 +1,361 @@ +/* +Service Account API + +API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100| + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +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 json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// 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 +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +}