From 96e401685d1f813746fac77d7c8d0effe86bea84 Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Fri, 6 Mar 2026 04:32:11 +0530 Subject: [PATCH 01/11] Add PAM Postgres E2E tests --- e2e/README.md | 3 + e2e/go.mod | 1 + e2e/go.sum | 4 + e2e/openapi-cfg.yaml | 3 +- e2e/packages/client/client.gen.go | 8008 +++++++++++++++++++++------- e2e/packages/client/provisioner.go | 22 +- e2e/pam/pam_helpers.go | 194 + e2e/pam/postgres_test.go | 177 + e2e/util/helpers.go | 50 +- 9 files changed, 6414 insertions(+), 2048 deletions(-) create mode 100644 e2e/pam/pam_helpers.go create mode 100644 e2e/pam/postgres_test.go diff --git a/e2e/README.md b/e2e/README.md index 909b38cb..53710033 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -156,8 +156,11 @@ If you're using a `.env` file (recommended), just make sure it's configured and ```bash cd e2e go test github.com/infisical/cli/e2e-tests/relay +go test github.com/infisical/cli/e2e-tests/pam -timeout 15m ``` +**Note:** PAM tests use subprocess mode and require a built CLI binary. Build it first with `go build -o e2e/infisical-merge .` from the repo root. + Alternatively, you can export environment variables manually: ```bash diff --git a/e2e/go.mod b/e2e/go.mod index 0818c25a..0d4f479e 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -20,6 +20,7 @@ require ( github.com/stretchr/testify v1.11.1 github.com/testcontainers/testcontainers-go v0.40.0 github.com/testcontainers/testcontainers-go/modules/compose v0.40.0 + github.com/testcontainers/testcontainers-go/modules/postgres v0.40.0 github.com/testcontainers/testcontainers-go/modules/redis v0.40.0 ) diff --git a/e2e/go.sum b/e2e/go.sum index 6f6ecc8b..cc33a8d4 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -596,6 +596,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v0.0.0-20150723085316-0dad96c0b94f/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= @@ -930,6 +932,8 @@ github.com/testcontainers/testcontainers-go v0.40.0 h1:pSdJYLOVgLE8YdUY2FHQ1Fxu+ github.com/testcontainers/testcontainers-go v0.40.0/go.mod h1:FSXV5KQtX2HAMlm7U3APNyLkkap35zNLxukw9oBi/MY= github.com/testcontainers/testcontainers-go/modules/compose v0.40.0 h1:Bj8W7GieY56sRbVJx1yLh0JVEtOQ8SQMhX+jRtzenLA= github.com/testcontainers/testcontainers-go/modules/compose v0.40.0/go.mod h1:fEEGqtsoH1KS+sUi1WG4+vH3fqdCyip1U9Hd8P3SRMA= +github.com/testcontainers/testcontainers-go/modules/postgres v0.40.0 h1:s2bIayFXlbDFexo96y+htn7FzuhpXLYJNnIuglNKqOk= +github.com/testcontainers/testcontainers-go/modules/postgres v0.40.0/go.mod h1:h+u/2KoREGTnTl9UwrQ/g+XhasAT8E6dClclAADeXoQ= github.com/testcontainers/testcontainers-go/modules/redis v0.40.0 h1:OG4qwcxp2O0re7V7M9lY9w0v6wWgWf7j7rtkpAnGMd0= github.com/testcontainers/testcontainers-go/modules/redis v0.40.0/go.mod h1:Bc+EDhKMo5zI5V5zdBkHiMVzeAXbtI4n5isS/nzf6zw= github.com/tetratelabs/wazero v1.9.0 h1:IcZ56OuxrtaEz8UYNRHBrUa9bYeX9oVY93KspZZBf/I= diff --git a/e2e/openapi-cfg.yaml b/e2e/openapi-cfg.yaml index 75b161cb..e66adbad 100644 --- a/e2e/openapi-cfg.yaml +++ b/e2e/openapi-cfg.yaml @@ -24,4 +24,5 @@ output-options: - createSecretV4 - getSecretByNameV4 - listSecretsV4 - + - createPostgresPamResource + - createPostgresPamAccount diff --git a/e2e/packages/client/client.gen.go b/e2e/packages/client/client.gen.go index 08650394..68d5e8f7 100644 --- a/e2e/packages/client/client.gen.go +++ b/e2e/packages/client/client.gen.go @@ -22,6 +22,213 @@ const ( BearerAuthScopes = "bearerAuth.Scopes" ) +// Defines values for CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials. +const ( + CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentialsFalse CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials = false +) + +// Defines values for CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider. +const ( + CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderAzureDns CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "azure-dns" + CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderCloudflare CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "cloudflare" + CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderDnsMadeEasy CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "dns-made-easy" + CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderRoute53 CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "route53" +) + +// Defines values for CreateAcmeCertificateAuthorityV1JSONBodyStatus. +const ( + CreateAcmeCertificateAuthorityV1JSONBodyStatusActive CreateAcmeCertificateAuthorityV1JSONBodyStatus = "active" + CreateAcmeCertificateAuthorityV1JSONBodyStatusDisabled CreateAcmeCertificateAuthorityV1JSONBodyStatus = "disabled" + CreateAcmeCertificateAuthorityV1JSONBodyStatusPendingCertificate CreateAcmeCertificateAuthorityV1JSONBodyStatus = "pending-certificate" +) + +// Defines values for UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider. +const ( + UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderAzureDns UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "azure-dns" + UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderCloudflare UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "cloudflare" + UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderDnsMadeEasy UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "dns-made-easy" + UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderRoute53 UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "route53" +) + +// Defines values for UpdateAcmeCertificateAuthorityV1JSONBodyStatus. +const ( + UpdateAcmeCertificateAuthorityV1JSONBodyStatusActive UpdateAcmeCertificateAuthorityV1JSONBodyStatus = "active" + UpdateAcmeCertificateAuthorityV1JSONBodyStatusDisabled UpdateAcmeCertificateAuthorityV1JSONBodyStatus = "disabled" + UpdateAcmeCertificateAuthorityV1JSONBodyStatusPendingCertificate UpdateAcmeCertificateAuthorityV1JSONBodyStatus = "pending-certificate" +) + +// Defines values for CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm. +const ( + CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmECPrime256v1 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "EC_prime256v1" + CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmECSecp384r1 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "EC_secp384r1" + CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmECSecp521r1 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "EC_secp521r1" + CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmRSA2048 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "RSA_2048" + CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmRSA3072 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "RSA_3072" + CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmRSA4096 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "RSA_4096" +) + +// Defines values for CreateInternalCertificateAuthorityV1JSONBodyConfigurationType. +const ( + Intermediate CreateInternalCertificateAuthorityV1JSONBodyConfigurationType = "intermediate" + Root CreateInternalCertificateAuthorityV1JSONBodyConfigurationType = "root" +) + +// Defines values for CreateInternalCertificateAuthorityV1JSONBodyStatus. +const ( + Active CreateInternalCertificateAuthorityV1JSONBodyStatus = "active" + Disabled CreateInternalCertificateAuthorityV1JSONBodyStatus = "disabled" + PendingCertificate CreateInternalCertificateAuthorityV1JSONBodyStatus = "pending-certificate" +) + +// Defines values for CreateCertificatePolicyJSONBodyBasicConstraintsIsCA. +const ( + Allowed CreateCertificatePolicyJSONBodyBasicConstraintsIsCA = "allowed" + Denied CreateCertificatePolicyJSONBodyBasicConstraintsIsCA = "denied" + Required CreateCertificatePolicyJSONBodyBasicConstraintsIsCA = "required" +) + +// Defines values for CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed. +const ( + CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedClientAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "client_auth" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedCodeSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "code_signing" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedEmailProtection CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "email_protection" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedOcspSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "ocsp_signing" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedServerAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "server_auth" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedTimeStamping CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "time_stamping" +) + +// Defines values for CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied. +const ( + CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedClientAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "client_auth" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedCodeSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "code_signing" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedEmailProtection CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "email_protection" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedOcspSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "ocsp_signing" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedServerAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "server_auth" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedTimeStamping CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "time_stamping" +) + +// Defines values for CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired. +const ( + CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredClientAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "client_auth" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredCodeSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "code_signing" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredEmailProtection CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "email_protection" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredOcspSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "ocsp_signing" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredServerAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "server_auth" + CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredTimeStamping CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "time_stamping" +) + +// Defines values for CreateCertificatePolicyJSONBodyKeyUsagesAllowed. +const ( + CreateCertificatePolicyJSONBodyKeyUsagesAllowedCrlSign CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "crl_sign" + CreateCertificatePolicyJSONBodyKeyUsagesAllowedDataEncipherment CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "data_encipherment" + CreateCertificatePolicyJSONBodyKeyUsagesAllowedDecipherOnly CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "decipher_only" + CreateCertificatePolicyJSONBodyKeyUsagesAllowedDigitalSignature CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "digital_signature" + CreateCertificatePolicyJSONBodyKeyUsagesAllowedEncipherOnly CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "encipher_only" + CreateCertificatePolicyJSONBodyKeyUsagesAllowedKeyAgreement CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "key_agreement" + CreateCertificatePolicyJSONBodyKeyUsagesAllowedKeyCertSign CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "key_cert_sign" + CreateCertificatePolicyJSONBodyKeyUsagesAllowedKeyEncipherment CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "key_encipherment" + CreateCertificatePolicyJSONBodyKeyUsagesAllowedNonRepudiation CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "non_repudiation" +) + +// Defines values for CreateCertificatePolicyJSONBodyKeyUsagesDenied. +const ( + CreateCertificatePolicyJSONBodyKeyUsagesDeniedCrlSign CreateCertificatePolicyJSONBodyKeyUsagesDenied = "crl_sign" + CreateCertificatePolicyJSONBodyKeyUsagesDeniedDataEncipherment CreateCertificatePolicyJSONBodyKeyUsagesDenied = "data_encipherment" + CreateCertificatePolicyJSONBodyKeyUsagesDeniedDecipherOnly CreateCertificatePolicyJSONBodyKeyUsagesDenied = "decipher_only" + CreateCertificatePolicyJSONBodyKeyUsagesDeniedDigitalSignature CreateCertificatePolicyJSONBodyKeyUsagesDenied = "digital_signature" + CreateCertificatePolicyJSONBodyKeyUsagesDeniedEncipherOnly CreateCertificatePolicyJSONBodyKeyUsagesDenied = "encipher_only" + CreateCertificatePolicyJSONBodyKeyUsagesDeniedKeyAgreement CreateCertificatePolicyJSONBodyKeyUsagesDenied = "key_agreement" + CreateCertificatePolicyJSONBodyKeyUsagesDeniedKeyCertSign CreateCertificatePolicyJSONBodyKeyUsagesDenied = "key_cert_sign" + CreateCertificatePolicyJSONBodyKeyUsagesDeniedKeyEncipherment CreateCertificatePolicyJSONBodyKeyUsagesDenied = "key_encipherment" + CreateCertificatePolicyJSONBodyKeyUsagesDeniedNonRepudiation CreateCertificatePolicyJSONBodyKeyUsagesDenied = "non_repudiation" +) + +// Defines values for CreateCertificatePolicyJSONBodyKeyUsagesRequired. +const ( + CreateCertificatePolicyJSONBodyKeyUsagesRequiredCrlSign CreateCertificatePolicyJSONBodyKeyUsagesRequired = "crl_sign" + CreateCertificatePolicyJSONBodyKeyUsagesRequiredDataEncipherment CreateCertificatePolicyJSONBodyKeyUsagesRequired = "data_encipherment" + CreateCertificatePolicyJSONBodyKeyUsagesRequiredDecipherOnly CreateCertificatePolicyJSONBodyKeyUsagesRequired = "decipher_only" + CreateCertificatePolicyJSONBodyKeyUsagesRequiredDigitalSignature CreateCertificatePolicyJSONBodyKeyUsagesRequired = "digital_signature" + CreateCertificatePolicyJSONBodyKeyUsagesRequiredEncipherOnly CreateCertificatePolicyJSONBodyKeyUsagesRequired = "encipher_only" + CreateCertificatePolicyJSONBodyKeyUsagesRequiredKeyAgreement CreateCertificatePolicyJSONBodyKeyUsagesRequired = "key_agreement" + CreateCertificatePolicyJSONBodyKeyUsagesRequiredKeyCertSign CreateCertificatePolicyJSONBodyKeyUsagesRequired = "key_cert_sign" + CreateCertificatePolicyJSONBodyKeyUsagesRequiredKeyEncipherment CreateCertificatePolicyJSONBodyKeyUsagesRequired = "key_encipherment" + CreateCertificatePolicyJSONBodyKeyUsagesRequiredNonRepudiation CreateCertificatePolicyJSONBodyKeyUsagesRequired = "non_repudiation" +) + +// Defines values for CreateCertificatePolicyJSONBodySansType. +const ( + DnsName CreateCertificatePolicyJSONBodySansType = "dns_name" + Email CreateCertificatePolicyJSONBodySansType = "email" + IpAddress CreateCertificatePolicyJSONBodySansType = "ip_address" + Uri CreateCertificatePolicyJSONBodySansType = "uri" +) + +// Defines values for CreateCertificatePolicyJSONBodySubjectType. +const ( + CommonName CreateCertificatePolicyJSONBodySubjectType = "common_name" + Country CreateCertificatePolicyJSONBodySubjectType = "country" + Locality CreateCertificatePolicyJSONBodySubjectType = "locality" + Organization CreateCertificatePolicyJSONBodySubjectType = "organization" + OrganizationalUnit CreateCertificatePolicyJSONBodySubjectType = "organizational_unit" + State CreateCertificatePolicyJSONBodySubjectType = "state" +) + +// Defines values for CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages. +const ( + CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesClientAuth CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "client_auth" + CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesCodeSigning CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "code_signing" + CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesEmailProtection CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "email_protection" + CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesOcspSigning CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "ocsp_signing" + CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesServerAuth CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "server_auth" + CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesTimeStamping CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "time_stamping" +) + +// Defines values for CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm. +const ( + CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmECPrime256v1 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "EC_prime256v1" + CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmECSecp384r1 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "EC_secp384r1" + CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmRSA2048 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "RSA_2048" + CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmRSA3072 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "RSA_3072" + CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmRSA4096 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "RSA_4096" +) + +// Defines values for CreateCertificateProfileJSONBodyDefaultsKeyUsages. +const ( + CreateCertificateProfileJSONBodyDefaultsKeyUsagesCrlSign CreateCertificateProfileJSONBodyDefaultsKeyUsages = "crl_sign" + CreateCertificateProfileJSONBodyDefaultsKeyUsagesDataEncipherment CreateCertificateProfileJSONBodyDefaultsKeyUsages = "data_encipherment" + CreateCertificateProfileJSONBodyDefaultsKeyUsagesDecipherOnly CreateCertificateProfileJSONBodyDefaultsKeyUsages = "decipher_only" + CreateCertificateProfileJSONBodyDefaultsKeyUsagesDigitalSignature CreateCertificateProfileJSONBodyDefaultsKeyUsages = "digital_signature" + CreateCertificateProfileJSONBodyDefaultsKeyUsagesEncipherOnly CreateCertificateProfileJSONBodyDefaultsKeyUsages = "encipher_only" + CreateCertificateProfileJSONBodyDefaultsKeyUsagesKeyAgreement CreateCertificateProfileJSONBodyDefaultsKeyUsages = "key_agreement" + CreateCertificateProfileJSONBodyDefaultsKeyUsagesKeyCertSign CreateCertificateProfileJSONBodyDefaultsKeyUsages = "key_cert_sign" + CreateCertificateProfileJSONBodyDefaultsKeyUsagesKeyEncipherment CreateCertificateProfileJSONBodyDefaultsKeyUsages = "key_encipherment" + CreateCertificateProfileJSONBodyDefaultsKeyUsagesNonRepudiation CreateCertificateProfileJSONBodyDefaultsKeyUsages = "non_repudiation" +) + +// Defines values for CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm. +const ( + ECDSASHA256 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "ECDSA-SHA256" + ECDSASHA384 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "ECDSA-SHA384" + ECDSASHA512 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "ECDSA-SHA512" + RSASHA256 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "RSA-SHA256" + RSASHA384 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "RSA-SHA384" + RSASHA512 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "RSA-SHA512" +) + +// Defines values for CreateCertificateProfileJSONBodyEnrollmentType. +const ( + Acme CreateCertificateProfileJSONBodyEnrollmentType = "acme" + Api CreateCertificateProfileJSONBodyEnrollmentType = "api" + Est CreateCertificateProfileJSONBodyEnrollmentType = "est" +) + +// Defines values for CreateCertificateProfileJSONBodyIssuerType. +const ( + Ca CreateCertificateProfileJSONBodyIssuerType = "ca" + SelfSigned CreateCertificateProfileJSONBodyIssuerType = "self-signed" +) + // Defines values for CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod. const ( ServiceAccountToken CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod = "service-account-token" @@ -61,6 +268,12 @@ const ( ListSecretsV4ParamsRecursiveTrue ListSecretsV4ParamsRecursive = "true" ) +// Defines values for ListSecretsV4ParamsIncludePersonalOverrides. +const ( + ListSecretsV4ParamsIncludePersonalOverridesFalse ListSecretsV4ParamsIncludePersonalOverrides = "false" + ListSecretsV4ParamsIncludePersonalOverridesTrue ListSecretsV4ParamsIncludePersonalOverrides = "true" +) + // Defines values for ListSecretsV4ParamsIncludeImports. const ( ListSecretsV4ParamsIncludeImportsFalse ListSecretsV4ParamsIncludeImports = "false" @@ -117,6 +330,38 @@ type AdminSignUpJSONBody struct { Password string `json:"password"` } +// CreateCloudflareAppConnectionJSONBody defines parameters for CreateCloudflareAppConnection. +type CreateCloudflareAppConnectionJSONBody struct { + // Description An optional description for the Cloudflare Connection. + Description *string `json:"description"` + + // GatewayId Not supported for Cloudflare Connections. + GatewayId *CreateCloudflareAppConnectionJSONBody_GatewayId `json:"gatewayId,omitempty"` + + // IsPlatformManagedCredentials Not supported for Cloudflare Connections. + IsPlatformManagedCredentials *CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials `json:"isPlatformManagedCredentials,omitempty"` + + // Name The name of the Cloudflare Connection to create. Must be slug-friendly. + Name string `json:"name"` + + // ProjectId The ID of the project to create the Cloudflare Connection in. + ProjectId *string `json:"projectId,omitempty"` +} + +// CreateCloudflareAppConnectionJSONBodyGatewayId0 defines parameters for CreateCloudflareAppConnection. +type CreateCloudflareAppConnectionJSONBodyGatewayId0 = interface{} + +// CreateCloudflareAppConnectionJSONBodyGatewayId1 defines parameters for CreateCloudflareAppConnection. +type CreateCloudflareAppConnectionJSONBodyGatewayId1 = interface{} + +// CreateCloudflareAppConnectionJSONBody_GatewayId defines parameters for CreateCloudflareAppConnection. +type CreateCloudflareAppConnectionJSONBody_GatewayId struct { + union json.RawMessage +} + +// CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials defines parameters for CreateCloudflareAppConnection. +type CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials bool + // AttachTokenAuthJSONBody defines parameters for AttachTokenAuth. type AttachTokenAuthJSONBody struct { // AccessTokenMaxTTL The maximum lifetime for an access token in seconds. @@ -139,10 +384,348 @@ type CreateTokenAuthTokenJSONBody struct { // Name The name of the token to create. Name *string `json:"name,omitempty"` - // SubOrganizationName The sub organization name to scope the token to. - SubOrganizationName *string `json:"subOrganizationName,omitempty"` + // OrganizationSlug The sub organization name to scope the token to. + OrganizationSlug *string `json:"organizationSlug,omitempty"` +} + +// AttachUniversalAuthJSONBody defines parameters for AttachUniversalAuth. +type AttachUniversalAuthJSONBody struct { + // AccessTokenMaxTTL The maximum lifetime for an access token in seconds. This value will be referenced at renewal time. + AccessTokenMaxTTL *int `json:"accessTokenMaxTTL,omitempty"` + + // AccessTokenNumUsesLimit The maximum number of times that an access token can be used; a value of 0 implies infinite number of uses. + AccessTokenNumUsesLimit *int `json:"accessTokenNumUsesLimit,omitempty"` + + // AccessTokenPeriod The period for an access token in seconds. This value will be referenced at renewal time. Default value is 0. + AccessTokenPeriod *int `json:"accessTokenPeriod,omitempty"` + + // AccessTokenTTL The lifetime for an access token in seconds. This value will be referenced at renewal time. + AccessTokenTTL *int `json:"accessTokenTTL,omitempty"` + + // AccessTokenTrustedIps A list of IPs or CIDR ranges that access tokens can be used from. You can use 0.0.0.0/0, to allow usage from any network address. + AccessTokenTrustedIps *[]struct { + IpAddress string `json:"ipAddress"` + } `json:"accessTokenTrustedIps,omitempty"` + + // ClientSecretTrustedIps A list of IPs or CIDR ranges that the Client Secret can be used from together with the Client ID to get back an access token. You can use 0.0.0.0/0, to allow usage from any network address. + ClientSecretTrustedIps *[]struct { + IpAddress string `json:"ipAddress"` + } `json:"clientSecretTrustedIps,omitempty"` + + // LockoutCounterResetSeconds How long to wait from the most recent failed login until resetting the lockout counter. + LockoutCounterResetSeconds *float32 `json:"lockoutCounterResetSeconds,omitempty"` + + // LockoutDurationSeconds How long an identity auth method lockout lasts. + LockoutDurationSeconds *float32 `json:"lockoutDurationSeconds,omitempty"` + + // LockoutEnabled Whether the lockout feature is enabled. + LockoutEnabled *bool `json:"lockoutEnabled,omitempty"` + + // LockoutThreshold The amount of times login must fail before locking the identity auth method. + LockoutThreshold *float32 `json:"lockoutThreshold,omitempty"` +} + +// CreateUniversalAuthClientSecretJSONBody defines parameters for CreateUniversalAuthClientSecret. +type CreateUniversalAuthClientSecretJSONBody struct { + // Description The description of the client secret. + Description *string `json:"description,omitempty"` + + // NumUsesLimit The maximum number of times that the client secret can be used; a value of 0 implies infinite number of uses. + NumUsesLimit *float32 `json:"numUsesLimit,omitempty"` + + // Ttl The lifetime for the client secret in seconds. + Ttl *float32 `json:"ttl,omitempty"` +} + +// CreateAcmeCertificateAuthorityV1JSONBody defines parameters for CreateAcmeCertificateAuthorityV1. +type CreateAcmeCertificateAuthorityV1JSONBody struct { + Configuration struct { + // AccountEmail The email address for the ACME Certificate Authority. + AccountEmail string `json:"accountEmail"` + + // DirectoryUrl The directory URL for the ACME Certificate Authority. + DirectoryUrl string `json:"directoryUrl"` + + // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. + DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` + DnsProviderConfig struct { + // HostedZoneId The hosted zone ID for the ACME Certificate Authority. + HostedZoneId string `json:"hostedZoneId"` + + // Provider The DNS provider for the ACME Certificate Authority. + Provider CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider `json:"provider"` + } `json:"dnsProviderConfig"` + + // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabHmacKey *string `json:"eabHmacKey,omitempty"` + + // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabKid *string `json:"eabKid,omitempty"` + } `json:"configuration"` + + // Name The name of the ACME-compatible CA Certificate Authority to create. Must be slug-friendly. + Name string `json:"name"` + + // ProjectId The ID of the project to create the Certificate Authority in. + ProjectId openapi_types.UUID `json:"projectId"` + + // Status The status of the ACME-compatible CA Certificate Authority. + Status CreateAcmeCertificateAuthorityV1JSONBodyStatus `json:"status"` +} + +// CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider defines parameters for CreateAcmeCertificateAuthorityV1. +type CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider string + +// CreateAcmeCertificateAuthorityV1JSONBodyStatus defines parameters for CreateAcmeCertificateAuthorityV1. +type CreateAcmeCertificateAuthorityV1JSONBodyStatus string + +// UpdateAcmeCertificateAuthorityV1JSONBody defines parameters for UpdateAcmeCertificateAuthorityV1. +type UpdateAcmeCertificateAuthorityV1JSONBody struct { + Configuration *struct { + // AccountEmail The email address for the ACME Certificate Authority. + AccountEmail string `json:"accountEmail"` + + // DirectoryUrl The directory URL for the ACME Certificate Authority. + DirectoryUrl string `json:"directoryUrl"` + + // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. + DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` + DnsProviderConfig struct { + // HostedZoneId The hosted zone ID for the ACME Certificate Authority. + HostedZoneId string `json:"hostedZoneId"` + + // Provider The DNS provider for the ACME Certificate Authority. + Provider UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider `json:"provider"` + } `json:"dnsProviderConfig"` + + // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabHmacKey *string `json:"eabHmacKey,omitempty"` + + // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabKid *string `json:"eabKid,omitempty"` + } `json:"configuration,omitempty"` + + // Status The updated status of the ACME-compatible CA Certificate Authority. + Status *UpdateAcmeCertificateAuthorityV1JSONBodyStatus `json:"status,omitempty"` } +// UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider defines parameters for UpdateAcmeCertificateAuthorityV1. +type UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider string + +// UpdateAcmeCertificateAuthorityV1JSONBodyStatus defines parameters for UpdateAcmeCertificateAuthorityV1. +type UpdateAcmeCertificateAuthorityV1JSONBodyStatus string + +// CreateInternalCertificateAuthorityV1JSONBody defines parameters for CreateInternalCertificateAuthorityV1. +type CreateInternalCertificateAuthorityV1JSONBody struct { + Configuration struct { + ActiveCaCertId *openapi_types.UUID `json:"activeCaCertId"` + + // CommonName The common name (CN) for the CA. + CommonName *string `json:"commonName,omitempty"` + + // Country The country name (C) for the CA. + Country *string `json:"country,omitempty"` + Dn *string `json:"dn"` + + // FriendlyName A friendly name for the CA. + FriendlyName *string `json:"friendlyName,omitempty"` + + // KeyAlgorithm The type of public key algorithm and size, in bits, of the key pair for the CA; when you create an intermediate CA, you must use a key algorithm supported by the parent CA. + KeyAlgorithm CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm `json:"keyAlgorithm"` + + // Locality The locality name for the CA. + Locality *string `json:"locality,omitempty"` + + // MaxPathLength The maximum number of intermediate CAs that may follow this CA in the certificate / CA chain. A maxPathLength of -1 implies no path limit on the chain. + MaxPathLength *float32 `json:"maxPathLength"` + + // NotAfter The date and time when the CA expires in YYYY-MM-DDTHH:mm:ss.sssZ format. + NotAfter *string `json:"notAfter,omitempty"` + + // NotBefore The date and time when the CA becomes valid in YYYY-MM-DDTHH:mm:ss.sssZ format. + NotBefore *string `json:"notBefore,omitempty"` + + // Organization The organization (O) for the CA. + Organization *string `json:"organization,omitempty"` + + // Ou The organization unit (OU) for the CA. + Ou *string `json:"ou,omitempty"` + ParentCaId *openapi_types.UUID `json:"parentCaId"` + + // Province The state of province name for the CA. + Province *string `json:"province,omitempty"` + SerialNumber *string `json:"serialNumber"` + + // Type The type of CA to create. + Type CreateInternalCertificateAuthorityV1JSONBodyConfigurationType `json:"type"` + } `json:"configuration"` + + // Name The name of the Internal Certificate Authority to create. Must be slug-friendly. + Name string `json:"name"` + + // ProjectId The ID of the project to create the Certificate Authority in. + ProjectId openapi_types.UUID `json:"projectId"` + + // Status The status of the Internal Certificate Authority. + Status CreateInternalCertificateAuthorityV1JSONBodyStatus `json:"status"` +} + +// CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm defines parameters for CreateInternalCertificateAuthorityV1. +type CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm string + +// CreateInternalCertificateAuthorityV1JSONBodyConfigurationType defines parameters for CreateInternalCertificateAuthorityV1. +type CreateInternalCertificateAuthorityV1JSONBodyConfigurationType string + +// CreateInternalCertificateAuthorityV1JSONBodyStatus defines parameters for CreateInternalCertificateAuthorityV1. +type CreateInternalCertificateAuthorityV1JSONBodyStatus string + +// CreateCertificatePolicyJSONBody defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBody struct { + Algorithms *struct { + KeyAlgorithm *[]string `json:"keyAlgorithm,omitempty"` + Signature *[]string `json:"signature,omitempty"` + } `json:"algorithms,omitempty"` + BasicConstraints *struct { + IsCA *CreateCertificatePolicyJSONBodyBasicConstraintsIsCA `json:"isCA,omitempty"` + MaxPathLength *int `json:"maxPathLength,omitempty"` + } `json:"basicConstraints"` + Description *string `json:"description,omitempty"` + ExtendedKeyUsages *struct { + Allowed *[]CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed `json:"allowed,omitempty"` + Denied *[]CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied `json:"denied,omitempty"` + Required *[]CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired `json:"required,omitempty"` + } `json:"extendedKeyUsages,omitempty"` + KeyUsages *struct { + Allowed *[]CreateCertificatePolicyJSONBodyKeyUsagesAllowed `json:"allowed,omitempty"` + Denied *[]CreateCertificatePolicyJSONBodyKeyUsagesDenied `json:"denied,omitempty"` + Required *[]CreateCertificatePolicyJSONBodyKeyUsagesRequired `json:"required,omitempty"` + } `json:"keyUsages,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + Sans *[]struct { + Allowed *[]string `json:"allowed,omitempty"` + Denied *[]string `json:"denied,omitempty"` + Required *[]string `json:"required,omitempty"` + Type CreateCertificatePolicyJSONBodySansType `json:"type"` + } `json:"sans,omitempty"` + Subject *[]struct { + Allowed *[]string `json:"allowed,omitempty"` + Denied *[]string `json:"denied,omitempty"` + Required *[]string `json:"required,omitempty"` + Type CreateCertificatePolicyJSONBodySubjectType `json:"type"` + } `json:"subject,omitempty"` + Validity *struct { + Max *string `json:"max,omitempty"` + } `json:"validity,omitempty"` +} + +// CreateCertificatePolicyJSONBodyBasicConstraintsIsCA defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBodyBasicConstraintsIsCA string + +// CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed string + +// CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied string + +// CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired string + +// CreateCertificatePolicyJSONBodyKeyUsagesAllowed defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBodyKeyUsagesAllowed string + +// CreateCertificatePolicyJSONBodyKeyUsagesDenied defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBodyKeyUsagesDenied string + +// CreateCertificatePolicyJSONBodyKeyUsagesRequired defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBodyKeyUsagesRequired string + +// CreateCertificatePolicyJSONBodySansType defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBodySansType string + +// CreateCertificatePolicyJSONBodySubjectType defines parameters for CreateCertificatePolicy. +type CreateCertificatePolicyJSONBodySubjectType string + +// CreateCertificateProfileJSONBody defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBody struct { + AcmeConfig *struct { + SkipDnsOwnershipVerification *bool `json:"skipDnsOwnershipVerification,omitempty"` + SkipEabBinding *bool `json:"skipEabBinding,omitempty"` + } `json:"acmeConfig,omitempty"` + ApiConfig *struct { + AutoRenew *bool `json:"autoRenew,omitempty"` + RenewBeforeDays *float32 `json:"renewBeforeDays,omitempty"` + } `json:"apiConfig,omitempty"` + CaId *openapi_types.UUID `json:"caId,omitempty"` + CertificatePolicyId openapi_types.UUID `json:"certificatePolicyId"` + Defaults *struct { + BasicConstraints *struct { + IsCA bool `json:"isCA"` + PathLength *int `json:"pathLength,omitempty"` + } `json:"basicConstraints,omitempty"` + CommonName *string `json:"commonName,omitempty"` + Country *string `json:"country,omitempty"` + ExtendedKeyUsages *[]CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages `json:"extendedKeyUsages,omitempty"` + KeyAlgorithm *CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm `json:"keyAlgorithm,omitempty"` + KeyUsages *[]CreateCertificateProfileJSONBodyDefaultsKeyUsages `json:"keyUsages,omitempty"` + Locality *string `json:"locality,omitempty"` + Organization *string `json:"organization,omitempty"` + OrganizationalUnit *string `json:"organizationalUnit,omitempty"` + SignatureAlgorithm *CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm `json:"signatureAlgorithm,omitempty"` + State *string `json:"state,omitempty"` + TtlDays *int `json:"ttlDays,omitempty"` + } `json:"defaults"` + Description *string `json:"description,omitempty"` + EnrollmentType CreateCertificateProfileJSONBodyEnrollmentType `json:"enrollmentType"` + EstConfig *struct { + CaChain *string `json:"caChain,omitempty"` + DisableBootstrapCaValidation *bool `json:"disableBootstrapCaValidation,omitempty"` + Passphrase string `json:"passphrase"` + } `json:"estConfig,omitempty"` + ExternalConfigs *CreateCertificateProfileJSONBody_ExternalConfigs `json:"externalConfigs"` + IssuerType *CreateCertificateProfileJSONBodyIssuerType `json:"issuerType,omitempty"` + ProjectId string `json:"projectId"` + Slug string `json:"slug"` +} + +// CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages string + +// CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm string + +// CreateCertificateProfileJSONBodyDefaultsKeyUsages defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyDefaultsKeyUsages string + +// CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm string + +// CreateCertificateProfileJSONBodyEnrollmentType defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyEnrollmentType string + +// CreateCertificateProfileJSONBodyExternalConfigs0 defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyExternalConfigs0 struct { + // Template Certificate template name for Azure AD CS + Template string `json:"template"` +} + +// CreateCertificateProfileJSONBodyExternalConfigs1 defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyExternalConfigs1 = map[string]interface{} + +// CreateCertificateProfileJSONBodyExternalConfigs2 defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyExternalConfigs2 = map[string]interface{} + +// CreateCertificateProfileJSONBodyExternalConfigs3 defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyExternalConfigs3 = map[string]interface{} + +// CreateCertificateProfileJSONBody_ExternalConfigs defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBody_ExternalConfigs struct { + union json.RawMessage +} + +// CreateCertificateProfileJSONBodyIssuerType defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyIssuerType string + // CreateMachineIdentityJSONBody defines parameters for CreateMachineIdentity. type CreateMachineIdentityJSONBody struct { // HasDeleteProtection Prevents deletion of the identity when enabled. @@ -162,6 +745,25 @@ type CreateMachineIdentityJSONBody struct { Role *string `json:"role,omitempty"` } +// CreatePostgresPamAccountJSONBody defines parameters for CreatePostgresPamAccount. +type CreatePostgresPamAccountJSONBody struct { + Credentials struct { + Password string `json:"password"` + Username string `json:"username"` + } `json:"credentials"` + Description *string `json:"description"` + FolderId *openapi_types.UUID `json:"folderId,omitempty"` + Metadata *[]struct { + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + RequireMfa *bool `json:"requireMfa,omitempty"` + ResourceId openapi_types.UUID `json:"resourceId"` + RotationEnabled bool `json:"rotationEnabled"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` +} + // CreateKubernetesPamResourceJSONBody defines parameters for CreateKubernetesPamResource. type CreateKubernetesPamResourceJSONBody struct { ConnectionDetails struct { @@ -169,7 +771,11 @@ type CreateKubernetesPamResourceJSONBody struct { SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` Url string `json:"url"` } `json:"connectionDetails"` - GatewayId openapi_types.UUID `json:"gatewayId"` + GatewayId openapi_types.UUID `json:"gatewayId"` + Metadata *[]struct { + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"metadata,omitempty"` Name string `json:"name"` ProjectId openapi_types.UUID `json:"projectId"` RotationAccountCredentials *CreateKubernetesPamResourceJSONBody_RotationAccountCredentials `json:"rotationAccountCredentials"` @@ -189,6 +795,29 @@ type CreateKubernetesPamResourceJSONBody_RotationAccountCredentials struct { union json.RawMessage } +// CreatePostgresPamResourceJSONBody defines parameters for CreatePostgresPamResource. +type CreatePostgresPamResourceJSONBody struct { + ConnectionDetails struct { + Database string `json:"database"` + Host string `json:"host"` + Port float32 `json:"port"` + SslCertificate *string `json:"sslCertificate,omitempty"` + SslEnabled bool `json:"sslEnabled"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + } `json:"connectionDetails"` + GatewayId openapi_types.UUID `json:"gatewayId"` + Metadata *[]struct { + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId openapi_types.UUID `json:"projectId"` + RotationAccountCredentials *struct { + Password string `json:"password"` + Username string `json:"username"` + } `json:"rotationAccountCredentials"` +} + // CreateRedisPamResourceJSONBody defines parameters for CreateRedisPamResource. type CreateRedisPamResourceJSONBody struct { ConnectionDetails struct { @@ -198,7 +827,11 @@ type CreateRedisPamResourceJSONBody struct { SslEnabled bool `json:"sslEnabled"` SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` } `json:"connectionDetails"` - GatewayId openapi_types.UUID `json:"gatewayId"` + GatewayId openapi_types.UUID `json:"gatewayId"` + Metadata *[]struct { + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"metadata,omitempty"` Name string `json:"name"` ProjectId openapi_types.UUID `json:"projectId"` RotationAccountCredentials *struct { @@ -241,7 +874,7 @@ type SelectOrganizationV3JSONBodyUserAgent string // ListSecretsV4Params defines parameters for ListSecretsV4. type ListSecretsV4Params struct { - // MetadataFilter The secret metadata key-value pairs to filter secrets by. When querying for multiple metadata pairs, the query is treated as an AND operation. Secret metadata format is key=value1,value=value2|key=value3,value=value4. + // MetadataFilter Unencrypted secret metadata key-value pairs used to filter secrets. Only metadata with unencrypted values is supported. When querying for multiple metadata pairs, the query is treated as an AND operation. Secret metadata format is key=value1,value=value2|key=value3,value=value4. MetadataFilter *string `form:"metadataFilter,omitempty" json:"metadataFilter,omitempty"` // ProjectId The ID of the project to list secrets from. @@ -262,8 +895,11 @@ type ListSecretsV4Params struct { // Recursive Whether or not to fetch all secrets from the specified base path, and all of its subdirectories. Note, the max depth is 20 deep. Recursive *ListSecretsV4ParamsRecursive `form:"recursive,omitempty" json:"recursive,omitempty"` + // IncludePersonalOverrides Whether or not to include personal secrets in the response. When enabled, personal secrets will be included in the response. Shared secrets will still be included, but personal secrets will take priority, and the corresponding shared secrets will be replaced with the personal secrets. + IncludePersonalOverrides *ListSecretsV4ParamsIncludePersonalOverrides `form:"includePersonalOverrides,omitempty" json:"includePersonalOverrides,omitempty"` + // IncludeImports Weather to include imported secrets or not. - IncludeImports *ListSecretsV4ParamsIncludeImports `form:"include_imports,omitempty" json:"include_imports,omitempty"` + IncludeImports *ListSecretsV4ParamsIncludeImports `form:"includeImports,omitempty" json:"includeImports,omitempty"` // TagSlugs The comma separated tag slugs to filter secrets. TagSlugs *string `form:"tagSlugs,omitempty" json:"tagSlugs,omitempty"` @@ -278,6 +914,9 @@ type ListSecretsV4ParamsExpandSecretReferences string // ListSecretsV4ParamsRecursive defines parameters for ListSecretsV4. type ListSecretsV4ParamsRecursive string +// ListSecretsV4ParamsIncludePersonalOverrides defines parameters for ListSecretsV4. +type ListSecretsV4ParamsIncludePersonalOverrides string + // ListSecretsV4ParamsIncludeImports defines parameters for ListSecretsV4. type ListSecretsV4ParamsIncludeImports string @@ -323,7 +962,7 @@ type GetSecretByNameV4Params struct { ExpandSecretReferences *GetSecretByNameV4ParamsExpandSecretReferences `form:"expandSecretReferences,omitempty" json:"expandSecretReferences,omitempty"` // IncludeImports Weather to include imported secrets or not. - IncludeImports *GetSecretByNameV4ParamsIncludeImports `form:"include_imports,omitempty" json:"include_imports,omitempty"` + IncludeImports *GetSecretByNameV4ParamsIncludeImports `form:"includeImports,omitempty" json:"includeImports,omitempty"` } // GetSecretByNameV4ParamsType defines parameters for GetSecretByNameV4. @@ -353,8 +992,9 @@ type UpdateSecretV4JSONBody struct { // SecretComment Update comment to the secret. SecretComment *string `json:"secretComment,omitempty"` SecretMetadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` } `json:"secretMetadata,omitempty"` // SecretPath The default path for secrets to update or upsert, if not provided in the secret details. @@ -396,8 +1036,9 @@ type CreateSecretV4JSONBody struct { // SecretComment Attach a comment to the secret. SecretComment *string `json:"secretComment,omitempty"` SecretMetadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` } `json:"secretMetadata,omitempty"` // SecretPath The path to create the secret in. @@ -413,7 +1054,7 @@ type CreateSecretV4JSONBody struct { SecretValue string `json:"secretValue"` // SkipMultilineEncoding Skip multiline encoding for the secret value. - SkipMultilineEncoding *bool `json:"skipMultilineEncoding,omitempty"` + SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` // TagIds The ID of the tags to be attached to the created secret. TagIds *[]string `json:"tagIds,omitempty"` @@ -428,18 +1069,48 @@ type CreateSecretV4JSONBodyType string // AdminSignUpJSONRequestBody defines body for AdminSignUp for application/json ContentType. type AdminSignUpJSONRequestBody AdminSignUpJSONBody +// CreateCloudflareAppConnectionJSONRequestBody defines body for CreateCloudflareAppConnection for application/json ContentType. +type CreateCloudflareAppConnectionJSONRequestBody CreateCloudflareAppConnectionJSONBody + // AttachTokenAuthJSONRequestBody defines body for AttachTokenAuth for application/json ContentType. type AttachTokenAuthJSONRequestBody AttachTokenAuthJSONBody // CreateTokenAuthTokenJSONRequestBody defines body for CreateTokenAuthToken for application/json ContentType. type CreateTokenAuthTokenJSONRequestBody CreateTokenAuthTokenJSONBody +// AttachUniversalAuthJSONRequestBody defines body for AttachUniversalAuth for application/json ContentType. +type AttachUniversalAuthJSONRequestBody AttachUniversalAuthJSONBody + +// CreateUniversalAuthClientSecretJSONRequestBody defines body for CreateUniversalAuthClientSecret for application/json ContentType. +type CreateUniversalAuthClientSecretJSONRequestBody CreateUniversalAuthClientSecretJSONBody + +// CreateAcmeCertificateAuthorityV1JSONRequestBody defines body for CreateAcmeCertificateAuthorityV1 for application/json ContentType. +type CreateAcmeCertificateAuthorityV1JSONRequestBody CreateAcmeCertificateAuthorityV1JSONBody + +// UpdateAcmeCertificateAuthorityV1JSONRequestBody defines body for UpdateAcmeCertificateAuthorityV1 for application/json ContentType. +type UpdateAcmeCertificateAuthorityV1JSONRequestBody UpdateAcmeCertificateAuthorityV1JSONBody + +// CreateInternalCertificateAuthorityV1JSONRequestBody defines body for CreateInternalCertificateAuthorityV1 for application/json ContentType. +type CreateInternalCertificateAuthorityV1JSONRequestBody CreateInternalCertificateAuthorityV1JSONBody + +// CreateCertificatePolicyJSONRequestBody defines body for CreateCertificatePolicy for application/json ContentType. +type CreateCertificatePolicyJSONRequestBody CreateCertificatePolicyJSONBody + +// CreateCertificateProfileJSONRequestBody defines body for CreateCertificateProfile for application/json ContentType. +type CreateCertificateProfileJSONRequestBody CreateCertificateProfileJSONBody + // CreateMachineIdentityJSONRequestBody defines body for CreateMachineIdentity for application/json ContentType. type CreateMachineIdentityJSONRequestBody CreateMachineIdentityJSONBody +// CreatePostgresPamAccountJSONRequestBody defines body for CreatePostgresPamAccount for application/json ContentType. +type CreatePostgresPamAccountJSONRequestBody CreatePostgresPamAccountJSONBody + // CreateKubernetesPamResourceJSONRequestBody defines body for CreateKubernetesPamResource for application/json ContentType. type CreateKubernetesPamResourceJSONRequestBody CreateKubernetesPamResourceJSONBody +// CreatePostgresPamResourceJSONRequestBody defines body for CreatePostgresPamResource for application/json ContentType. +type CreatePostgresPamResourceJSONRequestBody CreatePostgresPamResourceJSONBody + // CreateRedisPamResourceJSONRequestBody defines body for CreateRedisPamResource for application/json ContentType. type CreateRedisPamResourceJSONRequestBody CreateRedisPamResourceJSONBody @@ -536,6 +1207,11 @@ type ClientInterface interface { AdminSignUp(ctx context.Context, body AdminSignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateCloudflareAppConnectionWithBody request with any body + CreateCloudflareAppConnectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateCloudflareAppConnection(ctx context.Context, body CreateCloudflareAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // RefreshAuthToken request RefreshAuthToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -549,16 +1225,61 @@ type ClientInterface interface { CreateTokenAuthToken(ctx context.Context, identityId string, body CreateTokenAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // AttachUniversalAuthWithBody request with any body + AttachUniversalAuthWithBody(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AttachUniversalAuth(ctx context.Context, identityId string, body AttachUniversalAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateUniversalAuthClientSecretWithBody request with any body + CreateUniversalAuthClientSecretWithBody(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateUniversalAuthClientSecret(ctx context.Context, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateAcmeCertificateAuthorityV1WithBody request with any body + CreateAcmeCertificateAuthorityV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateAcmeCertificateAuthorityV1(ctx context.Context, body CreateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateAcmeCertificateAuthorityV1WithBody request with any body + UpdateAcmeCertificateAuthorityV1WithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateAcmeCertificateAuthorityV1(ctx context.Context, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateInternalCertificateAuthorityV1WithBody request with any body + CreateInternalCertificateAuthorityV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateInternalCertificateAuthorityV1(ctx context.Context, body CreateInternalCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateCertificatePolicyWithBody request with any body + CreateCertificatePolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateCertificatePolicy(ctx context.Context, body CreateCertificatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateCertificateProfileWithBody request with any body + CreateCertificateProfileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateCertificateProfile(ctx context.Context, body CreateCertificateProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateMachineIdentityWithBody request with any body CreateMachineIdentityWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateMachineIdentity(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePostgresPamAccountWithBody request with any body + CreatePostgresPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePostgresPamAccount(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateKubernetesPamResourceWithBody request with any body CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateKubernetesPamResource(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePostgresPamResourceWithBody request with any body + CreatePostgresPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePostgresPamResource(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateRedisPamResourceWithBody request with any body CreateRedisPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -626,6 +1347,30 @@ func (c *Client) AdminSignUp(ctx context.Context, body AdminSignUpJSONRequestBod return c.Client.Do(req) } +func (c *Client) CreateCloudflareAppConnectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCloudflareAppConnectionRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCloudflareAppConnection(ctx context.Context, body CreateCloudflareAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCloudflareAppConnectionRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) RefreshAuthToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewRefreshAuthTokenRequest(c.Server) if err != nil { @@ -686,8 +1431,8 @@ func (c *Client) CreateTokenAuthToken(ctx context.Context, identityId string, bo return c.Client.Do(req) } -func (c *Client) CreateMachineIdentityWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateMachineIdentityRequestWithBody(c.Server, contentType, body) +func (c *Client) AttachUniversalAuthWithBody(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAttachUniversalAuthRequestWithBody(c.Server, identityId, contentType, body) if err != nil { return nil, err } @@ -698,8 +1443,8 @@ func (c *Client) CreateMachineIdentityWithBody(ctx context.Context, contentType return c.Client.Do(req) } -func (c *Client) CreateMachineIdentity(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateMachineIdentityRequest(c.Server, body) +func (c *Client) AttachUniversalAuth(ctx context.Context, identityId string, body AttachUniversalAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAttachUniversalAuthRequest(c.Server, identityId, body) if err != nil { return nil, err } @@ -710,8 +1455,8 @@ func (c *Client) CreateMachineIdentity(ctx context.Context, body CreateMachineId return c.Client.Do(req) } -func (c *Client) CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateKubernetesPamResourceRequestWithBody(c.Server, contentType, body) +func (c *Client) CreateUniversalAuthClientSecretWithBody(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUniversalAuthClientSecretRequestWithBody(c.Server, identityId, contentType, body) if err != nil { return nil, err } @@ -722,8 +1467,8 @@ func (c *Client) CreateKubernetesPamResourceWithBody(ctx context.Context, conten return c.Client.Do(req) } -func (c *Client) CreateKubernetesPamResource(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateKubernetesPamResourceRequest(c.Server, body) +func (c *Client) CreateUniversalAuthClientSecret(ctx context.Context, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUniversalAuthClientSecretRequest(c.Server, identityId, body) if err != nil { return nil, err } @@ -734,8 +1479,8 @@ func (c *Client) CreateKubernetesPamResource(ctx context.Context, body CreateKub return c.Client.Do(req) } -func (c *Client) CreateRedisPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateRedisPamResourceRequestWithBody(c.Server, contentType, body) +func (c *Client) CreateAcmeCertificateAuthorityV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAcmeCertificateAuthorityV1RequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -746,8 +1491,8 @@ func (c *Client) CreateRedisPamResourceWithBody(ctx context.Context, contentType return c.Client.Do(req) } -func (c *Client) CreateRedisPamResource(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateRedisPamResourceRequest(c.Server, body) +func (c *Client) CreateAcmeCertificateAuthorityV1(ctx context.Context, body CreateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAcmeCertificateAuthorityV1Request(c.Server, body) if err != nil { return nil, err } @@ -758,8 +1503,8 @@ func (c *Client) CreateRedisPamResource(ctx context.Context, body CreateRedisPam return c.Client.Do(req) } -func (c *Client) CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateProjectRequestWithBody(c.Server, contentType, body) +func (c *Client) UpdateAcmeCertificateAuthorityV1WithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAcmeCertificateAuthorityV1RequestWithBody(c.Server, id, contentType, body) if err != nil { return nil, err } @@ -770,8 +1515,8 @@ func (c *Client) CreateProjectWithBody(ctx context.Context, contentType string, return c.Client.Do(req) } -func (c *Client) CreateProject(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateProjectRequest(c.Server, body) +func (c *Client) UpdateAcmeCertificateAuthorityV1(ctx context.Context, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAcmeCertificateAuthorityV1Request(c.Server, id, body) if err != nil { return nil, err } @@ -782,8 +1527,8 @@ func (c *Client) CreateProject(ctx context.Context, body CreateProjectJSONReques return c.Client.Do(req) } -func (c *Client) GetRelays(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetRelaysRequest(c.Server) +func (c *Client) CreateInternalCertificateAuthorityV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateInternalCertificateAuthorityV1RequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -794,8 +1539,8 @@ func (c *Client) GetRelays(ctx context.Context, reqEditors ...RequestEditorFn) ( return c.Client.Do(req) } -func (c *Client) ListGateways(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListGatewaysRequest(c.Server) +func (c *Client) CreateInternalCertificateAuthorityV1(ctx context.Context, body CreateInternalCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateInternalCertificateAuthorityV1Request(c.Server, body) if err != nil { return nil, err } @@ -806,8 +1551,224 @@ func (c *Client) ListGateways(ctx context.Context, reqEditors ...RequestEditorFn return c.Client.Do(req) } -func (c *Client) SelectOrganizationV3WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSelectOrganizationV3RequestWithBody(c.Server, contentType, body) +func (c *Client) CreateCertificatePolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCertificatePolicyRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCertificatePolicy(ctx context.Context, body CreateCertificatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCertificatePolicyRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCertificateProfileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCertificateProfileRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCertificateProfile(ctx context.Context, body CreateCertificateProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCertificateProfileRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateMachineIdentityWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateMachineIdentityRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateMachineIdentity(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateMachineIdentityRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePostgresPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamAccountRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePostgresPamAccount(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamAccountRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateKubernetesPamResourceRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateKubernetesPamResource(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateKubernetesPamResourceRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePostgresPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamResourceRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePostgresPamResource(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamResourceRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateRedisPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateRedisPamResourceRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateRedisPamResource(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateRedisPamResourceRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateProjectRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateProject(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateProjectRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetRelays(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRelaysRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListGateways(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListGatewaysRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SelectOrganizationV3WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSelectOrganizationV3RequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -966,6 +1927,46 @@ func NewAdminSignUpRequestWithBody(server string, contentType string, body io.Re return req, nil } +// NewCreateCloudflareAppConnectionRequest calls the generic CreateCloudflareAppConnection builder with application/json body +func NewCreateCloudflareAppConnectionRequest(server string, body CreateCloudflareAppConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateCloudflareAppConnectionRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateCloudflareAppConnectionRequestWithBody generates requests for CreateCloudflareAppConnection with any type of body +func NewCreateCloudflareAppConnectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/app-connections/cloudflare") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewRefreshAuthTokenRequest generates requests for RefreshAuthToken func NewRefreshAuthTokenRequest(server string) (*http.Request, error) { var err error @@ -1087,27 +2088,34 @@ func NewCreateTokenAuthTokenRequestWithBody(server string, identityId string, co return req, nil } -// NewCreateMachineIdentityRequest calls the generic CreateMachineIdentity builder with application/json body -func NewCreateMachineIdentityRequest(server string, body CreateMachineIdentityJSONRequestBody) (*http.Request, error) { +// NewAttachUniversalAuthRequest calls the generic AttachUniversalAuth builder with application/json body +func NewAttachUniversalAuthRequest(server string, identityId string, body AttachUniversalAuthJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateMachineIdentityRequestWithBody(server, "application/json", bodyReader) + return NewAttachUniversalAuthRequestWithBody(server, identityId, "application/json", bodyReader) } -// NewCreateMachineIdentityRequestWithBody generates requests for CreateMachineIdentity with any type of body -func NewCreateMachineIdentityRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewAttachUniversalAuthRequestWithBody generates requests for AttachUniversalAuth with any type of body +func NewAttachUniversalAuthRequestWithBody(server string, identityId string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identityId", runtime.ParamLocationPath, identityId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v1/identities") + operationPath := fmt.Sprintf("/api/v1/auth/universal-auth/identities/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1127,27 +2135,34 @@ func NewCreateMachineIdentityRequestWithBody(server string, contentType string, return req, nil } -// NewCreateKubernetesPamResourceRequest calls the generic CreateKubernetesPamResource builder with application/json body -func NewCreateKubernetesPamResourceRequest(server string, body CreateKubernetesPamResourceJSONRequestBody) (*http.Request, error) { +// NewCreateUniversalAuthClientSecretRequest calls the generic CreateUniversalAuthClientSecret builder with application/json body +func NewCreateUniversalAuthClientSecretRequest(server string, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateKubernetesPamResourceRequestWithBody(server, "application/json", bodyReader) + return NewCreateUniversalAuthClientSecretRequestWithBody(server, identityId, "application/json", bodyReader) } -// NewCreateKubernetesPamResourceRequestWithBody generates requests for CreateKubernetesPamResource with any type of body -func NewCreateKubernetesPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateUniversalAuthClientSecretRequestWithBody generates requests for CreateUniversalAuthClientSecret with any type of body +func NewCreateUniversalAuthClientSecretRequestWithBody(server string, identityId string, contentType string, body io.Reader) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) - if err != nil { + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identityId", runtime.ParamLocationPath, identityId) + if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v1/pam/resources/kubernetes") + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/auth/universal-auth/identities/%s/client-secrets", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1167,19 +2182,19 @@ func NewCreateKubernetesPamResourceRequestWithBody(server string, contentType st return req, nil } -// NewCreateRedisPamResourceRequest calls the generic CreateRedisPamResource builder with application/json body -func NewCreateRedisPamResourceRequest(server string, body CreateRedisPamResourceJSONRequestBody) (*http.Request, error) { +// NewCreateAcmeCertificateAuthorityV1Request calls the generic CreateAcmeCertificateAuthorityV1 builder with application/json body +func NewCreateAcmeCertificateAuthorityV1Request(server string, body CreateAcmeCertificateAuthorityV1JSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateRedisPamResourceRequestWithBody(server, "application/json", bodyReader) + return NewCreateAcmeCertificateAuthorityV1RequestWithBody(server, "application/json", bodyReader) } -// NewCreateRedisPamResourceRequestWithBody generates requests for CreateRedisPamResource with any type of body -func NewCreateRedisPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateAcmeCertificateAuthorityV1RequestWithBody generates requests for CreateAcmeCertificateAuthorityV1 with any type of body +func NewCreateAcmeCertificateAuthorityV1RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -1187,7 +2202,7 @@ func NewCreateRedisPamResourceRequestWithBody(server string, contentType string, return nil, err } - operationPath := fmt.Sprintf("/api/v1/pam/resources/redis") + operationPath := fmt.Sprintf("/api/v1/cert-manager/ca/acme") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1207,27 +2222,34 @@ func NewCreateRedisPamResourceRequestWithBody(server string, contentType string, return req, nil } -// NewCreateProjectRequest calls the generic CreateProject builder with application/json body -func NewCreateProjectRequest(server string, body CreateProjectJSONRequestBody) (*http.Request, error) { +// NewUpdateAcmeCertificateAuthorityV1Request calls the generic UpdateAcmeCertificateAuthorityV1 builder with application/json body +func NewUpdateAcmeCertificateAuthorityV1Request(server string, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateProjectRequestWithBody(server, "application/json", bodyReader) + return NewUpdateAcmeCertificateAuthorityV1RequestWithBody(server, id, "application/json", bodyReader) } -// NewCreateProjectRequestWithBody generates requests for CreateProject with any type of body -func NewCreateProjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateAcmeCertificateAuthorityV1RequestWithBody generates requests for UpdateAcmeCertificateAuthorityV1 with any type of body +func NewUpdateAcmeCertificateAuthorityV1RequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v1/projects") + operationPath := fmt.Sprintf("/api/v1/cert-manager/ca/acme/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1237,7 +2259,7 @@ func NewCreateProjectRequestWithBody(server string, contentType string, body io. return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -1247,8 +2269,19 @@ func NewCreateProjectRequestWithBody(server string, contentType string, body io. return req, nil } -// NewGetRelaysRequest generates requests for GetRelays -func NewGetRelaysRequest(server string) (*http.Request, error) { +// NewCreateInternalCertificateAuthorityV1Request calls the generic CreateInternalCertificateAuthorityV1 builder with application/json body +func NewCreateInternalCertificateAuthorityV1Request(server string, body CreateInternalCertificateAuthorityV1JSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateInternalCertificateAuthorityV1RequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateInternalCertificateAuthorityV1RequestWithBody generates requests for CreateInternalCertificateAuthorityV1 with any type of body +func NewCreateInternalCertificateAuthorityV1RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -1256,7 +2289,7 @@ func NewGetRelaysRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/api/v1/relays") + operationPath := fmt.Sprintf("/api/v1/cert-manager/ca/internal") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1266,16 +2299,29 @@ func NewGetRelaysRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewListGatewaysRequest generates requests for ListGateways -func NewListGatewaysRequest(server string) (*http.Request, error) { +// NewCreateCertificatePolicyRequest calls the generic CreateCertificatePolicy builder with application/json body +func NewCreateCertificatePolicyRequest(server string, body CreateCertificatePolicyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateCertificatePolicyRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateCertificatePolicyRequestWithBody generates requests for CreateCertificatePolicy with any type of body +func NewCreateCertificatePolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -1283,7 +2329,7 @@ func NewListGatewaysRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/api/v2/gateways") + operationPath := fmt.Sprintf("/api/v1/cert-manager/certificate-policies") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1293,27 +2339,29 @@ func NewListGatewaysRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewSelectOrganizationV3Request calls the generic SelectOrganizationV3 builder with application/json body -func NewSelectOrganizationV3Request(server string, body SelectOrganizationV3JSONRequestBody) (*http.Request, error) { +// NewCreateCertificateProfileRequest calls the generic CreateCertificateProfile builder with application/json body +func NewCreateCertificateProfileRequest(server string, body CreateCertificateProfileJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewSelectOrganizationV3RequestWithBody(server, "application/json", bodyReader) + return NewCreateCertificateProfileRequestWithBody(server, "application/json", bodyReader) } -// NewSelectOrganizationV3RequestWithBody generates requests for SelectOrganizationV3 with any type of body -func NewSelectOrganizationV3RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateCertificateProfileRequestWithBody generates requests for CreateCertificateProfile with any type of body +func NewCreateCertificateProfileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -1321,7 +2369,7 @@ func NewSelectOrganizationV3RequestWithBody(server string, contentType string, b return nil, err } - operationPath := fmt.Sprintf("/api/v3/auth/select-organization") + operationPath := fmt.Sprintf("/api/v1/cert-manager/certificate-profiles") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1341,8 +2389,19 @@ func NewSelectOrganizationV3RequestWithBody(server string, contentType string, b return req, nil } -// NewListSecretsV4Request generates requests for ListSecretsV4 -func NewListSecretsV4Request(server string, params *ListSecretsV4Params) (*http.Request, error) { +// NewCreateMachineIdentityRequest calls the generic CreateMachineIdentity builder with application/json body +func NewCreateMachineIdentityRequest(server string, body CreateMachineIdentityJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateMachineIdentityRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateMachineIdentityRequestWithBody generates requests for CreateMachineIdentity with any type of body +func NewCreateMachineIdentityRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -1350,7 +2409,7 @@ func NewListSecretsV4Request(server string, params *ListSecretsV4Params) (*http. return nil, err } - operationPath := fmt.Sprintf("/api/v4/secrets") + operationPath := fmt.Sprintf("/api/v1/identities") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1360,192 +2419,37 @@ func NewListSecretsV4Request(server string, params *ListSecretsV4Params) (*http. return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.MetadataFilter != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metadataFilter", runtime.ParamLocationQuery, *params.MetadataFilter); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ProjectId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectId", runtime.ParamLocationQuery, *params.ProjectId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Environment != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, *params.Environment); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretPath != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secretPath", runtime.ParamLocationQuery, *params.SecretPath); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ViewSecretValue != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "viewSecretValue", runtime.ParamLocationQuery, *params.ViewSecretValue); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ExpandSecretReferences != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "expandSecretReferences", runtime.ParamLocationQuery, *params.ExpandSecretReferences); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Recursive != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "recursive", runtime.ParamLocationQuery, *params.Recursive); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.IncludeImports != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_imports", runtime.ParamLocationQuery, *params.IncludeImports); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.TagSlugs != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tagSlugs", runtime.ParamLocationQuery, *params.TagSlugs); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewDeleteSecretV4Request calls the generic DeleteSecretV4 builder with application/json body -func NewDeleteSecretV4Request(server string, secretName string, body DeleteSecretV4JSONRequestBody) (*http.Request, error) { +// NewCreatePostgresPamAccountRequest calls the generic CreatePostgresPamAccount builder with application/json body +func NewCreatePostgresPamAccountRequest(server string, body CreatePostgresPamAccountJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeleteSecretV4RequestWithBody(server, secretName, "application/json", bodyReader) + return NewCreatePostgresPamAccountRequestWithBody(server, "application/json", bodyReader) } -// NewDeleteSecretV4RequestWithBody generates requests for DeleteSecretV4 with any type of body -func NewDeleteSecretV4RequestWithBody(server string, secretName string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePostgresPamAccountRequestWithBody generates requests for CreatePostgresPamAccount with any type of body +func NewCreatePostgresPamAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "secretName", runtime.ParamLocationPath, secretName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v4/secrets/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/pam/accounts/postgres") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1555,7 +2459,7 @@ func NewDeleteSecretV4RequestWithBody(server string, secretName string, contentT return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -1565,23 +2469,27 @@ func NewDeleteSecretV4RequestWithBody(server string, secretName string, contentT return req, nil } -// NewGetSecretByNameV4Request generates requests for GetSecretByNameV4 -func NewGetSecretByNameV4Request(server string, secretName string, params *GetSecretByNameV4Params) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "secretName", runtime.ParamLocationPath, secretName) +// NewCreateKubernetesPamResourceRequest calls the generic CreateKubernetesPamResource builder with application/json body +func NewCreateKubernetesPamResourceRequest(server string, body CreateKubernetesPamResourceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateKubernetesPamResourceRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateKubernetesPamResourceRequestWithBody generates requests for CreateKubernetesPamResource with any type of body +func NewCreateKubernetesPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v4/secrets/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/pam/resources/kubernetes") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1591,172 +2499,77 @@ func NewGetSecretByNameV4Request(server string, secretName string, params *GetSe return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectId", runtime.ParamLocationQuery, params.ProjectId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - if params.Environment != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, *params.Environment); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SecretPath != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secretPath", runtime.ParamLocationQuery, *params.SecretPath); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Version != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, *params.Version); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Type != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ViewSecretValue != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "viewSecretValue", runtime.ParamLocationQuery, *params.ViewSecretValue); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.ExpandSecretReferences != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "expandSecretReferences", runtime.ParamLocationQuery, *params.ExpandSecretReferences); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewCreatePostgresPamResourceRequest calls the generic CreatePostgresPamResource builder with application/json body +func NewCreatePostgresPamResourceRequest(server string, body CreatePostgresPamResourceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePostgresPamResourceRequestWithBody(server, "application/json", bodyReader) +} - if params.IncludeImports != nil { +// NewCreatePostgresPamResourceRequestWithBody generates requests for CreatePostgresPamResource with any type of body +func NewCreatePostgresPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_imports", runtime.ParamLocationQuery, *params.IncludeImports); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/api/v1/pam/resources/postgres") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - queryURL.RawQuery = queryValues.Encode() + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewUpdateSecretV4Request calls the generic UpdateSecretV4 builder with application/json body -func NewUpdateSecretV4Request(server string, secretName string, body UpdateSecretV4JSONRequestBody) (*http.Request, error) { +// NewCreateRedisPamResourceRequest calls the generic CreateRedisPamResource builder with application/json body +func NewCreateRedisPamResourceRequest(server string, body CreateRedisPamResourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSecretV4RequestWithBody(server, secretName, "application/json", bodyReader) + return NewCreateRedisPamResourceRequestWithBody(server, "application/json", bodyReader) } -// NewUpdateSecretV4RequestWithBody generates requests for UpdateSecretV4 with any type of body -func NewUpdateSecretV4RequestWithBody(server string, secretName string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateRedisPamResourceRequestWithBody generates requests for CreateRedisPamResource with any type of body +func NewCreateRedisPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "secretName", runtime.ParamLocationPath, secretName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v4/secrets/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/pam/resources/redis") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1766,7 +2579,7 @@ func NewUpdateSecretV4RequestWithBody(server string, secretName string, contentT return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -1776,34 +2589,27 @@ func NewUpdateSecretV4RequestWithBody(server string, secretName string, contentT return req, nil } -// NewCreateSecretV4Request calls the generic CreateSecretV4 builder with application/json body -func NewCreateSecretV4Request(server string, secretName string, body CreateSecretV4JSONRequestBody) (*http.Request, error) { +// NewCreateProjectRequest calls the generic CreateProject builder with application/json body +func NewCreateProjectRequest(server string, body CreateProjectJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSecretV4RequestWithBody(server, secretName, "application/json", bodyReader) + return NewCreateProjectRequestWithBody(server, "application/json", bodyReader) } -// NewCreateSecretV4RequestWithBody generates requests for CreateSecretV4 with any type of body -func NewCreateSecretV4RequestWithBody(server string, secretName string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateProjectRequestWithBody generates requests for CreateProject with any type of body +func NewCreateProjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "secretName", runtime.ParamLocationPath, secretName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v4/secrets/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/projects") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1823,733 +2629,875 @@ func NewCreateSecretV4RequestWithBody(server string, secretName string, contentT return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } +// NewGetRelaysRequest generates requests for GetRelays +func NewGetRelaysRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return nil -} -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} + operationPath := fmt.Sprintf("/api/v1/relays") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } + + return req, nil } -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // AdminSignUpWithBodyWithResponse request with any body - AdminSignUpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminSignUpResponse, error) +// NewListGatewaysRequest generates requests for ListGateways +func NewListGatewaysRequest(server string) (*http.Request, error) { + var err error - AdminSignUpWithResponse(ctx context.Context, body AdminSignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminSignUpResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // RefreshAuthTokenWithResponse request - RefreshAuthTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAuthTokenResponse, error) + operationPath := fmt.Sprintf("/api/v2/gateways") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // AttachTokenAuthWithBodyWithResponse request with any body - AttachTokenAuthWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachTokenAuthResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - AttachTokenAuthWithResponse(ctx context.Context, identityId string, body AttachTokenAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachTokenAuthResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // CreateTokenAuthTokenWithBodyWithResponse request with any body - CreateTokenAuthTokenWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTokenAuthTokenResponse, error) + return req, nil +} - CreateTokenAuthTokenWithResponse(ctx context.Context, identityId string, body CreateTokenAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTokenAuthTokenResponse, error) +// NewSelectOrganizationV3Request calls the generic SelectOrganizationV3 builder with application/json body +func NewSelectOrganizationV3Request(server string, body SelectOrganizationV3JSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSelectOrganizationV3RequestWithBody(server, "application/json", bodyReader) +} - // CreateMachineIdentityWithBodyWithResponse request with any body - CreateMachineIdentityWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) +// NewSelectOrganizationV3RequestWithBody generates requests for SelectOrganizationV3 with any type of body +func NewSelectOrganizationV3RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error - CreateMachineIdentityWithResponse(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CreateKubernetesPamResourceWithBodyWithResponse request with any body - CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) + operationPath := fmt.Sprintf("/api/v3/auth/select-organization") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - CreateKubernetesPamResourceWithResponse(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CreateRedisPamResourceWithBodyWithResponse request with any body - CreateRedisPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) + req.Header.Add("Content-Type", contentType) - // CreateProjectWithBodyWithResponse request with any body - CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) + return req, nil +} - CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) +// NewListSecretsV4Request generates requests for ListSecretsV4 +func NewListSecretsV4Request(server string, params *ListSecretsV4Params) (*http.Request, error) { + var err error - // GetRelaysWithResponse request - GetRelaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRelaysResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ListGatewaysWithResponse request - ListGatewaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListGatewaysResponse, error) + operationPath := fmt.Sprintf("/api/v4/secrets") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // SelectOrganizationV3WithBodyWithResponse request with any body - SelectOrganizationV3WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - SelectOrganizationV3WithResponse(ctx context.Context, body SelectOrganizationV3JSONRequestBody, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) + if params != nil { + queryValues := queryURL.Query() - // ListSecretsV4WithResponse request - ListSecretsV4WithResponse(ctx context.Context, params *ListSecretsV4Params, reqEditors ...RequestEditorFn) (*ListSecretsV4Response, error) + if params.MetadataFilter != nil { - // DeleteSecretV4WithBodyWithResponse request with any body - DeleteSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metadataFilter", runtime.ParamLocationQuery, *params.MetadataFilter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - DeleteSecretV4WithResponse(ctx context.Context, secretName string, body DeleteSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) + } - // GetSecretByNameV4WithResponse request - GetSecretByNameV4WithResponse(ctx context.Context, secretName string, params *GetSecretByNameV4Params, reqEditors ...RequestEditorFn) (*GetSecretByNameV4Response, error) + if params.ProjectId != nil { - // UpdateSecretV4WithBodyWithResponse request with any body - UpdateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectId", runtime.ParamLocationQuery, *params.ProjectId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - UpdateSecretV4WithResponse(ctx context.Context, secretName string, body UpdateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) + } - // CreateSecretV4WithBodyWithResponse request with any body - CreateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) + if params.Environment != nil { - CreateSecretV4WithResponse(ctx context.Context, secretName string, body CreateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, *params.Environment); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -type AdminSignUpResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Message string `json:"message"` - New string `json:"new"` - Organization struct { - AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization"` - AuthEnforced *bool `json:"authEnforced"` - BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"` - BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"` - CreatedAt time.Time `json:"createdAt"` - CustomerId *string `json:"customerId"` - DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"` - EnforceMfa *bool `json:"enforceMfa,omitempty"` - GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"` - GoogleSsoAuthLastUsed *time.Time `json:"googleSsoAuthLastUsed"` - Id openapi_types.UUID `json:"id"` - KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId"` - KmsEncryptedDataKey interface{} `json:"kmsEncryptedDataKey"` - KmsProductEnabled *bool `json:"kmsProductEnabled"` - MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime"` - MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit"` - Name string `json:"name"` - ParentOrgId *openapi_types.UUID `json:"parentOrgId"` - PkiProductEnabled *bool `json:"pkiProductEnabled"` - PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt"` - PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername"` - RootOrgId *openapi_types.UUID `json:"rootOrgId"` - ScannerProductEnabled *bool `json:"scannerProductEnabled"` - ScimEnabled *bool `json:"scimEnabled"` - SecretShareBrandConfig interface{} `json:"secretShareBrandConfig"` - SecretsProductEnabled *bool `json:"secretsProductEnabled"` - SelectedMfaMethod *string `json:"selectedMfaMethod"` - ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled"` - ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"` - Slug string `json:"slug"` - SshProductEnabled *bool `json:"sshProductEnabled"` - UpdatedAt time.Time `json:"updatedAt"` - UserTokenExpiration *string `json:"userTokenExpiration"` - } `json:"organization"` - Token string `json:"token"` - User struct { - AuthMethods *[]string `json:"authMethods"` - ConsecutiveFailedMfaAttempts *float32 `json:"consecutiveFailedMfaAttempts"` - ConsecutiveFailedPasswordAttempts *float32 `json:"consecutiveFailedPasswordAttempts"` - CreatedAt time.Time `json:"createdAt"` - Devices interface{} `json:"devices"` - Email *string `json:"email"` - FirstName *string `json:"firstName"` - Id openapi_types.UUID `json:"id"` - IsAccepted *bool `json:"isAccepted"` - IsEmailVerified *bool `json:"isEmailVerified"` - IsGhost *bool `json:"isGhost,omitempty"` - IsLocked *bool `json:"isLocked"` - IsMfaEnabled *bool `json:"isMfaEnabled"` - LastName *string `json:"lastName"` - MfaMethods *[]string `json:"mfaMethods"` - SelectedMfaMethod *string `json:"selectedMfaMethod"` - SuperAdmin *bool `json:"superAdmin"` - TemporaryLockDateEnd *time.Time `json:"temporaryLockDateEnd"` - UpdatedAt time.Time `json:"updatedAt"` - Username string `json:"username"` - } `json:"user"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp500StatusCode `json:"statusCode"` - } -} -type AdminSignUp400StatusCode float32 -type AdminSignUp401StatusCode float32 -type AdminSignUp403StatusCode float32 -type AdminSignUp404StatusCode float32 -type AdminSignUp422StatusCode float32 -type AdminSignUp500StatusCode float32 + } -// Status returns HTTPResponse.Status -func (r AdminSignUpResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + if params.SecretPath != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secretPath", runtime.ParamLocationQuery, *params.SecretPath); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ViewSecretValue != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "viewSecretValue", runtime.ParamLocationQuery, *params.ViewSecretValue); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ExpandSecretReferences != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "expandSecretReferences", runtime.ParamLocationQuery, *params.ExpandSecretReferences); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Recursive != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "recursive", runtime.ParamLocationQuery, *params.Recursive); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludePersonalOverrides != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includePersonalOverrides", runtime.ParamLocationQuery, *params.IncludePersonalOverrides); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeImports != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeImports", runtime.ParamLocationQuery, *params.IncludeImports); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.TagSlugs != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tagSlugs", runtime.ParamLocationQuery, *params.TagSlugs); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - return http.StatusText(0) + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r AdminSignUpResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewDeleteSecretV4Request calls the generic DeleteSecretV4 builder with application/json body +func NewDeleteSecretV4Request(server string, secretName string, body DeleteSecretV4JSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return 0 + bodyReader = bytes.NewReader(buf) + return NewDeleteSecretV4RequestWithBody(server, secretName, "application/json", bodyReader) } -type RefreshAuthTokenResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - OrganizationId *string `json:"organizationId,omitempty"` - SubOrganizationId *string `json:"subOrganizationId,omitempty"` - Token string `json:"token"` +// NewDeleteSecretV4RequestWithBody generates requests for DeleteSecretV4 with any type of body +func NewDeleteSecretV4RequestWithBody(server string, secretName string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "secretName", runtime.ParamLocationPath, secretName) + if err != nil { + return nil, err } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken400StatusCode `json:"statusCode"` + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken401StatusCode `json:"statusCode"` + + operationPath := fmt.Sprintf("/api/v4/secrets/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken403StatusCode `json:"statusCode"` + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken404StatusCode `json:"statusCode"` + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken422StatusCode `json:"statusCode"` + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetSecretByNameV4Request generates requests for GetSecretByNameV4 +func NewGetSecretByNameV4Request(server string, secretName string, params *GetSecretByNameV4Params) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "secretName", runtime.ParamLocationPath, secretName) + if err != nil { + return nil, err } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken500StatusCode `json:"statusCode"` + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } -} -type RefreshAuthToken400StatusCode float32 -type RefreshAuthToken401StatusCode float32 -type RefreshAuthToken403StatusCode float32 -type RefreshAuthToken404StatusCode float32 -type RefreshAuthToken422StatusCode float32 -type RefreshAuthToken500StatusCode float32 -// Status returns HTTPResponse.Status -func (r RefreshAuthTokenResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + operationPath := fmt.Sprintf("/api/v4/secrets/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r RefreshAuthTokenResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return 0 -} -type AttachTokenAuthResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - IdentityTokenAuth struct { - AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` - AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` - AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` - AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` - AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Id openapi_types.UUID `json:"id"` - IdentityId openapi_types.UUID `json:"identityId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"identityTokenAuth"` + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectId", runtime.ParamLocationQuery, params.ProjectId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.Environment != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, *params.Environment); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SecretPath != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secretPath", runtime.ParamLocationQuery, *params.SecretPath); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Version != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, *params.Version); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Type != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ViewSecretValue != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "viewSecretValue", runtime.ParamLocationQuery, *params.ViewSecretValue); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ExpandSecretReferences != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "expandSecretReferences", runtime.ParamLocationQuery, *params.ExpandSecretReferences); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeImports != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeImports", runtime.ParamLocationQuery, *params.IncludeImports); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth400StatusCode `json:"statusCode"` + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth401StatusCode `json:"statusCode"` + + return req, nil +} + +// NewUpdateSecretV4Request calls the generic UpdateSecretV4 builder with application/json body +func NewUpdateSecretV4Request(server string, secretName string, body UpdateSecretV4JSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth403StatusCode `json:"statusCode"` + bodyReader = bytes.NewReader(buf) + return NewUpdateSecretV4RequestWithBody(server, secretName, "application/json", bodyReader) +} + +// NewUpdateSecretV4RequestWithBody generates requests for UpdateSecretV4 with any type of body +func NewUpdateSecretV4RequestWithBody(server string, secretName string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "secretName", runtime.ParamLocationPath, secretName) + if err != nil { + return nil, err } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth404StatusCode `json:"statusCode"` + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth422StatusCode `json:"statusCode"` + + operationPath := fmt.Sprintf("/api/v4/secrets/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth500StatusCode `json:"statusCode"` + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } -} -type AttachTokenAuth400StatusCode float32 -type AttachTokenAuth401StatusCode float32 -type AttachTokenAuth403StatusCode float32 -type AttachTokenAuth404StatusCode float32 -type AttachTokenAuth422StatusCode float32 -type AttachTokenAuth500StatusCode float32 -// Status returns HTTPResponse.Status -func (r AttachTokenAuthResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err } - return http.StatusText(0) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r AttachTokenAuthResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewCreateSecretV4Request calls the generic CreateSecretV4 builder with application/json body +func NewCreateSecretV4Request(server string, secretName string, body CreateSecretV4JSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return 0 + bodyReader = bytes.NewReader(buf) + return NewCreateSecretV4RequestWithBody(server, secretName, "application/json", bodyReader) } -type CreateTokenAuthTokenResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - AccessToken string `json:"accessToken"` - AccessTokenMaxTTL float32 `json:"accessTokenMaxTTL"` - ExpiresIn float32 `json:"expiresIn"` - TokenData struct { - AccessTokenLastRenewedAt *time.Time `json:"accessTokenLastRenewedAt"` - AccessTokenLastUsedAt *time.Time `json:"accessTokenLastUsedAt"` - AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` - AccessTokenNumUses *float32 `json:"accessTokenNumUses,omitempty"` - AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` - AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` - AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` - AuthMethod string `json:"authMethod"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IdentityId openapi_types.UUID `json:"identityId"` - IdentityUAClientSecretId *string `json:"identityUAClientSecretId"` - IsAccessTokenRevoked *bool `json:"isAccessTokenRevoked,omitempty"` - Name *string `json:"name"` - SubOrganizationId *openapi_types.UUID `json:"subOrganizationId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"tokenData"` - TokenType CreateTokenAuthToken200TokenType `json:"tokenType"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken404StatusCode `json:"statusCode"` +// NewCreateSecretV4RequestWithBody generates requests for CreateSecretV4 with any type of body +func NewCreateSecretV4RequestWithBody(server string, secretName string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "secretName", runtime.ParamLocationPath, secretName) + if err != nil { + return nil, err } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken422StatusCode `json:"statusCode"` + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken500StatusCode `json:"statusCode"` + + operationPath := fmt.Sprintf("/api/v4/secrets/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } -} -type CreateTokenAuthToken200TokenType string -type CreateTokenAuthToken400StatusCode float32 -type CreateTokenAuthToken401StatusCode float32 -type CreateTokenAuthToken403StatusCode float32 -type CreateTokenAuthToken404StatusCode float32 -type CreateTokenAuthToken422StatusCode float32 -type CreateTokenAuthToken500StatusCode float32 -// Status returns HTTPResponse.Status -func (r CreateTokenAuthTokenResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r CreateTokenAuthTokenResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err } - return 0 + + req.Header.Add("Content-Type", contentType) + + return req, nil } -type CreateMachineIdentityResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Identity struct { - AuthMethod *string `json:"authMethod"` - AuthMethods []string `json:"authMethods"` - CreatedAt time.Time `json:"createdAt"` - HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"` - Id openapi_types.UUID `json:"id"` - Metadata []struct { - Id string `json:"id"` - Key string `json:"key"` - Value string `json:"value"` - } `json:"metadata"` - Name string `json:"name"` - OrgId openapi_types.UUID `json:"orgId"` - ProjectId *string `json:"projectId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"identity"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity422StatusCode `json:"statusCode"` +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity500StatusCode `json:"statusCode"` + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } } + return nil } -type CreateMachineIdentity400StatusCode float32 -type CreateMachineIdentity401StatusCode float32 -type CreateMachineIdentity403StatusCode float32 -type CreateMachineIdentity404StatusCode float32 -type CreateMachineIdentity422StatusCode float32 -type CreateMachineIdentity500StatusCode float32 -// Status returns HTTPResponse.Status -func (r CreateMachineIdentityResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface } -// StatusCode returns HTTPResponse.StatusCode -func (r CreateMachineIdentityResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err } - return 0 + return &ClientWithResponses{client}, nil } -type CreateKubernetesPamResourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Resource struct { - ConnectionDetails struct { - SslCertificate *string `json:"sslCertificate,omitempty"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - Url string `json:"url"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateKubernetesPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *CreateKubernetesPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource500StatusCode `json:"statusCode"` +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil } } -type CreateKubernetesPamResource200ResourceResourceType string -type CreateKubernetesPamResource200ResourceRotationAccountCredentials0 struct { - AuthMethod CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod `json:"authMethod"` -} -type CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod string -type CreateKubernetesPamResource_200_Resource_RotationAccountCredentials struct { - union json.RawMessage -} -type CreateKubernetesPamResource400StatusCode float32 -type CreateKubernetesPamResource401StatusCode float32 -type CreateKubernetesPamResource403StatusCode float32 -type CreateKubernetesPamResource404StatusCode float32 -type CreateKubernetesPamResource422StatusCode float32 -type CreateKubernetesPamResource500StatusCode float32 -// Status returns HTTPResponse.Status -func (r CreateKubernetesPamResourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // AdminSignUpWithBodyWithResponse request with any body + AdminSignUpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminSignUpResponse, error) -// StatusCode returns HTTPResponse.StatusCode -func (r CreateKubernetesPamResourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 + AdminSignUpWithResponse(ctx context.Context, body AdminSignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminSignUpResponse, error) + + // CreateCloudflareAppConnectionWithBodyWithResponse request with any body + CreateCloudflareAppConnectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCloudflareAppConnectionResponse, error) + + CreateCloudflareAppConnectionWithResponse(ctx context.Context, body CreateCloudflareAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCloudflareAppConnectionResponse, error) + + // RefreshAuthTokenWithResponse request + RefreshAuthTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAuthTokenResponse, error) + + // AttachTokenAuthWithBodyWithResponse request with any body + AttachTokenAuthWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachTokenAuthResponse, error) + + AttachTokenAuthWithResponse(ctx context.Context, identityId string, body AttachTokenAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachTokenAuthResponse, error) + + // CreateTokenAuthTokenWithBodyWithResponse request with any body + CreateTokenAuthTokenWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTokenAuthTokenResponse, error) + + CreateTokenAuthTokenWithResponse(ctx context.Context, identityId string, body CreateTokenAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTokenAuthTokenResponse, error) + + // AttachUniversalAuthWithBodyWithResponse request with any body + AttachUniversalAuthWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachUniversalAuthResponse, error) + + AttachUniversalAuthWithResponse(ctx context.Context, identityId string, body AttachUniversalAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachUniversalAuthResponse, error) + + // CreateUniversalAuthClientSecretWithBodyWithResponse request with any body + CreateUniversalAuthClientSecretWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUniversalAuthClientSecretResponse, error) + + CreateUniversalAuthClientSecretWithResponse(ctx context.Context, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUniversalAuthClientSecretResponse, error) + + // CreateAcmeCertificateAuthorityV1WithBodyWithResponse request with any body + CreateAcmeCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAcmeCertificateAuthorityV1Response, error) + + CreateAcmeCertificateAuthorityV1WithResponse(ctx context.Context, body CreateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAcmeCertificateAuthorityV1Response, error) + + // UpdateAcmeCertificateAuthorityV1WithBodyWithResponse request with any body + UpdateAcmeCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAcmeCertificateAuthorityV1Response, error) + + UpdateAcmeCertificateAuthorityV1WithResponse(ctx context.Context, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAcmeCertificateAuthorityV1Response, error) + + // CreateInternalCertificateAuthorityV1WithBodyWithResponse request with any body + CreateInternalCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInternalCertificateAuthorityV1Response, error) + + CreateInternalCertificateAuthorityV1WithResponse(ctx context.Context, body CreateInternalCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInternalCertificateAuthorityV1Response, error) + + // CreateCertificatePolicyWithBodyWithResponse request with any body + CreateCertificatePolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCertificatePolicyResponse, error) + + CreateCertificatePolicyWithResponse(ctx context.Context, body CreateCertificatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCertificatePolicyResponse, error) + + // CreateCertificateProfileWithBodyWithResponse request with any body + CreateCertificateProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCertificateProfileResponse, error) + + CreateCertificateProfileWithResponse(ctx context.Context, body CreateCertificateProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCertificateProfileResponse, error) + + // CreateMachineIdentityWithBodyWithResponse request with any body + CreateMachineIdentityWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) + + CreateMachineIdentityWithResponse(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) + + // CreatePostgresPamAccountWithBodyWithResponse request with any body + CreatePostgresPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) + + CreatePostgresPamAccountWithResponse(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) + + // CreateKubernetesPamResourceWithBodyWithResponse request with any body + CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) + + CreateKubernetesPamResourceWithResponse(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) + + // CreatePostgresPamResourceWithBodyWithResponse request with any body + CreatePostgresPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) + + CreatePostgresPamResourceWithResponse(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) + + // CreateRedisPamResourceWithBodyWithResponse request with any body + CreateRedisPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) + + CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) + + // CreateProjectWithBodyWithResponse request with any body + CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) + + CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) + + // GetRelaysWithResponse request + GetRelaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRelaysResponse, error) + + // ListGatewaysWithResponse request + ListGatewaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListGatewaysResponse, error) + + // SelectOrganizationV3WithBodyWithResponse request with any body + SelectOrganizationV3WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) + + SelectOrganizationV3WithResponse(ctx context.Context, body SelectOrganizationV3JSONRequestBody, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) + + // ListSecretsV4WithResponse request + ListSecretsV4WithResponse(ctx context.Context, params *ListSecretsV4Params, reqEditors ...RequestEditorFn) (*ListSecretsV4Response, error) + + // DeleteSecretV4WithBodyWithResponse request with any body + DeleteSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) + + DeleteSecretV4WithResponse(ctx context.Context, secretName string, body DeleteSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) + + // GetSecretByNameV4WithResponse request + GetSecretByNameV4WithResponse(ctx context.Context, secretName string, params *GetSecretByNameV4Params, reqEditors ...RequestEditorFn) (*GetSecretByNameV4Response, error) + + // UpdateSecretV4WithBodyWithResponse request with any body + UpdateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) + + UpdateSecretV4WithResponse(ctx context.Context, secretName string, body UpdateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) + + // CreateSecretV4WithBodyWithResponse request with any body + CreateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) + + CreateSecretV4WithResponse(ctx context.Context, secretName string, body CreateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) } -type CreateRedisPamResourceResponse struct { +type AdminSignUpResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Resource struct { - ConnectionDetails struct { - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateRedisPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *struct { - Username *string `json:"username,omitempty"` - } `json:"rotationAccountCredentials"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` + Message string `json:"message"` + New string `json:"new"` + Organization struct { + AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization"` + AuthEnforced *bool `json:"authEnforced"` + BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"` + BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"` + CreatedAt time.Time `json:"createdAt"` + CustomerId *string `json:"customerId"` + DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"` + EnforceMfa *bool `json:"enforceMfa,omitempty"` + GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"` + GoogleSsoAuthLastUsed *time.Time `json:"googleSsoAuthLastUsed"` + Id openapi_types.UUID `json:"id"` + KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId"` + KmsEncryptedDataKey interface{} `json:"kmsEncryptedDataKey"` + KmsProductEnabled *bool `json:"kmsProductEnabled"` + MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime"` + MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit"` + Name string `json:"name"` + ParentOrgId *openapi_types.UUID `json:"parentOrgId"` + PkiProductEnabled *bool `json:"pkiProductEnabled"` + PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt"` + PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername"` + RootOrgId *openapi_types.UUID `json:"rootOrgId"` + ScannerProductEnabled *bool `json:"scannerProductEnabled"` + ScimEnabled *bool `json:"scimEnabled"` + SecretShareBrandConfig interface{} `json:"secretShareBrandConfig"` + SecretsProductEnabled *bool `json:"secretsProductEnabled"` + SelectedMfaMethod *string `json:"selectedMfaMethod"` + ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled"` + ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"` + Slug string `json:"slug"` + SshProductEnabled *bool `json:"sshProductEnabled"` + UpdatedAt time.Time `json:"updatedAt"` + UserTokenExpiration *string `json:"userTokenExpiration"` + } `json:"organization"` + Token string `json:"token"` + User struct { + AuthMethods *[]string `json:"authMethods"` + ConsecutiveFailedMfaAttempts *float32 `json:"consecutiveFailedMfaAttempts"` + ConsecutiveFailedPasswordAttempts *float32 `json:"consecutiveFailedPasswordAttempts"` + CreatedAt time.Time `json:"createdAt"` + Devices interface{} `json:"devices"` + Email *string `json:"email"` + FirstName *string `json:"firstName"` + Id openapi_types.UUID `json:"id"` + IsAccepted *bool `json:"isAccepted"` + IsEmailVerified *bool `json:"isEmailVerified"` + IsGhost *bool `json:"isGhost,omitempty"` + IsLocked *bool `json:"isLocked"` + IsMfaEnabled *bool `json:"isMfaEnabled"` + LastName *string `json:"lastName"` + MfaMethods *[]string `json:"mfaMethods"` + SelectedMfaMethod *string `json:"selectedMfaMethod"` + SuperAdmin *bool `json:"superAdmin"` + TemporaryLockDateEnd *time.Time `json:"temporaryLockDateEnd"` + UpdatedAt time.Time `json:"updatedAt"` + Username string `json:"username"` + } `json:"user"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp500StatusCode `json:"statusCode"` } } -type CreateRedisPamResource200ResourceResourceType string -type CreateRedisPamResource400StatusCode float32 -type CreateRedisPamResource401StatusCode float32 -type CreateRedisPamResource403StatusCode float32 -type CreateRedisPamResource404StatusCode float32 -type CreateRedisPamResource422StatusCode float32 -type CreateRedisPamResource500StatusCode float32 +type AdminSignUp400StatusCode float32 +type AdminSignUp401StatusCode float32 +type AdminSignUp403StatusCode float32 +type AdminSignUp404StatusCode float32 +type AdminSignUp422StatusCode float32 +type AdminSignUp500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateRedisPamResourceResponse) Status() string { +func (r AdminSignUpResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2557,93 +3505,96 @@ func (r CreateRedisPamResourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateRedisPamResourceResponse) StatusCode() int { +func (r AdminSignUpResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateProjectResponse struct { +type CreateCloudflareAppConnectionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Project struct { - UnderscoreId string `json:"_id"` - AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` - AutoCapitalization *bool `json:"autoCapitalization"` - CreatedAt time.Time `json:"createdAt"` - DefaultProduct *string `json:"defaultProduct"` - Description *string `json:"description"` - Environments []struct { - Id string `json:"id"` - Name string `json:"name"` - Slug string `json:"slug"` - } `json:"environments"` - HasDeleteProtection *bool `json:"hasDeleteProtection"` - Id string `json:"id"` - KmsCertificateKeyId *openapi_types.UUID `json:"kmsCertificateKeyId"` - Name string `json:"name"` - OrgId openapi_types.UUID `json:"orgId"` - PitVersionLimit *float32 `json:"pitVersionLimit,omitempty"` - SecretDetectionIgnoreValues *[]string `json:"secretDetectionIgnoreValues"` - SecretSharing *bool `json:"secretSharing,omitempty"` - ShowSnapshotsLegacy *bool `json:"showSnapshotsLegacy,omitempty"` - Slug string `json:"slug"` - Type string `json:"type"` - UpdatedAt time.Time `json:"updatedAt"` - UpgradeStatus *string `json:"upgradeStatus"` - Version *float32 `json:"version,omitempty"` - } `json:"project"` + AppConnection CreateCloudflareAppConnection_200_AppConnection `json:"appConnection"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateProject400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateProject401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateProject403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateProject404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateProject422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateProject500StatusCode `json:"statusCode"` - } + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection500StatusCode `json:"statusCode"` + } +} +type CreateCloudflareAppConnection200AppConnection0 struct { + App CreateCloudflareAppConnection200AppConnection0App `json:"app"` + CreatedAt time.Time `json:"createdAt"` + Credentials struct { + AccountId string `json:"accountId"` + } `json:"credentials"` + CredentialsHash *string `json:"credentialsHash,omitempty"` + Description *string `json:"description"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + IsPlatformManagedCredentials *bool `json:"isPlatformManagedCredentials"` + Method CreateCloudflareAppConnection200AppConnection0Method `json:"method"` + Name string `json:"name"` + OrgId openapi_types.UUID `json:"orgId"` + Project *struct { + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + Type string `json:"type"` + } `json:"project"` + ProjectId *string `json:"projectId"` + UpdatedAt time.Time `json:"updatedAt"` + Version *float32 `json:"version,omitempty"` +} +type CreateCloudflareAppConnection200AppConnection0App string +type CreateCloudflareAppConnection200AppConnection0Method string +type CreateCloudflareAppConnection_200_AppConnection struct { + union json.RawMessage } -type CreateProject400StatusCode float32 -type CreateProject401StatusCode float32 -type CreateProject403StatusCode float32 -type CreateProject404StatusCode float32 -type CreateProject422StatusCode float32 -type CreateProject500StatusCode float32 +type CreateCloudflareAppConnection400StatusCode float32 +type CreateCloudflareAppConnection401StatusCode float32 +type CreateCloudflareAppConnection403StatusCode float32 +type CreateCloudflareAppConnection404StatusCode float32 +type CreateCloudflareAppConnection422StatusCode float32 +type CreateCloudflareAppConnection500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateProjectResponse) Status() string { +func (r CreateCloudflareAppConnectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2651,75 +3602,69 @@ func (r CreateProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateProjectResponse) StatusCode() int { +func (r CreateCloudflareAppConnectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetRelaysResponse struct { +type RefreshAuthTokenResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]struct { - CreatedAt time.Time `json:"createdAt"` - HealthAlertedAt *time.Time `json:"healthAlertedAt"` - Heartbeat *time.Time `json:"heartbeat"` - Host string `json:"host"` - Id openapi_types.UUID `json:"id"` - IdentityId *openapi_types.UUID `json:"identityId"` - Name string `json:"name"` - OrgId *openapi_types.UUID `json:"orgId"` - UpdatedAt time.Time `json:"updatedAt"` + JSON200 *struct { + OrganizationId *string `json:"organizationId,omitempty"` + SubOrganizationId *string `json:"subOrganizationId,omitempty"` + Token string `json:"token"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode GetRelays422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken500StatusCode `json:"statusCode"` } } -type GetRelays400StatusCode float32 -type GetRelays401StatusCode float32 -type GetRelays403StatusCode float32 -type GetRelays404StatusCode float32 -type GetRelays422StatusCode float32 -type GetRelays500StatusCode float32 +type RefreshAuthToken400StatusCode float32 +type RefreshAuthToken401StatusCode float32 +type RefreshAuthToken403StatusCode float32 +type RefreshAuthToken404StatusCode float32 +type RefreshAuthToken422StatusCode float32 +type RefreshAuthToken500StatusCode float32 // Status returns HTTPResponse.Status -func (r GetRelaysResponse) Status() string { +func (r RefreshAuthTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2727,76 +3672,77 @@ func (r GetRelaysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetRelaysResponse) StatusCode() int { +func (r RefreshAuthTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListGatewaysResponse struct { +type AttachTokenAuthResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]struct { - CreatedAt time.Time `json:"createdAt"` - Heartbeat *time.Time `json:"heartbeat"` - Id openapi_types.UUID `json:"id"` - Identity struct { - Id string `json:"id"` - Name string `json:"name"` - } `json:"identity"` - IdentityId openapi_types.UUID `json:"identityId"` - Name string `json:"name"` - UpdatedAt time.Time `json:"updatedAt"` + JSON200 *struct { + IdentityTokenAuth struct { + AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` + AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` + AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` + AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` + AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Id openapi_types.UUID `json:"id"` + IdentityId openapi_types.UUID `json:"identityId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"identityTokenAuth"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode ListGateways422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth500StatusCode `json:"statusCode"` } } -type ListGateways400StatusCode float32 -type ListGateways401StatusCode float32 -type ListGateways403StatusCode float32 -type ListGateways404StatusCode float32 -type ListGateways422StatusCode float32 -type ListGateways500StatusCode float32 +type AttachTokenAuth400StatusCode float32 +type AttachTokenAuth401StatusCode float32 +type AttachTokenAuth403StatusCode float32 +type AttachTokenAuth404StatusCode float32 +type AttachTokenAuth422StatusCode float32 +type AttachTokenAuth500StatusCode float32 // Status returns HTTPResponse.Status -func (r ListGatewaysResponse) Status() string { +func (r AttachTokenAuthResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2804,69 +3750,89 @@ func (r ListGatewaysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListGatewaysResponse) StatusCode() int { +func (r AttachTokenAuthResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SelectOrganizationV3Response struct { +type CreateTokenAuthTokenResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - IsMfaEnabled bool `json:"isMfaEnabled"` - MfaMethod *string `json:"mfaMethod,omitempty"` - Token string `json:"token"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3403StatusCode `json:"statusCode"` - } + AccessToken string `json:"accessToken"` + AccessTokenMaxTTL float32 `json:"accessTokenMaxTTL"` + ExpiresIn float32 `json:"expiresIn"` + TokenData struct { + AccessTokenLastRenewedAt *time.Time `json:"accessTokenLastRenewedAt"` + AccessTokenLastUsedAt *time.Time `json:"accessTokenLastUsedAt"` + AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` + AccessTokenNumUses *float32 `json:"accessTokenNumUses,omitempty"` + AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` + AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` + AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` + AuthMethod string `json:"authMethod"` + CreatedAt time.Time `json:"createdAt"` + Id string `json:"id"` + IdentityId openapi_types.UUID `json:"identityId"` + IdentityUAClientSecretId *string `json:"identityUAClientSecretId"` + IsAccessTokenRevoked *bool `json:"isAccessTokenRevoked,omitempty"` + Name *string `json:"name"` + SubOrganizationId *openapi_types.UUID `json:"subOrganizationId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"tokenData"` + TokenType CreateTokenAuthToken200TokenType `json:"tokenType"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken403StatusCode `json:"statusCode"` + } JSON404 *struct { Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3404StatusCode `json:"statusCode"` + StatusCode CreateTokenAuthToken404StatusCode `json:"statusCode"` } JSON422 *struct { Error string `json:"error"` Message interface{} `json:"message,omitempty"` ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3422StatusCode `json:"statusCode"` + StatusCode CreateTokenAuthToken422StatusCode `json:"statusCode"` } JSON500 *struct { Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3500StatusCode `json:"statusCode"` + StatusCode CreateTokenAuthToken500StatusCode `json:"statusCode"` } } -type SelectOrganizationV3400StatusCode float32 -type SelectOrganizationV3401StatusCode float32 -type SelectOrganizationV3403StatusCode float32 -type SelectOrganizationV3404StatusCode float32 -type SelectOrganizationV3422StatusCode float32 -type SelectOrganizationV3500StatusCode float32 +type CreateTokenAuthToken200TokenType string +type CreateTokenAuthToken400StatusCode float32 +type CreateTokenAuthToken401StatusCode float32 +type CreateTokenAuthToken403StatusCode float32 +type CreateTokenAuthToken404StatusCode float32 +type CreateTokenAuthToken422StatusCode float32 +type CreateTokenAuthToken500StatusCode float32 // Status returns HTTPResponse.Status -func (r SelectOrganizationV3Response) Status() string { +func (r CreateTokenAuthTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2874,136 +3840,83 @@ func (r SelectOrganizationV3Response) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SelectOrganizationV3Response) StatusCode() int { +func (r CreateTokenAuthTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSecretsV4Response struct { +type AttachUniversalAuthResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Imports *[]struct { - Environment string `json:"environment"` - FolderId *string `json:"folderId,omitempty"` - SecretPath string `json:"secretPath"` - Secrets []struct { - UnderscoreId string `json:"_id"` - Actor *struct { - ActorId *string `json:"actorId"` - ActorType *string `json:"actorType"` - GroupId *string `json:"groupId"` - MembershipId *string `json:"membershipId"` - Name *string `json:"name"` - } `json:"actor"` - Environment string `json:"environment"` - Id string `json:"id"` - IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` - RotationId *openapi_types.UUID `json:"rotationId"` - SecretComment string `json:"secretComment"` - SecretKey string `json:"secretKey"` - SecretMetadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"secretMetadata,omitempty"` - SecretReminderNote *string `json:"secretReminderNote"` - SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` - SecretValue string `json:"secretValue"` - SecretValueHidden bool `json:"secretValueHidden"` - SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` - Type string `json:"type"` - Version float32 `json:"version"` - Workspace string `json:"workspace"` - } `json:"secrets"` - } `json:"imports,omitempty"` - Secrets []struct { - UnderscoreId string `json:"_id"` - Actor *struct { - ActorId *string `json:"actorId"` - ActorType *string `json:"actorType"` - GroupId *string `json:"groupId"` - MembershipId *string `json:"membershipId"` - Name *string `json:"name"` - } `json:"actor"` - CreatedAt time.Time `json:"createdAt"` - Environment string `json:"environment"` - Id string `json:"id"` - IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` - RotationId *openapi_types.UUID `json:"rotationId"` - SecretComment string `json:"secretComment"` - SecretKey string `json:"secretKey"` - SecretMetadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"secretMetadata,omitempty"` - SecretPath *string `json:"secretPath,omitempty"` - SecretReminderNote *string `json:"secretReminderNote"` - SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` - SecretValue string `json:"secretValue"` - SecretValueHidden bool `json:"secretValueHidden"` - SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` - Tags *[]struct { - Color *string `json:"color"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - Slug string `json:"slug"` - } `json:"tags,omitempty"` - Type string `json:"type"` - UpdatedAt time.Time `json:"updatedAt"` - Version float32 `json:"version"` - Workspace string `json:"workspace"` - } `json:"secrets"` + IdentityUniversalAuth struct { + AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` + AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` + AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` + AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` + AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` + ClientId string `json:"clientId"` + ClientSecretTrustedIps interface{} `json:"clientSecretTrustedIps,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Id openapi_types.UUID `json:"id"` + IdentityId openapi_types.UUID `json:"identityId"` + LockoutCounterResetSeconds *float32 `json:"lockoutCounterResetSeconds,omitempty"` + LockoutDurationSeconds *float32 `json:"lockoutDurationSeconds,omitempty"` + LockoutEnabled *bool `json:"lockoutEnabled,omitempty"` + LockoutThreshold *float32 `json:"lockoutThreshold,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"identityUniversalAuth"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth500StatusCode `json:"statusCode"` } } -type ListSecretsV4400StatusCode float32 -type ListSecretsV4401StatusCode float32 -type ListSecretsV4403StatusCode float32 -type ListSecretsV4404StatusCode float32 -type ListSecretsV4422StatusCode float32 -type ListSecretsV4500StatusCode float32 +type AttachUniversalAuth400StatusCode float32 +type AttachUniversalAuth401StatusCode float32 +type AttachUniversalAuth403StatusCode float32 +type AttachUniversalAuth404StatusCode float32 +type AttachUniversalAuth422StatusCode float32 +type AttachUniversalAuth500StatusCode float32 // Status returns HTTPResponse.Status -func (r ListSecretsV4Response) Status() string { +func (r AttachUniversalAuthResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3011,112 +3924,79 @@ func (r ListSecretsV4Response) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSecretsV4Response) StatusCode() int { +func (r AttachUniversalAuthResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteSecretV4Response struct { +type CreateUniversalAuthClientSecretResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - union json.RawMessage + ClientSecret string `json:"clientSecret"` + ClientSecretData struct { + ClientSecretNumUses *float32 `json:"clientSecretNumUses,omitempty"` + ClientSecretNumUsesLimit *float32 `json:"clientSecretNumUsesLimit,omitempty"` + ClientSecretPrefix string `json:"clientSecretPrefix"` + ClientSecretTTL *float32 `json:"clientSecretTTL,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Description string `json:"description"` + Id string `json:"id"` + IdentityUAId openapi_types.UUID `json:"identityUAId"` + IsClientSecretRevoked *bool `json:"isClientSecretRevoked,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"clientSecretData"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret500StatusCode `json:"statusCode"` } } -type DeleteSecretV42000 struct { - Secret struct { - UnderscoreId string `json:"_id"` - Actor *struct { - ActorId *string `json:"actorId"` - ActorType *string `json:"actorType"` - GroupId *string `json:"groupId"` - MembershipId *string `json:"membershipId"` - Name *string `json:"name"` - } `json:"actor"` - CreatedAt time.Time `json:"createdAt"` - Environment string `json:"environment"` - Id string `json:"id"` - IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` - RotationId *openapi_types.UUID `json:"rotationId"` - SecretComment string `json:"secretComment"` - SecretKey string `json:"secretKey"` - SecretReminderNote *string `json:"secretReminderNote"` - SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` - SecretValue string `json:"secretValue"` - SecretValueHidden bool `json:"secretValueHidden"` - SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` - Type string `json:"type"` - UpdatedAt time.Time `json:"updatedAt"` - Version float32 `json:"version"` - Workspace string `json:"workspace"` - } `json:"secret"` -} -type DeleteSecretV42001 struct { - Approval struct { - BypassReason *string `json:"bypassReason"` - CommitterUserId *openapi_types.UUID `json:"committerUserId"` - Conflicts interface{} `json:"conflicts"` - CreatedAt time.Time `json:"createdAt"` - FolderId openapi_types.UUID `json:"folderId"` - HasMerged *bool `json:"hasMerged,omitempty"` - Id openapi_types.UUID `json:"id"` - IsReplicated *bool `json:"isReplicated"` - PolicyId openapi_types.UUID `json:"policyId"` - Slug string `json:"slug"` - Status *string `json:"status,omitempty"` - StatusChangedByUserId *openapi_types.UUID `json:"statusChangedByUserId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"approval"` -} -type DeleteSecretV4400StatusCode float32 -type DeleteSecretV4401StatusCode float32 -type DeleteSecretV4403StatusCode float32 -type DeleteSecretV4404StatusCode float32 -type DeleteSecretV4422StatusCode float32 -type DeleteSecretV4500StatusCode float32 +type CreateUniversalAuthClientSecret400StatusCode float32 +type CreateUniversalAuthClientSecret401StatusCode float32 +type CreateUniversalAuthClientSecret403StatusCode float32 +type CreateUniversalAuthClientSecret404StatusCode float32 +type CreateUniversalAuthClientSecret422StatusCode float32 +type CreateUniversalAuthClientSecret500StatusCode float32 // Status returns HTTPResponse.Status -func (r DeleteSecretV4Response) Status() string { +func (r CreateUniversalAuthClientSecretResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3124,103 +4004,197 @@ func (r DeleteSecretV4Response) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSecretV4Response) StatusCode() int { +func (r CreateUniversalAuthClientSecretResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSecretByNameV4Response struct { +type CreateAcmeCertificateAuthorityV1Response struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Secret struct { - UnderscoreId string `json:"_id"` - Actor *struct { - ActorId *string `json:"actorId"` - ActorType *string `json:"actorType"` - GroupId *string `json:"groupId"` - MembershipId *string `json:"membershipId"` - Name *string `json:"name"` - } `json:"actor"` - CreatedAt time.Time `json:"createdAt"` - Environment string `json:"environment"` - Id string `json:"id"` - IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` - RotationId *openapi_types.UUID `json:"rotationId"` - SecretComment string `json:"secretComment"` - SecretKey string `json:"secretKey"` - SecretMetadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"secretMetadata,omitempty"` - SecretPath string `json:"secretPath"` - SecretReminderNote *string `json:"secretReminderNote"` - SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` - SecretValue string `json:"secretValue"` - SecretValueHidden bool `json:"secretValueHidden"` - SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` - Tags *[]struct { - Color *string `json:"color"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - Slug string `json:"slug"` - } `json:"tags,omitempty"` - Type string `json:"type"` - UpdatedAt time.Time `json:"updatedAt"` - Version float32 `json:"version"` - Workspace string `json:"workspace"` - } `json:"secret"` + Configuration struct { + // AccountEmail The email address for the ACME Certificate Authority. + AccountEmail string `json:"accountEmail"` + + // DirectoryUrl The directory URL for the ACME Certificate Authority. + DirectoryUrl string `json:"directoryUrl"` + + // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. + DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` + DnsProviderConfig struct { + // HostedZoneId The hosted zone ID for the ACME Certificate Authority. + HostedZoneId string `json:"hostedZoneId"` + + // Provider The DNS provider for the ACME Certificate Authority. + Provider CreateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider `json:"provider"` + } `json:"dnsProviderConfig"` + + // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabHmacKey *string `json:"eabHmacKey,omitempty"` + + // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabKid *string `json:"eabKid,omitempty"` + } `json:"configuration"` + EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + Status CreateAcmeCertificateAuthorityV1200Status `json:"status"` + Type CreateAcmeCertificateAuthorityV1200Type `json:"type"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1500StatusCode `json:"statusCode"` + } +} +type CreateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider string +type CreateAcmeCertificateAuthorityV1200Status string +type CreateAcmeCertificateAuthorityV1200Type string +type CreateAcmeCertificateAuthorityV1400StatusCode float32 +type CreateAcmeCertificateAuthorityV1401StatusCode float32 +type CreateAcmeCertificateAuthorityV1403StatusCode float32 +type CreateAcmeCertificateAuthorityV1404StatusCode float32 +type CreateAcmeCertificateAuthorityV1422StatusCode float32 +type CreateAcmeCertificateAuthorityV1500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateAcmeCertificateAuthorityV1Response) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) } -type GetSecretByNameV4400StatusCode float32 -type GetSecretByNameV4401StatusCode float32 -type GetSecretByNameV4403StatusCode float32 -type GetSecretByNameV4404StatusCode float32 -type GetSecretByNameV4422StatusCode float32 -type GetSecretByNameV4500StatusCode float32 + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAcmeCertificateAuthorityV1Response) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateAcmeCertificateAuthorityV1Response struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Configuration struct { + // AccountEmail The email address for the ACME Certificate Authority. + AccountEmail string `json:"accountEmail"` + + // DirectoryUrl The directory URL for the ACME Certificate Authority. + DirectoryUrl string `json:"directoryUrl"` + + // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. + DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` + DnsProviderConfig struct { + // HostedZoneId The hosted zone ID for the ACME Certificate Authority. + HostedZoneId string `json:"hostedZoneId"` + + // Provider The DNS provider for the ACME Certificate Authority. + Provider UpdateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider `json:"provider"` + } `json:"dnsProviderConfig"` + + // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabHmacKey *string `json:"eabHmacKey,omitempty"` + + // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabKid *string `json:"eabKid,omitempty"` + } `json:"configuration"` + EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + Status UpdateAcmeCertificateAuthorityV1200Status `json:"status"` + Type UpdateAcmeCertificateAuthorityV1200Type `json:"type"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1500StatusCode `json:"statusCode"` + } +} +type UpdateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider string +type UpdateAcmeCertificateAuthorityV1200Status string +type UpdateAcmeCertificateAuthorityV1200Type string +type UpdateAcmeCertificateAuthorityV1400StatusCode float32 +type UpdateAcmeCertificateAuthorityV1401StatusCode float32 +type UpdateAcmeCertificateAuthorityV1403StatusCode float32 +type UpdateAcmeCertificateAuthorityV1404StatusCode float32 +type UpdateAcmeCertificateAuthorityV1422StatusCode float32 +type UpdateAcmeCertificateAuthorityV1500StatusCode float32 // Status returns HTTPResponse.Status -func (r GetSecretByNameV4Response) Status() string { +func (r UpdateAcmeCertificateAuthorityV1Response) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3228,112 +4202,235 @@ func (r GetSecretByNameV4Response) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSecretByNameV4Response) StatusCode() int { +func (r UpdateAcmeCertificateAuthorityV1Response) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSecretV4Response struct { +type CreateInternalCertificateAuthorityV1Response struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - union json.RawMessage + Configuration struct { + ActiveCaCertId *openapi_types.UUID `json:"activeCaCertId"` + + // CommonName The common name (CN) for the CA. + CommonName *string `json:"commonName,omitempty"` + + // Country The country name (C) for the CA. + Country *string `json:"country,omitempty"` + Dn *string `json:"dn"` + + // FriendlyName A friendly name for the CA. + FriendlyName *string `json:"friendlyName,omitempty"` + + // KeyAlgorithm The type of public key algorithm and size, in bits, of the key pair for the CA; when you create an intermediate CA, you must use a key algorithm supported by the parent CA. + KeyAlgorithm CreateInternalCertificateAuthorityV1200ConfigurationKeyAlgorithm `json:"keyAlgorithm"` + + // Locality The locality name for the CA. + Locality *string `json:"locality,omitempty"` + + // MaxPathLength The maximum number of intermediate CAs that may follow this CA in the certificate / CA chain. A maxPathLength of -1 implies no path limit on the chain. + MaxPathLength *float32 `json:"maxPathLength"` + + // NotAfter The date and time when the CA expires in YYYY-MM-DDTHH:mm:ss.sssZ format. + NotAfter *string `json:"notAfter,omitempty"` + + // NotBefore The date and time when the CA becomes valid in YYYY-MM-DDTHH:mm:ss.sssZ format. + NotBefore *string `json:"notBefore,omitempty"` + + // Organization The organization (O) for the CA. + Organization *string `json:"organization,omitempty"` + + // Ou The organization unit (OU) for the CA. + Ou *string `json:"ou,omitempty"` + ParentCaId *openapi_types.UUID `json:"parentCaId"` + + // Province The state of province name for the CA. + Province *string `json:"province,omitempty"` + SerialNumber *string `json:"serialNumber"` + + // Type The type of CA to create. + Type CreateInternalCertificateAuthorityV1200ConfigurationType `json:"type"` + } `json:"configuration"` + EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + Status CreateInternalCertificateAuthorityV1200Status `json:"status"` + Type CreateInternalCertificateAuthorityV1200Type `json:"type"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateSecretV4400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateSecretV4401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateSecretV4403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateSecretV4404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode UpdateSecretV4422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateSecretV4500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1500StatusCode `json:"statusCode"` + } +} +type CreateInternalCertificateAuthorityV1200ConfigurationKeyAlgorithm string +type CreateInternalCertificateAuthorityV1200ConfigurationType string +type CreateInternalCertificateAuthorityV1200Status string +type CreateInternalCertificateAuthorityV1200Type string +type CreateInternalCertificateAuthorityV1400StatusCode float32 +type CreateInternalCertificateAuthorityV1401StatusCode float32 +type CreateInternalCertificateAuthorityV1403StatusCode float32 +type CreateInternalCertificateAuthorityV1404StatusCode float32 +type CreateInternalCertificateAuthorityV1422StatusCode float32 +type CreateInternalCertificateAuthorityV1500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateInternalCertificateAuthorityV1Response) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) } -type UpdateSecretV42000 struct { - Secret struct { - UnderscoreId string `json:"_id"` - Actor *struct { - ActorId *string `json:"actorId"` - ActorType *string `json:"actorType"` - GroupId *string `json:"groupId"` - MembershipId *string `json:"membershipId"` - Name *string `json:"name"` - } `json:"actor"` - CreatedAt time.Time `json:"createdAt"` - Environment string `json:"environment"` - Id string `json:"id"` - IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` - RotationId *openapi_types.UUID `json:"rotationId"` - SecretComment string `json:"secretComment"` - SecretKey string `json:"secretKey"` - SecretReminderNote *string `json:"secretReminderNote"` - SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` - SecretValue string `json:"secretValue"` - SecretValueHidden bool `json:"secretValueHidden"` - SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` - Type string `json:"type"` - UpdatedAt time.Time `json:"updatedAt"` - Version float32 `json:"version"` - Workspace string `json:"workspace"` - } `json:"secret"` -} -type UpdateSecretV42001 struct { - Approval struct { - BypassReason *string `json:"bypassReason"` - CommitterUserId *openapi_types.UUID `json:"committerUserId"` - Conflicts interface{} `json:"conflicts"` - CreatedAt time.Time `json:"createdAt"` - FolderId openapi_types.UUID `json:"folderId"` - HasMerged *bool `json:"hasMerged,omitempty"` - Id openapi_types.UUID `json:"id"` - IsReplicated *bool `json:"isReplicated"` - PolicyId openapi_types.UUID `json:"policyId"` - Slug string `json:"slug"` - Status *string `json:"status,omitempty"` - StatusChangedByUserId *openapi_types.UUID `json:"statusChangedByUserId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"approval"` + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateInternalCertificateAuthorityV1Response) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -type UpdateSecretV4400StatusCode float32 -type UpdateSecretV4401StatusCode float32 -type UpdateSecretV4403StatusCode float32 -type UpdateSecretV4404StatusCode float32 -type UpdateSecretV4422StatusCode float32 -type UpdateSecretV4500StatusCode float32 + +type CreateCertificatePolicyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + CertificatePolicy struct { + Algorithms *struct { + KeyAlgorithm *[]string `json:"keyAlgorithm,omitempty"` + Signature *[]string `json:"signature,omitempty"` + } `json:"algorithms,omitempty"` + BasicConstraints *struct { + IsCA *CreateCertificatePolicy200CertificatePolicyBasicConstraintsIsCA `json:"isCA,omitempty"` + MaxPathLength *int `json:"maxPathLength,omitempty"` + } `json:"basicConstraints"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + ExtendedKeyUsages *struct { + Allowed *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesAllowed `json:"allowed,omitempty"` + Denied *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesDenied `json:"denied,omitempty"` + Required *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesRequired `json:"required,omitempty"` + } `json:"extendedKeyUsages,omitempty"` + Id openapi_types.UUID `json:"id"` + KeyUsages *struct { + Allowed *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesAllowed `json:"allowed,omitempty"` + Denied *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesDenied `json:"denied,omitempty"` + Required *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesRequired `json:"required,omitempty"` + } `json:"keyUsages,omitempty"` + Name string `json:"name"` + ProjectId openapi_types.UUID `json:"projectId"` + Sans *[]struct { + Allowed *[]string `json:"allowed,omitempty"` + Denied *[]string `json:"denied,omitempty"` + Required *[]string `json:"required,omitempty"` + Type CreateCertificatePolicy200CertificatePolicySansType `json:"type"` + } `json:"sans,omitempty"` + Subject *[]struct { + Allowed *[]string `json:"allowed,omitempty"` + Denied *[]string `json:"denied,omitempty"` + Required *[]string `json:"required,omitempty"` + Type CreateCertificatePolicy200CertificatePolicySubjectType `json:"type"` + } `json:"subject,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + Validity *struct { + Max *string `json:"max,omitempty"` + } `json:"validity,omitempty"` + } `json:"certificatePolicy"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy500StatusCode `json:"statusCode"` + } +} +type CreateCertificatePolicy200CertificatePolicyBasicConstraintsIsCA string +type CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesAllowed string +type CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesDenied string +type CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesRequired string +type CreateCertificatePolicy200CertificatePolicyKeyUsagesAllowed string +type CreateCertificatePolicy200CertificatePolicyKeyUsagesDenied string +type CreateCertificatePolicy200CertificatePolicyKeyUsagesRequired string +type CreateCertificatePolicy200CertificatePolicySansType string +type CreateCertificatePolicy200CertificatePolicySubjectType string +type CreateCertificatePolicy400StatusCode float32 +type CreateCertificatePolicy401StatusCode float32 +type CreateCertificatePolicy403StatusCode float32 +type CreateCertificatePolicy404StatusCode float32 +type CreateCertificatePolicy422StatusCode float32 +type CreateCertificatePolicy500StatusCode float32 // Status returns HTTPResponse.Status -func (r UpdateSecretV4Response) Status() string { +func (r CreateCertificatePolicyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3341,67 +4438,1439 @@ func (r UpdateSecretV4Response) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSecretV4Response) StatusCode() int { +func (r CreateCertificatePolicyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSecretV4Response struct { +type CreateCertificateProfileResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - union json.RawMessage + CertificateProfile struct { + AcmeConfigId *openapi_types.UUID `json:"acmeConfigId"` + ApiConfigId *openapi_types.UUID `json:"apiConfigId"` + CaId *openapi_types.UUID `json:"caId"` + CertificatePolicyId openapi_types.UUID `json:"certificatePolicyId"` + CreatedAt time.Time `json:"createdAt"` + Defaults *struct { + BasicConstraints *struct { + IsCA bool `json:"isCA"` + PathLength *float32 `json:"pathLength,omitempty"` + } `json:"basicConstraints,omitempty"` + CommonName *string `json:"commonName,omitempty"` + Country *string `json:"country,omitempty"` + ExtendedKeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsExtendedKeyUsages `json:"extendedKeyUsages,omitempty"` + KeyAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsKeyAlgorithm `json:"keyAlgorithm,omitempty"` + KeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsKeyUsages `json:"keyUsages,omitempty"` + Locality *string `json:"locality,omitempty"` + Organization *string `json:"organization,omitempty"` + OrganizationalUnit *string `json:"organizationalUnit,omitempty"` + SignatureAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsSignatureAlgorithm `json:"signatureAlgorithm,omitempty"` + State *string `json:"state,omitempty"` + TtlDays *float32 `json:"ttlDays,omitempty"` + } `json:"defaults"` + Description *string `json:"description"` + EnrollmentType string `json:"enrollmentType"` + EstConfigId *openapi_types.UUID `json:"estConfigId"` + ExternalConfigs *CreateCertificateProfile_200_CertificateProfile_ExternalConfigs `json:"externalConfigs"` + Id openapi_types.UUID `json:"id"` + IssuerType *string `json:"issuerType,omitempty"` + ProjectId string `json:"projectId"` + Slug string `json:"slug"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"certificateProfile"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSecretV4400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSecretV4401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSecretV4403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSecretV4404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateSecretV4422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSecretV4500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile500StatusCode `json:"statusCode"` + } +} +type CreateCertificateProfile200CertificateProfileDefaultsExtendedKeyUsages string +type CreateCertificateProfile200CertificateProfileDefaultsKeyAlgorithm string +type CreateCertificateProfile200CertificateProfileDefaultsKeyUsages string +type CreateCertificateProfile200CertificateProfileDefaultsSignatureAlgorithm string +type CreateCertificateProfile200CertificateProfileExternalConfigs0 struct { + // Template Certificate template name for Azure AD CS + Template string `json:"template"` +} +type CreateCertificateProfile200CertificateProfileExternalConfigs1 = map[string]interface{} +type CreateCertificateProfile200CertificateProfileExternalConfigs2 = map[string]interface{} +type CreateCertificateProfile200CertificateProfileExternalConfigs3 = map[string]interface{} +type CreateCertificateProfile_200_CertificateProfile_ExternalConfigs struct { + union json.RawMessage +} +type CreateCertificateProfile400StatusCode float32 +type CreateCertificateProfile401StatusCode float32 +type CreateCertificateProfile403StatusCode float32 +type CreateCertificateProfile404StatusCode float32 +type CreateCertificateProfile422StatusCode float32 +type CreateCertificateProfile500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateCertificateProfileResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) } -type CreateSecretV42000 struct { - Secret struct { - UnderscoreId string `json:"_id"` - Actor *struct { - ActorId *string `json:"actorId"` - ActorType *string `json:"actorType"` - GroupId *string `json:"groupId"` - MembershipId *string `json:"membershipId"` - Name *string `json:"name"` + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateCertificateProfileResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateMachineIdentityResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Identity struct { + AuthMethod *string `json:"authMethod"` + AuthMethods []string `json:"authMethods"` + CreatedAt time.Time `json:"createdAt"` + HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"` + Id openapi_types.UUID `json:"id"` + Metadata []struct { + Id string `json:"id"` + Key string `json:"key"` + Value string `json:"value"` + } `json:"metadata"` + Name string `json:"name"` + OrgId openapi_types.UUID `json:"orgId"` + ProjectId *string `json:"projectId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"identity"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity500StatusCode `json:"statusCode"` + } +} +type CreateMachineIdentity400StatusCode float32 +type CreateMachineIdentity401StatusCode float32 +type CreateMachineIdentity403StatusCode float32 +type CreateMachineIdentity404StatusCode float32 +type CreateMachineIdentity422StatusCode float32 +type CreateMachineIdentity500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateMachineIdentityResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateMachineIdentityResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePostgresPamAccountResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Account struct { + CreatedAt time.Time `json:"createdAt"` + Credentials struct { + Username string `json:"username"` + } `json:"credentials"` + Description *string `json:"description"` + EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` + FolderId *openapi_types.UUID `json:"folderId"` + Id openapi_types.UUID `json:"id"` + InternalMetadata interface{} `json:"internalMetadata"` + LastRotatedAt *time.Time `json:"lastRotatedAt"` + LastRotationMessage *string `json:"lastRotationMessage"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + RequireMfa *bool `json:"requireMfa"` + Resource struct { + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ResourceType string `json:"resourceType"` + RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` + } `json:"resource"` + ResourceId openapi_types.UUID `json:"resourceId"` + ResourceType CreatePostgresPamAccount200AccountResourceType `json:"resourceType"` + RotationEnabled *bool `json:"rotationEnabled,omitempty"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` + RotationStatus *string `json:"rotationStatus"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"account"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount500StatusCode `json:"statusCode"` + } +} +type CreatePostgresPamAccount200AccountResourceType string +type CreatePostgresPamAccount400StatusCode float32 +type CreatePostgresPamAccount401StatusCode float32 +type CreatePostgresPamAccount403StatusCode float32 +type CreatePostgresPamAccount404StatusCode float32 +type CreatePostgresPamAccount422StatusCode float32 +type CreatePostgresPamAccount500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreatePostgresPamAccountResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePostgresPamAccountResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateKubernetesPamResourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + SslCertificate *string `json:"sslCertificate,omitempty"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + Url string `json:"url"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreateKubernetesPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *CreateKubernetesPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource500StatusCode `json:"statusCode"` + } +} +type CreateKubernetesPamResource200ResourceResourceType string +type CreateKubernetesPamResource200ResourceRotationAccountCredentials0 struct { + AuthMethod CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod `json:"authMethod"` +} +type CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod string +type CreateKubernetesPamResource_200_Resource_RotationAccountCredentials struct { + union json.RawMessage +} +type CreateKubernetesPamResource400StatusCode float32 +type CreateKubernetesPamResource401StatusCode float32 +type CreateKubernetesPamResource403StatusCode float32 +type CreateKubernetesPamResource404StatusCode float32 +type CreateKubernetesPamResource422StatusCode float32 +type CreateKubernetesPamResource500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateKubernetesPamResourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateKubernetesPamResourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePostgresPamResourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + Database string `json:"database"` + Host string `json:"host"` + Port float32 `json:"port"` + SslCertificate *string `json:"sslCertificate,omitempty"` + SslEnabled bool `json:"sslEnabled"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreatePostgresPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *struct { + Username string `json:"username"` + } `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource500StatusCode `json:"statusCode"` + } +} +type CreatePostgresPamResource200ResourceResourceType string +type CreatePostgresPamResource400StatusCode float32 +type CreatePostgresPamResource401StatusCode float32 +type CreatePostgresPamResource403StatusCode float32 +type CreatePostgresPamResource404StatusCode float32 +type CreatePostgresPamResource422StatusCode float32 +type CreatePostgresPamResource500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreatePostgresPamResourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePostgresPamResourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateRedisPamResourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + Host string `json:"host"` + Port float32 `json:"port"` + SslCertificate *string `json:"sslCertificate,omitempty"` + SslEnabled bool `json:"sslEnabled"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreateRedisPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *struct { + Username *string `json:"username,omitempty"` + } `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource500StatusCode `json:"statusCode"` + } +} +type CreateRedisPamResource200ResourceResourceType string +type CreateRedisPamResource400StatusCode float32 +type CreateRedisPamResource401StatusCode float32 +type CreateRedisPamResource403StatusCode float32 +type CreateRedisPamResource404StatusCode float32 +type CreateRedisPamResource422StatusCode float32 +type CreateRedisPamResource500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateRedisPamResourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateRedisPamResourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateProjectResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Project struct { + UnderscoreId string `json:"_id"` + AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` + AutoCapitalization *bool `json:"autoCapitalization"` + CreatedAt time.Time `json:"createdAt"` + DefaultProduct *string `json:"defaultProduct"` + Description *string `json:"description"` + EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata"` + Environments []struct { + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + } `json:"environments"` + HasDeleteProtection *bool `json:"hasDeleteProtection"` + Id string `json:"id"` + KmsCertificateKeyId *openapi_types.UUID `json:"kmsCertificateKeyId"` + Name string `json:"name"` + OrgId openapi_types.UUID `json:"orgId"` + PitVersionLimit *float32 `json:"pitVersionLimit,omitempty"` + SecretDetectionIgnoreValues *[]string `json:"secretDetectionIgnoreValues"` + SecretSharing *bool `json:"secretSharing,omitempty"` + ShowSnapshotsLegacy *bool `json:"showSnapshotsLegacy,omitempty"` + Slug string `json:"slug"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + UpgradeStatus *string `json:"upgradeStatus"` + Version *float32 `json:"version,omitempty"` + } `json:"project"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateProject422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject500StatusCode `json:"statusCode"` + } +} +type CreateProject400StatusCode float32 +type CreateProject401StatusCode float32 +type CreateProject403StatusCode float32 +type CreateProject404StatusCode float32 +type CreateProject422StatusCode float32 +type CreateProject500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateProjectResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateProjectResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRelaysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]struct { + CreatedAt time.Time `json:"createdAt"` + HealthAlertedAt *time.Time `json:"healthAlertedAt"` + Heartbeat *time.Time `json:"heartbeat"` + Host string `json:"host"` + Id openapi_types.UUID `json:"id"` + IdentityId *openapi_types.UUID `json:"identityId"` + Name string `json:"name"` + OrgId *openapi_types.UUID `json:"orgId"` + UpdatedAt time.Time `json:"updatedAt"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode GetRelays422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays500StatusCode `json:"statusCode"` + } +} +type GetRelays400StatusCode float32 +type GetRelays401StatusCode float32 +type GetRelays403StatusCode float32 +type GetRelays404StatusCode float32 +type GetRelays422StatusCode float32 +type GetRelays500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r GetRelaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRelaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListGatewaysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]struct { + CreatedAt time.Time `json:"createdAt"` + Heartbeat *time.Time `json:"heartbeat"` + Id openapi_types.UUID `json:"id"` + Identity struct { + Id string `json:"id"` + Name string `json:"name"` + } `json:"identity"` + IdentityId openapi_types.UUID `json:"identityId"` + Name string `json:"name"` + UpdatedAt time.Time `json:"updatedAt"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode ListGateways422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways500StatusCode `json:"statusCode"` + } +} +type ListGateways400StatusCode float32 +type ListGateways401StatusCode float32 +type ListGateways403StatusCode float32 +type ListGateways404StatusCode float32 +type ListGateways422StatusCode float32 +type ListGateways500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r ListGatewaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListGatewaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SelectOrganizationV3Response struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + IsMfaEnabled bool `json:"isMfaEnabled"` + MfaMethod *string `json:"mfaMethod,omitempty"` + Token string `json:"token"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3500StatusCode `json:"statusCode"` + } +} +type SelectOrganizationV3400StatusCode float32 +type SelectOrganizationV3401StatusCode float32 +type SelectOrganizationV3403StatusCode float32 +type SelectOrganizationV3404StatusCode float32 +type SelectOrganizationV3422StatusCode float32 +type SelectOrganizationV3500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r SelectOrganizationV3Response) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SelectOrganizationV3Response) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListSecretsV4Response struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Imports *[]struct { + Environment string `json:"environment"` + FolderId *string `json:"folderId,omitempty"` + SecretPath string `json:"secretPath"` + Secrets []struct { + UnderscoreId string `json:"_id"` + Actor *struct { + ActorId *string `json:"actorId"` + ActorType *string `json:"actorType"` + GroupId *string `json:"groupId"` + MembershipId *string `json:"membershipId"` + Name *string `json:"name"` + } `json:"actor"` + Environment string `json:"environment"` + Id string `json:"id"` + IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` + RotationId *openapi_types.UUID `json:"rotationId"` + SecretComment string `json:"secretComment"` + SecretKey string `json:"secretKey"` + SecretMetadata *[]struct { + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"secretMetadata,omitempty"` + SecretReminderNote *string `json:"secretReminderNote"` + SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` + SecretValue string `json:"secretValue"` + SecretValueHidden bool `json:"secretValueHidden"` + SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` + Type string `json:"type"` + Version float32 `json:"version"` + Workspace string `json:"workspace"` + } `json:"secrets"` + } `json:"imports,omitempty"` + Secrets []struct { + UnderscoreId string `json:"_id"` + Actor *struct { + ActorId *string `json:"actorId"` + ActorType *string `json:"actorType"` + GroupId *string `json:"groupId"` + MembershipId *string `json:"membershipId"` + Name *string `json:"name"` + } `json:"actor"` + CreatedAt time.Time `json:"createdAt"` + Environment string `json:"environment"` + Id string `json:"id"` + IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` + RotationId *openapi_types.UUID `json:"rotationId"` + SecretComment string `json:"secretComment"` + SecretKey string `json:"secretKey"` + SecretMetadata *[]struct { + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"secretMetadata,omitempty"` + SecretPath *string `json:"secretPath,omitempty"` + SecretReminderNote *string `json:"secretReminderNote"` + SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` + SecretValue string `json:"secretValue"` + SecretValueHidden bool `json:"secretValueHidden"` + SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` + Tags *[]struct { + Color *string `json:"color"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + } `json:"tags,omitempty"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + Version float32 `json:"version"` + Workspace string `json:"workspace"` + } `json:"secrets"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4500StatusCode `json:"statusCode"` + } +} +type ListSecretsV4400StatusCode float32 +type ListSecretsV4401StatusCode float32 +type ListSecretsV4403StatusCode float32 +type ListSecretsV4404StatusCode float32 +type ListSecretsV4422StatusCode float32 +type ListSecretsV4500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r ListSecretsV4Response) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSecretsV4Response) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteSecretV4Response struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + union json.RawMessage + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4500StatusCode `json:"statusCode"` + } +} +type DeleteSecretV42000 struct { + Secret struct { + UnderscoreId string `json:"_id"` + Actor *struct { + ActorId *string `json:"actorId"` + ActorType *string `json:"actorType"` + GroupId *string `json:"groupId"` + MembershipId *string `json:"membershipId"` + Name *string `json:"name"` + } `json:"actor"` + CreatedAt time.Time `json:"createdAt"` + Environment string `json:"environment"` + Id string `json:"id"` + IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` + RotationId *openapi_types.UUID `json:"rotationId"` + SecretComment string `json:"secretComment"` + SecretKey string `json:"secretKey"` + SecretReminderNote *string `json:"secretReminderNote"` + SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` + SecretValue string `json:"secretValue"` + SecretValueHidden bool `json:"secretValueHidden"` + SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + Version float32 `json:"version"` + Workspace string `json:"workspace"` + } `json:"secret"` +} +type DeleteSecretV42001 struct { + Approval struct { + BypassReason *string `json:"bypassReason"` + CommitterUserId *openapi_types.UUID `json:"committerUserId"` + Conflicts interface{} `json:"conflicts"` + CreatedAt time.Time `json:"createdAt"` + FolderId openapi_types.UUID `json:"folderId"` + HasMerged *bool `json:"hasMerged,omitempty"` + Id openapi_types.UUID `json:"id"` + IsReplicated *bool `json:"isReplicated"` + PolicyId openapi_types.UUID `json:"policyId"` + Slug string `json:"slug"` + Status *string `json:"status,omitempty"` + StatusChangedByUserId *openapi_types.UUID `json:"statusChangedByUserId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"approval"` +} +type DeleteSecretV4400StatusCode float32 +type DeleteSecretV4401StatusCode float32 +type DeleteSecretV4403StatusCode float32 +type DeleteSecretV4404StatusCode float32 +type DeleteSecretV4422StatusCode float32 +type DeleteSecretV4500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r DeleteSecretV4Response) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSecretV4Response) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSecretByNameV4Response struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Secret struct { + UnderscoreId string `json:"_id"` + Actor *struct { + ActorId *string `json:"actorId"` + ActorType *string `json:"actorType"` + GroupId *string `json:"groupId"` + MembershipId *string `json:"membershipId"` + Name *string `json:"name"` + } `json:"actor"` + CreatedAt time.Time `json:"createdAt"` + Environment string `json:"environment"` + Id string `json:"id"` + IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` + RotationId *openapi_types.UUID `json:"rotationId"` + SecretComment string `json:"secretComment"` + SecretKey string `json:"secretKey"` + SecretMetadata *[]struct { + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"secretMetadata,omitempty"` + SecretPath string `json:"secretPath"` + SecretReminderNote *string `json:"secretReminderNote"` + SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` + SecretValue string `json:"secretValue"` + SecretValueHidden bool `json:"secretValueHidden"` + SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` + Tags *[]struct { + Color *string `json:"color"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + } `json:"tags,omitempty"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + Version float32 `json:"version"` + Workspace string `json:"workspace"` + } `json:"secret"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4500StatusCode `json:"statusCode"` + } +} +type GetSecretByNameV4400StatusCode float32 +type GetSecretByNameV4401StatusCode float32 +type GetSecretByNameV4403StatusCode float32 +type GetSecretByNameV4404StatusCode float32 +type GetSecretByNameV4422StatusCode float32 +type GetSecretByNameV4500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r GetSecretByNameV4Response) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSecretByNameV4Response) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSecretV4Response struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + union json.RawMessage + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateSecretV4400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateSecretV4401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateSecretV4403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateSecretV4404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode UpdateSecretV4422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateSecretV4500StatusCode `json:"statusCode"` + } +} +type UpdateSecretV42000 struct { + Secret struct { + UnderscoreId string `json:"_id"` + Actor *struct { + ActorId *string `json:"actorId"` + ActorType *string `json:"actorType"` + GroupId *string `json:"groupId"` + MembershipId *string `json:"membershipId"` + Name *string `json:"name"` + } `json:"actor"` + CreatedAt time.Time `json:"createdAt"` + Environment string `json:"environment"` + Id string `json:"id"` + IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` + RotationId *openapi_types.UUID `json:"rotationId"` + SecretComment string `json:"secretComment"` + SecretKey string `json:"secretKey"` + SecretReminderNote *string `json:"secretReminderNote"` + SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` + SecretValue string `json:"secretValue"` + SecretValueHidden bool `json:"secretValueHidden"` + SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + Version float32 `json:"version"` + Workspace string `json:"workspace"` + } `json:"secret"` +} +type UpdateSecretV42001 struct { + Approval struct { + BypassReason *string `json:"bypassReason"` + CommitterUserId *openapi_types.UUID `json:"committerUserId"` + Conflicts interface{} `json:"conflicts"` + CreatedAt time.Time `json:"createdAt"` + FolderId openapi_types.UUID `json:"folderId"` + HasMerged *bool `json:"hasMerged,omitempty"` + Id openapi_types.UUID `json:"id"` + IsReplicated *bool `json:"isReplicated"` + PolicyId openapi_types.UUID `json:"policyId"` + Slug string `json:"slug"` + Status *string `json:"status,omitempty"` + StatusChangedByUserId *openapi_types.UUID `json:"statusChangedByUserId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"approval"` +} +type UpdateSecretV4400StatusCode float32 +type UpdateSecretV4401StatusCode float32 +type UpdateSecretV4403StatusCode float32 +type UpdateSecretV4404StatusCode float32 +type UpdateSecretV4422StatusCode float32 +type UpdateSecretV4500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r UpdateSecretV4Response) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSecretV4Response) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSecretV4Response struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + union json.RawMessage + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSecretV4400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSecretV4401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSecretV4403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSecretV4404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateSecretV4422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSecretV4500StatusCode `json:"statusCode"` + } +} +type CreateSecretV42000 struct { + Secret struct { + UnderscoreId string `json:"_id"` + Actor *struct { + ActorId *string `json:"actorId"` + ActorType *string `json:"actorType"` + GroupId *string `json:"groupId"` + MembershipId *string `json:"membershipId"` + Name *string `json:"name"` } `json:"actor"` CreatedAt time.Time `json:"createdAt"` Environment string `json:"environment"` @@ -3420,287 +5889,1421 @@ type CreateSecretV42000 struct { Workspace string `json:"workspace"` } `json:"secret"` } -type CreateSecretV42001 struct { - Approval struct { - BypassReason *string `json:"bypassReason"` - CommitterUserId *openapi_types.UUID `json:"committerUserId"` - Conflicts interface{} `json:"conflicts"` - CreatedAt time.Time `json:"createdAt"` - FolderId openapi_types.UUID `json:"folderId"` - HasMerged *bool `json:"hasMerged,omitempty"` - Id openapi_types.UUID `json:"id"` - IsReplicated *bool `json:"isReplicated"` - PolicyId openapi_types.UUID `json:"policyId"` - Slug string `json:"slug"` - Status *string `json:"status,omitempty"` - StatusChangedByUserId *openapi_types.UUID `json:"statusChangedByUserId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"approval"` +type CreateSecretV42001 struct { + Approval struct { + BypassReason *string `json:"bypassReason"` + CommitterUserId *openapi_types.UUID `json:"committerUserId"` + Conflicts interface{} `json:"conflicts"` + CreatedAt time.Time `json:"createdAt"` + FolderId openapi_types.UUID `json:"folderId"` + HasMerged *bool `json:"hasMerged,omitempty"` + Id openapi_types.UUID `json:"id"` + IsReplicated *bool `json:"isReplicated"` + PolicyId openapi_types.UUID `json:"policyId"` + Slug string `json:"slug"` + Status *string `json:"status,omitempty"` + StatusChangedByUserId *openapi_types.UUID `json:"statusChangedByUserId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"approval"` +} +type CreateSecretV4400StatusCode float32 +type CreateSecretV4401StatusCode float32 +type CreateSecretV4403StatusCode float32 +type CreateSecretV4404StatusCode float32 +type CreateSecretV4422StatusCode float32 +type CreateSecretV4500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateSecretV4Response) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSecretV4Response) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// AdminSignUpWithBodyWithResponse request with arbitrary body returning *AdminSignUpResponse +func (c *ClientWithResponses) AdminSignUpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminSignUpResponse, error) { + rsp, err := c.AdminSignUpWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAdminSignUpResponse(rsp) +} + +func (c *ClientWithResponses) AdminSignUpWithResponse(ctx context.Context, body AdminSignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminSignUpResponse, error) { + rsp, err := c.AdminSignUp(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAdminSignUpResponse(rsp) +} + +// CreateCloudflareAppConnectionWithBodyWithResponse request with arbitrary body returning *CreateCloudflareAppConnectionResponse +func (c *ClientWithResponses) CreateCloudflareAppConnectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCloudflareAppConnectionResponse, error) { + rsp, err := c.CreateCloudflareAppConnectionWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCloudflareAppConnectionResponse(rsp) +} + +func (c *ClientWithResponses) CreateCloudflareAppConnectionWithResponse(ctx context.Context, body CreateCloudflareAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCloudflareAppConnectionResponse, error) { + rsp, err := c.CreateCloudflareAppConnection(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCloudflareAppConnectionResponse(rsp) +} + +// RefreshAuthTokenWithResponse request returning *RefreshAuthTokenResponse +func (c *ClientWithResponses) RefreshAuthTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAuthTokenResponse, error) { + rsp, err := c.RefreshAuthToken(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseRefreshAuthTokenResponse(rsp) +} + +// AttachTokenAuthWithBodyWithResponse request with arbitrary body returning *AttachTokenAuthResponse +func (c *ClientWithResponses) AttachTokenAuthWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachTokenAuthResponse, error) { + rsp, err := c.AttachTokenAuthWithBody(ctx, identityId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAttachTokenAuthResponse(rsp) +} + +func (c *ClientWithResponses) AttachTokenAuthWithResponse(ctx context.Context, identityId string, body AttachTokenAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachTokenAuthResponse, error) { + rsp, err := c.AttachTokenAuth(ctx, identityId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAttachTokenAuthResponse(rsp) +} + +// CreateTokenAuthTokenWithBodyWithResponse request with arbitrary body returning *CreateTokenAuthTokenResponse +func (c *ClientWithResponses) CreateTokenAuthTokenWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTokenAuthTokenResponse, error) { + rsp, err := c.CreateTokenAuthTokenWithBody(ctx, identityId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTokenAuthTokenResponse(rsp) +} + +func (c *ClientWithResponses) CreateTokenAuthTokenWithResponse(ctx context.Context, identityId string, body CreateTokenAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTokenAuthTokenResponse, error) { + rsp, err := c.CreateTokenAuthToken(ctx, identityId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTokenAuthTokenResponse(rsp) +} + +// AttachUniversalAuthWithBodyWithResponse request with arbitrary body returning *AttachUniversalAuthResponse +func (c *ClientWithResponses) AttachUniversalAuthWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachUniversalAuthResponse, error) { + rsp, err := c.AttachUniversalAuthWithBody(ctx, identityId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAttachUniversalAuthResponse(rsp) +} + +func (c *ClientWithResponses) AttachUniversalAuthWithResponse(ctx context.Context, identityId string, body AttachUniversalAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachUniversalAuthResponse, error) { + rsp, err := c.AttachUniversalAuth(ctx, identityId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAttachUniversalAuthResponse(rsp) +} + +// CreateUniversalAuthClientSecretWithBodyWithResponse request with arbitrary body returning *CreateUniversalAuthClientSecretResponse +func (c *ClientWithResponses) CreateUniversalAuthClientSecretWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUniversalAuthClientSecretResponse, error) { + rsp, err := c.CreateUniversalAuthClientSecretWithBody(ctx, identityId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateUniversalAuthClientSecretResponse(rsp) +} + +func (c *ClientWithResponses) CreateUniversalAuthClientSecretWithResponse(ctx context.Context, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUniversalAuthClientSecretResponse, error) { + rsp, err := c.CreateUniversalAuthClientSecret(ctx, identityId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateUniversalAuthClientSecretResponse(rsp) +} + +// CreateAcmeCertificateAuthorityV1WithBodyWithResponse request with arbitrary body returning *CreateAcmeCertificateAuthorityV1Response +func (c *ClientWithResponses) CreateAcmeCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAcmeCertificateAuthorityV1Response, error) { + rsp, err := c.CreateAcmeCertificateAuthorityV1WithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAcmeCertificateAuthorityV1Response(rsp) +} + +func (c *ClientWithResponses) CreateAcmeCertificateAuthorityV1WithResponse(ctx context.Context, body CreateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAcmeCertificateAuthorityV1Response, error) { + rsp, err := c.CreateAcmeCertificateAuthorityV1(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAcmeCertificateAuthorityV1Response(rsp) +} + +// UpdateAcmeCertificateAuthorityV1WithBodyWithResponse request with arbitrary body returning *UpdateAcmeCertificateAuthorityV1Response +func (c *ClientWithResponses) UpdateAcmeCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAcmeCertificateAuthorityV1Response, error) { + rsp, err := c.UpdateAcmeCertificateAuthorityV1WithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAcmeCertificateAuthorityV1Response(rsp) +} + +func (c *ClientWithResponses) UpdateAcmeCertificateAuthorityV1WithResponse(ctx context.Context, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAcmeCertificateAuthorityV1Response, error) { + rsp, err := c.UpdateAcmeCertificateAuthorityV1(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAcmeCertificateAuthorityV1Response(rsp) +} + +// CreateInternalCertificateAuthorityV1WithBodyWithResponse request with arbitrary body returning *CreateInternalCertificateAuthorityV1Response +func (c *ClientWithResponses) CreateInternalCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInternalCertificateAuthorityV1Response, error) { + rsp, err := c.CreateInternalCertificateAuthorityV1WithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateInternalCertificateAuthorityV1Response(rsp) +} + +func (c *ClientWithResponses) CreateInternalCertificateAuthorityV1WithResponse(ctx context.Context, body CreateInternalCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInternalCertificateAuthorityV1Response, error) { + rsp, err := c.CreateInternalCertificateAuthorityV1(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateInternalCertificateAuthorityV1Response(rsp) +} + +// CreateCertificatePolicyWithBodyWithResponse request with arbitrary body returning *CreateCertificatePolicyResponse +func (c *ClientWithResponses) CreateCertificatePolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCertificatePolicyResponse, error) { + rsp, err := c.CreateCertificatePolicyWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCertificatePolicyResponse(rsp) +} + +func (c *ClientWithResponses) CreateCertificatePolicyWithResponse(ctx context.Context, body CreateCertificatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCertificatePolicyResponse, error) { + rsp, err := c.CreateCertificatePolicy(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCertificatePolicyResponse(rsp) +} + +// CreateCertificateProfileWithBodyWithResponse request with arbitrary body returning *CreateCertificateProfileResponse +func (c *ClientWithResponses) CreateCertificateProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCertificateProfileResponse, error) { + rsp, err := c.CreateCertificateProfileWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCertificateProfileResponse(rsp) +} + +func (c *ClientWithResponses) CreateCertificateProfileWithResponse(ctx context.Context, body CreateCertificateProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCertificateProfileResponse, error) { + rsp, err := c.CreateCertificateProfile(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCertificateProfileResponse(rsp) +} + +// CreateMachineIdentityWithBodyWithResponse request with arbitrary body returning *CreateMachineIdentityResponse +func (c *ClientWithResponses) CreateMachineIdentityWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) { + rsp, err := c.CreateMachineIdentityWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateMachineIdentityResponse(rsp) +} + +func (c *ClientWithResponses) CreateMachineIdentityWithResponse(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) { + rsp, err := c.CreateMachineIdentity(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateMachineIdentityResponse(rsp) +} + +// CreatePostgresPamAccountWithBodyWithResponse request with arbitrary body returning *CreatePostgresPamAccountResponse +func (c *ClientWithResponses) CreatePostgresPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { + rsp, err := c.CreatePostgresPamAccountWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePostgresPamAccountResponse(rsp) +} + +func (c *ClientWithResponses) CreatePostgresPamAccountWithResponse(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { + rsp, err := c.CreatePostgresPamAccount(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePostgresPamAccountResponse(rsp) +} + +// CreateKubernetesPamResourceWithBodyWithResponse request with arbitrary body returning *CreateKubernetesPamResourceResponse +func (c *ClientWithResponses) CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { + rsp, err := c.CreateKubernetesPamResourceWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateKubernetesPamResourceResponse(rsp) +} + +func (c *ClientWithResponses) CreateKubernetesPamResourceWithResponse(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { + rsp, err := c.CreateKubernetesPamResource(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateKubernetesPamResourceResponse(rsp) +} + +// CreatePostgresPamResourceWithBodyWithResponse request with arbitrary body returning *CreatePostgresPamResourceResponse +func (c *ClientWithResponses) CreatePostgresPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) { + rsp, err := c.CreatePostgresPamResourceWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePostgresPamResourceResponse(rsp) +} + +func (c *ClientWithResponses) CreatePostgresPamResourceWithResponse(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) { + rsp, err := c.CreatePostgresPamResource(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePostgresPamResourceResponse(rsp) +} + +// CreateRedisPamResourceWithBodyWithResponse request with arbitrary body returning *CreateRedisPamResourceResponse +func (c *ClientWithResponses) CreateRedisPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { + rsp, err := c.CreateRedisPamResourceWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateRedisPamResourceResponse(rsp) +} + +func (c *ClientWithResponses) CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { + rsp, err := c.CreateRedisPamResource(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateRedisPamResourceResponse(rsp) +} + +// CreateProjectWithBodyWithResponse request with arbitrary body returning *CreateProjectResponse +func (c *ClientWithResponses) CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { + rsp, err := c.CreateProjectWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateProjectResponse(rsp) +} + +func (c *ClientWithResponses) CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { + rsp, err := c.CreateProject(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateProjectResponse(rsp) +} + +// GetRelaysWithResponse request returning *GetRelaysResponse +func (c *ClientWithResponses) GetRelaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRelaysResponse, error) { + rsp, err := c.GetRelays(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRelaysResponse(rsp) +} + +// ListGatewaysWithResponse request returning *ListGatewaysResponse +func (c *ClientWithResponses) ListGatewaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListGatewaysResponse, error) { + rsp, err := c.ListGateways(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseListGatewaysResponse(rsp) +} + +// SelectOrganizationV3WithBodyWithResponse request with arbitrary body returning *SelectOrganizationV3Response +func (c *ClientWithResponses) SelectOrganizationV3WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) { + rsp, err := c.SelectOrganizationV3WithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSelectOrganizationV3Response(rsp) +} + +func (c *ClientWithResponses) SelectOrganizationV3WithResponse(ctx context.Context, body SelectOrganizationV3JSONRequestBody, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) { + rsp, err := c.SelectOrganizationV3(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSelectOrganizationV3Response(rsp) +} + +// ListSecretsV4WithResponse request returning *ListSecretsV4Response +func (c *ClientWithResponses) ListSecretsV4WithResponse(ctx context.Context, params *ListSecretsV4Params, reqEditors ...RequestEditorFn) (*ListSecretsV4Response, error) { + rsp, err := c.ListSecretsV4(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListSecretsV4Response(rsp) +} + +// DeleteSecretV4WithBodyWithResponse request with arbitrary body returning *DeleteSecretV4Response +func (c *ClientWithResponses) DeleteSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) { + rsp, err := c.DeleteSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSecretV4Response(rsp) +} + +func (c *ClientWithResponses) DeleteSecretV4WithResponse(ctx context.Context, secretName string, body DeleteSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) { + rsp, err := c.DeleteSecretV4(ctx, secretName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSecretV4Response(rsp) +} + +// GetSecretByNameV4WithResponse request returning *GetSecretByNameV4Response +func (c *ClientWithResponses) GetSecretByNameV4WithResponse(ctx context.Context, secretName string, params *GetSecretByNameV4Params, reqEditors ...RequestEditorFn) (*GetSecretByNameV4Response, error) { + rsp, err := c.GetSecretByNameV4(ctx, secretName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSecretByNameV4Response(rsp) +} + +// UpdateSecretV4WithBodyWithResponse request with arbitrary body returning *UpdateSecretV4Response +func (c *ClientWithResponses) UpdateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) { + rsp, err := c.UpdateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSecretV4Response(rsp) +} + +func (c *ClientWithResponses) UpdateSecretV4WithResponse(ctx context.Context, secretName string, body UpdateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) { + rsp, err := c.UpdateSecretV4(ctx, secretName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSecretV4Response(rsp) +} + +// CreateSecretV4WithBodyWithResponse request with arbitrary body returning *CreateSecretV4Response +func (c *ClientWithResponses) CreateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) { + rsp, err := c.CreateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSecretV4Response(rsp) +} + +func (c *ClientWithResponses) CreateSecretV4WithResponse(ctx context.Context, secretName string, body CreateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) { + rsp, err := c.CreateSecretV4(ctx, secretName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSecretV4Response(rsp) +} + +// ParseAdminSignUpResponse parses an HTTP response from a AdminSignUpWithResponse call +func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AdminSignUpResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Message string `json:"message"` + New string `json:"new"` + Organization struct { + AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization"` + AuthEnforced *bool `json:"authEnforced"` + BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"` + BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"` + CreatedAt time.Time `json:"createdAt"` + CustomerId *string `json:"customerId"` + DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"` + EnforceMfa *bool `json:"enforceMfa,omitempty"` + GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"` + GoogleSsoAuthLastUsed *time.Time `json:"googleSsoAuthLastUsed"` + Id openapi_types.UUID `json:"id"` + KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId"` + KmsEncryptedDataKey interface{} `json:"kmsEncryptedDataKey"` + KmsProductEnabled *bool `json:"kmsProductEnabled"` + MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime"` + MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit"` + Name string `json:"name"` + ParentOrgId *openapi_types.UUID `json:"parentOrgId"` + PkiProductEnabled *bool `json:"pkiProductEnabled"` + PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt"` + PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername"` + RootOrgId *openapi_types.UUID `json:"rootOrgId"` + ScannerProductEnabled *bool `json:"scannerProductEnabled"` + ScimEnabled *bool `json:"scimEnabled"` + SecretShareBrandConfig interface{} `json:"secretShareBrandConfig"` + SecretsProductEnabled *bool `json:"secretsProductEnabled"` + SelectedMfaMethod *string `json:"selectedMfaMethod"` + ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled"` + ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"` + Slug string `json:"slug"` + SshProductEnabled *bool `json:"sshProductEnabled"` + UpdatedAt time.Time `json:"updatedAt"` + UserTokenExpiration *string `json:"userTokenExpiration"` + } `json:"organization"` + Token string `json:"token"` + User struct { + AuthMethods *[]string `json:"authMethods"` + ConsecutiveFailedMfaAttempts *float32 `json:"consecutiveFailedMfaAttempts"` + ConsecutiveFailedPasswordAttempts *float32 `json:"consecutiveFailedPasswordAttempts"` + CreatedAt time.Time `json:"createdAt"` + Devices interface{} `json:"devices"` + Email *string `json:"email"` + FirstName *string `json:"firstName"` + Id openapi_types.UUID `json:"id"` + IsAccepted *bool `json:"isAccepted"` + IsEmailVerified *bool `json:"isEmailVerified"` + IsGhost *bool `json:"isGhost,omitempty"` + IsLocked *bool `json:"isLocked"` + IsMfaEnabled *bool `json:"isMfaEnabled"` + LastName *string `json:"lastName"` + MfaMethods *[]string `json:"mfaMethods"` + SelectedMfaMethod *string `json:"selectedMfaMethod"` + SuperAdmin *bool `json:"superAdmin"` + TemporaryLockDateEnd *time.Time `json:"temporaryLockDateEnd"` + UpdatedAt time.Time `json:"updatedAt"` + Username string `json:"username"` + } `json:"user"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateCloudflareAppConnectionResponse parses an HTTP response from a CreateCloudflareAppConnectionWithResponse call +func ParseCreateCloudflareAppConnectionResponse(rsp *http.Response) (*CreateCloudflareAppConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateCloudflareAppConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + AppConnection CreateCloudflareAppConnection_200_AppConnection `json:"appConnection"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCloudflareAppConnection500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseRefreshAuthTokenResponse parses an HTTP response from a RefreshAuthTokenWithResponse call +func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RefreshAuthTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + OrganizationId *string `json:"organizationId,omitempty"` + SubOrganizationId *string `json:"subOrganizationId,omitempty"` + Token string `json:"token"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAttachTokenAuthResponse parses an HTTP response from a AttachTokenAuthWithResponse call +func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AttachTokenAuthResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + IdentityTokenAuth struct { + AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` + AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` + AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` + AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` + AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Id openapi_types.UUID `json:"id"` + IdentityId openapi_types.UUID `json:"identityId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"identityTokenAuth"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -type CreateSecretV4400StatusCode float32 -type CreateSecretV4401StatusCode float32 -type CreateSecretV4403StatusCode float32 -type CreateSecretV4404StatusCode float32 -type CreateSecretV4422StatusCode float32 -type CreateSecretV4500StatusCode float32 -// Status returns HTTPResponse.Status -func (r CreateSecretV4Response) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} +// ParseCreateTokenAuthTokenResponse parses an HTTP response from a CreateTokenAuthTokenWithResponse call +func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthTokenResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateTokenAuthTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + AccessToken string `json:"accessToken"` + AccessTokenMaxTTL float32 `json:"accessTokenMaxTTL"` + ExpiresIn float32 `json:"expiresIn"` + TokenData struct { + AccessTokenLastRenewedAt *time.Time `json:"accessTokenLastRenewedAt"` + AccessTokenLastUsedAt *time.Time `json:"accessTokenLastUsedAt"` + AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` + AccessTokenNumUses *float32 `json:"accessTokenNumUses,omitempty"` + AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` + AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` + AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` + AuthMethod string `json:"authMethod"` + CreatedAt time.Time `json:"createdAt"` + Id string `json:"id"` + IdentityId openapi_types.UUID `json:"identityId"` + IdentityUAClientSecretId *string `json:"identityUAClientSecretId"` + IsAccessTokenRevoked *bool `json:"isAccessTokenRevoked,omitempty"` + Name *string `json:"name"` + SubOrganizationId *openapi_types.UUID `json:"subOrganizationId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"tokenData"` + TokenType CreateTokenAuthToken200TokenType `json:"tokenType"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSecretV4Response) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode } - return 0 -} -// AdminSignUpWithBodyWithResponse request with arbitrary body returning *AdminSignUpResponse -func (c *ClientWithResponses) AdminSignUpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminSignUpResponse, error) { - rsp, err := c.AdminSignUpWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAdminSignUpResponse(rsp) + return response, nil } -func (c *ClientWithResponses) AdminSignUpWithResponse(ctx context.Context, body AdminSignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminSignUpResponse, error) { - rsp, err := c.AdminSignUp(ctx, body, reqEditors...) +// ParseAttachUniversalAuthResponse parses an HTTP response from a AttachUniversalAuthWithResponse call +func ParseAttachUniversalAuthResponse(rsp *http.Response) (*AttachUniversalAuthResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseAdminSignUpResponse(rsp) -} -// RefreshAuthTokenWithResponse request returning *RefreshAuthTokenResponse -func (c *ClientWithResponses) RefreshAuthTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAuthTokenResponse, error) { - rsp, err := c.RefreshAuthToken(ctx, reqEditors...) - if err != nil { - return nil, err + response := &AttachUniversalAuthResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseRefreshAuthTokenResponse(rsp) -} -// AttachTokenAuthWithBodyWithResponse request with arbitrary body returning *AttachTokenAuthResponse -func (c *ClientWithResponses) AttachTokenAuthWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachTokenAuthResponse, error) { - rsp, err := c.AttachTokenAuthWithBody(ctx, identityId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAttachTokenAuthResponse(rsp) -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + IdentityUniversalAuth struct { + AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` + AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` + AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` + AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` + AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` + ClientId string `json:"clientId"` + ClientSecretTrustedIps interface{} `json:"clientSecretTrustedIps,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Id openapi_types.UUID `json:"id"` + IdentityId openapi_types.UUID `json:"identityId"` + LockoutCounterResetSeconds *float32 `json:"lockoutCounterResetSeconds,omitempty"` + LockoutDurationSeconds *float32 `json:"lockoutDurationSeconds,omitempty"` + LockoutEnabled *bool `json:"lockoutEnabled,omitempty"` + LockoutThreshold *float32 `json:"lockoutThreshold,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"identityUniversalAuth"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest -func (c *ClientWithResponses) AttachTokenAuthWithResponse(ctx context.Context, identityId string, body AttachTokenAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachTokenAuthResponse, error) { - rsp, err := c.AttachTokenAuth(ctx, identityId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAttachTokenAuthResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest -// CreateTokenAuthTokenWithBodyWithResponse request with arbitrary body returning *CreateTokenAuthTokenResponse -func (c *ClientWithResponses) CreateTokenAuthTokenWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTokenAuthTokenResponse, error) { - rsp, err := c.CreateTokenAuthTokenWithBody(ctx, identityId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTokenAuthTokenResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest -func (c *ClientWithResponses) CreateTokenAuthTokenWithResponse(ctx context.Context, identityId string, body CreateTokenAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTokenAuthTokenResponse, error) { - rsp, err := c.CreateTokenAuthToken(ctx, identityId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTokenAuthTokenResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest -// CreateMachineIdentityWithBodyWithResponse request with arbitrary body returning *CreateMachineIdentityResponse -func (c *ClientWithResponses) CreateMachineIdentityWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) { - rsp, err := c.CreateMachineIdentityWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateMachineIdentityResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest -func (c *ClientWithResponses) CreateMachineIdentityWithResponse(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) { - rsp, err := c.CreateMachineIdentity(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateMachineIdentityResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest -// CreateKubernetesPamResourceWithBodyWithResponse request with arbitrary body returning *CreateKubernetesPamResourceResponse -func (c *ClientWithResponses) CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { - rsp, err := c.CreateKubernetesPamResourceWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateKubernetesPamResourceResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachUniversalAuth500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -func (c *ClientWithResponses) CreateKubernetesPamResourceWithResponse(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { - rsp, err := c.CreateKubernetesPamResource(ctx, body, reqEditors...) - if err != nil { - return nil, err } - return ParseCreateKubernetesPamResourceResponse(rsp) -} -// CreateRedisPamResourceWithBodyWithResponse request with arbitrary body returning *CreateRedisPamResourceResponse -func (c *ClientWithResponses) CreateRedisPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { - rsp, err := c.CreateRedisPamResourceWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateRedisPamResourceResponse(rsp) + return response, nil } -func (c *ClientWithResponses) CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { - rsp, err := c.CreateRedisPamResource(ctx, body, reqEditors...) +// ParseCreateUniversalAuthClientSecretResponse parses an HTTP response from a CreateUniversalAuthClientSecretWithResponse call +func ParseCreateUniversalAuthClientSecretResponse(rsp *http.Response) (*CreateUniversalAuthClientSecretResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCreateRedisPamResourceResponse(rsp) -} -// CreateProjectWithBodyWithResponse request with arbitrary body returning *CreateProjectResponse -func (c *ClientWithResponses) CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { - rsp, err := c.CreateProjectWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &CreateUniversalAuthClientSecretResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCreateProjectResponse(rsp) -} -func (c *ClientWithResponses) CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { - rsp, err := c.CreateProject(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateProjectResponse(rsp) -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + ClientSecret string `json:"clientSecret"` + ClientSecretData struct { + ClientSecretNumUses *float32 `json:"clientSecretNumUses,omitempty"` + ClientSecretNumUsesLimit *float32 `json:"clientSecretNumUsesLimit,omitempty"` + ClientSecretPrefix string `json:"clientSecretPrefix"` + ClientSecretTTL *float32 `json:"clientSecretTTL,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Description string `json:"description"` + Id string `json:"id"` + IdentityUAId openapi_types.UUID `json:"identityUAId"` + IsClientSecretRevoked *bool `json:"isClientSecretRevoked,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"clientSecretData"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest -// GetRelaysWithResponse request returning *GetRelaysResponse -func (c *ClientWithResponses) GetRelaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRelaysResponse, error) { - rsp, err := c.GetRelays(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRelaysResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest -// ListGatewaysWithResponse request returning *ListGatewaysResponse -func (c *ClientWithResponses) ListGatewaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListGatewaysResponse, error) { - rsp, err := c.ListGateways(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseListGatewaysResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateUniversalAuthClientSecret500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// SelectOrganizationV3WithBodyWithResponse request with arbitrary body returning *SelectOrganizationV3Response -func (c *ClientWithResponses) SelectOrganizationV3WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) { - rsp, err := c.SelectOrganizationV3WithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err } - return ParseSelectOrganizationV3Response(rsp) -} -func (c *ClientWithResponses) SelectOrganizationV3WithResponse(ctx context.Context, body SelectOrganizationV3JSONRequestBody, reqEditors ...RequestEditorFn) (*SelectOrganizationV3Response, error) { - rsp, err := c.SelectOrganizationV3(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSelectOrganizationV3Response(rsp) + return response, nil } -// ListSecretsV4WithResponse request returning *ListSecretsV4Response -func (c *ClientWithResponses) ListSecretsV4WithResponse(ctx context.Context, params *ListSecretsV4Params, reqEditors ...RequestEditorFn) (*ListSecretsV4Response, error) { - rsp, err := c.ListSecretsV4(ctx, params, reqEditors...) +// ParseCreateAcmeCertificateAuthorityV1Response parses an HTTP response from a CreateAcmeCertificateAuthorityV1WithResponse call +func ParseCreateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*CreateAcmeCertificateAuthorityV1Response, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseListSecretsV4Response(rsp) -} -// DeleteSecretV4WithBodyWithResponse request with arbitrary body returning *DeleteSecretV4Response -func (c *ClientWithResponses) DeleteSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) { - rsp, err := c.DeleteSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &CreateAcmeCertificateAuthorityV1Response{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseDeleteSecretV4Response(rsp) -} -func (c *ClientWithResponses) DeleteSecretV4WithResponse(ctx context.Context, secretName string, body DeleteSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecretV4Response, error) { - rsp, err := c.DeleteSecretV4(ctx, secretName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSecretV4Response(rsp) -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Configuration struct { + // AccountEmail The email address for the ACME Certificate Authority. + AccountEmail string `json:"accountEmail"` + + // DirectoryUrl The directory URL for the ACME Certificate Authority. + DirectoryUrl string `json:"directoryUrl"` + + // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. + DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` + DnsProviderConfig struct { + // HostedZoneId The hosted zone ID for the ACME Certificate Authority. + HostedZoneId string `json:"hostedZoneId"` + + // Provider The DNS provider for the ACME Certificate Authority. + Provider CreateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider `json:"provider"` + } `json:"dnsProviderConfig"` + + // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabHmacKey *string `json:"eabHmacKey,omitempty"` + + // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabKid *string `json:"eabKid,omitempty"` + } `json:"configuration"` + EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + Status CreateAcmeCertificateAuthorityV1200Status `json:"status"` + Type CreateAcmeCertificateAuthorityV1200Type `json:"type"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest -// GetSecretByNameV4WithResponse request returning *GetSecretByNameV4Response -func (c *ClientWithResponses) GetSecretByNameV4WithResponse(ctx context.Context, secretName string, params *GetSecretByNameV4Params, reqEditors ...RequestEditorFn) (*GetSecretByNameV4Response, error) { - rsp, err := c.GetSecretByNameV4(ctx, secretName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSecretByNameV4Response(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest -// UpdateSecretV4WithBodyWithResponse request with arbitrary body returning *UpdateSecretV4Response -func (c *ClientWithResponses) UpdateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) { - rsp, err := c.UpdateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSecretV4Response(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest -func (c *ClientWithResponses) UpdateSecretV4WithResponse(ctx context.Context, secretName string, body UpdateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) { - rsp, err := c.UpdateSecretV4(ctx, secretName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSecretV4Response(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest -// CreateSecretV4WithBodyWithResponse request with arbitrary body returning *CreateSecretV4Response -func (c *ClientWithResponses) CreateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) { - rsp, err := c.CreateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSecretV4Response(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateAcmeCertificateAuthorityV1500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -func (c *ClientWithResponses) CreateSecretV4WithResponse(ctx context.Context, secretName string, body CreateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) { - rsp, err := c.CreateSecretV4(ctx, secretName, body, reqEditors...) - if err != nil { - return nil, err } - return ParseCreateSecretV4Response(rsp) + + return response, nil } -// ParseAdminSignUpResponse parses an HTTP response from a AdminSignUpWithResponse call -func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) { +// ParseUpdateAcmeCertificateAuthorityV1Response parses an HTTP response from a UpdateAcmeCertificateAuthorityV1WithResponse call +func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateAcmeCertificateAuthorityV1Response, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AdminSignUpResponse{ + response := &UpdateAcmeCertificateAuthorityV1Response{ Body: bodyBytes, HTTPResponse: rsp, } @@ -3708,66 +7311,35 @@ func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Message string `json:"message"` - New string `json:"new"` - Organization struct { - AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization"` - AuthEnforced *bool `json:"authEnforced"` - BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"` - BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"` - CreatedAt time.Time `json:"createdAt"` - CustomerId *string `json:"customerId"` - DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"` - EnforceMfa *bool `json:"enforceMfa,omitempty"` - GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"` - GoogleSsoAuthLastUsed *time.Time `json:"googleSsoAuthLastUsed"` - Id openapi_types.UUID `json:"id"` - KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId"` - KmsEncryptedDataKey interface{} `json:"kmsEncryptedDataKey"` - KmsProductEnabled *bool `json:"kmsProductEnabled"` - MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime"` - MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit"` - Name string `json:"name"` - ParentOrgId *openapi_types.UUID `json:"parentOrgId"` - PkiProductEnabled *bool `json:"pkiProductEnabled"` - PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt"` - PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername"` - RootOrgId *openapi_types.UUID `json:"rootOrgId"` - ScannerProductEnabled *bool `json:"scannerProductEnabled"` - ScimEnabled *bool `json:"scimEnabled"` - SecretShareBrandConfig interface{} `json:"secretShareBrandConfig"` - SecretsProductEnabled *bool `json:"secretsProductEnabled"` - SelectedMfaMethod *string `json:"selectedMfaMethod"` - ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled"` - ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"` - Slug string `json:"slug"` - SshProductEnabled *bool `json:"sshProductEnabled"` - UpdatedAt time.Time `json:"updatedAt"` - UserTokenExpiration *string `json:"userTokenExpiration"` - } `json:"organization"` - Token string `json:"token"` - User struct { - AuthMethods *[]string `json:"authMethods"` - ConsecutiveFailedMfaAttempts *float32 `json:"consecutiveFailedMfaAttempts"` - ConsecutiveFailedPasswordAttempts *float32 `json:"consecutiveFailedPasswordAttempts"` - CreatedAt time.Time `json:"createdAt"` - Devices interface{} `json:"devices"` - Email *string `json:"email"` - FirstName *string `json:"firstName"` - Id openapi_types.UUID `json:"id"` - IsAccepted *bool `json:"isAccepted"` - IsEmailVerified *bool `json:"isEmailVerified"` - IsGhost *bool `json:"isGhost,omitempty"` - IsLocked *bool `json:"isLocked"` - IsMfaEnabled *bool `json:"isMfaEnabled"` - LastName *string `json:"lastName"` - MfaMethods *[]string `json:"mfaMethods"` - SelectedMfaMethod *string `json:"selectedMfaMethod"` - SuperAdmin *bool `json:"superAdmin"` - TemporaryLockDateEnd *time.Time `json:"temporaryLockDateEnd"` - UpdatedAt time.Time `json:"updatedAt"` - Username string `json:"username"` - } `json:"user"` + Configuration struct { + // AccountEmail The email address for the ACME Certificate Authority. + AccountEmail string `json:"accountEmail"` + + // DirectoryUrl The directory URL for the ACME Certificate Authority. + DirectoryUrl string `json:"directoryUrl"` + + // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. + DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` + DnsProviderConfig struct { + // HostedZoneId The hosted zone ID for the ACME Certificate Authority. + HostedZoneId string `json:"hostedZoneId"` + + // Provider The DNS provider for the ACME Certificate Authority. + Provider UpdateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider `json:"provider"` + } `json:"dnsProviderConfig"` + + // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabHmacKey *string `json:"eabHmacKey,omitempty"` + + // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. + EabKid *string `json:"eabKid,omitempty"` + } `json:"configuration"` + EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + Status UpdateAcmeCertificateAuthorityV1200Status `json:"status"` + Type UpdateAcmeCertificateAuthorityV1200Type `json:"type"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3776,11 +7348,11 @@ func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3789,10 +7361,10 @@ func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3801,11 +7373,11 @@ func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3814,10 +7386,10 @@ func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3826,10 +7398,10 @@ func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3838,10 +7410,10 @@ func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode UpdateAcmeCertificateAuthorityV1500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3853,15 +7425,15 @@ func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) return response, nil } -// ParseRefreshAuthTokenResponse parses an HTTP response from a RefreshAuthTokenWithResponse call -func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenResponse, error) { +// ParseCreateInternalCertificateAuthorityV1Response parses an HTTP response from a CreateInternalCertificateAuthorityV1WithResponse call +func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*CreateInternalCertificateAuthorityV1Response, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &RefreshAuthTokenResponse{ + response := &CreateInternalCertificateAuthorityV1Response{ Body: bodyBytes, HTTPResponse: rsp, } @@ -3869,9 +7441,54 @@ func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenRespons switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - OrganizationId *string `json:"organizationId,omitempty"` - SubOrganizationId *string `json:"subOrganizationId,omitempty"` - Token string `json:"token"` + Configuration struct { + ActiveCaCertId *openapi_types.UUID `json:"activeCaCertId"` + + // CommonName The common name (CN) for the CA. + CommonName *string `json:"commonName,omitempty"` + + // Country The country name (C) for the CA. + Country *string `json:"country,omitempty"` + Dn *string `json:"dn"` + + // FriendlyName A friendly name for the CA. + FriendlyName *string `json:"friendlyName,omitempty"` + + // KeyAlgorithm The type of public key algorithm and size, in bits, of the key pair for the CA; when you create an intermediate CA, you must use a key algorithm supported by the parent CA. + KeyAlgorithm CreateInternalCertificateAuthorityV1200ConfigurationKeyAlgorithm `json:"keyAlgorithm"` + + // Locality The locality name for the CA. + Locality *string `json:"locality,omitempty"` + + // MaxPathLength The maximum number of intermediate CAs that may follow this CA in the certificate / CA chain. A maxPathLength of -1 implies no path limit on the chain. + MaxPathLength *float32 `json:"maxPathLength"` + + // NotAfter The date and time when the CA expires in YYYY-MM-DDTHH:mm:ss.sssZ format. + NotAfter *string `json:"notAfter,omitempty"` + + // NotBefore The date and time when the CA becomes valid in YYYY-MM-DDTHH:mm:ss.sssZ format. + NotBefore *string `json:"notBefore,omitempty"` + + // Organization The organization (O) for the CA. + Organization *string `json:"organization,omitempty"` + + // Ou The organization unit (OU) for the CA. + Ou *string `json:"ou,omitempty"` + ParentCaId *openapi_types.UUID `json:"parentCaId"` + + // Province The state of province name for the CA. + Province *string `json:"province,omitempty"` + SerialNumber *string `json:"serialNumber"` + + // Type The type of CA to create. + Type CreateInternalCertificateAuthorityV1200ConfigurationType `json:"type"` + } `json:"configuration"` + EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + Status CreateInternalCertificateAuthorityV1200Status `json:"status"` + Type CreateInternalCertificateAuthorityV1200Type `json:"type"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3880,11 +7497,11 @@ func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenRespons case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3893,10 +7510,10 @@ func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenRespons case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3905,11 +7522,11 @@ func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenRespons case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3918,10 +7535,10 @@ func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenRespons case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3930,10 +7547,10 @@ func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenRespons case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3942,10 +7559,10 @@ func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenRespons case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateInternalCertificateAuthorityV1500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3957,15 +7574,15 @@ func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenRespons return response, nil } -// ParseAttachTokenAuthResponse parses an HTTP response from a AttachTokenAuthWithResponse call -func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, error) { +// ParseCreateCertificatePolicyResponse parses an HTTP response from a CreateCertificatePolicyWithResponse call +func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificatePolicyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AttachTokenAuthResponse{ + response := &CreateCertificatePolicyResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -3973,17 +7590,47 @@ func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - IdentityTokenAuth struct { - AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` - AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` - AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` - AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` - AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Id openapi_types.UUID `json:"id"` - IdentityId openapi_types.UUID `json:"identityId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"identityTokenAuth"` + CertificatePolicy struct { + Algorithms *struct { + KeyAlgorithm *[]string `json:"keyAlgorithm,omitempty"` + Signature *[]string `json:"signature,omitempty"` + } `json:"algorithms,omitempty"` + BasicConstraints *struct { + IsCA *CreateCertificatePolicy200CertificatePolicyBasicConstraintsIsCA `json:"isCA,omitempty"` + MaxPathLength *int `json:"maxPathLength,omitempty"` + } `json:"basicConstraints"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + ExtendedKeyUsages *struct { + Allowed *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesAllowed `json:"allowed,omitempty"` + Denied *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesDenied `json:"denied,omitempty"` + Required *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesRequired `json:"required,omitempty"` + } `json:"extendedKeyUsages,omitempty"` + Id openapi_types.UUID `json:"id"` + KeyUsages *struct { + Allowed *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesAllowed `json:"allowed,omitempty"` + Denied *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesDenied `json:"denied,omitempty"` + Required *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesRequired `json:"required,omitempty"` + } `json:"keyUsages,omitempty"` + Name string `json:"name"` + ProjectId openapi_types.UUID `json:"projectId"` + Sans *[]struct { + Allowed *[]string `json:"allowed,omitempty"` + Denied *[]string `json:"denied,omitempty"` + Required *[]string `json:"required,omitempty"` + Type CreateCertificatePolicy200CertificatePolicySansType `json:"type"` + } `json:"sans,omitempty"` + Subject *[]struct { + Allowed *[]string `json:"allowed,omitempty"` + Denied *[]string `json:"denied,omitempty"` + Required *[]string `json:"required,omitempty"` + Type CreateCertificatePolicy200CertificatePolicySubjectType `json:"type"` + } `json:"subject,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + Validity *struct { + Max *string `json:"max,omitempty"` + } `json:"validity,omitempty"` + } `json:"certificatePolicy"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -3992,11 +7639,11 @@ func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4005,10 +7652,10 @@ func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4017,11 +7664,11 @@ func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4030,10 +7677,10 @@ func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4042,10 +7689,10 @@ func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4054,10 +7701,10 @@ func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificatePolicy500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4069,15 +7716,15 @@ func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, return response, nil } -// ParseCreateTokenAuthTokenResponse parses an HTTP response from a CreateTokenAuthTokenWithResponse call -func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthTokenResponse, error) { +// ParseCreateCertificateProfileResponse parses an HTTP response from a CreateCertificateProfileWithResponse call +func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertificateProfileResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTokenAuthTokenResponse{ + response := &CreateCertificateProfileResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -4085,28 +7732,39 @@ func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthToke switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - AccessToken string `json:"accessToken"` - AccessTokenMaxTTL float32 `json:"accessTokenMaxTTL"` - ExpiresIn float32 `json:"expiresIn"` - TokenData struct { - AccessTokenLastRenewedAt *time.Time `json:"accessTokenLastRenewedAt"` - AccessTokenLastUsedAt *time.Time `json:"accessTokenLastUsedAt"` - AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` - AccessTokenNumUses *float32 `json:"accessTokenNumUses,omitempty"` - AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` - AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` - AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` - AuthMethod string `json:"authMethod"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IdentityId openapi_types.UUID `json:"identityId"` - IdentityUAClientSecretId *string `json:"identityUAClientSecretId"` - IsAccessTokenRevoked *bool `json:"isAccessTokenRevoked,omitempty"` - Name *string `json:"name"` - SubOrganizationId *openapi_types.UUID `json:"subOrganizationId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"tokenData"` - TokenType CreateTokenAuthToken200TokenType `json:"tokenType"` + CertificateProfile struct { + AcmeConfigId *openapi_types.UUID `json:"acmeConfigId"` + ApiConfigId *openapi_types.UUID `json:"apiConfigId"` + CaId *openapi_types.UUID `json:"caId"` + CertificatePolicyId openapi_types.UUID `json:"certificatePolicyId"` + CreatedAt time.Time `json:"createdAt"` + Defaults *struct { + BasicConstraints *struct { + IsCA bool `json:"isCA"` + PathLength *float32 `json:"pathLength,omitempty"` + } `json:"basicConstraints,omitempty"` + CommonName *string `json:"commonName,omitempty"` + Country *string `json:"country,omitempty"` + ExtendedKeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsExtendedKeyUsages `json:"extendedKeyUsages,omitempty"` + KeyAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsKeyAlgorithm `json:"keyAlgorithm,omitempty"` + KeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsKeyUsages `json:"keyUsages,omitempty"` + Locality *string `json:"locality,omitempty"` + Organization *string `json:"organization,omitempty"` + OrganizationalUnit *string `json:"organizationalUnit,omitempty"` + SignatureAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsSignatureAlgorithm `json:"signatureAlgorithm,omitempty"` + State *string `json:"state,omitempty"` + TtlDays *float32 `json:"ttlDays,omitempty"` + } `json:"defaults"` + Description *string `json:"description"` + EnrollmentType string `json:"enrollmentType"` + EstConfigId *openapi_types.UUID `json:"estConfigId"` + ExternalConfigs *CreateCertificateProfile_200_CertificateProfile_ExternalConfigs `json:"externalConfigs"` + Id openapi_types.UUID `json:"id"` + IssuerType *string `json:"issuerType,omitempty"` + ProjectId string `json:"projectId"` + Slug string `json:"slug"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"certificateProfile"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4115,11 +7773,11 @@ func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthToke case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4128,10 +7786,10 @@ func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthToke case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4140,11 +7798,11 @@ func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthToke case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4153,10 +7811,10 @@ func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthToke case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4165,10 +7823,10 @@ func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthToke case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4177,10 +7835,10 @@ func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthToke case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateCertificateProfile500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -4309,6 +7967,140 @@ func ParseCreateMachineIdentityResponse(rsp *http.Response) (*CreateMachineIdent return response, nil } +// ParseCreatePostgresPamAccountResponse parses an HTTP response from a CreatePostgresPamAccountWithResponse call +func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresPamAccountResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePostgresPamAccountResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Account struct { + CreatedAt time.Time `json:"createdAt"` + Credentials struct { + Username string `json:"username"` + } `json:"credentials"` + Description *string `json:"description"` + EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` + FolderId *openapi_types.UUID `json:"folderId"` + Id openapi_types.UUID `json:"id"` + InternalMetadata interface{} `json:"internalMetadata"` + LastRotatedAt *time.Time `json:"lastRotatedAt"` + LastRotationMessage *string `json:"lastRotationMessage"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + RequireMfa *bool `json:"requireMfa"` + Resource struct { + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ResourceType string `json:"resourceType"` + RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` + } `json:"resource"` + ResourceId openapi_types.UUID `json:"resourceId"` + ResourceType CreatePostgresPamAccount200AccountResourceType `json:"resourceType"` + RotationEnabled *bool `json:"rotationEnabled,omitempty"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` + RotationStatus *string `json:"rotationStatus"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"account"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreateKubernetesPamResourceResponse parses an HTTP response from a CreateKubernetesPamResourceWithResponse call func ParseCreateKubernetesPamResourceResponse(rsp *http.Response) (*CreateKubernetesPamResourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -4326,15 +8118,21 @@ func ParseCreateKubernetesPamResourceResponse(rsp *http.Response) (*CreateKubern case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { Resource struct { - ConnectionDetails struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { SslCertificate *string `json:"sslCertificate,omitempty"` SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` Url string `json:"url"` } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - Id openapi_types.UUID `json:"id"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` Name string `json:"name"` ProjectId string `json:"projectId"` ResourceType CreateKubernetesPamResource200ResourceResourceType `json:"resourceType"` @@ -4426,6 +8224,134 @@ func ParseCreateKubernetesPamResourceResponse(rsp *http.Response) (*CreateKubern return response, nil } +// ParseCreatePostgresPamResourceResponse parses an HTTP response from a CreatePostgresPamResourceWithResponse call +func ParseCreatePostgresPamResourceResponse(rsp *http.Response) (*CreatePostgresPamResourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePostgresPamResourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + Database string `json:"database"` + Host string `json:"host"` + Port float32 `json:"port"` + SslCertificate *string `json:"sslCertificate,omitempty"` + SslEnabled bool `json:"sslEnabled"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreatePostgresPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *struct { + Username string `json:"username"` + } `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreateRedisPamResourceResponse parses an HTTP response from a CreateRedisPamResourceWithResponse call func ParseCreateRedisPamResourceResponse(rsp *http.Response) (*CreateRedisPamResourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -4443,17 +8369,23 @@ func ParseCreateRedisPamResourceResponse(rsp *http.Response) (*CreateRedisPamRes case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { Resource struct { - ConnectionDetails struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { Host string `json:"host"` Port float32 `json:"port"` SslCertificate *string `json:"sslCertificate,omitempty"` SslEnabled bool `json:"sslEnabled"` SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - Id openapi_types.UUID `json:"id"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` Name string `json:"name"` ProjectId string `json:"projectId"` ResourceType CreateRedisPamResource200ResourceResourceType `json:"resourceType"` @@ -4564,13 +8496,14 @@ func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, err case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { Project struct { - UnderscoreId string `json:"_id"` - AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` - AutoCapitalization *bool `json:"autoCapitalization"` - CreatedAt time.Time `json:"createdAt"` - DefaultProduct *string `json:"defaultProduct"` - Description *string `json:"description"` - Environments []struct { + UnderscoreId string `json:"_id"` + AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` + AutoCapitalization *bool `json:"autoCapitalization"` + CreatedAt time.Time `json:"createdAt"` + DefaultProduct *string `json:"defaultProduct"` + Description *string `json:"description"` + EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata"` + Environments []struct { Id string `json:"id"` Name string `json:"name"` Slug string `json:"slug"` @@ -5036,8 +8969,9 @@ func ParseListSecretsV4Response(rsp *http.Response) (*ListSecretsV4Response, err SecretComment string `json:"secretComment"` SecretKey string `json:"secretKey"` SecretMetadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` } `json:"secretMetadata,omitempty"` SecretReminderNote *string `json:"secretReminderNote"` SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` @@ -5066,8 +9000,9 @@ func ParseListSecretsV4Response(rsp *http.Response) (*ListSecretsV4Response, err SecretComment string `json:"secretComment"` SecretKey string `json:"secretKey"` SecretMetadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` } `json:"secretMetadata,omitempty"` SecretPath *string `json:"secretPath,omitempty"` SecretReminderNote *string `json:"secretReminderNote"` @@ -5306,8 +9241,9 @@ func ParseGetSecretByNameV4Response(rsp *http.Response) (*GetSecretByNameV4Respo SecretComment string `json:"secretComment"` SecretKey string `json:"secretKey"` SecretMetadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` } `json:"secretMetadata,omitempty"` SecretPath string `json:"secretPath"` SecretReminderNote *string `json:"secretReminderNote"` diff --git a/e2e/packages/client/provisioner.go b/e2e/packages/client/provisioner.go index a18fb01a..1fe85f4b 100644 --- a/e2e/packages/client/provisioner.go +++ b/e2e/packages/client/provisioner.go @@ -16,9 +16,11 @@ type Provisioner struct { } type ProvisionResult struct { - UserId string - OrgId string - Token string + UserId string + OrgId string + Token string + Email string + Password string } type ProvisionerOption func(*Provisioner) @@ -51,10 +53,12 @@ func WithCookies(cookies ...*http.Cookie) RequestEditorFn { func (p *Provisioner) Bootstrap(ctx context.Context) (*ProvisionResult, error) { slog.Info("Signing up Admin account ...") + email := faker.Email() + password := faker.Password() signUpResp, err := p.Client.AdminSignUpWithResponse(ctx, AdminSignUpJSONRequestBody{ - Email: types.Email(faker.Email()), + Email: types.Email(email), FirstName: faker.FirstName(), - Password: faker.Password(), + Password: password, }) if err != nil { return nil, err @@ -105,8 +109,10 @@ func (p *Provisioner) Bootstrap(ctx context.Context) (*ProvisionResult, error) { } slog.Info("Token successfully created") return &ProvisionResult{ - UserId: signUpResp.JSON200.User.Id.String(), - OrgId: signUpResp.JSON200.Organization.Id.String(), - Token: authTokenResp.JSON200.Token, + UserId: signUpResp.JSON200.User.Id.String(), + OrgId: signUpResp.JSON200.Organization.Id.String(), + Token: authTokenResp.JSON200.Token, + Email: email, + Password: password, }, nil } diff --git a/e2e/pam/pam_helpers.go b/e2e/pam/pam_helpers.go new file mode 100644 index 00000000..f7a741d9 --- /dev/null +++ b/e2e/pam/pam_helpers.go @@ -0,0 +1,194 @@ +package pam_test + +import ( + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log/slog" + "net" + "net/http" + "os" + "path/filepath" + "testing" + + "github.com/compose-spec/compose-go/v2/types" + "github.com/infisical/cli/e2e-tests/packages/client" + helpers "github.com/infisical/cli/e2e-tests/util" + openapitypes "github.com/oapi-codegen/runtime/types" + "github.com/stretchr/testify/require" +) + +// getOutboundIP returns the host's preferred outbound IP address. +// This IP is reachable from both Docker containers and host processes, +// unlike "host.docker.internal" which only resolves inside Docker. +func getOutboundIP(t *testing.T) string { + conn, err := net.Dial("udp", "8.8.8.8:80") + require.NoError(t, err) + defer conn.Close() + return conn.LocalAddr().(*net.UDPAddr).IP.String() +} + +type PAMTestInfra struct { + Infisical *helpers.InfisicalService + ApiClient client.ClientWithResponsesInterface + Identity helpers.MachineIdentity + ProjectId string + GatewayId openapitypes.UUID + RelayCmd *helpers.Command + GatewayCmd *helpers.Command + ProvisionResult *client.ProvisionResult + SharedHomeDir string +} + +func SetupPAMInfra(t *testing.T, ctx context.Context) *PAMTestInfra { + infisical := helpers.NewInfisicalService(). + WithBackendEnvironment(types.NewMappingWithEquals([]string{ + "ALLOW_INTERNAL_IP_CONNECTIONS=true", + })). + Up(t, ctx) + + c := infisical.ApiClient() + identity := infisical.CreateMachineIdentity(t, ctx, helpers.WithTokenAuth()) + require.NotNil(t, identity) + + // Start relay. + // Use the host's outbound IP so the pam db access subprocess (which runs + // on the host) can resolve the relay address returned by the backend API. + relayHost := getOutboundIP(t) + relayName := helpers.RandomSlug(2) + relayCmd := &helpers.Command{ + Test: t, + Args: []string{"relay", "start", "--domain", infisical.ApiUrl(t)}, + Env: map[string]string{ + "INFISICAL_API_URL": infisical.ApiUrl(t), + "INFISICAL_RELAY_NAME": relayName, + "INFISICAL_RELAY_HOST": relayHost, + "INFISICAL_TOKEN": *identity.TokenAuthToken, + }, + } + relayCmd.Start(ctx) + t.Cleanup(relayCmd.Stop) + result := helpers.WaitForStderr(t, helpers.WaitForStderrOptions{ + EnsureCmdRunning: relayCmd, + ExpectedString: "Relay is reachable by Infisical", + }) + require.Equal(t, helpers.WaitSuccess, result) + + // Start gateway + tmpLogDir := t.TempDir() + sessionRecordingPath := filepath.Join(tmpLogDir, "session-recording") + require.NoError(t, os.MkdirAll(sessionRecordingPath, 0755)) + gatewayName := helpers.RandomSlug(2) + gatewayCmd := &helpers.Command{ + Test: t, + Args: []string{"gateway", "start", + fmt.Sprintf("--name=%s", gatewayName), + fmt.Sprintf("--pam-session-recording-path=%s", sessionRecordingPath), + }, + Env: map[string]string{ + "INFISICAL_API_URL": infisical.ApiUrl(t), + "INFISICAL_TOKEN": *identity.TokenAuthToken, + }, + } + gatewayCmd.Start(ctx) + t.Cleanup(gatewayCmd.Stop) + result = helpers.WaitForStderr(t, helpers.WaitForStderrOptions{ + EnsureCmdRunning: gatewayCmd, + ExpectedString: "Gateway is reachable by Infisical", + }) + require.Equal(t, helpers.WaitSuccess, result) + + // Find gateway ID + var gatewayId openapitypes.UUID + resp, err := c.ListGatewaysWithResponse(ctx) + require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode()) + for _, gateway := range *resp.JSON200 { + if gateway.Name == gatewayName && gateway.Heartbeat != nil { + gatewayId = gateway.Id + slog.Info("Found gateway ID", "gatewayId", gatewayId) + break + } + } + require.NotZero(t, gatewayId, "Gateway ID should be set") + + // Create PAM project + projDesc := "e2e tests for PAM postgres" + template := "default" + projectType := client.Pam + projectResp, err := c.CreateProjectWithResponse(ctx, client.CreateProjectJSONRequestBody{ + ProjectName: "pam-pg-tests", + ProjectDescription: &projDesc, + Template: &template, + Type: &projectType, + }) + require.NoError(t, err) + require.Equal(t, http.StatusOK, projectResp.StatusCode()) + projectId := projectResp.JSON200.Project.Id + + // Create shared HOME dir for login and pam commands. + // Pre-seed the config to use file-based vault so the CLI never + // attempts to access the system keychain. + sharedHomeDir := t.TempDir() + infisicalConfigDir := filepath.Join(sharedHomeDir, ".infisical") + require.NoError(t, os.MkdirAll(infisicalConfigDir, 0755)) + configData, err := json.Marshal(map[string]string{ + "vaultBackendType": "file", + "vaultBackendPassphrase": base64.StdEncoding.EncodeToString([]byte("e2e-test-passphrase")), + }) + require.NoError(t, err) + require.NoError(t, os.WriteFile( + filepath.Join(infisicalConfigDir, "infisical-config.json"), + configData, 0644, + )) + + return &PAMTestInfra{ + Infisical: infisical, + ApiClient: c, + Identity: identity, + ProjectId: projectId, + GatewayId: gatewayId, + RelayCmd: relayCmd, + GatewayCmd: gatewayCmd, + ProvisionResult: infisical.ProvisionResult(), + SharedHomeDir: sharedHomeDir, + } +} + +func LoginUser(t *testing.T, ctx context.Context, infra *PAMTestInfra) { + loginCmd := helpers.Command{ + Test: t, + RunMethod: helpers.RunMethodSubprocess, + DisableTempHomeDir: true, + Args: []string{ + "login", + "--email", infra.ProvisionResult.Email, + "--password", infra.ProvisionResult.Password, + "--organization-id", infra.ProvisionResult.OrgId, + "--domain", infra.Infisical.ApiUrl(t), + }, + Env: map[string]string{ + "HOME": infra.SharedHomeDir, + "INFISICAL_API_URL": infra.Infisical.ApiUrl(t), + }, + } + loginCmd.Start(ctx) + + // Login is a short-lived command that exits on completion. + // Do NOT use EnsureCmdRunning — it treats any exit as failure. + result := helpers.WaitFor(t, helpers.WaitForOptions{ + Condition: func() helpers.ConditionResult { + if !loginCmd.IsRunning() { + if loginCmd.ExitCode() == 0 { + slog.Info("Login completed successfully") + return helpers.ConditionSuccess + } + loginCmd.DumpOutput() + return helpers.ConditionBreakEarly + } + return helpers.ConditionWait + }, + }) + require.Equal(t, helpers.WaitSuccess, result, "Login should succeed") +} diff --git a/e2e/pam/postgres_test.go b/e2e/pam/postgres_test.go new file mode 100644 index 00000000..d813ba0a --- /dev/null +++ b/e2e/pam/postgres_test.go @@ -0,0 +1,177 @@ +package pam_test + +import ( + "context" + "fmt" + "log/slog" + "net/http" + "os" + "strings" + "testing" + "time" + + "github.com/google/uuid" + "github.com/infisical/cli/e2e-tests/packages/client" + helpers "github.com/infisical/cli/e2e-tests/util" + "github.com/jackc/pgx/v5" + "github.com/joho/godotenv" + "github.com/stretchr/testify/require" + tcpostgres "github.com/testcontainers/testcontainers-go/modules/postgres" +) + +func TestMain(m *testing.M) { + _ = godotenv.Load("../.env") + os.Exit(m.Run()) +} + +func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + t.Cleanup(cancel) + + infra := SetupPAMInfra(t, ctx) + + // Start PAM-target Postgres via testcontainers + pgContainer, err := tcpostgres.Run(ctx, "postgres:16", + tcpostgres.WithDatabase("testdb"), + tcpostgres.WithUsername("pamuser"), + tcpostgres.WithPassword("pampassword"), + tcpostgres.BasicWaitStrategies(), + ) + require.NoError(t, err) + t.Cleanup(func() { + if err := pgContainer.Terminate(ctx); err != nil { + t.Logf("Failed to terminate Postgres container: %v", err) + } + }) + + // Verify PAM Postgres is reachable directly + pgConnStr, err := pgContainer.ConnectionString(ctx, "sslmode=disable") + require.NoError(t, err) + directConn, err := pgx.Connect(ctx, pgConnStr) + require.NoError(t, err) + var directResult int + err = directConn.QueryRow(ctx, "SELECT 1").Scan(&directResult) + require.NoError(t, err) + require.Equal(t, 1, directResult) + directConn.Close(ctx) + slog.Info("Verified PAM Postgres is accessible directly") + + // Get host/port for PAM resource creation + pgHost, err := pgContainer.Host(ctx) + require.NoError(t, err) + pgPort, err := pgContainer.MappedPort(ctx, "5432") + require.NoError(t, err) + + // Create Postgres PAM resource via API + resourceName := "pg-resource" + pgResResp, err := infra.ApiClient.CreatePostgresPamResourceWithResponse( + ctx, + client.CreatePostgresPamResourceJSONRequestBody{ + ProjectId: uuid.MustParse(infra.ProjectId), + GatewayId: infra.GatewayId, + Name: resourceName, + ConnectionDetails: struct { + Database string `json:"database"` + Host string `json:"host"` + Port float32 `json:"port"` + SslCertificate *string `json:"sslCertificate,omitempty"` + SslEnabled bool `json:"sslEnabled"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + }{ + Host: pgHost, + Port: float32(pgPort.Int()), + Database: "testdb", + SslEnabled: false, + SslRejectUnauthorized: false, + }, + }, + ) + require.NoError(t, err) + require.Equal(t, http.StatusOK, pgResResp.StatusCode()) + resourceId := pgResResp.JSON200.Resource.Id + slog.Info("Created Postgres PAM resource", "resourceId", resourceId) + + // Create Postgres PAM account via API + accountName := "pg-account" + pgAcctResp, err := infra.ApiClient.CreatePostgresPamAccountWithResponse( + ctx, + client.CreatePostgresPamAccountJSONRequestBody{ + ResourceId: resourceId, + Name: accountName, + RotationEnabled: false, + Credentials: struct { + Password string `json:"password"` + Username string `json:"username"` + }{ + Username: "pamuser", + Password: "pampassword", + }, + }, + ) + require.NoError(t, err) + require.Equal(t, http.StatusOK, pgAcctResp.StatusCode()) + slog.Info("Created Postgres PAM account") + + // Login with provisioned admin user + LoginUser(t, ctx, infra) + + // Run pam db access + freePort := helpers.GetFreePort() + pamCmd := helpers.Command{ + Test: t, + RunMethod: helpers.RunMethodSubprocess, + DisableTempHomeDir: true, + Args: []string{ + "pam", "db", "access", + "--resource", resourceName, + "--account", accountName, + "--project-id", infra.ProjectId, + "--duration", "5m", + "--port", fmt.Sprintf("%d", freePort), + }, + Env: map[string]string{ + "HOME": infra.SharedHomeDir, + "INFISICAL_API_URL": infra.Infisical.ApiUrl(t), + }, + } + pamCmd.Start(ctx) + t.Cleanup(pamCmd.Stop) + + // Wait for proxy to be ready (printed to stdout via fmt.Printf) + result := helpers.WaitFor(t, helpers.WaitForOptions{ + EnsureCmdRunning: &pamCmd, + Condition: func() helpers.ConditionResult { + if strings.Contains(pamCmd.Stdout(), "Database Proxy Session Started") { + return helpers.ConditionSuccess + } + return helpers.ConditionWait + }, + }) + require.Equal(t, helpers.WaitSuccess, result, "Database proxy should start successfully") + + // Connect via pgx to the proxy and run SELECT 1 + proxyConnStr := fmt.Sprintf("postgres://pamuser@localhost:%d/testdb?sslmode=disable", freePort) + var proxyConn *pgx.Conn + connectResult := helpers.WaitFor(t, helpers.WaitForOptions{ + EnsureCmdRunning: &pamCmd, + Interval: 2 * time.Second, + Timeout: 30 * time.Second, + Condition: func() helpers.ConditionResult { + conn, err := pgx.Connect(ctx, proxyConnStr) + if err != nil { + slog.Warn("Proxy connection attempt failed, retrying...", "error", err) + return helpers.ConditionWait + } + proxyConn = conn + return helpers.ConditionSuccess + }, + }) + require.Equal(t, helpers.WaitSuccess, connectResult, "Should connect to database through proxy") + defer proxyConn.Close(ctx) + + var proxyResult int + err = proxyConn.QueryRow(ctx, "SELECT 1").Scan(&proxyResult) + require.NoError(t, err) + require.Equal(t, 1, proxyResult) + slog.Info("SELECT 1 through PAM proxy succeeded") +} diff --git a/e2e/util/helpers.go b/e2e/util/helpers.go index e4677164..5146976a 100644 --- a/e2e/util/helpers.go +++ b/e2e/util/helpers.go @@ -11,6 +11,7 @@ import ( "os" "os/exec" "path" + "path/filepath" "strings" "sync" "testing" @@ -216,19 +217,62 @@ type Command struct { functionCallErrMu sync.Mutex } +// findModuleRoot walks up from the current directory to find the directory +// containing go.mod, which is the e2e module root. Returns "" if not found. +func findModuleRoot() string { + dir, err := os.Getwd() + if err != nil { + return "" + } + for { + if _, err := os.Stat(filepath.Join(dir, "go.mod")); err == nil { + return dir + } + parent := filepath.Dir(dir) + if parent == dir { + return "" + } + dir = parent + } +} + +// resolveExecutablePath resolves a potentially relative executable path. +// Since go test sets the working directory to the test package directory +// (e.g. e2e/pam/), but .env paths are relative to the e2e module root, +// we try the path as-is first, then resolve it relative to the module root. +func resolveExecutablePath(execPath string) string { + if filepath.IsAbs(execPath) { + return execPath + } + // Try as-is from current working directory + if validateExecutable(execPath) == nil { + return execPath + } + // Try relative to the module root (e2e/) + if root := findModuleRoot(); root != "" { + candidate := filepath.Join(root, execPath) + if validateExecutable(candidate) == nil { + return candidate + } + } + // Return original path so the caller gets a meaningful error + return execPath +} + func findExecutable(t *testing.T) string { // First, check for INFISICAL_CLI_EXECUTABLE environment variable envExec := os.Getenv("INFISICAL_CLI_EXECUTABLE") if envExec != "" { - if err := validateExecutable(envExec); err != nil { + resolved := resolveExecutablePath(envExec) + if err := validateExecutable(resolved); err != nil { t.Fatalf("INFISICAL_CLI_EXECUTABLE is set to '%s' but the executable cannot be found or is not executable: %v\n"+ "Please ensure the path is correct and the file has execute permissions.", envExec, err) } - return envExec + return resolved } // Fall back to default path - defaultPath := "./infisical-merge" + defaultPath := resolveExecutablePath("./infisical-merge") if err := validateExecutable(defaultPath); err != nil { t.Fatalf("Cannot find executable at default path '%s': %v\n"+ "Please either:\n"+ From f283f822441bd4cfaf01a9e927364ef0fa6a6fdd Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Fri, 6 Mar 2026 05:16:41 +0530 Subject: [PATCH 02/11] Refactor PAM Postgres E2E tests to use constants for credentials and improve IP detection logic. --- e2e/pam/pam_helpers.go | 15 +++++++++++---- e2e/pam/postgres_test.go | 20 +++++++++++++------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/e2e/pam/pam_helpers.go b/e2e/pam/pam_helpers.go index f7a741d9..c00d97d6 100644 --- a/e2e/pam/pam_helpers.go +++ b/e2e/pam/pam_helpers.go @@ -19,14 +19,21 @@ import ( "github.com/stretchr/testify/require" ) -// getOutboundIP returns the host's preferred outbound IP address. +// getOutboundIP returns a non-loopback IPv4 address of the host. // This IP is reachable from both Docker containers and host processes, // unlike "host.docker.internal" which only resolves inside Docker. +// It enumerates local interfaces instead of dialing an external address, +// so it works in air-gapped and network-restricted CI environments. func getOutboundIP(t *testing.T) string { - conn, err := net.Dial("udp", "8.8.8.8:80") + addrs, err := net.InterfaceAddrs() require.NoError(t, err) - defer conn.Close() - return conn.LocalAddr().(*net.UDPAddr).IP.String() + for _, addr := range addrs { + if ipNet, ok := addr.(*net.IPNet); ok && !ipNet.IP.IsLoopback() && ipNet.IP.To4() != nil { + return ipNet.IP.String() + } + } + t.Fatal("no non-loopback IPv4 address found") + return "" } type PAMTestInfra struct { diff --git a/e2e/pam/postgres_test.go b/e2e/pam/postgres_test.go index d813ba0a..9ff752d7 100644 --- a/e2e/pam/postgres_test.go +++ b/e2e/pam/postgres_test.go @@ -30,11 +30,17 @@ func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { infra := SetupPAMInfra(t, ctx) + const ( + pgUser = "pamuser" + pgPassword = "pampassword" + pgDatabase = "testdb" + ) + // Start PAM-target Postgres via testcontainers pgContainer, err := tcpostgres.Run(ctx, "postgres:16", - tcpostgres.WithDatabase("testdb"), - tcpostgres.WithUsername("pamuser"), - tcpostgres.WithPassword("pampassword"), + tcpostgres.WithDatabase(pgDatabase), + tcpostgres.WithUsername(pgUser), + tcpostgres.WithPassword(pgPassword), tcpostgres.BasicWaitStrategies(), ) require.NoError(t, err) @@ -80,7 +86,7 @@ func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { }{ Host: pgHost, Port: float32(pgPort.Int()), - Database: "testdb", + Database: pgDatabase, SslEnabled: false, SslRejectUnauthorized: false, }, @@ -103,8 +109,8 @@ func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { Password string `json:"password"` Username string `json:"username"` }{ - Username: "pamuser", - Password: "pampassword", + Username: pgUser, + Password: pgPassword, }, }, ) @@ -150,7 +156,7 @@ func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { require.Equal(t, helpers.WaitSuccess, result, "Database proxy should start successfully") // Connect via pgx to the proxy and run SELECT 1 - proxyConnStr := fmt.Sprintf("postgres://pamuser@localhost:%d/testdb?sslmode=disable", freePort) + proxyConnStr := fmt.Sprintf("postgres://%s@localhost:%d/%s?sslmode=disable", pgUser, freePort, pgDatabase) var proxyConn *pgx.Conn connectResult := helpers.WaitFor(t, helpers.WaitForOptions{ EnsureCmdRunning: &pamCmd, From fefd210ffca722e6e25700f44d602e6d856c4c60 Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Fri, 6 Mar 2026 05:19:40 +0530 Subject: [PATCH 03/11] Split CLI E2E tests into General and PAM-specific workflows; update Go version to 1.25.2. --- .github/workflows/run-cli-e2e-tests.yml | 44 +++++++++++++++++-------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/.github/workflows/run-cli-e2e-tests.yml b/.github/workflows/run-cli-e2e-tests.yml index d9e0ed9c..ef1caa4d 100644 --- a/.github/workflows/run-cli-e2e-tests.yml +++ b/.github/workflows/run-cli-e2e-tests.yml @@ -5,18 +5,18 @@ on: types: [opened, synchronize] workflow_dispatch: workflow_call: - jobs: test: runs-on: ubuntu-latest + name: General E2E Tests steps: - uses: actions/checkout@v6 - name: Setup Go uses: actions/setup-go@v6 with: - go-version: "1.24.13" + go-version: "1.25.2" - name: Install dependencies run: go get . - name: Build the CLI @@ -26,19 +26,37 @@ jobs: with: repository: infisical/infisical path: infisical - - - name: Free disk space - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/lib/android - sudo rm -rf /opt/ghc - sudo rm -rf /opt/hostedtoolcache/CodeQL - docker system prune -af - df -h - name: Test with the Go CLI - run: go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/... + run: go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/proxy github.com/infisical/cli/e2e-tests/relay + working-directory: ./e2e + env: + INFISICAL_BACKEND_DIR: ${{ github.workspace }}/infisical/backend + INFISICAL_CLI_EXECUTABLE: ${{ github.workspace }}/infisical-cli + CLI_E2E_DEFAULT_RUN_METHOD: subprocess + + pam-test: + runs-on: ubuntu-latest + name: PAM E2E Tests + + steps: + - uses: actions/checkout@v6 + - name: Setup Go + uses: actions/setup-go@v6 + with: + go-version: "1.25.2" + - name: Install dependencies + run: go get . + - name: Build the CLI + run: go build -o infisical-cli + - name: Checkout infisical repo + uses: actions/checkout@v6 + with: + repository: infisical/infisical + path: infisical + - name: Test PAM Resources + run: go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/pam working-directory: ./e2e env: INFISICAL_BACKEND_DIR: ${{ github.workspace }}/infisical/backend INFISICAL_CLI_EXECUTABLE: ${{ github.workspace }}/infisical-cli - CLI_E2E_DEFAULT_RUN_METHOD: subprocess \ No newline at end of file + CLI_E2E_DEFAULT_RUN_METHOD: subprocess From 9ad228deacbdd67ac0b6249a93ccd42f52a6f457 Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Fri, 6 Mar 2026 14:39:42 +0530 Subject: [PATCH 04/11] Optimize disk space management in CLI and PAM E2E workflows; update job names for clarity. --- .github/workflows/run-cli-e2e-tests.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-cli-e2e-tests.yml b/.github/workflows/run-cli-e2e-tests.yml index ef1caa4d..02ce4cd1 100644 --- a/.github/workflows/run-cli-e2e-tests.yml +++ b/.github/workflows/run-cli-e2e-tests.yml @@ -9,7 +9,7 @@ on: jobs: test: runs-on: ubuntu-latest - name: General E2E Tests + name: CLI End-to-End Testing steps: - uses: actions/checkout@v6 @@ -26,6 +26,14 @@ jobs: with: repository: infisical/infisical path: infisical + - name: Free disk space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + docker system prune -af + df -h - name: Test with the Go CLI run: go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/proxy github.com/infisical/cli/e2e-tests/relay working-directory: ./e2e @@ -36,7 +44,7 @@ jobs: pam-test: runs-on: ubuntu-latest - name: PAM E2E Tests + name: PAM End-to-End Testing steps: - uses: actions/checkout@v6 @@ -53,6 +61,14 @@ jobs: with: repository: infisical/infisical path: infisical + - name: Free disk space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + docker system prune -af + df -h - name: Test PAM Resources run: go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/pam working-directory: ./e2e From 611ff8294c552fbd5ed9eb938bd5c74723607ec7 Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Fri, 6 Mar 2026 20:32:54 +0530 Subject: [PATCH 05/11] Refactor PAM helper functions and tests into separate files; add support for SSH PAM resources in E2E tests. --- e2e/openapi-cfg.yaml | 2 + e2e/packages/client/client.gen.go | 5744 +++++------------ e2e/pam/main_test.go | 13 + .../{pam_helpers.go => pam_helpers_test.go} | 6 +- e2e/pam/postgres_test.go | 7 - e2e/pam/ssh_test.go | 191 + e2e/util/helpers.go | 4 + 7 files changed, 1894 insertions(+), 4073 deletions(-) create mode 100644 e2e/pam/main_test.go rename e2e/pam/{pam_helpers.go => pam_helpers_test.go} (97%) create mode 100644 e2e/pam/ssh_test.go diff --git a/e2e/openapi-cfg.yaml b/e2e/openapi-cfg.yaml index e66adbad..d79e069b 100644 --- a/e2e/openapi-cfg.yaml +++ b/e2e/openapi-cfg.yaml @@ -26,3 +26,5 @@ output-options: - listSecretsV4 - createPostgresPamResource - createPostgresPamAccount + - createSshPamResource + - createSshPamAccount diff --git a/e2e/packages/client/client.gen.go b/e2e/packages/client/client.gen.go index 68d5e8f7..43d20de7 100644 --- a/e2e/packages/client/client.gen.go +++ b/e2e/packages/client/client.gen.go @@ -22,216 +22,39 @@ const ( BearerAuthScopes = "bearerAuth.Scopes" ) -// Defines values for CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials. +// Defines values for CreateSshPamAccountJSONBodyCredentials0AuthMethod. const ( - CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentialsFalse CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials = false + CreateSshPamAccountJSONBodyCredentials0AuthMethodPassword CreateSshPamAccountJSONBodyCredentials0AuthMethod = "password" ) -// Defines values for CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider. +// Defines values for CreateSshPamAccountJSONBodyCredentials1AuthMethod. const ( - CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderAzureDns CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "azure-dns" - CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderCloudflare CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "cloudflare" - CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderDnsMadeEasy CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "dns-made-easy" - CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderRoute53 CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "route53" + CreateSshPamAccountJSONBodyCredentials1AuthMethodPublicKey CreateSshPamAccountJSONBodyCredentials1AuthMethod = "public-key" ) -// Defines values for CreateAcmeCertificateAuthorityV1JSONBodyStatus. +// Defines values for CreateSshPamAccountJSONBodyCredentials2AuthMethod. const ( - CreateAcmeCertificateAuthorityV1JSONBodyStatusActive CreateAcmeCertificateAuthorityV1JSONBodyStatus = "active" - CreateAcmeCertificateAuthorityV1JSONBodyStatusDisabled CreateAcmeCertificateAuthorityV1JSONBodyStatus = "disabled" - CreateAcmeCertificateAuthorityV1JSONBodyStatusPendingCertificate CreateAcmeCertificateAuthorityV1JSONBodyStatus = "pending-certificate" + CreateSshPamAccountJSONBodyCredentials2AuthMethodCertificate CreateSshPamAccountJSONBodyCredentials2AuthMethod = "certificate" ) -// Defines values for UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider. -const ( - UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderAzureDns UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "azure-dns" - UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderCloudflare UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "cloudflare" - UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderDnsMadeEasy UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "dns-made-easy" - UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProviderRoute53 UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider = "route53" -) - -// Defines values for UpdateAcmeCertificateAuthorityV1JSONBodyStatus. -const ( - UpdateAcmeCertificateAuthorityV1JSONBodyStatusActive UpdateAcmeCertificateAuthorityV1JSONBodyStatus = "active" - UpdateAcmeCertificateAuthorityV1JSONBodyStatusDisabled UpdateAcmeCertificateAuthorityV1JSONBodyStatus = "disabled" - UpdateAcmeCertificateAuthorityV1JSONBodyStatusPendingCertificate UpdateAcmeCertificateAuthorityV1JSONBodyStatus = "pending-certificate" -) - -// Defines values for CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm. -const ( - CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmECPrime256v1 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "EC_prime256v1" - CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmECSecp384r1 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "EC_secp384r1" - CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmECSecp521r1 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "EC_secp521r1" - CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmRSA2048 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "RSA_2048" - CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmRSA3072 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "RSA_3072" - CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmRSA4096 CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "RSA_4096" -) - -// Defines values for CreateInternalCertificateAuthorityV1JSONBodyConfigurationType. -const ( - Intermediate CreateInternalCertificateAuthorityV1JSONBodyConfigurationType = "intermediate" - Root CreateInternalCertificateAuthorityV1JSONBodyConfigurationType = "root" -) - -// Defines values for CreateInternalCertificateAuthorityV1JSONBodyStatus. -const ( - Active CreateInternalCertificateAuthorityV1JSONBodyStatus = "active" - Disabled CreateInternalCertificateAuthorityV1JSONBodyStatus = "disabled" - PendingCertificate CreateInternalCertificateAuthorityV1JSONBodyStatus = "pending-certificate" -) - -// Defines values for CreateCertificatePolicyJSONBodyBasicConstraintsIsCA. -const ( - Allowed CreateCertificatePolicyJSONBodyBasicConstraintsIsCA = "allowed" - Denied CreateCertificatePolicyJSONBodyBasicConstraintsIsCA = "denied" - Required CreateCertificatePolicyJSONBodyBasicConstraintsIsCA = "required" -) - -// Defines values for CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed. -const ( - CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedClientAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "client_auth" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedCodeSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "code_signing" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedEmailProtection CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "email_protection" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedOcspSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "ocsp_signing" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedServerAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "server_auth" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedTimeStamping CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "time_stamping" -) - -// Defines values for CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied. -const ( - CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedClientAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "client_auth" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedCodeSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "code_signing" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedEmailProtection CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "email_protection" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedOcspSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "ocsp_signing" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedServerAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "server_auth" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedTimeStamping CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "time_stamping" -) - -// Defines values for CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired. -const ( - CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredClientAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "client_auth" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredCodeSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "code_signing" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredEmailProtection CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "email_protection" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredOcspSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "ocsp_signing" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredServerAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "server_auth" - CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredTimeStamping CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "time_stamping" -) - -// Defines values for CreateCertificatePolicyJSONBodyKeyUsagesAllowed. -const ( - CreateCertificatePolicyJSONBodyKeyUsagesAllowedCrlSign CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "crl_sign" - CreateCertificatePolicyJSONBodyKeyUsagesAllowedDataEncipherment CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "data_encipherment" - CreateCertificatePolicyJSONBodyKeyUsagesAllowedDecipherOnly CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "decipher_only" - CreateCertificatePolicyJSONBodyKeyUsagesAllowedDigitalSignature CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "digital_signature" - CreateCertificatePolicyJSONBodyKeyUsagesAllowedEncipherOnly CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "encipher_only" - CreateCertificatePolicyJSONBodyKeyUsagesAllowedKeyAgreement CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "key_agreement" - CreateCertificatePolicyJSONBodyKeyUsagesAllowedKeyCertSign CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "key_cert_sign" - CreateCertificatePolicyJSONBodyKeyUsagesAllowedKeyEncipherment CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "key_encipherment" - CreateCertificatePolicyJSONBodyKeyUsagesAllowedNonRepudiation CreateCertificatePolicyJSONBodyKeyUsagesAllowed = "non_repudiation" -) - -// Defines values for CreateCertificatePolicyJSONBodyKeyUsagesDenied. -const ( - CreateCertificatePolicyJSONBodyKeyUsagesDeniedCrlSign CreateCertificatePolicyJSONBodyKeyUsagesDenied = "crl_sign" - CreateCertificatePolicyJSONBodyKeyUsagesDeniedDataEncipherment CreateCertificatePolicyJSONBodyKeyUsagesDenied = "data_encipherment" - CreateCertificatePolicyJSONBodyKeyUsagesDeniedDecipherOnly CreateCertificatePolicyJSONBodyKeyUsagesDenied = "decipher_only" - CreateCertificatePolicyJSONBodyKeyUsagesDeniedDigitalSignature CreateCertificatePolicyJSONBodyKeyUsagesDenied = "digital_signature" - CreateCertificatePolicyJSONBodyKeyUsagesDeniedEncipherOnly CreateCertificatePolicyJSONBodyKeyUsagesDenied = "encipher_only" - CreateCertificatePolicyJSONBodyKeyUsagesDeniedKeyAgreement CreateCertificatePolicyJSONBodyKeyUsagesDenied = "key_agreement" - CreateCertificatePolicyJSONBodyKeyUsagesDeniedKeyCertSign CreateCertificatePolicyJSONBodyKeyUsagesDenied = "key_cert_sign" - CreateCertificatePolicyJSONBodyKeyUsagesDeniedKeyEncipherment CreateCertificatePolicyJSONBodyKeyUsagesDenied = "key_encipherment" - CreateCertificatePolicyJSONBodyKeyUsagesDeniedNonRepudiation CreateCertificatePolicyJSONBodyKeyUsagesDenied = "non_repudiation" -) - -// Defines values for CreateCertificatePolicyJSONBodyKeyUsagesRequired. -const ( - CreateCertificatePolicyJSONBodyKeyUsagesRequiredCrlSign CreateCertificatePolicyJSONBodyKeyUsagesRequired = "crl_sign" - CreateCertificatePolicyJSONBodyKeyUsagesRequiredDataEncipherment CreateCertificatePolicyJSONBodyKeyUsagesRequired = "data_encipherment" - CreateCertificatePolicyJSONBodyKeyUsagesRequiredDecipherOnly CreateCertificatePolicyJSONBodyKeyUsagesRequired = "decipher_only" - CreateCertificatePolicyJSONBodyKeyUsagesRequiredDigitalSignature CreateCertificatePolicyJSONBodyKeyUsagesRequired = "digital_signature" - CreateCertificatePolicyJSONBodyKeyUsagesRequiredEncipherOnly CreateCertificatePolicyJSONBodyKeyUsagesRequired = "encipher_only" - CreateCertificatePolicyJSONBodyKeyUsagesRequiredKeyAgreement CreateCertificatePolicyJSONBodyKeyUsagesRequired = "key_agreement" - CreateCertificatePolicyJSONBodyKeyUsagesRequiredKeyCertSign CreateCertificatePolicyJSONBodyKeyUsagesRequired = "key_cert_sign" - CreateCertificatePolicyJSONBodyKeyUsagesRequiredKeyEncipherment CreateCertificatePolicyJSONBodyKeyUsagesRequired = "key_encipherment" - CreateCertificatePolicyJSONBodyKeyUsagesRequiredNonRepudiation CreateCertificatePolicyJSONBodyKeyUsagesRequired = "non_repudiation" -) - -// Defines values for CreateCertificatePolicyJSONBodySansType. -const ( - DnsName CreateCertificatePolicyJSONBodySansType = "dns_name" - Email CreateCertificatePolicyJSONBodySansType = "email" - IpAddress CreateCertificatePolicyJSONBodySansType = "ip_address" - Uri CreateCertificatePolicyJSONBodySansType = "uri" -) - -// Defines values for CreateCertificatePolicyJSONBodySubjectType. -const ( - CommonName CreateCertificatePolicyJSONBodySubjectType = "common_name" - Country CreateCertificatePolicyJSONBodySubjectType = "country" - Locality CreateCertificatePolicyJSONBodySubjectType = "locality" - Organization CreateCertificatePolicyJSONBodySubjectType = "organization" - OrganizationalUnit CreateCertificatePolicyJSONBodySubjectType = "organizational_unit" - State CreateCertificatePolicyJSONBodySubjectType = "state" -) - -// Defines values for CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages. -const ( - CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesClientAuth CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "client_auth" - CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesCodeSigning CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "code_signing" - CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesEmailProtection CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "email_protection" - CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesOcspSigning CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "ocsp_signing" - CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesServerAuth CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "server_auth" - CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesTimeStamping CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "time_stamping" -) - -// Defines values for CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm. -const ( - CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmECPrime256v1 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "EC_prime256v1" - CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmECSecp384r1 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "EC_secp384r1" - CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmRSA2048 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "RSA_2048" - CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmRSA3072 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "RSA_3072" - CreateCertificateProfileJSONBodyDefaultsKeyAlgorithmRSA4096 CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm = "RSA_4096" -) - -// Defines values for CreateCertificateProfileJSONBodyDefaultsKeyUsages. -const ( - CreateCertificateProfileJSONBodyDefaultsKeyUsagesCrlSign CreateCertificateProfileJSONBodyDefaultsKeyUsages = "crl_sign" - CreateCertificateProfileJSONBodyDefaultsKeyUsagesDataEncipherment CreateCertificateProfileJSONBodyDefaultsKeyUsages = "data_encipherment" - CreateCertificateProfileJSONBodyDefaultsKeyUsagesDecipherOnly CreateCertificateProfileJSONBodyDefaultsKeyUsages = "decipher_only" - CreateCertificateProfileJSONBodyDefaultsKeyUsagesDigitalSignature CreateCertificateProfileJSONBodyDefaultsKeyUsages = "digital_signature" - CreateCertificateProfileJSONBodyDefaultsKeyUsagesEncipherOnly CreateCertificateProfileJSONBodyDefaultsKeyUsages = "encipher_only" - CreateCertificateProfileJSONBodyDefaultsKeyUsagesKeyAgreement CreateCertificateProfileJSONBodyDefaultsKeyUsages = "key_agreement" - CreateCertificateProfileJSONBodyDefaultsKeyUsagesKeyCertSign CreateCertificateProfileJSONBodyDefaultsKeyUsages = "key_cert_sign" - CreateCertificateProfileJSONBodyDefaultsKeyUsagesKeyEncipherment CreateCertificateProfileJSONBodyDefaultsKeyUsages = "key_encipherment" - CreateCertificateProfileJSONBodyDefaultsKeyUsagesNonRepudiation CreateCertificateProfileJSONBodyDefaultsKeyUsages = "non_repudiation" -) - -// Defines values for CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm. +// Defines values for CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod. const ( - ECDSASHA256 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "ECDSA-SHA256" - ECDSASHA384 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "ECDSA-SHA384" - ECDSASHA512 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "ECDSA-SHA512" - RSASHA256 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "RSA-SHA256" - RSASHA384 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "RSA-SHA384" - RSASHA512 CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "RSA-SHA512" + ServiceAccountToken CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod = "service-account-token" ) -// Defines values for CreateCertificateProfileJSONBodyEnrollmentType. +// Defines values for CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod. const ( - Acme CreateCertificateProfileJSONBodyEnrollmentType = "acme" - Api CreateCertificateProfileJSONBodyEnrollmentType = "api" - Est CreateCertificateProfileJSONBodyEnrollmentType = "est" + CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethodPassword CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod = "password" ) -// Defines values for CreateCertificateProfileJSONBodyIssuerType. +// Defines values for CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod. const ( - Ca CreateCertificateProfileJSONBodyIssuerType = "ca" - SelfSigned CreateCertificateProfileJSONBodyIssuerType = "self-signed" + CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethodPublicKey CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod = "public-key" ) -// Defines values for CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod. +// Defines values for CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod. const ( - ServiceAccountToken CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod = "service-account-token" + CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethodCertificate CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod = "certificate" ) // Defines values for CreateProjectJSONBodyType. @@ -306,8 +129,8 @@ const ( // Defines values for GetSecretByNameV4ParamsIncludeImports. const ( - False GetSecretByNameV4ParamsIncludeImports = "false" - True GetSecretByNameV4ParamsIncludeImports = "true" + GetSecretByNameV4ParamsIncludeImportsFalse GetSecretByNameV4ParamsIncludeImports = "false" + GetSecretByNameV4ParamsIncludeImportsTrue GetSecretByNameV4ParamsIncludeImports = "true" ) // Defines values for UpdateSecretV4JSONBodyType. @@ -330,38 +153,6 @@ type AdminSignUpJSONBody struct { Password string `json:"password"` } -// CreateCloudflareAppConnectionJSONBody defines parameters for CreateCloudflareAppConnection. -type CreateCloudflareAppConnectionJSONBody struct { - // Description An optional description for the Cloudflare Connection. - Description *string `json:"description"` - - // GatewayId Not supported for Cloudflare Connections. - GatewayId *CreateCloudflareAppConnectionJSONBody_GatewayId `json:"gatewayId,omitempty"` - - // IsPlatformManagedCredentials Not supported for Cloudflare Connections. - IsPlatformManagedCredentials *CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials `json:"isPlatformManagedCredentials,omitempty"` - - // Name The name of the Cloudflare Connection to create. Must be slug-friendly. - Name string `json:"name"` - - // ProjectId The ID of the project to create the Cloudflare Connection in. - ProjectId *string `json:"projectId,omitempty"` -} - -// CreateCloudflareAppConnectionJSONBodyGatewayId0 defines parameters for CreateCloudflareAppConnection. -type CreateCloudflareAppConnectionJSONBodyGatewayId0 = interface{} - -// CreateCloudflareAppConnectionJSONBodyGatewayId1 defines parameters for CreateCloudflareAppConnection. -type CreateCloudflareAppConnectionJSONBodyGatewayId1 = interface{} - -// CreateCloudflareAppConnectionJSONBody_GatewayId defines parameters for CreateCloudflareAppConnection. -type CreateCloudflareAppConnectionJSONBody_GatewayId struct { - union json.RawMessage -} - -// CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials defines parameters for CreateCloudflareAppConnection. -type CreateCloudflareAppConnectionJSONBodyIsPlatformManagedCredentials bool - // AttachTokenAuthJSONBody defines parameters for AttachTokenAuth. type AttachTokenAuthJSONBody struct { // AccessTokenMaxTTL The maximum lifetime for an access token in seconds. @@ -388,344 +179,6 @@ type CreateTokenAuthTokenJSONBody struct { OrganizationSlug *string `json:"organizationSlug,omitempty"` } -// AttachUniversalAuthJSONBody defines parameters for AttachUniversalAuth. -type AttachUniversalAuthJSONBody struct { - // AccessTokenMaxTTL The maximum lifetime for an access token in seconds. This value will be referenced at renewal time. - AccessTokenMaxTTL *int `json:"accessTokenMaxTTL,omitempty"` - - // AccessTokenNumUsesLimit The maximum number of times that an access token can be used; a value of 0 implies infinite number of uses. - AccessTokenNumUsesLimit *int `json:"accessTokenNumUsesLimit,omitempty"` - - // AccessTokenPeriod The period for an access token in seconds. This value will be referenced at renewal time. Default value is 0. - AccessTokenPeriod *int `json:"accessTokenPeriod,omitempty"` - - // AccessTokenTTL The lifetime for an access token in seconds. This value will be referenced at renewal time. - AccessTokenTTL *int `json:"accessTokenTTL,omitempty"` - - // AccessTokenTrustedIps A list of IPs or CIDR ranges that access tokens can be used from. You can use 0.0.0.0/0, to allow usage from any network address. - AccessTokenTrustedIps *[]struct { - IpAddress string `json:"ipAddress"` - } `json:"accessTokenTrustedIps,omitempty"` - - // ClientSecretTrustedIps A list of IPs or CIDR ranges that the Client Secret can be used from together with the Client ID to get back an access token. You can use 0.0.0.0/0, to allow usage from any network address. - ClientSecretTrustedIps *[]struct { - IpAddress string `json:"ipAddress"` - } `json:"clientSecretTrustedIps,omitempty"` - - // LockoutCounterResetSeconds How long to wait from the most recent failed login until resetting the lockout counter. - LockoutCounterResetSeconds *float32 `json:"lockoutCounterResetSeconds,omitempty"` - - // LockoutDurationSeconds How long an identity auth method lockout lasts. - LockoutDurationSeconds *float32 `json:"lockoutDurationSeconds,omitempty"` - - // LockoutEnabled Whether the lockout feature is enabled. - LockoutEnabled *bool `json:"lockoutEnabled,omitempty"` - - // LockoutThreshold The amount of times login must fail before locking the identity auth method. - LockoutThreshold *float32 `json:"lockoutThreshold,omitempty"` -} - -// CreateUniversalAuthClientSecretJSONBody defines parameters for CreateUniversalAuthClientSecret. -type CreateUniversalAuthClientSecretJSONBody struct { - // Description The description of the client secret. - Description *string `json:"description,omitempty"` - - // NumUsesLimit The maximum number of times that the client secret can be used; a value of 0 implies infinite number of uses. - NumUsesLimit *float32 `json:"numUsesLimit,omitempty"` - - // Ttl The lifetime for the client secret in seconds. - Ttl *float32 `json:"ttl,omitempty"` -} - -// CreateAcmeCertificateAuthorityV1JSONBody defines parameters for CreateAcmeCertificateAuthorityV1. -type CreateAcmeCertificateAuthorityV1JSONBody struct { - Configuration struct { - // AccountEmail The email address for the ACME Certificate Authority. - AccountEmail string `json:"accountEmail"` - - // DirectoryUrl The directory URL for the ACME Certificate Authority. - DirectoryUrl string `json:"directoryUrl"` - - // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. - DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` - DnsProviderConfig struct { - // HostedZoneId The hosted zone ID for the ACME Certificate Authority. - HostedZoneId string `json:"hostedZoneId"` - - // Provider The DNS provider for the ACME Certificate Authority. - Provider CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider `json:"provider"` - } `json:"dnsProviderConfig"` - - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabKid *string `json:"eabKid,omitempty"` - } `json:"configuration"` - - // Name The name of the ACME-compatible CA Certificate Authority to create. Must be slug-friendly. - Name string `json:"name"` - - // ProjectId The ID of the project to create the Certificate Authority in. - ProjectId openapi_types.UUID `json:"projectId"` - - // Status The status of the ACME-compatible CA Certificate Authority. - Status CreateAcmeCertificateAuthorityV1JSONBodyStatus `json:"status"` -} - -// CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider defines parameters for CreateAcmeCertificateAuthorityV1. -type CreateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider string - -// CreateAcmeCertificateAuthorityV1JSONBodyStatus defines parameters for CreateAcmeCertificateAuthorityV1. -type CreateAcmeCertificateAuthorityV1JSONBodyStatus string - -// UpdateAcmeCertificateAuthorityV1JSONBody defines parameters for UpdateAcmeCertificateAuthorityV1. -type UpdateAcmeCertificateAuthorityV1JSONBody struct { - Configuration *struct { - // AccountEmail The email address for the ACME Certificate Authority. - AccountEmail string `json:"accountEmail"` - - // DirectoryUrl The directory URL for the ACME Certificate Authority. - DirectoryUrl string `json:"directoryUrl"` - - // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. - DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` - DnsProviderConfig struct { - // HostedZoneId The hosted zone ID for the ACME Certificate Authority. - HostedZoneId string `json:"hostedZoneId"` - - // Provider The DNS provider for the ACME Certificate Authority. - Provider UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider `json:"provider"` - } `json:"dnsProviderConfig"` - - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabKid *string `json:"eabKid,omitempty"` - } `json:"configuration,omitempty"` - - // Status The updated status of the ACME-compatible CA Certificate Authority. - Status *UpdateAcmeCertificateAuthorityV1JSONBodyStatus `json:"status,omitempty"` -} - -// UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider defines parameters for UpdateAcmeCertificateAuthorityV1. -type UpdateAcmeCertificateAuthorityV1JSONBodyConfigurationDnsProviderConfigProvider string - -// UpdateAcmeCertificateAuthorityV1JSONBodyStatus defines parameters for UpdateAcmeCertificateAuthorityV1. -type UpdateAcmeCertificateAuthorityV1JSONBodyStatus string - -// CreateInternalCertificateAuthorityV1JSONBody defines parameters for CreateInternalCertificateAuthorityV1. -type CreateInternalCertificateAuthorityV1JSONBody struct { - Configuration struct { - ActiveCaCertId *openapi_types.UUID `json:"activeCaCertId"` - - // CommonName The common name (CN) for the CA. - CommonName *string `json:"commonName,omitempty"` - - // Country The country name (C) for the CA. - Country *string `json:"country,omitempty"` - Dn *string `json:"dn"` - - // FriendlyName A friendly name for the CA. - FriendlyName *string `json:"friendlyName,omitempty"` - - // KeyAlgorithm The type of public key algorithm and size, in bits, of the key pair for the CA; when you create an intermediate CA, you must use a key algorithm supported by the parent CA. - KeyAlgorithm CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm `json:"keyAlgorithm"` - - // Locality The locality name for the CA. - Locality *string `json:"locality,omitempty"` - - // MaxPathLength The maximum number of intermediate CAs that may follow this CA in the certificate / CA chain. A maxPathLength of -1 implies no path limit on the chain. - MaxPathLength *float32 `json:"maxPathLength"` - - // NotAfter The date and time when the CA expires in YYYY-MM-DDTHH:mm:ss.sssZ format. - NotAfter *string `json:"notAfter,omitempty"` - - // NotBefore The date and time when the CA becomes valid in YYYY-MM-DDTHH:mm:ss.sssZ format. - NotBefore *string `json:"notBefore,omitempty"` - - // Organization The organization (O) for the CA. - Organization *string `json:"organization,omitempty"` - - // Ou The organization unit (OU) for the CA. - Ou *string `json:"ou,omitempty"` - ParentCaId *openapi_types.UUID `json:"parentCaId"` - - // Province The state of province name for the CA. - Province *string `json:"province,omitempty"` - SerialNumber *string `json:"serialNumber"` - - // Type The type of CA to create. - Type CreateInternalCertificateAuthorityV1JSONBodyConfigurationType `json:"type"` - } `json:"configuration"` - - // Name The name of the Internal Certificate Authority to create. Must be slug-friendly. - Name string `json:"name"` - - // ProjectId The ID of the project to create the Certificate Authority in. - ProjectId openapi_types.UUID `json:"projectId"` - - // Status The status of the Internal Certificate Authority. - Status CreateInternalCertificateAuthorityV1JSONBodyStatus `json:"status"` -} - -// CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm defines parameters for CreateInternalCertificateAuthorityV1. -type CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm string - -// CreateInternalCertificateAuthorityV1JSONBodyConfigurationType defines parameters for CreateInternalCertificateAuthorityV1. -type CreateInternalCertificateAuthorityV1JSONBodyConfigurationType string - -// CreateInternalCertificateAuthorityV1JSONBodyStatus defines parameters for CreateInternalCertificateAuthorityV1. -type CreateInternalCertificateAuthorityV1JSONBodyStatus string - -// CreateCertificatePolicyJSONBody defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBody struct { - Algorithms *struct { - KeyAlgorithm *[]string `json:"keyAlgorithm,omitempty"` - Signature *[]string `json:"signature,omitempty"` - } `json:"algorithms,omitempty"` - BasicConstraints *struct { - IsCA *CreateCertificatePolicyJSONBodyBasicConstraintsIsCA `json:"isCA,omitempty"` - MaxPathLength *int `json:"maxPathLength,omitempty"` - } `json:"basicConstraints"` - Description *string `json:"description,omitempty"` - ExtendedKeyUsages *struct { - Allowed *[]CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed `json:"allowed,omitempty"` - Denied *[]CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied `json:"denied,omitempty"` - Required *[]CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired `json:"required,omitempty"` - } `json:"extendedKeyUsages,omitempty"` - KeyUsages *struct { - Allowed *[]CreateCertificatePolicyJSONBodyKeyUsagesAllowed `json:"allowed,omitempty"` - Denied *[]CreateCertificatePolicyJSONBodyKeyUsagesDenied `json:"denied,omitempty"` - Required *[]CreateCertificatePolicyJSONBodyKeyUsagesRequired `json:"required,omitempty"` - } `json:"keyUsages,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - Sans *[]struct { - Allowed *[]string `json:"allowed,omitempty"` - Denied *[]string `json:"denied,omitempty"` - Required *[]string `json:"required,omitempty"` - Type CreateCertificatePolicyJSONBodySansType `json:"type"` - } `json:"sans,omitempty"` - Subject *[]struct { - Allowed *[]string `json:"allowed,omitempty"` - Denied *[]string `json:"denied,omitempty"` - Required *[]string `json:"required,omitempty"` - Type CreateCertificatePolicyJSONBodySubjectType `json:"type"` - } `json:"subject,omitempty"` - Validity *struct { - Max *string `json:"max,omitempty"` - } `json:"validity,omitempty"` -} - -// CreateCertificatePolicyJSONBodyBasicConstraintsIsCA defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBodyBasicConstraintsIsCA string - -// CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed string - -// CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied string - -// CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired string - -// CreateCertificatePolicyJSONBodyKeyUsagesAllowed defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBodyKeyUsagesAllowed string - -// CreateCertificatePolicyJSONBodyKeyUsagesDenied defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBodyKeyUsagesDenied string - -// CreateCertificatePolicyJSONBodyKeyUsagesRequired defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBodyKeyUsagesRequired string - -// CreateCertificatePolicyJSONBodySansType defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBodySansType string - -// CreateCertificatePolicyJSONBodySubjectType defines parameters for CreateCertificatePolicy. -type CreateCertificatePolicyJSONBodySubjectType string - -// CreateCertificateProfileJSONBody defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBody struct { - AcmeConfig *struct { - SkipDnsOwnershipVerification *bool `json:"skipDnsOwnershipVerification,omitempty"` - SkipEabBinding *bool `json:"skipEabBinding,omitempty"` - } `json:"acmeConfig,omitempty"` - ApiConfig *struct { - AutoRenew *bool `json:"autoRenew,omitempty"` - RenewBeforeDays *float32 `json:"renewBeforeDays,omitempty"` - } `json:"apiConfig,omitempty"` - CaId *openapi_types.UUID `json:"caId,omitempty"` - CertificatePolicyId openapi_types.UUID `json:"certificatePolicyId"` - Defaults *struct { - BasicConstraints *struct { - IsCA bool `json:"isCA"` - PathLength *int `json:"pathLength,omitempty"` - } `json:"basicConstraints,omitempty"` - CommonName *string `json:"commonName,omitempty"` - Country *string `json:"country,omitempty"` - ExtendedKeyUsages *[]CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages `json:"extendedKeyUsages,omitempty"` - KeyAlgorithm *CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm `json:"keyAlgorithm,omitempty"` - KeyUsages *[]CreateCertificateProfileJSONBodyDefaultsKeyUsages `json:"keyUsages,omitempty"` - Locality *string `json:"locality,omitempty"` - Organization *string `json:"organization,omitempty"` - OrganizationalUnit *string `json:"organizationalUnit,omitempty"` - SignatureAlgorithm *CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm `json:"signatureAlgorithm,omitempty"` - State *string `json:"state,omitempty"` - TtlDays *int `json:"ttlDays,omitempty"` - } `json:"defaults"` - Description *string `json:"description,omitempty"` - EnrollmentType CreateCertificateProfileJSONBodyEnrollmentType `json:"enrollmentType"` - EstConfig *struct { - CaChain *string `json:"caChain,omitempty"` - DisableBootstrapCaValidation *bool `json:"disableBootstrapCaValidation,omitempty"` - Passphrase string `json:"passphrase"` - } `json:"estConfig,omitempty"` - ExternalConfigs *CreateCertificateProfileJSONBody_ExternalConfigs `json:"externalConfigs"` - IssuerType *CreateCertificateProfileJSONBodyIssuerType `json:"issuerType,omitempty"` - ProjectId string `json:"projectId"` - Slug string `json:"slug"` -} - -// CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages string - -// CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm string - -// CreateCertificateProfileJSONBodyDefaultsKeyUsages defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyDefaultsKeyUsages string - -// CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm string - -// CreateCertificateProfileJSONBodyEnrollmentType defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyEnrollmentType string - -// CreateCertificateProfileJSONBodyExternalConfigs0 defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyExternalConfigs0 struct { - // Template Certificate template name for Azure AD CS - Template string `json:"template"` -} - -// CreateCertificateProfileJSONBodyExternalConfigs1 defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyExternalConfigs1 = map[string]interface{} - -// CreateCertificateProfileJSONBodyExternalConfigs2 defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyExternalConfigs2 = map[string]interface{} - -// CreateCertificateProfileJSONBodyExternalConfigs3 defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyExternalConfigs3 = map[string]interface{} - -// CreateCertificateProfileJSONBody_ExternalConfigs defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBody_ExternalConfigs struct { - union json.RawMessage -} - -// CreateCertificateProfileJSONBodyIssuerType defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyIssuerType string - // CreateMachineIdentityJSONBody defines parameters for CreateMachineIdentity. type CreateMachineIdentityJSONBody struct { // HasDeleteProtection Prevents deletion of the identity when enabled. @@ -764,6 +217,56 @@ type CreatePostgresPamAccountJSONBody struct { RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` } +// CreateSshPamAccountJSONBody defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBody struct { + Credentials CreateSshPamAccountJSONBody_Credentials `json:"credentials"` + Description *string `json:"description"` + FolderId *openapi_types.UUID `json:"folderId,omitempty"` + Metadata *[]struct { + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + RequireMfa *bool `json:"requireMfa,omitempty"` + ResourceId openapi_types.UUID `json:"resourceId"` + RotationEnabled bool `json:"rotationEnabled"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` +} + +// CreateSshPamAccountJSONBodyCredentials0 defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials0 struct { + AuthMethod CreateSshPamAccountJSONBodyCredentials0AuthMethod `json:"authMethod"` + Password string `json:"password"` + Username string `json:"username"` +} + +// CreateSshPamAccountJSONBodyCredentials0AuthMethod defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials0AuthMethod string + +// CreateSshPamAccountJSONBodyCredentials1 defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials1 struct { + AuthMethod CreateSshPamAccountJSONBodyCredentials1AuthMethod `json:"authMethod"` + PrivateKey string `json:"privateKey"` + Username string `json:"username"` +} + +// CreateSshPamAccountJSONBodyCredentials1AuthMethod defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials1AuthMethod string + +// CreateSshPamAccountJSONBodyCredentials2 defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials2 struct { + AuthMethod CreateSshPamAccountJSONBodyCredentials2AuthMethod `json:"authMethod"` + Username string `json:"username"` +} + +// CreateSshPamAccountJSONBodyCredentials2AuthMethod defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials2AuthMethod string + +// CreateSshPamAccountJSONBody_Credentials defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBody_Credentials struct { + union json.RawMessage +} + // CreateKubernetesPamResourceJSONBody defines parameters for CreateKubernetesPamResource. type CreateKubernetesPamResourceJSONBody struct { ConnectionDetails struct { @@ -840,6 +343,56 @@ type CreateRedisPamResourceJSONBody struct { } `json:"rotationAccountCredentials"` } +// CreateSshPamResourceJSONBody defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBody struct { + ConnectionDetails struct { + Host string `json:"host"` + Port float32 `json:"port"` + } `json:"connectionDetails"` + GatewayId openapi_types.UUID `json:"gatewayId"` + Metadata *[]struct { + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId openapi_types.UUID `json:"projectId"` + RotationAccountCredentials *CreateSshPamResourceJSONBody_RotationAccountCredentials `json:"rotationAccountCredentials"` +} + +// CreateSshPamResourceJSONBodyRotationAccountCredentials0 defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials0 struct { + AuthMethod CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod `json:"authMethod"` + Password string `json:"password"` + Username string `json:"username"` +} + +// CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod string + +// CreateSshPamResourceJSONBodyRotationAccountCredentials1 defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials1 struct { + AuthMethod CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod `json:"authMethod"` + PrivateKey string `json:"privateKey"` + Username string `json:"username"` +} + +// CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod string + +// CreateSshPamResourceJSONBodyRotationAccountCredentials2 defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials2 struct { + AuthMethod CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod `json:"authMethod"` + Username string `json:"username"` +} + +// CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod string + +// CreateSshPamResourceJSONBody_RotationAccountCredentials defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBody_RotationAccountCredentials struct { + union json.RawMessage +} + // CreateProjectJSONBody defines parameters for CreateProject. type CreateProjectJSONBody struct { HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"` @@ -1069,42 +622,21 @@ type CreateSecretV4JSONBodyType string // AdminSignUpJSONRequestBody defines body for AdminSignUp for application/json ContentType. type AdminSignUpJSONRequestBody AdminSignUpJSONBody -// CreateCloudflareAppConnectionJSONRequestBody defines body for CreateCloudflareAppConnection for application/json ContentType. -type CreateCloudflareAppConnectionJSONRequestBody CreateCloudflareAppConnectionJSONBody - // AttachTokenAuthJSONRequestBody defines body for AttachTokenAuth for application/json ContentType. type AttachTokenAuthJSONRequestBody AttachTokenAuthJSONBody // CreateTokenAuthTokenJSONRequestBody defines body for CreateTokenAuthToken for application/json ContentType. type CreateTokenAuthTokenJSONRequestBody CreateTokenAuthTokenJSONBody -// AttachUniversalAuthJSONRequestBody defines body for AttachUniversalAuth for application/json ContentType. -type AttachUniversalAuthJSONRequestBody AttachUniversalAuthJSONBody - -// CreateUniversalAuthClientSecretJSONRequestBody defines body for CreateUniversalAuthClientSecret for application/json ContentType. -type CreateUniversalAuthClientSecretJSONRequestBody CreateUniversalAuthClientSecretJSONBody - -// CreateAcmeCertificateAuthorityV1JSONRequestBody defines body for CreateAcmeCertificateAuthorityV1 for application/json ContentType. -type CreateAcmeCertificateAuthorityV1JSONRequestBody CreateAcmeCertificateAuthorityV1JSONBody - -// UpdateAcmeCertificateAuthorityV1JSONRequestBody defines body for UpdateAcmeCertificateAuthorityV1 for application/json ContentType. -type UpdateAcmeCertificateAuthorityV1JSONRequestBody UpdateAcmeCertificateAuthorityV1JSONBody - -// CreateInternalCertificateAuthorityV1JSONRequestBody defines body for CreateInternalCertificateAuthorityV1 for application/json ContentType. -type CreateInternalCertificateAuthorityV1JSONRequestBody CreateInternalCertificateAuthorityV1JSONBody - -// CreateCertificatePolicyJSONRequestBody defines body for CreateCertificatePolicy for application/json ContentType. -type CreateCertificatePolicyJSONRequestBody CreateCertificatePolicyJSONBody - -// CreateCertificateProfileJSONRequestBody defines body for CreateCertificateProfile for application/json ContentType. -type CreateCertificateProfileJSONRequestBody CreateCertificateProfileJSONBody - // CreateMachineIdentityJSONRequestBody defines body for CreateMachineIdentity for application/json ContentType. type CreateMachineIdentityJSONRequestBody CreateMachineIdentityJSONBody // CreatePostgresPamAccountJSONRequestBody defines body for CreatePostgresPamAccount for application/json ContentType. type CreatePostgresPamAccountJSONRequestBody CreatePostgresPamAccountJSONBody +// CreateSshPamAccountJSONRequestBody defines body for CreateSshPamAccount for application/json ContentType. +type CreateSshPamAccountJSONRequestBody CreateSshPamAccountJSONBody + // CreateKubernetesPamResourceJSONRequestBody defines body for CreateKubernetesPamResource for application/json ContentType. type CreateKubernetesPamResourceJSONRequestBody CreateKubernetesPamResourceJSONBody @@ -1114,6 +646,9 @@ type CreatePostgresPamResourceJSONRequestBody CreatePostgresPamResourceJSONBody // CreateRedisPamResourceJSONRequestBody defines body for CreateRedisPamResource for application/json ContentType. type CreateRedisPamResourceJSONRequestBody CreateRedisPamResourceJSONBody +// CreateSshPamResourceJSONRequestBody defines body for CreateSshPamResource for application/json ContentType. +type CreateSshPamResourceJSONRequestBody CreateSshPamResourceJSONBody + // CreateProjectJSONRequestBody defines body for CreateProject for application/json ContentType. type CreateProjectJSONRequestBody CreateProjectJSONBody @@ -1207,11 +742,6 @@ type ClientInterface interface { AdminSignUp(ctx context.Context, body AdminSignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateCloudflareAppConnectionWithBody request with any body - CreateCloudflareAppConnectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateCloudflareAppConnection(ctx context.Context, body CreateCloudflareAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // RefreshAuthToken request RefreshAuthToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1225,41 +755,6 @@ type ClientInterface interface { CreateTokenAuthToken(ctx context.Context, identityId string, body CreateTokenAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // AttachUniversalAuthWithBody request with any body - AttachUniversalAuthWithBody(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - AttachUniversalAuth(ctx context.Context, identityId string, body AttachUniversalAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateUniversalAuthClientSecretWithBody request with any body - CreateUniversalAuthClientSecretWithBody(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateUniversalAuthClientSecret(ctx context.Context, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateAcmeCertificateAuthorityV1WithBody request with any body - CreateAcmeCertificateAuthorityV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateAcmeCertificateAuthorityV1(ctx context.Context, body CreateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateAcmeCertificateAuthorityV1WithBody request with any body - UpdateAcmeCertificateAuthorityV1WithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateAcmeCertificateAuthorityV1(ctx context.Context, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateInternalCertificateAuthorityV1WithBody request with any body - CreateInternalCertificateAuthorityV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateInternalCertificateAuthorityV1(ctx context.Context, body CreateInternalCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateCertificatePolicyWithBody request with any body - CreateCertificatePolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateCertificatePolicy(ctx context.Context, body CreateCertificatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateCertificateProfileWithBody request with any body - CreateCertificateProfileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateCertificateProfile(ctx context.Context, body CreateCertificateProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateMachineIdentityWithBody request with any body CreateMachineIdentityWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1270,6 +765,11 @@ type ClientInterface interface { CreatePostgresPamAccount(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSshPamAccountWithBody request with any body + CreateSshPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSshPamAccount(ctx context.Context, body CreateSshPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateKubernetesPamResourceWithBody request with any body CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1285,6 +785,11 @@ type ClientInterface interface { CreateRedisPamResource(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSshPamResourceWithBody request with any body + CreateSshPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSshPamResource(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateProjectWithBody request with any body CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1347,30 +852,6 @@ func (c *Client) AdminSignUp(ctx context.Context, body AdminSignUpJSONRequestBod return c.Client.Do(req) } -func (c *Client) CreateCloudflareAppConnectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateCloudflareAppConnectionRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateCloudflareAppConnection(ctx context.Context, body CreateCloudflareAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateCloudflareAppConnectionRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) RefreshAuthToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewRefreshAuthTokenRequest(c.Server) if err != nil { @@ -1431,8 +912,8 @@ func (c *Client) CreateTokenAuthToken(ctx context.Context, identityId string, bo return c.Client.Do(req) } -func (c *Client) AttachUniversalAuthWithBody(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAttachUniversalAuthRequestWithBody(c.Server, identityId, contentType, body) +func (c *Client) CreateMachineIdentityWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateMachineIdentityRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1443,8 +924,8 @@ func (c *Client) AttachUniversalAuthWithBody(ctx context.Context, identityId str return c.Client.Do(req) } -func (c *Client) AttachUniversalAuth(ctx context.Context, identityId string, body AttachUniversalAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAttachUniversalAuthRequest(c.Server, identityId, body) +func (c *Client) CreateMachineIdentity(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateMachineIdentityRequest(c.Server, body) if err != nil { return nil, err } @@ -1455,8 +936,8 @@ func (c *Client) AttachUniversalAuth(ctx context.Context, identityId string, bod return c.Client.Do(req) } -func (c *Client) CreateUniversalAuthClientSecretWithBody(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUniversalAuthClientSecretRequestWithBody(c.Server, identityId, contentType, body) +func (c *Client) CreatePostgresPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamAccountRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1467,8 +948,8 @@ func (c *Client) CreateUniversalAuthClientSecretWithBody(ctx context.Context, id return c.Client.Do(req) } -func (c *Client) CreateUniversalAuthClientSecret(ctx context.Context, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUniversalAuthClientSecretRequest(c.Server, identityId, body) +func (c *Client) CreatePostgresPamAccount(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamAccountRequest(c.Server, body) if err != nil { return nil, err } @@ -1479,8 +960,8 @@ func (c *Client) CreateUniversalAuthClientSecret(ctx context.Context, identityId return c.Client.Do(req) } -func (c *Client) CreateAcmeCertificateAuthorityV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateAcmeCertificateAuthorityV1RequestWithBody(c.Server, contentType, body) +func (c *Client) CreateSshPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSshPamAccountRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1491,8 +972,8 @@ func (c *Client) CreateAcmeCertificateAuthorityV1WithBody(ctx context.Context, c return c.Client.Do(req) } -func (c *Client) CreateAcmeCertificateAuthorityV1(ctx context.Context, body CreateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateAcmeCertificateAuthorityV1Request(c.Server, body) +func (c *Client) CreateSshPamAccount(ctx context.Context, body CreateSshPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSshPamAccountRequest(c.Server, body) if err != nil { return nil, err } @@ -1503,8 +984,8 @@ func (c *Client) CreateAcmeCertificateAuthorityV1(ctx context.Context, body Crea return c.Client.Do(req) } -func (c *Client) UpdateAcmeCertificateAuthorityV1WithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateAcmeCertificateAuthorityV1RequestWithBody(c.Server, id, contentType, body) +func (c *Client) CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateKubernetesPamResourceRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1515,8 +996,8 @@ func (c *Client) UpdateAcmeCertificateAuthorityV1WithBody(ctx context.Context, i return c.Client.Do(req) } -func (c *Client) UpdateAcmeCertificateAuthorityV1(ctx context.Context, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateAcmeCertificateAuthorityV1Request(c.Server, id, body) +func (c *Client) CreateKubernetesPamResource(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateKubernetesPamResourceRequest(c.Server, body) if err != nil { return nil, err } @@ -1527,8 +1008,8 @@ func (c *Client) UpdateAcmeCertificateAuthorityV1(ctx context.Context, id string return c.Client.Do(req) } -func (c *Client) CreateInternalCertificateAuthorityV1WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateInternalCertificateAuthorityV1RequestWithBody(c.Server, contentType, body) +func (c *Client) CreatePostgresPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamResourceRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1539,8 +1020,8 @@ func (c *Client) CreateInternalCertificateAuthorityV1WithBody(ctx context.Contex return c.Client.Do(req) } -func (c *Client) CreateInternalCertificateAuthorityV1(ctx context.Context, body CreateInternalCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateInternalCertificateAuthorityV1Request(c.Server, body) +func (c *Client) CreatePostgresPamResource(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamResourceRequest(c.Server, body) if err != nil { return nil, err } @@ -1551,8 +1032,8 @@ func (c *Client) CreateInternalCertificateAuthorityV1(ctx context.Context, body return c.Client.Do(req) } -func (c *Client) CreateCertificatePolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateCertificatePolicyRequestWithBody(c.Server, contentType, body) +func (c *Client) CreateRedisPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateRedisPamResourceRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1563,8 +1044,8 @@ func (c *Client) CreateCertificatePolicyWithBody(ctx context.Context, contentTyp return c.Client.Do(req) } -func (c *Client) CreateCertificatePolicy(ctx context.Context, body CreateCertificatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateCertificatePolicyRequest(c.Server, body) +func (c *Client) CreateRedisPamResource(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateRedisPamResourceRequest(c.Server, body) if err != nil { return nil, err } @@ -1575,8 +1056,8 @@ func (c *Client) CreateCertificatePolicy(ctx context.Context, body CreateCertifi return c.Client.Do(req) } -func (c *Client) CreateCertificateProfileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateCertificateProfileRequestWithBody(c.Server, contentType, body) +func (c *Client) CreateSshPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSshPamResourceRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1587,8 +1068,8 @@ func (c *Client) CreateCertificateProfileWithBody(ctx context.Context, contentTy return c.Client.Do(req) } -func (c *Client) CreateCertificateProfile(ctx context.Context, body CreateCertificateProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateCertificateProfileRequest(c.Server, body) +func (c *Client) CreateSshPamResource(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSshPamResourceRequest(c.Server, body) if err != nil { return nil, err } @@ -1599,8 +1080,8 @@ func (c *Client) CreateCertificateProfile(ctx context.Context, body CreateCertif return c.Client.Do(req) } -func (c *Client) CreateMachineIdentityWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateMachineIdentityRequestWithBody(c.Server, contentType, body) +func (c *Client) CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateProjectRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1611,128 +1092,8 @@ func (c *Client) CreateMachineIdentityWithBody(ctx context.Context, contentType return c.Client.Do(req) } -func (c *Client) CreateMachineIdentity(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateMachineIdentityRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreatePostgresPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePostgresPamAccountRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreatePostgresPamAccount(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePostgresPamAccountRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateKubernetesPamResourceRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateKubernetesPamResource(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateKubernetesPamResourceRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreatePostgresPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePostgresPamResourceRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreatePostgresPamResource(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePostgresPamResourceRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateRedisPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateRedisPamResourceRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateRedisPamResource(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateRedisPamResourceRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateProjectRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateProject(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateProjectRequest(c.Server, body) +func (c *Client) CreateProject(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateProjectRequest(c.Server, body) if err != nil { return nil, err } @@ -1927,46 +1288,6 @@ func NewAdminSignUpRequestWithBody(server string, contentType string, body io.Re return req, nil } -// NewCreateCloudflareAppConnectionRequest calls the generic CreateCloudflareAppConnection builder with application/json body -func NewCreateCloudflareAppConnectionRequest(server string, body CreateCloudflareAppConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateCloudflareAppConnectionRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateCloudflareAppConnectionRequestWithBody generates requests for CreateCloudflareAppConnection with any type of body -func NewCreateCloudflareAppConnectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/app-connections/cloudflare") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - // NewRefreshAuthTokenRequest generates requests for RefreshAuthToken func NewRefreshAuthTokenRequest(server string) (*http.Request, error) { var err error @@ -2088,34 +1409,27 @@ func NewCreateTokenAuthTokenRequestWithBody(server string, identityId string, co return req, nil } -// NewAttachUniversalAuthRequest calls the generic AttachUniversalAuth builder with application/json body -func NewAttachUniversalAuthRequest(server string, identityId string, body AttachUniversalAuthJSONRequestBody) (*http.Request, error) { +// NewCreateMachineIdentityRequest calls the generic CreateMachineIdentity builder with application/json body +func NewCreateMachineIdentityRequest(server string, body CreateMachineIdentityJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewAttachUniversalAuthRequestWithBody(server, identityId, "application/json", bodyReader) + return NewCreateMachineIdentityRequestWithBody(server, "application/json", bodyReader) } -// NewAttachUniversalAuthRequestWithBody generates requests for AttachUniversalAuth with any type of body -func NewAttachUniversalAuthRequestWithBody(server string, identityId string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateMachineIdentityRequestWithBody generates requests for CreateMachineIdentity with any type of body +func NewCreateMachineIdentityRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identityId", runtime.ParamLocationPath, identityId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v1/auth/universal-auth/identities/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/identities") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2135,34 +1449,27 @@ func NewAttachUniversalAuthRequestWithBody(server string, identityId string, con return req, nil } -// NewCreateUniversalAuthClientSecretRequest calls the generic CreateUniversalAuthClientSecret builder with application/json body -func NewCreateUniversalAuthClientSecretRequest(server string, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody) (*http.Request, error) { +// NewCreatePostgresPamAccountRequest calls the generic CreatePostgresPamAccount builder with application/json body +func NewCreatePostgresPamAccountRequest(server string, body CreatePostgresPamAccountJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateUniversalAuthClientSecretRequestWithBody(server, identityId, "application/json", bodyReader) + return NewCreatePostgresPamAccountRequestWithBody(server, "application/json", bodyReader) } -// NewCreateUniversalAuthClientSecretRequestWithBody generates requests for CreateUniversalAuthClientSecret with any type of body -func NewCreateUniversalAuthClientSecretRequestWithBody(server string, identityId string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePostgresPamAccountRequestWithBody generates requests for CreatePostgresPamAccount with any type of body +func NewCreatePostgresPamAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identityId", runtime.ParamLocationPath, identityId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v1/auth/universal-auth/identities/%s/client-secrets", pathParam0) + operationPath := fmt.Sprintf("/api/v1/pam/accounts/postgres") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2182,19 +1489,19 @@ func NewCreateUniversalAuthClientSecretRequestWithBody(server string, identityId return req, nil } -// NewCreateAcmeCertificateAuthorityV1Request calls the generic CreateAcmeCertificateAuthorityV1 builder with application/json body -func NewCreateAcmeCertificateAuthorityV1Request(server string, body CreateAcmeCertificateAuthorityV1JSONRequestBody) (*http.Request, error) { +// NewCreateSshPamAccountRequest calls the generic CreateSshPamAccount builder with application/json body +func NewCreateSshPamAccountRequest(server string, body CreateSshPamAccountJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateAcmeCertificateAuthorityV1RequestWithBody(server, "application/json", bodyReader) + return NewCreateSshPamAccountRequestWithBody(server, "application/json", bodyReader) } -// NewCreateAcmeCertificateAuthorityV1RequestWithBody generates requests for CreateAcmeCertificateAuthorityV1 with any type of body -func NewCreateAcmeCertificateAuthorityV1RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSshPamAccountRequestWithBody generates requests for CreateSshPamAccount with any type of body +func NewCreateSshPamAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2202,7 +1509,7 @@ func NewCreateAcmeCertificateAuthorityV1RequestWithBody(server string, contentTy return nil, err } - operationPath := fmt.Sprintf("/api/v1/cert-manager/ca/acme") + operationPath := fmt.Sprintf("/api/v1/pam/accounts/ssh") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2222,34 +1529,27 @@ func NewCreateAcmeCertificateAuthorityV1RequestWithBody(server string, contentTy return req, nil } -// NewUpdateAcmeCertificateAuthorityV1Request calls the generic UpdateAcmeCertificateAuthorityV1 builder with application/json body -func NewUpdateAcmeCertificateAuthorityV1Request(server string, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody) (*http.Request, error) { +// NewCreateKubernetesPamResourceRequest calls the generic CreateKubernetesPamResource builder with application/json body +func NewCreateKubernetesPamResourceRequest(server string, body CreateKubernetesPamResourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateAcmeCertificateAuthorityV1RequestWithBody(server, id, "application/json", bodyReader) + return NewCreateKubernetesPamResourceRequestWithBody(server, "application/json", bodyReader) } -// NewUpdateAcmeCertificateAuthorityV1RequestWithBody generates requests for UpdateAcmeCertificateAuthorityV1 with any type of body -func NewUpdateAcmeCertificateAuthorityV1RequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateKubernetesPamResourceRequestWithBody generates requests for CreateKubernetesPamResource with any type of body +func NewCreateKubernetesPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v1/cert-manager/ca/acme/%s", pathParam0) + operationPath := fmt.Sprintf("/api/v1/pam/resources/kubernetes") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2259,7 +1559,7 @@ func NewUpdateAcmeCertificateAuthorityV1RequestWithBody(server string, id string return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -2269,19 +1569,19 @@ func NewUpdateAcmeCertificateAuthorityV1RequestWithBody(server string, id string return req, nil } -// NewCreateInternalCertificateAuthorityV1Request calls the generic CreateInternalCertificateAuthorityV1 builder with application/json body -func NewCreateInternalCertificateAuthorityV1Request(server string, body CreateInternalCertificateAuthorityV1JSONRequestBody) (*http.Request, error) { +// NewCreatePostgresPamResourceRequest calls the generic CreatePostgresPamResource builder with application/json body +func NewCreatePostgresPamResourceRequest(server string, body CreatePostgresPamResourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateInternalCertificateAuthorityV1RequestWithBody(server, "application/json", bodyReader) + return NewCreatePostgresPamResourceRequestWithBody(server, "application/json", bodyReader) } -// NewCreateInternalCertificateAuthorityV1RequestWithBody generates requests for CreateInternalCertificateAuthorityV1 with any type of body -func NewCreateInternalCertificateAuthorityV1RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePostgresPamResourceRequestWithBody generates requests for CreatePostgresPamResource with any type of body +func NewCreatePostgresPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2289,7 +1589,7 @@ func NewCreateInternalCertificateAuthorityV1RequestWithBody(server string, conte return nil, err } - operationPath := fmt.Sprintf("/api/v1/cert-manager/ca/internal") + operationPath := fmt.Sprintf("/api/v1/pam/resources/postgres") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2309,19 +1609,19 @@ func NewCreateInternalCertificateAuthorityV1RequestWithBody(server string, conte return req, nil } -// NewCreateCertificatePolicyRequest calls the generic CreateCertificatePolicy builder with application/json body -func NewCreateCertificatePolicyRequest(server string, body CreateCertificatePolicyJSONRequestBody) (*http.Request, error) { +// NewCreateRedisPamResourceRequest calls the generic CreateRedisPamResource builder with application/json body +func NewCreateRedisPamResourceRequest(server string, body CreateRedisPamResourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateCertificatePolicyRequestWithBody(server, "application/json", bodyReader) + return NewCreateRedisPamResourceRequestWithBody(server, "application/json", bodyReader) } -// NewCreateCertificatePolicyRequestWithBody generates requests for CreateCertificatePolicy with any type of body -func NewCreateCertificatePolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateRedisPamResourceRequestWithBody generates requests for CreateRedisPamResource with any type of body +func NewCreateRedisPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2329,7 +1629,7 @@ func NewCreateCertificatePolicyRequestWithBody(server string, contentType string return nil, err } - operationPath := fmt.Sprintf("/api/v1/cert-manager/certificate-policies") + operationPath := fmt.Sprintf("/api/v1/pam/resources/redis") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2349,19 +1649,19 @@ func NewCreateCertificatePolicyRequestWithBody(server string, contentType string return req, nil } -// NewCreateCertificateProfileRequest calls the generic CreateCertificateProfile builder with application/json body -func NewCreateCertificateProfileRequest(server string, body CreateCertificateProfileJSONRequestBody) (*http.Request, error) { +// NewCreateSshPamResourceRequest calls the generic CreateSshPamResource builder with application/json body +func NewCreateSshPamResourceRequest(server string, body CreateSshPamResourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateCertificateProfileRequestWithBody(server, "application/json", bodyReader) + return NewCreateSshPamResourceRequestWithBody(server, "application/json", bodyReader) } -// NewCreateCertificateProfileRequestWithBody generates requests for CreateCertificateProfile with any type of body -func NewCreateCertificateProfileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSshPamResourceRequestWithBody generates requests for CreateSshPamResource with any type of body +func NewCreateSshPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2369,7 +1669,7 @@ func NewCreateCertificateProfileRequestWithBody(server string, contentType strin return nil, err } - operationPath := fmt.Sprintf("/api/v1/cert-manager/certificate-profiles") + operationPath := fmt.Sprintf("/api/v1/pam/resources/ssh") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2389,19 +1689,19 @@ func NewCreateCertificateProfileRequestWithBody(server string, contentType strin return req, nil } -// NewCreateMachineIdentityRequest calls the generic CreateMachineIdentity builder with application/json body -func NewCreateMachineIdentityRequest(server string, body CreateMachineIdentityJSONRequestBody) (*http.Request, error) { +// NewCreateProjectRequest calls the generic CreateProject builder with application/json body +func NewCreateProjectRequest(server string, body CreateProjectJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateMachineIdentityRequestWithBody(server, "application/json", bodyReader) + return NewCreateProjectRequestWithBody(server, "application/json", bodyReader) } -// NewCreateMachineIdentityRequestWithBody generates requests for CreateMachineIdentity with any type of body -func NewCreateMachineIdentityRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateProjectRequestWithBody generates requests for CreateProject with any type of body +func NewCreateProjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2409,7 +1709,7 @@ func NewCreateMachineIdentityRequestWithBody(server string, contentType string, return nil, err } - operationPath := fmt.Sprintf("/api/v1/identities") + operationPath := fmt.Sprintf("/api/v1/projects") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2429,19 +1729,8 @@ func NewCreateMachineIdentityRequestWithBody(server string, contentType string, return req, nil } -// NewCreatePostgresPamAccountRequest calls the generic CreatePostgresPamAccount builder with application/json body -func NewCreatePostgresPamAccountRequest(server string, body CreatePostgresPamAccountJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreatePostgresPamAccountRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreatePostgresPamAccountRequestWithBody generates requests for CreatePostgresPamAccount with any type of body -func NewCreatePostgresPamAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewGetRelaysRequest generates requests for GetRelays +func NewGetRelaysRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2449,7 +1738,7 @@ func NewCreatePostgresPamAccountRequestWithBody(server string, contentType strin return nil, err } - operationPath := fmt.Sprintf("/api/v1/pam/accounts/postgres") + operationPath := fmt.Sprintf("/api/v1/relays") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2459,29 +1748,16 @@ func NewCreatePostgresPamAccountRequestWithBody(server string, contentType strin return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewCreateKubernetesPamResourceRequest calls the generic CreateKubernetesPamResource builder with application/json body -func NewCreateKubernetesPamResourceRequest(server string, body CreateKubernetesPamResourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateKubernetesPamResourceRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateKubernetesPamResourceRequestWithBody generates requests for CreateKubernetesPamResource with any type of body -func NewCreateKubernetesPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewListGatewaysRequest generates requests for ListGateways +func NewListGatewaysRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2489,183 +1765,7 @@ func NewCreateKubernetesPamResourceRequestWithBody(server string, contentType st return nil, err } - operationPath := fmt.Sprintf("/api/v1/pam/resources/kubernetes") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreatePostgresPamResourceRequest calls the generic CreatePostgresPamResource builder with application/json body -func NewCreatePostgresPamResourceRequest(server string, body CreatePostgresPamResourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreatePostgresPamResourceRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreatePostgresPamResourceRequestWithBody generates requests for CreatePostgresPamResource with any type of body -func NewCreatePostgresPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/pam/resources/postgres") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreateRedisPamResourceRequest calls the generic CreateRedisPamResource builder with application/json body -func NewCreateRedisPamResourceRequest(server string, body CreateRedisPamResourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateRedisPamResourceRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateRedisPamResourceRequestWithBody generates requests for CreateRedisPamResource with any type of body -func NewCreateRedisPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/pam/resources/redis") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreateProjectRequest calls the generic CreateProject builder with application/json body -func NewCreateProjectRequest(server string, body CreateProjectJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateProjectRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateProjectRequestWithBody generates requests for CreateProject with any type of body -func NewCreateProjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/projects") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetRelaysRequest generates requests for GetRelays -func NewGetRelaysRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/relays") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListGatewaysRequest generates requests for ListGateways -func NewListGatewaysRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v2/gateways") + operationPath := fmt.Sprintf("/api/v2/gateways") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3269,11 +2369,6 @@ type ClientWithResponsesInterface interface { AdminSignUpWithResponse(ctx context.Context, body AdminSignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminSignUpResponse, error) - // CreateCloudflareAppConnectionWithBodyWithResponse request with any body - CreateCloudflareAppConnectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCloudflareAppConnectionResponse, error) - - CreateCloudflareAppConnectionWithResponse(ctx context.Context, body CreateCloudflareAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCloudflareAppConnectionResponse, error) - // RefreshAuthTokenWithResponse request RefreshAuthTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAuthTokenResponse, error) @@ -3287,41 +2382,6 @@ type ClientWithResponsesInterface interface { CreateTokenAuthTokenWithResponse(ctx context.Context, identityId string, body CreateTokenAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTokenAuthTokenResponse, error) - // AttachUniversalAuthWithBodyWithResponse request with any body - AttachUniversalAuthWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachUniversalAuthResponse, error) - - AttachUniversalAuthWithResponse(ctx context.Context, identityId string, body AttachUniversalAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachUniversalAuthResponse, error) - - // CreateUniversalAuthClientSecretWithBodyWithResponse request with any body - CreateUniversalAuthClientSecretWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUniversalAuthClientSecretResponse, error) - - CreateUniversalAuthClientSecretWithResponse(ctx context.Context, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUniversalAuthClientSecretResponse, error) - - // CreateAcmeCertificateAuthorityV1WithBodyWithResponse request with any body - CreateAcmeCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAcmeCertificateAuthorityV1Response, error) - - CreateAcmeCertificateAuthorityV1WithResponse(ctx context.Context, body CreateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAcmeCertificateAuthorityV1Response, error) - - // UpdateAcmeCertificateAuthorityV1WithBodyWithResponse request with any body - UpdateAcmeCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAcmeCertificateAuthorityV1Response, error) - - UpdateAcmeCertificateAuthorityV1WithResponse(ctx context.Context, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAcmeCertificateAuthorityV1Response, error) - - // CreateInternalCertificateAuthorityV1WithBodyWithResponse request with any body - CreateInternalCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInternalCertificateAuthorityV1Response, error) - - CreateInternalCertificateAuthorityV1WithResponse(ctx context.Context, body CreateInternalCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInternalCertificateAuthorityV1Response, error) - - // CreateCertificatePolicyWithBodyWithResponse request with any body - CreateCertificatePolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCertificatePolicyResponse, error) - - CreateCertificatePolicyWithResponse(ctx context.Context, body CreateCertificatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCertificatePolicyResponse, error) - - // CreateCertificateProfileWithBodyWithResponse request with any body - CreateCertificateProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCertificateProfileResponse, error) - - CreateCertificateProfileWithResponse(ctx context.Context, body CreateCertificateProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCertificateProfileResponse, error) - // CreateMachineIdentityWithBodyWithResponse request with any body CreateMachineIdentityWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) @@ -3332,6 +2392,11 @@ type ClientWithResponsesInterface interface { CreatePostgresPamAccountWithResponse(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) + // CreateSshPamAccountWithBodyWithResponse request with any body + CreateSshPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamAccountResponse, error) + + CreateSshPamAccountWithResponse(ctx context.Context, body CreateSshPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamAccountResponse, error) + // CreateKubernetesPamResourceWithBodyWithResponse request with any body CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) @@ -3347,6 +2412,11 @@ type ClientWithResponsesInterface interface { CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) + // CreateSshPamResourceWithBodyWithResponse request with any body + CreateSshPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) + + CreateSshPamResourceWithResponse(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) + // CreateProjectWithBodyWithResponse request with any body CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) @@ -3512,103 +2582,6 @@ func (r AdminSignUpResponse) StatusCode() int { return 0 } -type CreateCloudflareAppConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - AppConnection CreateCloudflareAppConnection_200_AppConnection `json:"appConnection"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection500StatusCode `json:"statusCode"` - } -} -type CreateCloudflareAppConnection200AppConnection0 struct { - App CreateCloudflareAppConnection200AppConnection0App `json:"app"` - CreatedAt time.Time `json:"createdAt"` - Credentials struct { - AccountId string `json:"accountId"` - } `json:"credentials"` - CredentialsHash *string `json:"credentialsHash,omitempty"` - Description *string `json:"description"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - Id openapi_types.UUID `json:"id"` - IsPlatformManagedCredentials *bool `json:"isPlatformManagedCredentials"` - Method CreateCloudflareAppConnection200AppConnection0Method `json:"method"` - Name string `json:"name"` - OrgId openapi_types.UUID `json:"orgId"` - Project *struct { - Id string `json:"id"` - Name string `json:"name"` - Slug string `json:"slug"` - Type string `json:"type"` - } `json:"project"` - ProjectId *string `json:"projectId"` - UpdatedAt time.Time `json:"updatedAt"` - Version *float32 `json:"version,omitempty"` -} -type CreateCloudflareAppConnection200AppConnection0App string -type CreateCloudflareAppConnection200AppConnection0Method string -type CreateCloudflareAppConnection_200_AppConnection struct { - union json.RawMessage -} -type CreateCloudflareAppConnection400StatusCode float32 -type CreateCloudflareAppConnection401StatusCode float32 -type CreateCloudflareAppConnection403StatusCode float32 -type CreateCloudflareAppConnection404StatusCode float32 -type CreateCloudflareAppConnection422StatusCode float32 -type CreateCloudflareAppConnection500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r CreateCloudflareAppConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateCloudflareAppConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type RefreshAuthTokenResponse struct { Body []byte HTTPResponse *http.Response @@ -3847,76 +2820,75 @@ func (r CreateTokenAuthTokenResponse) StatusCode() int { return 0 } -type AttachUniversalAuthResponse struct { +type CreateMachineIdentityResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - IdentityUniversalAuth struct { - AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` - AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` - AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` - AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` - AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` - ClientId string `json:"clientId"` - ClientSecretTrustedIps interface{} `json:"clientSecretTrustedIps,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Id openapi_types.UUID `json:"id"` - IdentityId openapi_types.UUID `json:"identityId"` - LockoutCounterResetSeconds *float32 `json:"lockoutCounterResetSeconds,omitempty"` - LockoutDurationSeconds *float32 `json:"lockoutDurationSeconds,omitempty"` - LockoutEnabled *bool `json:"lockoutEnabled,omitempty"` - LockoutThreshold *float32 `json:"lockoutThreshold,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"identityUniversalAuth"` + Identity struct { + AuthMethod *string `json:"authMethod"` + AuthMethods []string `json:"authMethods"` + CreatedAt time.Time `json:"createdAt"` + HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"` + Id openapi_types.UUID `json:"id"` + Metadata []struct { + Id string `json:"id"` + Key string `json:"key"` + Value string `json:"value"` + } `json:"metadata"` + Name string `json:"name"` + OrgId openapi_types.UUID `json:"orgId"` + ProjectId *string `json:"projectId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"identity"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth401StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateMachineIdentity500StatusCode `json:"statusCode"` } } -type AttachUniversalAuth400StatusCode float32 -type AttachUniversalAuth401StatusCode float32 -type AttachUniversalAuth403StatusCode float32 -type AttachUniversalAuth404StatusCode float32 -type AttachUniversalAuth422StatusCode float32 -type AttachUniversalAuth500StatusCode float32 +type CreateMachineIdentity400StatusCode float32 +type CreateMachineIdentity401StatusCode float32 +type CreateMachineIdentity403StatusCode float32 +type CreateMachineIdentity404StatusCode float32 +type CreateMachineIdentity422StatusCode float32 +type CreateMachineIdentity500StatusCode float32 // Status returns HTTPResponse.Status -func (r AttachUniversalAuthResponse) Status() string { +func (r CreateMachineIdentityResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3924,79 +2896,100 @@ func (r AttachUniversalAuthResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AttachUniversalAuthResponse) StatusCode() int { +func (r CreateMachineIdentityResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateUniversalAuthClientSecretResponse struct { +type CreatePostgresPamAccountResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - ClientSecret string `json:"clientSecret"` - ClientSecretData struct { - ClientSecretNumUses *float32 `json:"clientSecretNumUses,omitempty"` - ClientSecretNumUsesLimit *float32 `json:"clientSecretNumUsesLimit,omitempty"` - ClientSecretPrefix string `json:"clientSecretPrefix"` - ClientSecretTTL *float32 `json:"clientSecretTTL,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Description string `json:"description"` - Id string `json:"id"` - IdentityUAId openapi_types.UUID `json:"identityUAId"` - IsClientSecretRevoked *bool `json:"isClientSecretRevoked,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"clientSecretData"` + Account struct { + CreatedAt time.Time `json:"createdAt"` + Credentials struct { + Username string `json:"username"` + } `json:"credentials"` + Description *string `json:"description"` + EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` + FolderId *openapi_types.UUID `json:"folderId"` + Id openapi_types.UUID `json:"id"` + InternalMetadata interface{} `json:"internalMetadata"` + LastRotatedAt *time.Time `json:"lastRotatedAt"` + LastRotationMessage *string `json:"lastRotationMessage"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + RequireMfa *bool `json:"requireMfa"` + Resource struct { + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ResourceType string `json:"resourceType"` + RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` + } `json:"resource"` + ResourceId openapi_types.UUID `json:"resourceId"` + ResourceType CreatePostgresPamAccount200AccountResourceType `json:"resourceType"` + RotationEnabled *bool `json:"rotationEnabled,omitempty"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` + RotationStatus *string `json:"rotationStatus"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"account"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount500StatusCode `json:"statusCode"` } } -type CreateUniversalAuthClientSecret400StatusCode float32 -type CreateUniversalAuthClientSecret401StatusCode float32 -type CreateUniversalAuthClientSecret403StatusCode float32 -type CreateUniversalAuthClientSecret404StatusCode float32 -type CreateUniversalAuthClientSecret422StatusCode float32 -type CreateUniversalAuthClientSecret500StatusCode float32 +type CreatePostgresPamAccount200AccountResourceType string +type CreatePostgresPamAccount400StatusCode float32 +type CreatePostgresPamAccount401StatusCode float32 +type CreatePostgresPamAccount403StatusCode float32 +type CreatePostgresPamAccount404StatusCode float32 +type CreatePostgresPamAccount422StatusCode float32 +type CreatePostgresPamAccount500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateUniversalAuthClientSecretResponse) Status() string { +func (r CreatePostgresPamAccountResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4004,98 +2997,116 @@ func (r CreateUniversalAuthClientSecretResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateUniversalAuthClientSecretResponse) StatusCode() int { +func (r CreatePostgresPamAccountResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateAcmeCertificateAuthorityV1Response struct { +type CreateSshPamAccountResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Configuration struct { - // AccountEmail The email address for the ACME Certificate Authority. - AccountEmail string `json:"accountEmail"` - - // DirectoryUrl The directory URL for the ACME Certificate Authority. - DirectoryUrl string `json:"directoryUrl"` - - // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. - DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` - DnsProviderConfig struct { - // HostedZoneId The hosted zone ID for the ACME Certificate Authority. - HostedZoneId string `json:"hostedZoneId"` - - // Provider The DNS provider for the ACME Certificate Authority. - Provider CreateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider `json:"provider"` - } `json:"dnsProviderConfig"` - - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabKid *string `json:"eabKid,omitempty"` - } `json:"configuration"` - EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - Status CreateAcmeCertificateAuthorityV1200Status `json:"status"` - Type CreateAcmeCertificateAuthorityV1200Type `json:"type"` + Account struct { + CreatedAt time.Time `json:"createdAt"` + Credentials CreateSshPamAccount_200_Account_Credentials `json:"credentials"` + Description *string `json:"description"` + EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` + FolderId *openapi_types.UUID `json:"folderId"` + Id openapi_types.UUID `json:"id"` + InternalMetadata interface{} `json:"internalMetadata"` + LastRotatedAt *time.Time `json:"lastRotatedAt"` + LastRotationMessage *string `json:"lastRotationMessage"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + RequireMfa *bool `json:"requireMfa"` + Resource struct { + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ResourceType string `json:"resourceType"` + RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` + } `json:"resource"` + ResourceId openapi_types.UUID `json:"resourceId"` + ResourceType CreateSshPamAccount200AccountResourceType `json:"resourceType"` + RotationEnabled *bool `json:"rotationEnabled,omitempty"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` + RotationStatus *string `json:"rotationStatus"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"account"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1500StatusCode `json:"statusCode"` - } -} -type CreateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider string -type CreateAcmeCertificateAuthorityV1200Status string -type CreateAcmeCertificateAuthorityV1200Type string -type CreateAcmeCertificateAuthorityV1400StatusCode float32 -type CreateAcmeCertificateAuthorityV1401StatusCode float32 -type CreateAcmeCertificateAuthorityV1403StatusCode float32 -type CreateAcmeCertificateAuthorityV1404StatusCode float32 -type CreateAcmeCertificateAuthorityV1422StatusCode float32 -type CreateAcmeCertificateAuthorityV1500StatusCode float32 + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount500StatusCode `json:"statusCode"` + } +} +type CreateSshPamAccount200AccountCredentials0 struct { + AuthMethod CreateSshPamAccount200AccountCredentials0AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamAccount200AccountCredentials0AuthMethod string +type CreateSshPamAccount200AccountCredentials1 struct { + AuthMethod CreateSshPamAccount200AccountCredentials1AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamAccount200AccountCredentials1AuthMethod string +type CreateSshPamAccount200AccountCredentials2 struct { + AuthMethod CreateSshPamAccount200AccountCredentials2AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamAccount200AccountCredentials2AuthMethod string +type CreateSshPamAccount_200_Account_Credentials struct { + union json.RawMessage +} +type CreateSshPamAccount200AccountResourceType string +type CreateSshPamAccount400StatusCode float32 +type CreateSshPamAccount401StatusCode float32 +type CreateSshPamAccount403StatusCode float32 +type CreateSshPamAccount404StatusCode float32 +type CreateSshPamAccount422StatusCode float32 +type CreateSshPamAccount500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateAcmeCertificateAuthorityV1Response) Status() string { +func (r CreateSshPamAccountResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4103,98 +3114,96 @@ func (r CreateAcmeCertificateAuthorityV1Response) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateAcmeCertificateAuthorityV1Response) StatusCode() int { +func (r CreateSshPamAccountResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateAcmeCertificateAuthorityV1Response struct { +type CreateKubernetesPamResourceResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Configuration struct { - // AccountEmail The email address for the ACME Certificate Authority. - AccountEmail string `json:"accountEmail"` - - // DirectoryUrl The directory URL for the ACME Certificate Authority. - DirectoryUrl string `json:"directoryUrl"` - - // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. - DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` - DnsProviderConfig struct { - // HostedZoneId The hosted zone ID for the ACME Certificate Authority. - HostedZoneId string `json:"hostedZoneId"` - - // Provider The DNS provider for the ACME Certificate Authority. - Provider UpdateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider `json:"provider"` - } `json:"dnsProviderConfig"` - - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabKid *string `json:"eabKid,omitempty"` - } `json:"configuration"` - EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - Status UpdateAcmeCertificateAuthorityV1200Status `json:"status"` - Type UpdateAcmeCertificateAuthorityV1200Type `json:"type"` + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + SslCertificate *string `json:"sslCertificate,omitempty"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + Url string `json:"url"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreateKubernetesPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *CreateKubernetesPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1500StatusCode `json:"statusCode"` - } -} -type UpdateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider string -type UpdateAcmeCertificateAuthorityV1200Status string -type UpdateAcmeCertificateAuthorityV1200Type string -type UpdateAcmeCertificateAuthorityV1400StatusCode float32 -type UpdateAcmeCertificateAuthorityV1401StatusCode float32 -type UpdateAcmeCertificateAuthorityV1403StatusCode float32 -type UpdateAcmeCertificateAuthorityV1404StatusCode float32 -type UpdateAcmeCertificateAuthorityV1422StatusCode float32 -type UpdateAcmeCertificateAuthorityV1500StatusCode float32 + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateKubernetesPamResource500StatusCode `json:"statusCode"` + } +} +type CreateKubernetesPamResource200ResourceResourceType string +type CreateKubernetesPamResource200ResourceRotationAccountCredentials0 struct { + AuthMethod CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod `json:"authMethod"` +} +type CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod string +type CreateKubernetesPamResource_200_Resource_RotationAccountCredentials struct { + union json.RawMessage +} +type CreateKubernetesPamResource400StatusCode float32 +type CreateKubernetesPamResource401StatusCode float32 +type CreateKubernetesPamResource403StatusCode float32 +type CreateKubernetesPamResource404StatusCode float32 +type CreateKubernetesPamResource422StatusCode float32 +type CreateKubernetesPamResource500StatusCode float32 // Status returns HTTPResponse.Status -func (r UpdateAcmeCertificateAuthorityV1Response) Status() string { +func (r CreateKubernetesPamResourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4202,235 +3211,94 @@ func (r UpdateAcmeCertificateAuthorityV1Response) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateAcmeCertificateAuthorityV1Response) StatusCode() int { +func (r CreateKubernetesPamResourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateInternalCertificateAuthorityV1Response struct { +type CreatePostgresPamResourceResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Configuration struct { - ActiveCaCertId *openapi_types.UUID `json:"activeCaCertId"` - - // CommonName The common name (CN) for the CA. - CommonName *string `json:"commonName,omitempty"` - - // Country The country name (C) for the CA. - Country *string `json:"country,omitempty"` - Dn *string `json:"dn"` - - // FriendlyName A friendly name for the CA. - FriendlyName *string `json:"friendlyName,omitempty"` - - // KeyAlgorithm The type of public key algorithm and size, in bits, of the key pair for the CA; when you create an intermediate CA, you must use a key algorithm supported by the parent CA. - KeyAlgorithm CreateInternalCertificateAuthorityV1200ConfigurationKeyAlgorithm `json:"keyAlgorithm"` - - // Locality The locality name for the CA. - Locality *string `json:"locality,omitempty"` - - // MaxPathLength The maximum number of intermediate CAs that may follow this CA in the certificate / CA chain. A maxPathLength of -1 implies no path limit on the chain. - MaxPathLength *float32 `json:"maxPathLength"` - - // NotAfter The date and time when the CA expires in YYYY-MM-DDTHH:mm:ss.sssZ format. - NotAfter *string `json:"notAfter,omitempty"` - - // NotBefore The date and time when the CA becomes valid in YYYY-MM-DDTHH:mm:ss.sssZ format. - NotBefore *string `json:"notBefore,omitempty"` - - // Organization The organization (O) for the CA. - Organization *string `json:"organization,omitempty"` - - // Ou The organization unit (OU) for the CA. - Ou *string `json:"ou,omitempty"` - ParentCaId *openapi_types.UUID `json:"parentCaId"` - - // Province The state of province name for the CA. - Province *string `json:"province,omitempty"` - SerialNumber *string `json:"serialNumber"` - - // Type The type of CA to create. - Type CreateInternalCertificateAuthorityV1200ConfigurationType `json:"type"` - } `json:"configuration"` - EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - Status CreateInternalCertificateAuthorityV1200Status `json:"status"` - Type CreateInternalCertificateAuthorityV1200Type `json:"type"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1500StatusCode `json:"statusCode"` - } -} -type CreateInternalCertificateAuthorityV1200ConfigurationKeyAlgorithm string -type CreateInternalCertificateAuthorityV1200ConfigurationType string -type CreateInternalCertificateAuthorityV1200Status string -type CreateInternalCertificateAuthorityV1200Type string -type CreateInternalCertificateAuthorityV1400StatusCode float32 -type CreateInternalCertificateAuthorityV1401StatusCode float32 -type CreateInternalCertificateAuthorityV1403StatusCode float32 -type CreateInternalCertificateAuthorityV1404StatusCode float32 -type CreateInternalCertificateAuthorityV1422StatusCode float32 -type CreateInternalCertificateAuthorityV1500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r CreateInternalCertificateAuthorityV1Response) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateInternalCertificateAuthorityV1Response) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateCertificatePolicyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - CertificatePolicy struct { - Algorithms *struct { - KeyAlgorithm *[]string `json:"keyAlgorithm,omitempty"` - Signature *[]string `json:"signature,omitempty"` - } `json:"algorithms,omitempty"` - BasicConstraints *struct { - IsCA *CreateCertificatePolicy200CertificatePolicyBasicConstraintsIsCA `json:"isCA,omitempty"` - MaxPathLength *int `json:"maxPathLength,omitempty"` - } `json:"basicConstraints"` - CreatedAt time.Time `json:"createdAt"` - Description *string `json:"description"` - ExtendedKeyUsages *struct { - Allowed *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesAllowed `json:"allowed,omitempty"` - Denied *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesDenied `json:"denied,omitempty"` - Required *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesRequired `json:"required,omitempty"` - } `json:"extendedKeyUsages,omitempty"` - Id openapi_types.UUID `json:"id"` - KeyUsages *struct { - Allowed *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesAllowed `json:"allowed,omitempty"` - Denied *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesDenied `json:"denied,omitempty"` - Required *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesRequired `json:"required,omitempty"` - } `json:"keyUsages,omitempty"` - Name string `json:"name"` - ProjectId openapi_types.UUID `json:"projectId"` - Sans *[]struct { - Allowed *[]string `json:"allowed,omitempty"` - Denied *[]string `json:"denied,omitempty"` - Required *[]string `json:"required,omitempty"` - Type CreateCertificatePolicy200CertificatePolicySansType `json:"type"` - } `json:"sans,omitempty"` - Subject *[]struct { - Allowed *[]string `json:"allowed,omitempty"` - Denied *[]string `json:"denied,omitempty"` - Required *[]string `json:"required,omitempty"` - Type CreateCertificatePolicy200CertificatePolicySubjectType `json:"type"` - } `json:"subject,omitempty"` + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + Database string `json:"database"` + Host string `json:"host"` + Port float32 `json:"port"` + SslCertificate *string `json:"sslCertificate,omitempty"` + SslEnabled bool `json:"sslEnabled"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreatePostgresPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *struct { + Username string `json:"username"` + } `json:"rotationAccountCredentials"` UpdatedAt time.Time `json:"updatedAt"` - Validity *struct { - Max *string `json:"max,omitempty"` - } `json:"validity,omitempty"` - } `json:"certificatePolicy"` + } `json:"resource"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy500StatusCode `json:"statusCode"` - } -} -type CreateCertificatePolicy200CertificatePolicyBasicConstraintsIsCA string -type CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesAllowed string -type CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesDenied string -type CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesRequired string -type CreateCertificatePolicy200CertificatePolicyKeyUsagesAllowed string -type CreateCertificatePolicy200CertificatePolicyKeyUsagesDenied string -type CreateCertificatePolicy200CertificatePolicyKeyUsagesRequired string -type CreateCertificatePolicy200CertificatePolicySansType string -type CreateCertificatePolicy200CertificatePolicySubjectType string -type CreateCertificatePolicy400StatusCode float32 -type CreateCertificatePolicy401StatusCode float32 -type CreateCertificatePolicy403StatusCode float32 -type CreateCertificatePolicy404StatusCode float32 -type CreateCertificatePolicy422StatusCode float32 -type CreateCertificatePolicy500StatusCode float32 + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamResource500StatusCode `json:"statusCode"` + } +} +type CreatePostgresPamResource200ResourceResourceType string +type CreatePostgresPamResource400StatusCode float32 +type CreatePostgresPamResource401StatusCode float32 +type CreatePostgresPamResource403StatusCode float32 +type CreatePostgresPamResource404StatusCode float32 +type CreatePostgresPamResource422StatusCode float32 +type CreatePostgresPamResource500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateCertificatePolicyResponse) Status() string { +func (r CreatePostgresPamResourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4438,113 +3306,93 @@ func (r CreateCertificatePolicyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateCertificatePolicyResponse) StatusCode() int { +func (r CreatePostgresPamResourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateCertificateProfileResponse struct { +type CreateRedisPamResourceResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - CertificateProfile struct { - AcmeConfigId *openapi_types.UUID `json:"acmeConfigId"` - ApiConfigId *openapi_types.UUID `json:"apiConfigId"` - CaId *openapi_types.UUID `json:"caId"` - CertificatePolicyId openapi_types.UUID `json:"certificatePolicyId"` - CreatedAt time.Time `json:"createdAt"` - Defaults *struct { - BasicConstraints *struct { - IsCA bool `json:"isCA"` - PathLength *float32 `json:"pathLength,omitempty"` - } `json:"basicConstraints,omitempty"` - CommonName *string `json:"commonName,omitempty"` - Country *string `json:"country,omitempty"` - ExtendedKeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsExtendedKeyUsages `json:"extendedKeyUsages,omitempty"` - KeyAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsKeyAlgorithm `json:"keyAlgorithm,omitempty"` - KeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsKeyUsages `json:"keyUsages,omitempty"` - Locality *string `json:"locality,omitempty"` - Organization *string `json:"organization,omitempty"` - OrganizationalUnit *string `json:"organizationalUnit,omitempty"` - SignatureAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsSignatureAlgorithm `json:"signatureAlgorithm,omitempty"` - State *string `json:"state,omitempty"` - TtlDays *float32 `json:"ttlDays,omitempty"` - } `json:"defaults"` - Description *string `json:"description"` - EnrollmentType string `json:"enrollmentType"` - EstConfigId *openapi_types.UUID `json:"estConfigId"` - ExternalConfigs *CreateCertificateProfile_200_CertificateProfile_ExternalConfigs `json:"externalConfigs"` - Id openapi_types.UUID `json:"id"` - IssuerType *string `json:"issuerType,omitempty"` - ProjectId string `json:"projectId"` - Slug string `json:"slug"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"certificateProfile"` + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + Host string `json:"host"` + Port float32 `json:"port"` + SslCertificate *string `json:"sslCertificate,omitempty"` + SslEnabled bool `json:"sslEnabled"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreateRedisPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *struct { + Username *string `json:"username,omitempty"` + } `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateRedisPamResource500StatusCode `json:"statusCode"` } } -type CreateCertificateProfile200CertificateProfileDefaultsExtendedKeyUsages string -type CreateCertificateProfile200CertificateProfileDefaultsKeyAlgorithm string -type CreateCertificateProfile200CertificateProfileDefaultsKeyUsages string -type CreateCertificateProfile200CertificateProfileDefaultsSignatureAlgorithm string -type CreateCertificateProfile200CertificateProfileExternalConfigs0 struct { - // Template Certificate template name for Azure AD CS - Template string `json:"template"` -} -type CreateCertificateProfile200CertificateProfileExternalConfigs1 = map[string]interface{} -type CreateCertificateProfile200CertificateProfileExternalConfigs2 = map[string]interface{} -type CreateCertificateProfile200CertificateProfileExternalConfigs3 = map[string]interface{} -type CreateCertificateProfile_200_CertificateProfile_ExternalConfigs struct { - union json.RawMessage -} -type CreateCertificateProfile400StatusCode float32 -type CreateCertificateProfile401StatusCode float32 -type CreateCertificateProfile403StatusCode float32 -type CreateCertificateProfile404StatusCode float32 -type CreateCertificateProfile422StatusCode float32 -type CreateCertificateProfile500StatusCode float32 +type CreateRedisPamResource200ResourceResourceType string +type CreateRedisPamResource400StatusCode float32 +type CreateRedisPamResource401StatusCode float32 +type CreateRedisPamResource403StatusCode float32 +type CreateRedisPamResource404StatusCode float32 +type CreateRedisPamResource422StatusCode float32 +type CreateRedisPamResource500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateCertificateProfileResponse) Status() string { +func (r CreateRedisPamResourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4552,82 +3400,106 @@ func (r CreateCertificateProfileResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateCertificateProfileResponse) StatusCode() int { +func (r CreateRedisPamResourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateMachineIdentityResponse struct { +type CreateSshPamResourceResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Identity struct { - AuthMethod *string `json:"authMethod"` - AuthMethods []string `json:"authMethods"` - CreatedAt time.Time `json:"createdAt"` - HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"` - Id openapi_types.UUID `json:"id"` - Metadata []struct { - Id string `json:"id"` - Key string `json:"key"` - Value string `json:"value"` - } `json:"metadata"` - Name string `json:"name"` - OrgId openapi_types.UUID `json:"orgId"` - ProjectId *string `json:"projectId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"identity"` + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + Host string `json:"host"` + Port float32 `json:"port"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreateSshPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *CreateSshPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateMachineIdentity500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource500StatusCode `json:"statusCode"` } } -type CreateMachineIdentity400StatusCode float32 -type CreateMachineIdentity401StatusCode float32 -type CreateMachineIdentity403StatusCode float32 -type CreateMachineIdentity404StatusCode float32 -type CreateMachineIdentity422StatusCode float32 -type CreateMachineIdentity500StatusCode float32 +type CreateSshPamResource200ResourceResourceType string +type CreateSshPamResource200ResourceRotationAccountCredentials0 struct { + AuthMethod CreateSshPamResource200ResourceRotationAccountCredentials0AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamResource200ResourceRotationAccountCredentials0AuthMethod string +type CreateSshPamResource200ResourceRotationAccountCredentials1 struct { + AuthMethod CreateSshPamResource200ResourceRotationAccountCredentials1AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamResource200ResourceRotationAccountCredentials1AuthMethod string +type CreateSshPamResource200ResourceRotationAccountCredentials2 struct { + AuthMethod CreateSshPamResource200ResourceRotationAccountCredentials2AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamResource200ResourceRotationAccountCredentials2AuthMethod string +type CreateSshPamResource_200_Resource_RotationAccountCredentials struct { + union json.RawMessage +} +type CreateSshPamResource400StatusCode float32 +type CreateSshPamResource401StatusCode float32 +type CreateSshPamResource403StatusCode float32 +type CreateSshPamResource404StatusCode float32 +type CreateSshPamResource422StatusCode float32 +type CreateSshPamResource500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateMachineIdentityResponse) Status() string { +func (r CreateSshPamResourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4635,100 +3507,94 @@ func (r CreateMachineIdentityResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateMachineIdentityResponse) StatusCode() int { +func (r CreateSshPamResourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreatePostgresPamAccountResponse struct { +type CreateProjectResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Account struct { - CreatedAt time.Time `json:"createdAt"` - Credentials struct { - Username string `json:"username"` - } `json:"credentials"` - Description *string `json:"description"` - EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` - FolderId *openapi_types.UUID `json:"folderId"` - Id openapi_types.UUID `json:"id"` - InternalMetadata interface{} `json:"internalMetadata"` - LastRotatedAt *time.Time `json:"lastRotatedAt"` - LastRotationMessage *string `json:"lastRotationMessage"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - RequireMfa *bool `json:"requireMfa"` - Resource struct { - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ResourceType string `json:"resourceType"` - RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` - } `json:"resource"` - ResourceId openapi_types.UUID `json:"resourceId"` - ResourceType CreatePostgresPamAccount200AccountResourceType `json:"resourceType"` - RotationEnabled *bool `json:"rotationEnabled,omitempty"` - RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` - RotationStatus *string `json:"rotationStatus"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"account"` + Project struct { + UnderscoreId string `json:"_id"` + AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` + AutoCapitalization *bool `json:"autoCapitalization"` + CreatedAt time.Time `json:"createdAt"` + DefaultProduct *string `json:"defaultProduct"` + Description *string `json:"description"` + EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata"` + Environments []struct { + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + } `json:"environments"` + HasDeleteProtection *bool `json:"hasDeleteProtection"` + Id string `json:"id"` + KmsCertificateKeyId *openapi_types.UUID `json:"kmsCertificateKeyId"` + Name string `json:"name"` + OrgId openapi_types.UUID `json:"orgId"` + PitVersionLimit *float32 `json:"pitVersionLimit,omitempty"` + SecretDetectionIgnoreValues *[]string `json:"secretDetectionIgnoreValues"` + SecretSharing *bool `json:"secretSharing,omitempty"` + ShowSnapshotsLegacy *bool `json:"showSnapshotsLegacy,omitempty"` + Slug string `json:"slug"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + UpgradeStatus *string `json:"upgradeStatus"` + Version *float32 `json:"version,omitempty"` + } `json:"project"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateProject422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateProject500StatusCode `json:"statusCode"` } } -type CreatePostgresPamAccount200AccountResourceType string -type CreatePostgresPamAccount400StatusCode float32 -type CreatePostgresPamAccount401StatusCode float32 -type CreatePostgresPamAccount403StatusCode float32 -type CreatePostgresPamAccount404StatusCode float32 -type CreatePostgresPamAccount422StatusCode float32 -type CreatePostgresPamAccount500StatusCode float32 +type CreateProject400StatusCode float32 +type CreateProject401StatusCode float32 +type CreateProject403StatusCode float32 +type CreateProject404StatusCode float32 +type CreateProject422StatusCode float32 +type CreateProject500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreatePostgresPamAccountResponse) Status() string { +func (r CreateProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4736,96 +3602,75 @@ func (r CreatePostgresPamAccountResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreatePostgresPamAccountResponse) StatusCode() int { +func (r CreateProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateKubernetesPamResourceResponse struct { +type GetRelaysResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Resource struct { - AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` - ConnectionDetails struct { - SslCertificate *string `json:"sslCertificate,omitempty"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - Url string `json:"url"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateKubernetesPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *CreateKubernetesPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` + JSON200 *[]struct { + CreatedAt time.Time `json:"createdAt"` + HealthAlertedAt *time.Time `json:"healthAlertedAt"` + Heartbeat *time.Time `json:"heartbeat"` + Host string `json:"host"` + Id openapi_types.UUID `json:"id"` + IdentityId *openapi_types.UUID `json:"identityId"` + Name string `json:"name"` + OrgId *openapi_types.UUID `json:"orgId"` + UpdatedAt time.Time `json:"updatedAt"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode GetRelays422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetRelays500StatusCode `json:"statusCode"` } } -type CreateKubernetesPamResource200ResourceResourceType string -type CreateKubernetesPamResource200ResourceRotationAccountCredentials0 struct { - AuthMethod CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod `json:"authMethod"` -} -type CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod string -type CreateKubernetesPamResource_200_Resource_RotationAccountCredentials struct { - union json.RawMessage -} -type CreateKubernetesPamResource400StatusCode float32 -type CreateKubernetesPamResource401StatusCode float32 -type CreateKubernetesPamResource403StatusCode float32 -type CreateKubernetesPamResource404StatusCode float32 -type CreateKubernetesPamResource422StatusCode float32 -type CreateKubernetesPamResource500StatusCode float32 +type GetRelays400StatusCode float32 +type GetRelays401StatusCode float32 +type GetRelays403StatusCode float32 +type GetRelays404StatusCode float32 +type GetRelays422StatusCode float32 +type GetRelays500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateKubernetesPamResourceResponse) Status() string { +func (r GetRelaysResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4833,94 +3678,76 @@ func (r CreateKubernetesPamResourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateKubernetesPamResourceResponse) StatusCode() int { +func (r GetRelaysResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreatePostgresPamResourceResponse struct { +type ListGatewaysResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Resource struct { - AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` - ConnectionDetails struct { - Database string `json:"database"` - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreatePostgresPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *struct { - Username string `json:"username"` - } `json:"rotationAccountCredentials"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` + JSON200 *[]struct { + CreatedAt time.Time `json:"createdAt"` + Heartbeat *time.Time `json:"heartbeat"` + Id openapi_types.UUID `json:"id"` + Identity struct { + Id string `json:"id"` + Name string `json:"name"` + } `json:"identity"` + IdentityId openapi_types.UUID `json:"identityId"` + Name string `json:"name"` + UpdatedAt time.Time `json:"updatedAt"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode ListGateways422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListGateways500StatusCode `json:"statusCode"` } } -type CreatePostgresPamResource200ResourceResourceType string -type CreatePostgresPamResource400StatusCode float32 -type CreatePostgresPamResource401StatusCode float32 -type CreatePostgresPamResource403StatusCode float32 -type CreatePostgresPamResource404StatusCode float32 -type CreatePostgresPamResource422StatusCode float32 -type CreatePostgresPamResource500StatusCode float32 +type ListGateways400StatusCode float32 +type ListGateways401StatusCode float32 +type ListGateways403StatusCode float32 +type ListGateways404StatusCode float32 +type ListGateways422StatusCode float32 +type ListGateways500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreatePostgresPamResourceResponse) Status() string { +func (r ListGatewaysResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4928,93 +3755,69 @@ func (r CreatePostgresPamResourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreatePostgresPamResourceResponse) StatusCode() int { +func (r ListGatewaysResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateRedisPamResourceResponse struct { +type SelectOrganizationV3Response struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Resource struct { - AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` - ConnectionDetails struct { - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateRedisPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *struct { - Username *string `json:"username,omitempty"` - } `json:"rotationAccountCredentials"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` + IsMfaEnabled bool `json:"isMfaEnabled"` + MfaMethod *string `json:"mfaMethod,omitempty"` + Token string `json:"token"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode SelectOrganizationV3500StatusCode `json:"statusCode"` } } -type CreateRedisPamResource200ResourceResourceType string -type CreateRedisPamResource400StatusCode float32 -type CreateRedisPamResource401StatusCode float32 -type CreateRedisPamResource403StatusCode float32 -type CreateRedisPamResource404StatusCode float32 -type CreateRedisPamResource422StatusCode float32 -type CreateRedisPamResource500StatusCode float32 +type SelectOrganizationV3400StatusCode float32 +type SelectOrganizationV3401StatusCode float32 +type SelectOrganizationV3403StatusCode float32 +type SelectOrganizationV3404StatusCode float32 +type SelectOrganizationV3422StatusCode float32 +type SelectOrganizationV3500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateRedisPamResourceResponse) Status() string { +func (r SelectOrganizationV3Response) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5022,94 +3825,138 @@ func (r CreateRedisPamResourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateRedisPamResourceResponse) StatusCode() int { +func (r SelectOrganizationV3Response) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateProjectResponse struct { +type ListSecretsV4Response struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Project struct { - UnderscoreId string `json:"_id"` - AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` - AutoCapitalization *bool `json:"autoCapitalization"` - CreatedAt time.Time `json:"createdAt"` - DefaultProduct *string `json:"defaultProduct"` - Description *string `json:"description"` - EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata"` - Environments []struct { - Id string `json:"id"` - Name string `json:"name"` - Slug string `json:"slug"` - } `json:"environments"` - HasDeleteProtection *bool `json:"hasDeleteProtection"` - Id string `json:"id"` - KmsCertificateKeyId *openapi_types.UUID `json:"kmsCertificateKeyId"` - Name string `json:"name"` - OrgId openapi_types.UUID `json:"orgId"` - PitVersionLimit *float32 `json:"pitVersionLimit,omitempty"` - SecretDetectionIgnoreValues *[]string `json:"secretDetectionIgnoreValues"` - SecretSharing *bool `json:"secretSharing,omitempty"` - ShowSnapshotsLegacy *bool `json:"showSnapshotsLegacy,omitempty"` - Slug string `json:"slug"` - Type string `json:"type"` - UpdatedAt time.Time `json:"updatedAt"` - UpgradeStatus *string `json:"upgradeStatus"` - Version *float32 `json:"version,omitempty"` - } `json:"project"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateProject400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateProject401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateProject403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateProject404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` + Imports *[]struct { + Environment string `json:"environment"` + FolderId *string `json:"folderId,omitempty"` + SecretPath string `json:"secretPath"` + Secrets []struct { + UnderscoreId string `json:"_id"` + Actor *struct { + ActorId *string `json:"actorId"` + ActorType *string `json:"actorType"` + GroupId *string `json:"groupId"` + MembershipId *string `json:"membershipId"` + Name *string `json:"name"` + } `json:"actor"` + Environment string `json:"environment"` + Id string `json:"id"` + IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` + RotationId *openapi_types.UUID `json:"rotationId"` + SecretComment string `json:"secretComment"` + SecretKey string `json:"secretKey"` + SecretMetadata *[]struct { + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"secretMetadata,omitempty"` + SecretReminderNote *string `json:"secretReminderNote"` + SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` + SecretValue string `json:"secretValue"` + SecretValueHidden bool `json:"secretValueHidden"` + SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` + Type string `json:"type"` + Version float32 `json:"version"` + Workspace string `json:"workspace"` + } `json:"secrets"` + } `json:"imports,omitempty"` + Secrets []struct { + UnderscoreId string `json:"_id"` + Actor *struct { + ActorId *string `json:"actorId"` + ActorType *string `json:"actorType"` + GroupId *string `json:"groupId"` + MembershipId *string `json:"membershipId"` + Name *string `json:"name"` + } `json:"actor"` + CreatedAt time.Time `json:"createdAt"` + Environment string `json:"environment"` + Id string `json:"id"` + IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` + RotationId *openapi_types.UUID `json:"rotationId"` + SecretComment string `json:"secretComment"` + SecretKey string `json:"secretKey"` + SecretMetadata *[]struct { + IsEncrypted *bool `json:"isEncrypted,omitempty"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"secretMetadata,omitempty"` + SecretPath *string `json:"secretPath,omitempty"` + SecretReminderNote *string `json:"secretReminderNote"` + SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` + SecretValue string `json:"secretValue"` + SecretValueHidden bool `json:"secretValueHidden"` + SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` + Tags *[]struct { + Color *string `json:"color"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + } `json:"tags,omitempty"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + Version float32 `json:"version"` + Workspace string `json:"workspace"` + } `json:"secrets"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode ListSecretsV4404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` Message interface{} `json:"message,omitempty"` ReqId string `json:"reqId"` - StatusCode CreateProject422StatusCode `json:"statusCode"` + StatusCode ListSecretsV4422StatusCode `json:"statusCode"` } JSON500 *struct { Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreateProject500StatusCode `json:"statusCode"` + StatusCode ListSecretsV4500StatusCode `json:"statusCode"` } } -type CreateProject400StatusCode float32 -type CreateProject401StatusCode float32 -type CreateProject403StatusCode float32 -type CreateProject404StatusCode float32 -type CreateProject422StatusCode float32 -type CreateProject500StatusCode float32 +type ListSecretsV4400StatusCode float32 +type ListSecretsV4401StatusCode float32 +type ListSecretsV4403StatusCode float32 +type ListSecretsV4404StatusCode float32 +type ListSecretsV4422StatusCode float32 +type ListSecretsV4500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateProjectResponse) Status() string { +func (r ListSecretsV4Response) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5117,75 +3964,112 @@ func (r CreateProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateProjectResponse) StatusCode() int { +func (r ListSecretsV4Response) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetRelaysResponse struct { +type DeleteSecretV4Response struct { Body []byte HTTPResponse *http.Response - JSON200 *[]struct { - CreatedAt time.Time `json:"createdAt"` - HealthAlertedAt *time.Time `json:"healthAlertedAt"` - Heartbeat *time.Time `json:"heartbeat"` - Host string `json:"host"` - Id openapi_types.UUID `json:"id"` - IdentityId *openapi_types.UUID `json:"identityId"` - Name string `json:"name"` - OrgId *openapi_types.UUID `json:"orgId"` - UpdatedAt time.Time `json:"updatedAt"` + JSON200 *struct { + union json.RawMessage } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode GetRelays422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetRelays500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode DeleteSecretV4500StatusCode `json:"statusCode"` } } -type GetRelays400StatusCode float32 -type GetRelays401StatusCode float32 -type GetRelays403StatusCode float32 -type GetRelays404StatusCode float32 -type GetRelays422StatusCode float32 -type GetRelays500StatusCode float32 +type DeleteSecretV42000 struct { + Secret struct { + UnderscoreId string `json:"_id"` + Actor *struct { + ActorId *string `json:"actorId"` + ActorType *string `json:"actorType"` + GroupId *string `json:"groupId"` + MembershipId *string `json:"membershipId"` + Name *string `json:"name"` + } `json:"actor"` + CreatedAt time.Time `json:"createdAt"` + Environment string `json:"environment"` + Id string `json:"id"` + IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` + RotationId *openapi_types.UUID `json:"rotationId"` + SecretComment string `json:"secretComment"` + SecretKey string `json:"secretKey"` + SecretReminderNote *string `json:"secretReminderNote"` + SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` + SecretValue string `json:"secretValue"` + SecretValueHidden bool `json:"secretValueHidden"` + SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + Version float32 `json:"version"` + Workspace string `json:"workspace"` + } `json:"secret"` +} +type DeleteSecretV42001 struct { + Approval struct { + BypassReason *string `json:"bypassReason"` + CommitterUserId *openapi_types.UUID `json:"committerUserId"` + Conflicts interface{} `json:"conflicts"` + CreatedAt time.Time `json:"createdAt"` + FolderId openapi_types.UUID `json:"folderId"` + HasMerged *bool `json:"hasMerged,omitempty"` + Id openapi_types.UUID `json:"id"` + IsReplicated *bool `json:"isReplicated"` + PolicyId openapi_types.UUID `json:"policyId"` + Slug string `json:"slug"` + Status *string `json:"status,omitempty"` + StatusChangedByUserId *openapi_types.UUID `json:"statusChangedByUserId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"approval"` +} +type DeleteSecretV4400StatusCode float32 +type DeleteSecretV4401StatusCode float32 +type DeleteSecretV4403StatusCode float32 +type DeleteSecretV4404StatusCode float32 +type DeleteSecretV4422StatusCode float32 +type DeleteSecretV4500StatusCode float32 // Status returns HTTPResponse.Status -func (r GetRelaysResponse) Status() string { +func (r DeleteSecretV4Response) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5193,199 +4077,18 @@ func (r GetRelaysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetRelaysResponse) StatusCode() int { +func (r DeleteSecretV4Response) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListGatewaysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]struct { - CreatedAt time.Time `json:"createdAt"` - Heartbeat *time.Time `json:"heartbeat"` - Id openapi_types.UUID `json:"id"` - Identity struct { - Id string `json:"id"` - Name string `json:"name"` - } `json:"identity"` - IdentityId openapi_types.UUID `json:"identityId"` - Name string `json:"name"` - UpdatedAt time.Time `json:"updatedAt"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode ListGateways422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListGateways500StatusCode `json:"statusCode"` - } -} -type ListGateways400StatusCode float32 -type ListGateways401StatusCode float32 -type ListGateways403StatusCode float32 -type ListGateways404StatusCode float32 -type ListGateways422StatusCode float32 -type ListGateways500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r ListGatewaysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListGatewaysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type SelectOrganizationV3Response struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - IsMfaEnabled bool `json:"isMfaEnabled"` - MfaMethod *string `json:"mfaMethod,omitempty"` - Token string `json:"token"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode SelectOrganizationV3500StatusCode `json:"statusCode"` - } -} -type SelectOrganizationV3400StatusCode float32 -type SelectOrganizationV3401StatusCode float32 -type SelectOrganizationV3403StatusCode float32 -type SelectOrganizationV3404StatusCode float32 -type SelectOrganizationV3422StatusCode float32 -type SelectOrganizationV3500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r SelectOrganizationV3Response) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SelectOrganizationV3Response) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListSecretsV4Response struct { +type GetSecretByNameV4Response struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Imports *[]struct { - Environment string `json:"environment"` - FolderId *string `json:"folderId,omitempty"` - SecretPath string `json:"secretPath"` - Secrets []struct { - UnderscoreId string `json:"_id"` - Actor *struct { - ActorId *string `json:"actorId"` - ActorType *string `json:"actorType"` - GroupId *string `json:"groupId"` - MembershipId *string `json:"membershipId"` - Name *string `json:"name"` - } `json:"actor"` - Environment string `json:"environment"` - Id string `json:"id"` - IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` - RotationId *openapi_types.UUID `json:"rotationId"` - SecretComment string `json:"secretComment"` - SecretKey string `json:"secretKey"` - SecretMetadata *[]struct { - IsEncrypted *bool `json:"isEncrypted,omitempty"` - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"secretMetadata,omitempty"` - SecretReminderNote *string `json:"secretReminderNote"` - SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` - SecretValue string `json:"secretValue"` - SecretValueHidden bool `json:"secretValueHidden"` - SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` - Type string `json:"type"` - Version float32 `json:"version"` - Workspace string `json:"workspace"` - } `json:"secrets"` - } `json:"imports,omitempty"` - Secrets []struct { + Secret struct { UnderscoreId string `json:"_id"` Actor *struct { ActorId *string `json:"actorId"` @@ -5406,7 +4109,7 @@ type ListSecretsV4Response struct { Key string `json:"key"` Value *string `json:"value,omitempty"` } `json:"secretMetadata,omitempty"` - SecretPath *string `json:"secretPath,omitempty"` + SecretPath string `json:"secretPath"` SecretReminderNote *string `json:"secretReminderNote"` SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` SecretValue string `json:"secretValue"` @@ -5422,56 +4125,56 @@ type ListSecretsV4Response struct { UpdatedAt time.Time `json:"updatedAt"` Version float32 `json:"version"` Workspace string `json:"workspace"` - } `json:"secrets"` + } `json:"secret"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode ListSecretsV4500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode GetSecretByNameV4500StatusCode `json:"statusCode"` } } -type ListSecretsV4400StatusCode float32 -type ListSecretsV4401StatusCode float32 -type ListSecretsV4403StatusCode float32 -type ListSecretsV4404StatusCode float32 -type ListSecretsV4422StatusCode float32 -type ListSecretsV4500StatusCode float32 +type GetSecretByNameV4400StatusCode float32 +type GetSecretByNameV4401StatusCode float32 +type GetSecretByNameV4403StatusCode float32 +type GetSecretByNameV4404StatusCode float32 +type GetSecretByNameV4422StatusCode float32 +type GetSecretByNameV4500StatusCode float32 // Status returns HTTPResponse.Status -func (r ListSecretsV4Response) Status() string { +func (r GetSecretByNameV4Response) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5479,14 +4182,14 @@ func (r ListSecretsV4Response) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSecretsV4Response) StatusCode() int { +func (r GetSecretByNameV4Response) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteSecretV4Response struct { +type UpdateSecretV4Response struct { Body []byte HTTPResponse *http.Response JSON200 *struct { @@ -5497,231 +4200,13 @@ type DeleteSecretV4Response struct { Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode DeleteSecretV4400StatusCode `json:"statusCode"` + StatusCode UpdateSecretV4400StatusCode `json:"statusCode"` } JSON401 *struct { Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode DeleteSecretV4401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode DeleteSecretV4500StatusCode `json:"statusCode"` - } -} -type DeleteSecretV42000 struct { - Secret struct { - UnderscoreId string `json:"_id"` - Actor *struct { - ActorId *string `json:"actorId"` - ActorType *string `json:"actorType"` - GroupId *string `json:"groupId"` - MembershipId *string `json:"membershipId"` - Name *string `json:"name"` - } `json:"actor"` - CreatedAt time.Time `json:"createdAt"` - Environment string `json:"environment"` - Id string `json:"id"` - IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` - RotationId *openapi_types.UUID `json:"rotationId"` - SecretComment string `json:"secretComment"` - SecretKey string `json:"secretKey"` - SecretReminderNote *string `json:"secretReminderNote"` - SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` - SecretValue string `json:"secretValue"` - SecretValueHidden bool `json:"secretValueHidden"` - SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` - Type string `json:"type"` - UpdatedAt time.Time `json:"updatedAt"` - Version float32 `json:"version"` - Workspace string `json:"workspace"` - } `json:"secret"` -} -type DeleteSecretV42001 struct { - Approval struct { - BypassReason *string `json:"bypassReason"` - CommitterUserId *openapi_types.UUID `json:"committerUserId"` - Conflicts interface{} `json:"conflicts"` - CreatedAt time.Time `json:"createdAt"` - FolderId openapi_types.UUID `json:"folderId"` - HasMerged *bool `json:"hasMerged,omitempty"` - Id openapi_types.UUID `json:"id"` - IsReplicated *bool `json:"isReplicated"` - PolicyId openapi_types.UUID `json:"policyId"` - Slug string `json:"slug"` - Status *string `json:"status,omitempty"` - StatusChangedByUserId *openapi_types.UUID `json:"statusChangedByUserId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"approval"` -} -type DeleteSecretV4400StatusCode float32 -type DeleteSecretV4401StatusCode float32 -type DeleteSecretV4403StatusCode float32 -type DeleteSecretV4404StatusCode float32 -type DeleteSecretV4422StatusCode float32 -type DeleteSecretV4500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r DeleteSecretV4Response) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteSecretV4Response) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSecretByNameV4Response struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Secret struct { - UnderscoreId string `json:"_id"` - Actor *struct { - ActorId *string `json:"actorId"` - ActorType *string `json:"actorType"` - GroupId *string `json:"groupId"` - MembershipId *string `json:"membershipId"` - Name *string `json:"name"` - } `json:"actor"` - CreatedAt time.Time `json:"createdAt"` - Environment string `json:"environment"` - Id string `json:"id"` - IsRotatedSecret *bool `json:"isRotatedSecret,omitempty"` - RotationId *openapi_types.UUID `json:"rotationId"` - SecretComment string `json:"secretComment"` - SecretKey string `json:"secretKey"` - SecretMetadata *[]struct { - IsEncrypted *bool `json:"isEncrypted,omitempty"` - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"secretMetadata,omitempty"` - SecretPath string `json:"secretPath"` - SecretReminderNote *string `json:"secretReminderNote"` - SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` - SecretValue string `json:"secretValue"` - SecretValueHidden bool `json:"secretValueHidden"` - SkipMultilineEncoding *bool `json:"skipMultilineEncoding"` - Tags *[]struct { - Color *string `json:"color"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - Slug string `json:"slug"` - } `json:"tags,omitempty"` - Type string `json:"type"` - UpdatedAt time.Time `json:"updatedAt"` - Version float32 `json:"version"` - Workspace string `json:"workspace"` - } `json:"secret"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode GetSecretByNameV4500StatusCode `json:"statusCode"` - } -} -type GetSecretByNameV4400StatusCode float32 -type GetSecretByNameV4401StatusCode float32 -type GetSecretByNameV4403StatusCode float32 -type GetSecretByNameV4404StatusCode float32 -type GetSecretByNameV4422StatusCode float32 -type GetSecretByNameV4500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r GetSecretByNameV4Response) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSecretByNameV4Response) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSecretV4Response struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - union json.RawMessage - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateSecretV4400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateSecretV4401StatusCode `json:"statusCode"` + StatusCode UpdateSecretV4401StatusCode `json:"statusCode"` } JSON403 *struct { Details interface{} `json:"details,omitempty"` @@ -5946,23 +4431,6 @@ func (c *ClientWithResponses) AdminSignUpWithResponse(ctx context.Context, body return ParseAdminSignUpResponse(rsp) } -// CreateCloudflareAppConnectionWithBodyWithResponse request with arbitrary body returning *CreateCloudflareAppConnectionResponse -func (c *ClientWithResponses) CreateCloudflareAppConnectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCloudflareAppConnectionResponse, error) { - rsp, err := c.CreateCloudflareAppConnectionWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateCloudflareAppConnectionResponse(rsp) -} - -func (c *ClientWithResponses) CreateCloudflareAppConnectionWithResponse(ctx context.Context, body CreateCloudflareAppConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCloudflareAppConnectionResponse, error) { - rsp, err := c.CreateCloudflareAppConnection(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateCloudflareAppConnectionResponse(rsp) -} - // RefreshAuthTokenWithResponse request returning *RefreshAuthTokenResponse func (c *ClientWithResponses) RefreshAuthTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAuthTokenResponse, error) { rsp, err := c.RefreshAuthToken(ctx, reqEditors...) @@ -6006,208 +4474,123 @@ func (c *ClientWithResponses) CreateTokenAuthTokenWithResponse(ctx context.Conte return ParseCreateTokenAuthTokenResponse(rsp) } -// AttachUniversalAuthWithBodyWithResponse request with arbitrary body returning *AttachUniversalAuthResponse -func (c *ClientWithResponses) AttachUniversalAuthWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachUniversalAuthResponse, error) { - rsp, err := c.AttachUniversalAuthWithBody(ctx, identityId, contentType, body, reqEditors...) +// CreateMachineIdentityWithBodyWithResponse request with arbitrary body returning *CreateMachineIdentityResponse +func (c *ClientWithResponses) CreateMachineIdentityWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) { + rsp, err := c.CreateMachineIdentityWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseAttachUniversalAuthResponse(rsp) + return ParseCreateMachineIdentityResponse(rsp) } -func (c *ClientWithResponses) AttachUniversalAuthWithResponse(ctx context.Context, identityId string, body AttachUniversalAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachUniversalAuthResponse, error) { - rsp, err := c.AttachUniversalAuth(ctx, identityId, body, reqEditors...) +func (c *ClientWithResponses) CreateMachineIdentityWithResponse(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) { + rsp, err := c.CreateMachineIdentity(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseAttachUniversalAuthResponse(rsp) + return ParseCreateMachineIdentityResponse(rsp) } -// CreateUniversalAuthClientSecretWithBodyWithResponse request with arbitrary body returning *CreateUniversalAuthClientSecretResponse -func (c *ClientWithResponses) CreateUniversalAuthClientSecretWithBodyWithResponse(ctx context.Context, identityId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUniversalAuthClientSecretResponse, error) { - rsp, err := c.CreateUniversalAuthClientSecretWithBody(ctx, identityId, contentType, body, reqEditors...) +// CreatePostgresPamAccountWithBodyWithResponse request with arbitrary body returning *CreatePostgresPamAccountResponse +func (c *ClientWithResponses) CreatePostgresPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { + rsp, err := c.CreatePostgresPamAccountWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateUniversalAuthClientSecretResponse(rsp) + return ParseCreatePostgresPamAccountResponse(rsp) } -func (c *ClientWithResponses) CreateUniversalAuthClientSecretWithResponse(ctx context.Context, identityId string, body CreateUniversalAuthClientSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUniversalAuthClientSecretResponse, error) { - rsp, err := c.CreateUniversalAuthClientSecret(ctx, identityId, body, reqEditors...) +func (c *ClientWithResponses) CreatePostgresPamAccountWithResponse(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { + rsp, err := c.CreatePostgresPamAccount(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateUniversalAuthClientSecretResponse(rsp) + return ParseCreatePostgresPamAccountResponse(rsp) } -// CreateAcmeCertificateAuthorityV1WithBodyWithResponse request with arbitrary body returning *CreateAcmeCertificateAuthorityV1Response -func (c *ClientWithResponses) CreateAcmeCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAcmeCertificateAuthorityV1Response, error) { - rsp, err := c.CreateAcmeCertificateAuthorityV1WithBody(ctx, contentType, body, reqEditors...) +// CreateSshPamAccountWithBodyWithResponse request with arbitrary body returning *CreateSshPamAccountResponse +func (c *ClientWithResponses) CreateSshPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamAccountResponse, error) { + rsp, err := c.CreateSshPamAccountWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateAcmeCertificateAuthorityV1Response(rsp) + return ParseCreateSshPamAccountResponse(rsp) } -func (c *ClientWithResponses) CreateAcmeCertificateAuthorityV1WithResponse(ctx context.Context, body CreateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAcmeCertificateAuthorityV1Response, error) { - rsp, err := c.CreateAcmeCertificateAuthorityV1(ctx, body, reqEditors...) +func (c *ClientWithResponses) CreateSshPamAccountWithResponse(ctx context.Context, body CreateSshPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamAccountResponse, error) { + rsp, err := c.CreateSshPamAccount(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateAcmeCertificateAuthorityV1Response(rsp) + return ParseCreateSshPamAccountResponse(rsp) } -// UpdateAcmeCertificateAuthorityV1WithBodyWithResponse request with arbitrary body returning *UpdateAcmeCertificateAuthorityV1Response -func (c *ClientWithResponses) UpdateAcmeCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAcmeCertificateAuthorityV1Response, error) { - rsp, err := c.UpdateAcmeCertificateAuthorityV1WithBody(ctx, id, contentType, body, reqEditors...) +// CreateKubernetesPamResourceWithBodyWithResponse request with arbitrary body returning *CreateKubernetesPamResourceResponse +func (c *ClientWithResponses) CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { + rsp, err := c.CreateKubernetesPamResourceWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateAcmeCertificateAuthorityV1Response(rsp) + return ParseCreateKubernetesPamResourceResponse(rsp) } -func (c *ClientWithResponses) UpdateAcmeCertificateAuthorityV1WithResponse(ctx context.Context, id string, body UpdateAcmeCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAcmeCertificateAuthorityV1Response, error) { - rsp, err := c.UpdateAcmeCertificateAuthorityV1(ctx, id, body, reqEditors...) +func (c *ClientWithResponses) CreateKubernetesPamResourceWithResponse(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { + rsp, err := c.CreateKubernetesPamResource(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateAcmeCertificateAuthorityV1Response(rsp) + return ParseCreateKubernetesPamResourceResponse(rsp) } -// CreateInternalCertificateAuthorityV1WithBodyWithResponse request with arbitrary body returning *CreateInternalCertificateAuthorityV1Response -func (c *ClientWithResponses) CreateInternalCertificateAuthorityV1WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInternalCertificateAuthorityV1Response, error) { - rsp, err := c.CreateInternalCertificateAuthorityV1WithBody(ctx, contentType, body, reqEditors...) +// CreatePostgresPamResourceWithBodyWithResponse request with arbitrary body returning *CreatePostgresPamResourceResponse +func (c *ClientWithResponses) CreatePostgresPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) { + rsp, err := c.CreatePostgresPamResourceWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateInternalCertificateAuthorityV1Response(rsp) + return ParseCreatePostgresPamResourceResponse(rsp) } -func (c *ClientWithResponses) CreateInternalCertificateAuthorityV1WithResponse(ctx context.Context, body CreateInternalCertificateAuthorityV1JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInternalCertificateAuthorityV1Response, error) { - rsp, err := c.CreateInternalCertificateAuthorityV1(ctx, body, reqEditors...) +func (c *ClientWithResponses) CreatePostgresPamResourceWithResponse(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) { + rsp, err := c.CreatePostgresPamResource(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateInternalCertificateAuthorityV1Response(rsp) + return ParseCreatePostgresPamResourceResponse(rsp) } -// CreateCertificatePolicyWithBodyWithResponse request with arbitrary body returning *CreateCertificatePolicyResponse -func (c *ClientWithResponses) CreateCertificatePolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCertificatePolicyResponse, error) { - rsp, err := c.CreateCertificatePolicyWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateCertificatePolicyResponse(rsp) -} - -func (c *ClientWithResponses) CreateCertificatePolicyWithResponse(ctx context.Context, body CreateCertificatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCertificatePolicyResponse, error) { - rsp, err := c.CreateCertificatePolicy(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateCertificatePolicyResponse(rsp) -} - -// CreateCertificateProfileWithBodyWithResponse request with arbitrary body returning *CreateCertificateProfileResponse -func (c *ClientWithResponses) CreateCertificateProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCertificateProfileResponse, error) { - rsp, err := c.CreateCertificateProfileWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateCertificateProfileResponse(rsp) -} - -func (c *ClientWithResponses) CreateCertificateProfileWithResponse(ctx context.Context, body CreateCertificateProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCertificateProfileResponse, error) { - rsp, err := c.CreateCertificateProfile(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateCertificateProfileResponse(rsp) -} - -// CreateMachineIdentityWithBodyWithResponse request with arbitrary body returning *CreateMachineIdentityResponse -func (c *ClientWithResponses) CreateMachineIdentityWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) { - rsp, err := c.CreateMachineIdentityWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateMachineIdentityResponse(rsp) -} - -func (c *ClientWithResponses) CreateMachineIdentityWithResponse(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) { - rsp, err := c.CreateMachineIdentity(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateMachineIdentityResponse(rsp) -} - -// CreatePostgresPamAccountWithBodyWithResponse request with arbitrary body returning *CreatePostgresPamAccountResponse -func (c *ClientWithResponses) CreatePostgresPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { - rsp, err := c.CreatePostgresPamAccountWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePostgresPamAccountResponse(rsp) -} - -func (c *ClientWithResponses) CreatePostgresPamAccountWithResponse(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { - rsp, err := c.CreatePostgresPamAccount(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePostgresPamAccountResponse(rsp) -} - -// CreateKubernetesPamResourceWithBodyWithResponse request with arbitrary body returning *CreateKubernetesPamResourceResponse -func (c *ClientWithResponses) CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { - rsp, err := c.CreateKubernetesPamResourceWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateKubernetesPamResourceResponse(rsp) -} - -func (c *ClientWithResponses) CreateKubernetesPamResourceWithResponse(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { - rsp, err := c.CreateKubernetesPamResource(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateKubernetesPamResourceResponse(rsp) -} - -// CreatePostgresPamResourceWithBodyWithResponse request with arbitrary body returning *CreatePostgresPamResourceResponse -func (c *ClientWithResponses) CreatePostgresPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) { - rsp, err := c.CreatePostgresPamResourceWithBody(ctx, contentType, body, reqEditors...) +// CreateRedisPamResourceWithBodyWithResponse request with arbitrary body returning *CreateRedisPamResourceResponse +func (c *ClientWithResponses) CreateRedisPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { + rsp, err := c.CreateRedisPamResourceWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreatePostgresPamResourceResponse(rsp) + return ParseCreateRedisPamResourceResponse(rsp) } -func (c *ClientWithResponses) CreatePostgresPamResourceWithResponse(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) { - rsp, err := c.CreatePostgresPamResource(ctx, body, reqEditors...) +func (c *ClientWithResponses) CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { + rsp, err := c.CreateRedisPamResource(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreatePostgresPamResourceResponse(rsp) + return ParseCreateRedisPamResourceResponse(rsp) } -// CreateRedisPamResourceWithBodyWithResponse request with arbitrary body returning *CreateRedisPamResourceResponse -func (c *ClientWithResponses) CreateRedisPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { - rsp, err := c.CreateRedisPamResourceWithBody(ctx, contentType, body, reqEditors...) +// CreateSshPamResourceWithBodyWithResponse request with arbitrary body returning *CreateSshPamResourceResponse +func (c *ClientWithResponses) CreateSshPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) { + rsp, err := c.CreateSshPamResourceWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateRedisPamResourceResponse(rsp) + return ParseCreateSshPamResourceResponse(rsp) } -func (c *ClientWithResponses) CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { - rsp, err := c.CreateRedisPamResource(ctx, body, reqEditors...) +func (c *ClientWithResponses) CreateSshPamResourceWithResponse(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) { + rsp, err := c.CreateSshPamResource(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateRedisPamResourceResponse(rsp) + return ParseCreateSshPamResourceResponse(rsp) } // CreateProjectWithBodyWithResponse request with arbitrary body returning *CreateProjectResponse @@ -6292,1018 +4675,54 @@ func (c *ClientWithResponses) DeleteSecretV4WithResponse(ctx context.Context, se func (c *ClientWithResponses) GetSecretByNameV4WithResponse(ctx context.Context, secretName string, params *GetSecretByNameV4Params, reqEditors ...RequestEditorFn) (*GetSecretByNameV4Response, error) { rsp, err := c.GetSecretByNameV4(ctx, secretName, params, reqEditors...) if err != nil { - return nil, err - } - return ParseGetSecretByNameV4Response(rsp) -} - -// UpdateSecretV4WithBodyWithResponse request with arbitrary body returning *UpdateSecretV4Response -func (c *ClientWithResponses) UpdateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) { - rsp, err := c.UpdateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSecretV4Response(rsp) -} - -func (c *ClientWithResponses) UpdateSecretV4WithResponse(ctx context.Context, secretName string, body UpdateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) { - rsp, err := c.UpdateSecretV4(ctx, secretName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSecretV4Response(rsp) -} - -// CreateSecretV4WithBodyWithResponse request with arbitrary body returning *CreateSecretV4Response -func (c *ClientWithResponses) CreateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) { - rsp, err := c.CreateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSecretV4Response(rsp) -} - -func (c *ClientWithResponses) CreateSecretV4WithResponse(ctx context.Context, secretName string, body CreateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) { - rsp, err := c.CreateSecretV4(ctx, secretName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSecretV4Response(rsp) -} - -// ParseAdminSignUpResponse parses an HTTP response from a AdminSignUpWithResponse call -func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &AdminSignUpResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Message string `json:"message"` - New string `json:"new"` - Organization struct { - AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization"` - AuthEnforced *bool `json:"authEnforced"` - BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"` - BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"` - CreatedAt time.Time `json:"createdAt"` - CustomerId *string `json:"customerId"` - DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"` - EnforceMfa *bool `json:"enforceMfa,omitempty"` - GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"` - GoogleSsoAuthLastUsed *time.Time `json:"googleSsoAuthLastUsed"` - Id openapi_types.UUID `json:"id"` - KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId"` - KmsEncryptedDataKey interface{} `json:"kmsEncryptedDataKey"` - KmsProductEnabled *bool `json:"kmsProductEnabled"` - MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime"` - MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit"` - Name string `json:"name"` - ParentOrgId *openapi_types.UUID `json:"parentOrgId"` - PkiProductEnabled *bool `json:"pkiProductEnabled"` - PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt"` - PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername"` - RootOrgId *openapi_types.UUID `json:"rootOrgId"` - ScannerProductEnabled *bool `json:"scannerProductEnabled"` - ScimEnabled *bool `json:"scimEnabled"` - SecretShareBrandConfig interface{} `json:"secretShareBrandConfig"` - SecretsProductEnabled *bool `json:"secretsProductEnabled"` - SelectedMfaMethod *string `json:"selectedMfaMethod"` - ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled"` - ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"` - Slug string `json:"slug"` - SshProductEnabled *bool `json:"sshProductEnabled"` - UpdatedAt time.Time `json:"updatedAt"` - UserTokenExpiration *string `json:"userTokenExpiration"` - } `json:"organization"` - Token string `json:"token"` - User struct { - AuthMethods *[]string `json:"authMethods"` - ConsecutiveFailedMfaAttempts *float32 `json:"consecutiveFailedMfaAttempts"` - ConsecutiveFailedPasswordAttempts *float32 `json:"consecutiveFailedPasswordAttempts"` - CreatedAt time.Time `json:"createdAt"` - Devices interface{} `json:"devices"` - Email *string `json:"email"` - FirstName *string `json:"firstName"` - Id openapi_types.UUID `json:"id"` - IsAccepted *bool `json:"isAccepted"` - IsEmailVerified *bool `json:"isEmailVerified"` - IsGhost *bool `json:"isGhost,omitempty"` - IsLocked *bool `json:"isLocked"` - IsMfaEnabled *bool `json:"isMfaEnabled"` - LastName *string `json:"lastName"` - MfaMethods *[]string `json:"mfaMethods"` - SelectedMfaMethod *string `json:"selectedMfaMethod"` - SuperAdmin *bool `json:"superAdmin"` - TemporaryLockDateEnd *time.Time `json:"temporaryLockDateEnd"` - UpdatedAt time.Time `json:"updatedAt"` - Username string `json:"username"` - } `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AdminSignUp500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateCloudflareAppConnectionResponse parses an HTTP response from a CreateCloudflareAppConnectionWithResponse call -func ParseCreateCloudflareAppConnectionResponse(rsp *http.Response) (*CreateCloudflareAppConnectionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateCloudflareAppConnectionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - AppConnection CreateCloudflareAppConnection_200_AppConnection `json:"appConnection"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCloudflareAppConnection500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseRefreshAuthTokenResponse parses an HTTP response from a RefreshAuthTokenWithResponse call -func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &RefreshAuthTokenResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - OrganizationId *string `json:"organizationId,omitempty"` - SubOrganizationId *string `json:"subOrganizationId,omitempty"` - Token string `json:"token"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode RefreshAuthToken500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseAttachTokenAuthResponse parses an HTTP response from a AttachTokenAuthWithResponse call -func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &AttachTokenAuthResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - IdentityTokenAuth struct { - AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` - AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` - AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` - AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` - AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Id openapi_types.UUID `json:"id"` - IdentityId openapi_types.UUID `json:"identityId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"identityTokenAuth"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachTokenAuth500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateTokenAuthTokenResponse parses an HTTP response from a CreateTokenAuthTokenWithResponse call -func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthTokenResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateTokenAuthTokenResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - AccessToken string `json:"accessToken"` - AccessTokenMaxTTL float32 `json:"accessTokenMaxTTL"` - ExpiresIn float32 `json:"expiresIn"` - TokenData struct { - AccessTokenLastRenewedAt *time.Time `json:"accessTokenLastRenewedAt"` - AccessTokenLastUsedAt *time.Time `json:"accessTokenLastUsedAt"` - AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` - AccessTokenNumUses *float32 `json:"accessTokenNumUses,omitempty"` - AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` - AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` - AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` - AuthMethod string `json:"authMethod"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IdentityId openapi_types.UUID `json:"identityId"` - IdentityUAClientSecretId *string `json:"identityUAClientSecretId"` - IsAccessTokenRevoked *bool `json:"isAccessTokenRevoked,omitempty"` - Name *string `json:"name"` - SubOrganizationId *openapi_types.UUID `json:"subOrganizationId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"tokenData"` - TokenType CreateTokenAuthToken200TokenType `json:"tokenType"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateTokenAuthToken500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseAttachUniversalAuthResponse parses an HTTP response from a AttachUniversalAuthWithResponse call -func ParseAttachUniversalAuthResponse(rsp *http.Response) (*AttachUniversalAuthResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &AttachUniversalAuthResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - IdentityUniversalAuth struct { - AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` - AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` - AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` - AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` - AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` - ClientId string `json:"clientId"` - ClientSecretTrustedIps interface{} `json:"clientSecretTrustedIps,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Id openapi_types.UUID `json:"id"` - IdentityId openapi_types.UUID `json:"identityId"` - LockoutCounterResetSeconds *float32 `json:"lockoutCounterResetSeconds,omitempty"` - LockoutDurationSeconds *float32 `json:"lockoutDurationSeconds,omitempty"` - LockoutEnabled *bool `json:"lockoutEnabled,omitempty"` - LockoutThreshold *float32 `json:"lockoutThreshold,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"identityUniversalAuth"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode AttachUniversalAuth500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateUniversalAuthClientSecretResponse parses an HTTP response from a CreateUniversalAuthClientSecretWithResponse call -func ParseCreateUniversalAuthClientSecretResponse(rsp *http.Response) (*CreateUniversalAuthClientSecretResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateUniversalAuthClientSecretResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - ClientSecret string `json:"clientSecret"` - ClientSecretData struct { - ClientSecretNumUses *float32 `json:"clientSecretNumUses,omitempty"` - ClientSecretNumUsesLimit *float32 `json:"clientSecretNumUsesLimit,omitempty"` - ClientSecretPrefix string `json:"clientSecretPrefix"` - ClientSecretTTL *float32 `json:"clientSecretTTL,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Description string `json:"description"` - Id string `json:"id"` - IdentityUAId openapi_types.UUID `json:"identityUAId"` - IsClientSecretRevoked *bool `json:"isClientSecretRevoked,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"clientSecretData"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateUniversalAuthClientSecret500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateAcmeCertificateAuthorityV1Response parses an HTTP response from a CreateAcmeCertificateAuthorityV1WithResponse call -func ParseCreateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*CreateAcmeCertificateAuthorityV1Response, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateAcmeCertificateAuthorityV1Response{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Configuration struct { - // AccountEmail The email address for the ACME Certificate Authority. - AccountEmail string `json:"accountEmail"` - - // DirectoryUrl The directory URL for the ACME Certificate Authority. - DirectoryUrl string `json:"directoryUrl"` - - // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. - DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` - DnsProviderConfig struct { - // HostedZoneId The hosted zone ID for the ACME Certificate Authority. - HostedZoneId string `json:"hostedZoneId"` - - // Provider The DNS provider for the ACME Certificate Authority. - Provider CreateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider `json:"provider"` - } `json:"dnsProviderConfig"` - - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabKid *string `json:"eabKid,omitempty"` - } `json:"configuration"` - EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - Status CreateAcmeCertificateAuthorityV1200Status `json:"status"` - Type CreateAcmeCertificateAuthorityV1200Type `json:"type"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest + return nil, err + } + return ParseGetSecretByNameV4Response(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest +// UpdateSecretV4WithBodyWithResponse request with arbitrary body returning *UpdateSecretV4Response +func (c *ClientWithResponses) UpdateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) { + rsp, err := c.UpdateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSecretV4Response(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateAcmeCertificateAuthorityV1500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +func (c *ClientWithResponses) UpdateSecretV4WithResponse(ctx context.Context, secretName string, body UpdateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretV4Response, error) { + rsp, err := c.UpdateSecretV4(ctx, secretName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSecretV4Response(rsp) +} +// CreateSecretV4WithBodyWithResponse request with arbitrary body returning *CreateSecretV4Response +func (c *ClientWithResponses) CreateSecretV4WithBodyWithResponse(ctx context.Context, secretName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) { + rsp, err := c.CreateSecretV4WithBody(ctx, secretName, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseCreateSecretV4Response(rsp) +} - return response, nil +func (c *ClientWithResponses) CreateSecretV4WithResponse(ctx context.Context, secretName string, body CreateSecretV4JSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecretV4Response, error) { + rsp, err := c.CreateSecretV4(ctx, secretName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSecretV4Response(rsp) } -// ParseUpdateAcmeCertificateAuthorityV1Response parses an HTTP response from a UpdateAcmeCertificateAuthorityV1WithResponse call -func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateAcmeCertificateAuthorityV1Response, error) { +// ParseAdminSignUpResponse parses an HTTP response from a AdminSignUpWithResponse call +func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAcmeCertificateAuthorityV1Response{ + response := &AdminSignUpResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -7311,35 +4730,66 @@ func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateA switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Configuration struct { - // AccountEmail The email address for the ACME Certificate Authority. - AccountEmail string `json:"accountEmail"` - - // DirectoryUrl The directory URL for the ACME Certificate Authority. - DirectoryUrl string `json:"directoryUrl"` - - // DnsAppConnectionId The ID of the App Connection to use for creating and managing DNS TXT records required for ACME domain validation. This connection must have permissions to create and delete TXT records in your DNS provider (e.g., Route53) for the ACME challenge process. - DnsAppConnectionId openapi_types.UUID `json:"dnsAppConnectionId"` - DnsProviderConfig struct { - // HostedZoneId The hosted zone ID for the ACME Certificate Authority. - HostedZoneId string `json:"hostedZoneId"` - - // Provider The DNS provider for the ACME Certificate Authority. - Provider UpdateAcmeCertificateAuthorityV1200ConfigurationDnsProviderConfigProvider `json:"provider"` - } `json:"dnsProviderConfig"` - - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabKid *string `json:"eabKid,omitempty"` - } `json:"configuration"` - EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - Status UpdateAcmeCertificateAuthorityV1200Status `json:"status"` - Type UpdateAcmeCertificateAuthorityV1200Type `json:"type"` + Message string `json:"message"` + New string `json:"new"` + Organization struct { + AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization"` + AuthEnforced *bool `json:"authEnforced"` + BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"` + BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"` + CreatedAt time.Time `json:"createdAt"` + CustomerId *string `json:"customerId"` + DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"` + EnforceMfa *bool `json:"enforceMfa,omitempty"` + GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"` + GoogleSsoAuthLastUsed *time.Time `json:"googleSsoAuthLastUsed"` + Id openapi_types.UUID `json:"id"` + KmsDefaultKeyId *openapi_types.UUID `json:"kmsDefaultKeyId"` + KmsEncryptedDataKey interface{} `json:"kmsEncryptedDataKey"` + KmsProductEnabled *bool `json:"kmsProductEnabled"` + MaxSharedSecretLifetime *float32 `json:"maxSharedSecretLifetime"` + MaxSharedSecretViewLimit *float32 `json:"maxSharedSecretViewLimit"` + Name string `json:"name"` + ParentOrgId *openapi_types.UUID `json:"parentOrgId"` + PkiProductEnabled *bool `json:"pkiProductEnabled"` + PrivilegeUpgradeInitiatedAt *time.Time `json:"privilegeUpgradeInitiatedAt"` + PrivilegeUpgradeInitiatedByUsername *string `json:"privilegeUpgradeInitiatedByUsername"` + RootOrgId *openapi_types.UUID `json:"rootOrgId"` + ScannerProductEnabled *bool `json:"scannerProductEnabled"` + ScimEnabled *bool `json:"scimEnabled"` + SecretShareBrandConfig interface{} `json:"secretShareBrandConfig"` + SecretsProductEnabled *bool `json:"secretsProductEnabled"` + SelectedMfaMethod *string `json:"selectedMfaMethod"` + ShareSecretsProductEnabled *bool `json:"shareSecretsProductEnabled"` + ShouldUseNewPrivilegeSystem *bool `json:"shouldUseNewPrivilegeSystem,omitempty"` + Slug string `json:"slug"` + SshProductEnabled *bool `json:"sshProductEnabled"` + UpdatedAt time.Time `json:"updatedAt"` + UserTokenExpiration *string `json:"userTokenExpiration"` + } `json:"organization"` + Token string `json:"token"` + User struct { + AuthMethods *[]string `json:"authMethods"` + ConsecutiveFailedMfaAttempts *float32 `json:"consecutiveFailedMfaAttempts"` + ConsecutiveFailedPasswordAttempts *float32 `json:"consecutiveFailedPasswordAttempts"` + CreatedAt time.Time `json:"createdAt"` + Devices interface{} `json:"devices"` + Email *string `json:"email"` + FirstName *string `json:"firstName"` + Id openapi_types.UUID `json:"id"` + IsAccepted *bool `json:"isAccepted"` + IsEmailVerified *bool `json:"isEmailVerified"` + IsGhost *bool `json:"isGhost,omitempty"` + IsLocked *bool `json:"isLocked"` + IsMfaEnabled *bool `json:"isMfaEnabled"` + LastName *string `json:"lastName"` + MfaMethods *[]string `json:"mfaMethods"` + SelectedMfaMethod *string `json:"selectedMfaMethod"` + SuperAdmin *bool `json:"superAdmin"` + TemporaryLockDateEnd *time.Time `json:"temporaryLockDateEnd"` + UpdatedAt time.Time `json:"updatedAt"` + Username string `json:"username"` + } `json:"user"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7348,11 +4798,11 @@ func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateA case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7361,10 +4811,10 @@ func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateA case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7373,11 +4823,11 @@ func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateA case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7386,10 +4836,10 @@ func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateA case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7398,10 +4848,10 @@ func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateA case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7410,10 +4860,10 @@ func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateA case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode UpdateAcmeCertificateAuthorityV1500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AdminSignUp500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7425,15 +4875,15 @@ func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateA return response, nil } -// ParseCreateInternalCertificateAuthorityV1Response parses an HTTP response from a CreateInternalCertificateAuthorityV1WithResponse call -func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*CreateInternalCertificateAuthorityV1Response, error) { +// ParseRefreshAuthTokenResponse parses an HTTP response from a RefreshAuthTokenWithResponse call +func ParseRefreshAuthTokenResponse(rsp *http.Response) (*RefreshAuthTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateInternalCertificateAuthorityV1Response{ + response := &RefreshAuthTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -7441,54 +4891,9 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Configuration struct { - ActiveCaCertId *openapi_types.UUID `json:"activeCaCertId"` - - // CommonName The common name (CN) for the CA. - CommonName *string `json:"commonName,omitempty"` - - // Country The country name (C) for the CA. - Country *string `json:"country,omitempty"` - Dn *string `json:"dn"` - - // FriendlyName A friendly name for the CA. - FriendlyName *string `json:"friendlyName,omitempty"` - - // KeyAlgorithm The type of public key algorithm and size, in bits, of the key pair for the CA; when you create an intermediate CA, you must use a key algorithm supported by the parent CA. - KeyAlgorithm CreateInternalCertificateAuthorityV1200ConfigurationKeyAlgorithm `json:"keyAlgorithm"` - - // Locality The locality name for the CA. - Locality *string `json:"locality,omitempty"` - - // MaxPathLength The maximum number of intermediate CAs that may follow this CA in the certificate / CA chain. A maxPathLength of -1 implies no path limit on the chain. - MaxPathLength *float32 `json:"maxPathLength"` - - // NotAfter The date and time when the CA expires in YYYY-MM-DDTHH:mm:ss.sssZ format. - NotAfter *string `json:"notAfter,omitempty"` - - // NotBefore The date and time when the CA becomes valid in YYYY-MM-DDTHH:mm:ss.sssZ format. - NotBefore *string `json:"notBefore,omitempty"` - - // Organization The organization (O) for the CA. - Organization *string `json:"organization,omitempty"` - - // Ou The organization unit (OU) for the CA. - Ou *string `json:"ou,omitempty"` - ParentCaId *openapi_types.UUID `json:"parentCaId"` - - // Province The state of province name for the CA. - Province *string `json:"province,omitempty"` - SerialNumber *string `json:"serialNumber"` - - // Type The type of CA to create. - Type CreateInternalCertificateAuthorityV1200ConfigurationType `json:"type"` - } `json:"configuration"` - EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - Status CreateInternalCertificateAuthorityV1200Status `json:"status"` - Type CreateInternalCertificateAuthorityV1200Type `json:"type"` + OrganizationId *string `json:"organizationId,omitempty"` + SubOrganizationId *string `json:"subOrganizationId,omitempty"` + Token string `json:"token"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7497,11 +4902,11 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7510,10 +4915,10 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7522,11 +4927,11 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7535,10 +4940,10 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7547,10 +4952,10 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7559,10 +4964,10 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateInternalCertificateAuthorityV1500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode RefreshAuthToken500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7574,15 +4979,15 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre return response, nil } -// ParseCreateCertificatePolicyResponse parses an HTTP response from a CreateCertificatePolicyWithResponse call -func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificatePolicyResponse, error) { +// ParseAttachTokenAuthResponse parses an HTTP response from a AttachTokenAuthWithResponse call +func ParseAttachTokenAuthResponse(rsp *http.Response) (*AttachTokenAuthResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateCertificatePolicyResponse{ + response := &AttachTokenAuthResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -7590,47 +4995,17 @@ func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificat switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - CertificatePolicy struct { - Algorithms *struct { - KeyAlgorithm *[]string `json:"keyAlgorithm,omitempty"` - Signature *[]string `json:"signature,omitempty"` - } `json:"algorithms,omitempty"` - BasicConstraints *struct { - IsCA *CreateCertificatePolicy200CertificatePolicyBasicConstraintsIsCA `json:"isCA,omitempty"` - MaxPathLength *int `json:"maxPathLength,omitempty"` - } `json:"basicConstraints"` - CreatedAt time.Time `json:"createdAt"` - Description *string `json:"description"` - ExtendedKeyUsages *struct { - Allowed *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesAllowed `json:"allowed,omitempty"` - Denied *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesDenied `json:"denied,omitempty"` - Required *[]CreateCertificatePolicy200CertificatePolicyExtendedKeyUsagesRequired `json:"required,omitempty"` - } `json:"extendedKeyUsages,omitempty"` - Id openapi_types.UUID `json:"id"` - KeyUsages *struct { - Allowed *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesAllowed `json:"allowed,omitempty"` - Denied *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesDenied `json:"denied,omitempty"` - Required *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesRequired `json:"required,omitempty"` - } `json:"keyUsages,omitempty"` - Name string `json:"name"` - ProjectId openapi_types.UUID `json:"projectId"` - Sans *[]struct { - Allowed *[]string `json:"allowed,omitempty"` - Denied *[]string `json:"denied,omitempty"` - Required *[]string `json:"required,omitempty"` - Type CreateCertificatePolicy200CertificatePolicySansType `json:"type"` - } `json:"sans,omitempty"` - Subject *[]struct { - Allowed *[]string `json:"allowed,omitempty"` - Denied *[]string `json:"denied,omitempty"` - Required *[]string `json:"required,omitempty"` - Type CreateCertificatePolicy200CertificatePolicySubjectType `json:"type"` - } `json:"subject,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - Validity *struct { - Max *string `json:"max,omitempty"` - } `json:"validity,omitempty"` - } `json:"certificatePolicy"` + IdentityTokenAuth struct { + AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` + AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` + AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` + AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` + AccessTokenTrustedIps interface{} `json:"accessTokenTrustedIps,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Id openapi_types.UUID `json:"id"` + IdentityId openapi_types.UUID `json:"identityId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"identityTokenAuth"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7639,11 +5014,11 @@ func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificat case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7652,10 +5027,10 @@ func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificat case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7664,11 +5039,11 @@ func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificat case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7677,10 +5052,10 @@ func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificat case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7689,10 +5064,10 @@ func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificat case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7701,10 +5076,10 @@ func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificat case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificatePolicy500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode AttachTokenAuth500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7716,15 +5091,15 @@ func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificat return response, nil } -// ParseCreateCertificateProfileResponse parses an HTTP response from a CreateCertificateProfileWithResponse call -func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertificateProfileResponse, error) { +// ParseCreateTokenAuthTokenResponse parses an HTTP response from a CreateTokenAuthTokenWithResponse call +func ParseCreateTokenAuthTokenResponse(rsp *http.Response) (*CreateTokenAuthTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateCertificateProfileResponse{ + response := &CreateTokenAuthTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -7732,39 +5107,28 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - CertificateProfile struct { - AcmeConfigId *openapi_types.UUID `json:"acmeConfigId"` - ApiConfigId *openapi_types.UUID `json:"apiConfigId"` - CaId *openapi_types.UUID `json:"caId"` - CertificatePolicyId openapi_types.UUID `json:"certificatePolicyId"` - CreatedAt time.Time `json:"createdAt"` - Defaults *struct { - BasicConstraints *struct { - IsCA bool `json:"isCA"` - PathLength *float32 `json:"pathLength,omitempty"` - } `json:"basicConstraints,omitempty"` - CommonName *string `json:"commonName,omitempty"` - Country *string `json:"country,omitempty"` - ExtendedKeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsExtendedKeyUsages `json:"extendedKeyUsages,omitempty"` - KeyAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsKeyAlgorithm `json:"keyAlgorithm,omitempty"` - KeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsKeyUsages `json:"keyUsages,omitempty"` - Locality *string `json:"locality,omitempty"` - Organization *string `json:"organization,omitempty"` - OrganizationalUnit *string `json:"organizationalUnit,omitempty"` - SignatureAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsSignatureAlgorithm `json:"signatureAlgorithm,omitempty"` - State *string `json:"state,omitempty"` - TtlDays *float32 `json:"ttlDays,omitempty"` - } `json:"defaults"` - Description *string `json:"description"` - EnrollmentType string `json:"enrollmentType"` - EstConfigId *openapi_types.UUID `json:"estConfigId"` - ExternalConfigs *CreateCertificateProfile_200_CertificateProfile_ExternalConfigs `json:"externalConfigs"` - Id openapi_types.UUID `json:"id"` - IssuerType *string `json:"issuerType,omitempty"` - ProjectId string `json:"projectId"` - Slug string `json:"slug"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"certificateProfile"` + AccessToken string `json:"accessToken"` + AccessTokenMaxTTL float32 `json:"accessTokenMaxTTL"` + ExpiresIn float32 `json:"expiresIn"` + TokenData struct { + AccessTokenLastRenewedAt *time.Time `json:"accessTokenLastRenewedAt"` + AccessTokenLastUsedAt *time.Time `json:"accessTokenLastUsedAt"` + AccessTokenMaxTTL *float32 `json:"accessTokenMaxTTL,omitempty"` + AccessTokenNumUses *float32 `json:"accessTokenNumUses,omitempty"` + AccessTokenNumUsesLimit *float32 `json:"accessTokenNumUsesLimit,omitempty"` + AccessTokenPeriod *float32 `json:"accessTokenPeriod,omitempty"` + AccessTokenTTL *float32 `json:"accessTokenTTL,omitempty"` + AuthMethod string `json:"authMethod"` + CreatedAt time.Time `json:"createdAt"` + Id string `json:"id"` + IdentityId openapi_types.UUID `json:"identityId"` + IdentityUAClientSecretId *string `json:"identityUAClientSecretId"` + IsAccessTokenRevoked *bool `json:"isAccessTokenRevoked,omitempty"` + Name *string `json:"name"` + SubOrganizationId *openapi_types.UUID `json:"subOrganizationId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"tokenData"` + TokenType CreateTokenAuthToken200TokenType `json:"tokenType"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7773,11 +5137,11 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7786,10 +5150,10 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7798,11 +5162,11 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7811,10 +5175,10 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7823,10 +5187,10 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -7835,10 +5199,10 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateCertificateProfile500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateTokenAuthToken500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -8101,6 +5465,138 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP return response, nil } +// ParseCreateSshPamAccountResponse parses an HTTP response from a CreateSshPamAccountWithResponse call +func ParseCreateSshPamAccountResponse(rsp *http.Response) (*CreateSshPamAccountResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSshPamAccountResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Account struct { + CreatedAt time.Time `json:"createdAt"` + Credentials CreateSshPamAccount_200_Account_Credentials `json:"credentials"` + Description *string `json:"description"` + EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` + FolderId *openapi_types.UUID `json:"folderId"` + Id openapi_types.UUID `json:"id"` + InternalMetadata interface{} `json:"internalMetadata"` + LastRotatedAt *time.Time `json:"lastRotatedAt"` + LastRotationMessage *string `json:"lastRotationMessage"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + RequireMfa *bool `json:"requireMfa"` + Resource struct { + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ResourceType string `json:"resourceType"` + RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` + } `json:"resource"` + ResourceId openapi_types.UUID `json:"resourceId"` + ResourceType CreateSshPamAccount200AccountResourceType `json:"resourceType"` + RotationEnabled *bool `json:"rotationEnabled,omitempty"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` + RotationStatus *string `json:"rotationStatus"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"account"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreateKubernetesPamResourceResponse parses an HTTP response from a CreateKubernetesPamResourceWithResponse call func ParseCreateKubernetesPamResourceResponse(rsp *http.Response) (*CreateKubernetesPamResourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -8479,6 +5975,128 @@ func ParseCreateRedisPamResourceResponse(rsp *http.Response) (*CreateRedisPamRes return response, nil } +// ParseCreateSshPamResourceResponse parses an HTTP response from a CreateSshPamResourceWithResponse call +func ParseCreateSshPamResourceResponse(rsp *http.Response) (*CreateSshPamResourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSshPamResourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + Host string `json:"host"` + Port float32 `json:"port"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreateSshPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *CreateSshPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreateProjectResponse parses an HTTP response from a CreateProjectWithResponse call func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/e2e/pam/main_test.go b/e2e/pam/main_test.go new file mode 100644 index 00000000..0b504e8e --- /dev/null +++ b/e2e/pam/main_test.go @@ -0,0 +1,13 @@ +package pam_test + +import ( + "os" + "testing" + + "github.com/joho/godotenv" +) + +func TestMain(m *testing.M) { + _ = godotenv.Load("../.env") + os.Exit(m.Run()) +} diff --git a/e2e/pam/pam_helpers.go b/e2e/pam/pam_helpers_test.go similarity index 97% rename from e2e/pam/pam_helpers.go rename to e2e/pam/pam_helpers_test.go index c00d97d6..558d992d 100644 --- a/e2e/pam/pam_helpers.go +++ b/e2e/pam/pam_helpers_test.go @@ -60,7 +60,7 @@ func SetupPAMInfra(t *testing.T, ctx context.Context) *PAMTestInfra { require.NotNil(t, identity) // Start relay. - // Use the host's outbound IP so the pam db access subprocess (which runs + // Use the host's outbound IP so the pam access subprocess (which runs // on the host) can resolve the relay address returned by the backend API. relayHost := getOutboundIP(t) relayName := helpers.RandomSlug(2) @@ -121,11 +121,11 @@ func SetupPAMInfra(t *testing.T, ctx context.Context) *PAMTestInfra { require.NotZero(t, gatewayId, "Gateway ID should be set") // Create PAM project - projDesc := "e2e tests for PAM postgres" + projDesc := "e2e tests for PAM" template := "default" projectType := client.Pam projectResp, err := c.CreateProjectWithResponse(ctx, client.CreateProjectJSONRequestBody{ - ProjectName: "pam-pg-tests", + ProjectName: "pam-e2e-tests", ProjectDescription: &projDesc, Template: &template, Type: &projectType, diff --git a/e2e/pam/postgres_test.go b/e2e/pam/postgres_test.go index 9ff752d7..abe40f98 100644 --- a/e2e/pam/postgres_test.go +++ b/e2e/pam/postgres_test.go @@ -5,7 +5,6 @@ import ( "fmt" "log/slog" "net/http" - "os" "strings" "testing" "time" @@ -14,16 +13,10 @@ import ( "github.com/infisical/cli/e2e-tests/packages/client" helpers "github.com/infisical/cli/e2e-tests/util" "github.com/jackc/pgx/v5" - "github.com/joho/godotenv" "github.com/stretchr/testify/require" tcpostgres "github.com/testcontainers/testcontainers-go/modules/postgres" ) -func TestMain(m *testing.M) { - _ = godotenv.Load("../.env") - os.Exit(m.Run()) -} - func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) t.Cleanup(cancel) diff --git a/e2e/pam/ssh_test.go b/e2e/pam/ssh_test.go new file mode 100644 index 00000000..21429ab0 --- /dev/null +++ b/e2e/pam/ssh_test.go @@ -0,0 +1,191 @@ +package pam_test + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "log/slog" + "net/http" + "strings" + "testing" + "time" + + "github.com/docker/go-connections/nat" + "github.com/google/uuid" + "github.com/infisical/cli/e2e-tests/packages/client" + helpers "github.com/infisical/cli/e2e-tests/util" + "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" +) + +func TestPAM_SSH_ConnectToServer(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + t.Cleanup(cancel) + + infra := SetupPAMInfra(t, ctx) + + const ( + sshUser = "testuser" + sshPassword = "testpass" + ) + + // Start an SSH server container (linuxserver/openssh-server) + sshContainer, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + Image: "linuxserver/openssh-server:latest", + ExposedPorts: []string{"2222/tcp"}, + Env: map[string]string{ + "PASSWORD_ACCESS": "true", + "USER_NAME": sshUser, + "USER_PASSWORD": sshPassword, + "PUID": "1000", + "PGID": "1000", + }, + WaitingFor: wait.ForListeningPort(nat.Port("2222/tcp")).WithStartupTimeout(60 * time.Second), + }, + Started: true, + }) + require.NoError(t, err) + t.Cleanup(func() { + if err := sshContainer.Terminate(ctx); err != nil { + t.Logf("Failed to terminate SSH container: %v", err) + } + }) + + sshPort, err := sshContainer.MappedPort(ctx, "2222") + require.NoError(t, err) + + // Use the outbound IP so the gateway (running on the host) can reach the container + resourceHost := getOutboundIP(t) + slog.Info("SSH container started", "host", resourceHost, "port", sshPort.Int()) + + // Create SSH PAM resource via typed API + resourceName := "ssh-resource" + sshResResp, err := infra.ApiClient.CreateSshPamResourceWithResponse( + ctx, + client.CreateSshPamResourceJSONRequestBody{ + ProjectId: uuid.MustParse(infra.ProjectId), + GatewayId: infra.GatewayId, + Name: resourceName, + ConnectionDetails: struct { + Host string `json:"host"` + Port float32 `json:"port"` + }{ + Host: resourceHost, + Port: float32(sshPort.Int()), + }, + }, + ) + require.NoError(t, err) + require.Equal(t, http.StatusOK, sshResResp.StatusCode()) + resourceId := sshResResp.JSON200.Resource.Id + slog.Info("Created SSH PAM resource", "resourceId", resourceId) + + // Create SSH PAM account (raw JSON — oapi-codegen doesn't generate helpers for the anyOf credentials union) + accountName := "ssh-account" + sshAcctBody, err := json.Marshal(map[string]interface{}{ + "resourceId": resourceId.String(), + "name": accountName, + "rotationEnabled": false, + "credentials": map[string]interface{}{ + "authMethod": "password", + "username": sshUser, + "password": sshPassword, + }, + }) + require.NoError(t, err) + + // Retry — the backend may restart after resource creation, wait for it to come back + acctResult := helpers.WaitFor(t, helpers.WaitForOptions{ + Timeout: 90 * time.Second, + Interval: 3 * time.Second, + Condition: func() helpers.ConditionResult { + resp, callErr := infra.ApiClient.CreateSshPamAccountWithBodyWithResponse( + ctx, "application/json", bytes.NewReader(append([]byte(nil), sshAcctBody...)), + ) + if callErr != nil { + slog.Warn("SSH PAM account creation attempt failed, retrying...", "error", callErr) + return helpers.ConditionWait + } + if resp.StatusCode() != http.StatusOK { + slog.Warn("SSH PAM account creation returned non-200, retrying...", "status", resp.StatusCode(), "body", string(resp.Body)) + return helpers.ConditionWait + } + return helpers.ConditionSuccess + }, + }) + require.Equal(t, helpers.WaitSuccess, acctResult, "SSH PAM account creation should succeed") + slog.Info("Created SSH PAM account") + + // Login with provisioned admin user + LoginUser(t, ctx, infra) + + // Create a pipe for stdin — we'll send commands to the SSH session + stdinReader, stdinWriter := io.Pipe() + + // Run `pam ssh access` as a subprocess + pamCmd := helpers.Command{ + Test: t, + RunMethod: helpers.RunMethodSubprocess, + DisableTempHomeDir: true, + Stdin: stdinReader, + Args: []string{ + "pam", "ssh", "access", + "--resource", resourceName, + "--account", accountName, + "--project-id", infra.ProjectId, + "--duration", "5m", + }, + Env: map[string]string{ + "HOME": infra.SharedHomeDir, + "INFISICAL_API_URL": infra.Infisical.ApiUrl(t), + "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", + }, + } + pamCmd.Start(ctx) + t.Cleanup(pamCmd.Stop) + + // Send echo command in a goroutine. The io.Pipe write blocks until + // the SSH client reads, so this naturally waits for the session to be ready. + go func() { + fmt.Fprintln(stdinWriter, "echo hello-infisical") + }() + + // Wait for the echo output to appear in stdout + echoResult := helpers.WaitFor(t, helpers.WaitForOptions{ + EnsureCmdRunning: &pamCmd, + Timeout: 60 * time.Second, + Interval: 1 * time.Second, + Condition: func() helpers.ConditionResult { + if strings.Contains(pamCmd.Stdout(), "hello-infisical") { + return helpers.ConditionSuccess + } + return helpers.ConditionWait + }, + }) + require.Equal(t, helpers.WaitSuccess, echoResult, "Should see echo output") + + // Close stdin to end the SSH session (EOF causes the remote shell to exit) + stdinWriter.Close() + + // Wait for the subprocess to exit (SSH proxy calls os.Exit(0) after SSH client disconnects) + result := helpers.WaitFor(t, helpers.WaitForOptions{ + Timeout: 30 * time.Second, + Interval: 2 * time.Second, + Condition: func() helpers.ConditionResult { + if !pamCmd.IsRunning() { + if pamCmd.ExitCode() == 0 { + slog.Info("PAM SSH access completed successfully") + return helpers.ConditionSuccess + } + pamCmd.DumpOutput() + return helpers.ConditionBreakEarly + } + return helpers.ConditionWait + }, + }) + require.Equal(t, helpers.WaitSuccess, result, "pam ssh access should complete successfully") +} diff --git a/e2e/util/helpers.go b/e2e/util/helpers.go index 5146976a..073413b4 100644 --- a/e2e/util/helpers.go +++ b/e2e/util/helpers.go @@ -202,6 +202,7 @@ type Command struct { Env map[string]string RunMethod RunMethod DisableTempHomeDir bool + Stdin io.Reader stdoutFilePath string stdoutFile *os.File @@ -376,6 +377,9 @@ func (c *Command) Start(ctx context.Context) { c.cmd.Stdout = c.stdoutFile c.cmd.Stderr = c.stderrFile + if c.Stdin != nil { + c.cmd.Stdin = c.Stdin + } err := c.cmd.Start() go func() { From 03655107e7a3736e6e406bee79489be74586aa01 Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Sun, 8 Mar 2026 13:13:53 +0530 Subject: [PATCH 06/11] Remove unused `pam_helpers.go` and replace SSH test container with custom-built Dockerfile; add support for multiple SSH auth methods (password, public-key, certificate) in PAM E2E tests. --- e2e/go.mod | 2 +- e2e/go.sum | 2 + e2e/packages/client/client.gen.go | 806 +++++++++++++++++++++- e2e/pam/pam_helpers.go | 201 ------ e2e/pam/postgres_test.go | 7 - e2e/pam/ssh_test.go | 242 +++++-- e2e/pam/testdata/ssh-server/Dockerfile | 10 + e2e/pam/testdata/ssh-server/entrypoint.sh | 19 + 8 files changed, 1009 insertions(+), 280 deletions(-) delete mode 100644 e2e/pam/pam_helpers.go create mode 100644 e2e/pam/testdata/ssh-server/Dockerfile create mode 100644 e2e/pam/testdata/ssh-server/entrypoint.sh diff --git a/e2e/go.mod b/e2e/go.mod index 0d4f479e..33ba49d4 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -22,6 +22,7 @@ require ( github.com/testcontainers/testcontainers-go/modules/compose v0.40.0 github.com/testcontainers/testcontainers-go/modules/postgres v0.40.0 github.com/testcontainers/testcontainers-go/modules/redis v0.40.0 + golang.org/x/crypto v0.45.0 ) require ( @@ -298,7 +299,6 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.44.0 // indirect golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect golang.org/x/mod v0.30.0 // indirect golang.org/x/net v0.47.0 // indirect diff --git a/e2e/go.sum b/e2e/go.sum index cc33a8d4..a46b9aa7 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -1081,6 +1081,8 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= diff --git a/e2e/packages/client/client.gen.go b/e2e/packages/client/client.gen.go index c63c2a92..97cdfd95 100644 --- a/e2e/packages/client/client.gen.go +++ b/e2e/packages/client/client.gen.go @@ -229,11 +229,41 @@ const ( SelfSigned CreateCertificateProfileJSONBodyIssuerType = "self-signed" ) +// Defines values for CreateSshPamAccountJSONBodyCredentials0AuthMethod. +const ( + CreateSshPamAccountJSONBodyCredentials0AuthMethodPassword CreateSshPamAccountJSONBodyCredentials0AuthMethod = "password" +) + +// Defines values for CreateSshPamAccountJSONBodyCredentials1AuthMethod. +const ( + CreateSshPamAccountJSONBodyCredentials1AuthMethodPublicKey CreateSshPamAccountJSONBodyCredentials1AuthMethod = "public-key" +) + +// Defines values for CreateSshPamAccountJSONBodyCredentials2AuthMethod. +const ( + CreateSshPamAccountJSONBodyCredentials2AuthMethodCertificate CreateSshPamAccountJSONBodyCredentials2AuthMethod = "certificate" +) + // Defines values for CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod. const ( ServiceAccountToken CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod = "service-account-token" ) +// Defines values for CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod. +const ( + CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethodPassword CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod = "password" +) + +// Defines values for CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod. +const ( + CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethodPublicKey CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod = "public-key" +) + +// Defines values for CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod. +const ( + CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethodCertificate CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod = "certificate" +) + // Defines values for CreateProjectJSONBodyType. const ( Ai CreateProjectJSONBodyType = "ai" @@ -764,6 +794,56 @@ type CreatePostgresPamAccountJSONBody struct { RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` } +// CreateSshPamAccountJSONBody defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBody struct { + Credentials CreateSshPamAccountJSONBody_Credentials `json:"credentials"` + Description *string `json:"description"` + FolderId *openapi_types.UUID `json:"folderId,omitempty"` + Metadata *[]struct { + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + RequireMfa *bool `json:"requireMfa,omitempty"` + ResourceId openapi_types.UUID `json:"resourceId"` + RotationEnabled bool `json:"rotationEnabled"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` +} + +// CreateSshPamAccountJSONBodyCredentials0 defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials0 struct { + AuthMethod CreateSshPamAccountJSONBodyCredentials0AuthMethod `json:"authMethod"` + Password string `json:"password"` + Username string `json:"username"` +} + +// CreateSshPamAccountJSONBodyCredentials0AuthMethod defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials0AuthMethod string + +// CreateSshPamAccountJSONBodyCredentials1 defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials1 struct { + AuthMethod CreateSshPamAccountJSONBodyCredentials1AuthMethod `json:"authMethod"` + PrivateKey string `json:"privateKey"` + Username string `json:"username"` +} + +// CreateSshPamAccountJSONBodyCredentials1AuthMethod defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials1AuthMethod string + +// CreateSshPamAccountJSONBodyCredentials2 defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials2 struct { + AuthMethod CreateSshPamAccountJSONBodyCredentials2AuthMethod `json:"authMethod"` + Username string `json:"username"` +} + +// CreateSshPamAccountJSONBodyCredentials2AuthMethod defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodyCredentials2AuthMethod string + +// CreateSshPamAccountJSONBody_Credentials defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBody_Credentials struct { + union json.RawMessage +} + // CreateKubernetesPamResourceJSONBody defines parameters for CreateKubernetesPamResource. type CreateKubernetesPamResourceJSONBody struct { ConnectionDetails struct { @@ -840,6 +920,56 @@ type CreateRedisPamResourceJSONBody struct { } `json:"rotationAccountCredentials"` } +// CreateSshPamResourceJSONBody defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBody struct { + ConnectionDetails struct { + Host string `json:"host"` + Port float32 `json:"port"` + } `json:"connectionDetails"` + GatewayId openapi_types.UUID `json:"gatewayId"` + Metadata *[]struct { + Key string `json:"key"` + Value *string `json:"value,omitempty"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId openapi_types.UUID `json:"projectId"` + RotationAccountCredentials *CreateSshPamResourceJSONBody_RotationAccountCredentials `json:"rotationAccountCredentials"` +} + +// CreateSshPamResourceJSONBodyRotationAccountCredentials0 defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials0 struct { + AuthMethod CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod `json:"authMethod"` + Password string `json:"password"` + Username string `json:"username"` +} + +// CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod string + +// CreateSshPamResourceJSONBodyRotationAccountCredentials1 defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials1 struct { + AuthMethod CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod `json:"authMethod"` + PrivateKey string `json:"privateKey"` + Username string `json:"username"` +} + +// CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod string + +// CreateSshPamResourceJSONBodyRotationAccountCredentials2 defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials2 struct { + AuthMethod CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod `json:"authMethod"` + Username string `json:"username"` +} + +// CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod string + +// CreateSshPamResourceJSONBody_RotationAccountCredentials defines parameters for CreateSshPamResource. +type CreateSshPamResourceJSONBody_RotationAccountCredentials struct { + union json.RawMessage +} + // CreateProjectJSONBody defines parameters for CreateProject. type CreateProjectJSONBody struct { HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"` @@ -1105,6 +1235,9 @@ type CreateMachineIdentityJSONRequestBody CreateMachineIdentityJSONBody // CreatePostgresPamAccountJSONRequestBody defines body for CreatePostgresPamAccount for application/json ContentType. type CreatePostgresPamAccountJSONRequestBody CreatePostgresPamAccountJSONBody +// CreateSshPamAccountJSONRequestBody defines body for CreateSshPamAccount for application/json ContentType. +type CreateSshPamAccountJSONRequestBody CreateSshPamAccountJSONBody + // CreateKubernetesPamResourceJSONRequestBody defines body for CreateKubernetesPamResource for application/json ContentType. type CreateKubernetesPamResourceJSONRequestBody CreateKubernetesPamResourceJSONBody @@ -1114,6 +1247,9 @@ type CreatePostgresPamResourceJSONRequestBody CreatePostgresPamResourceJSONBody // CreateRedisPamResourceJSONRequestBody defines body for CreateRedisPamResource for application/json ContentType. type CreateRedisPamResourceJSONRequestBody CreateRedisPamResourceJSONBody +// CreateSshPamResourceJSONRequestBody defines body for CreateSshPamResource for application/json ContentType. +type CreateSshPamResourceJSONRequestBody CreateSshPamResourceJSONBody + // CreateProjectJSONRequestBody defines body for CreateProject for application/json ContentType. type CreateProjectJSONRequestBody CreateProjectJSONBody @@ -1270,6 +1406,11 @@ type ClientInterface interface { CreatePostgresPamAccount(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSshPamAccountWithBody request with any body + CreateSshPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSshPamAccount(ctx context.Context, body CreateSshPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateKubernetesPamResourceWithBody request with any body CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1285,6 +1426,11 @@ type ClientInterface interface { CreateRedisPamResource(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSshPamResourceWithBody request with any body + CreateSshPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSshPamResource(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateProjectWithBody request with any body CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1647,6 +1793,30 @@ func (c *Client) CreatePostgresPamAccount(ctx context.Context, body CreatePostgr return c.Client.Do(req) } +func (c *Client) CreateSshPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSshPamAccountRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSshPamAccount(ctx context.Context, body CreateSshPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSshPamAccountRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateKubernetesPamResourceRequestWithBody(c.Server, contentType, body) if err != nil { @@ -1719,6 +1889,30 @@ func (c *Client) CreateRedisPamResource(ctx context.Context, body CreateRedisPam return c.Client.Do(req) } +func (c *Client) CreateSshPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSshPamResourceRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSshPamResource(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSshPamResourceRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateProjectRequestWithBody(c.Server, contentType, body) if err != nil { @@ -2469,6 +2663,46 @@ func NewCreatePostgresPamAccountRequestWithBody(server string, contentType strin return req, nil } +// NewCreateSshPamAccountRequest calls the generic CreateSshPamAccount builder with application/json body +func NewCreateSshPamAccountRequest(server string, body CreateSshPamAccountJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSshPamAccountRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateSshPamAccountRequestWithBody generates requests for CreateSshPamAccount with any type of body +func NewCreateSshPamAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/pam/accounts/ssh") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewCreateKubernetesPamResourceRequest calls the generic CreateKubernetesPamResource builder with application/json body func NewCreateKubernetesPamResourceRequest(server string, body CreateKubernetesPamResourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -2589,6 +2823,46 @@ func NewCreateRedisPamResourceRequestWithBody(server string, contentType string, return req, nil } +// NewCreateSshPamResourceRequest calls the generic CreateSshPamResource builder with application/json body +func NewCreateSshPamResourceRequest(server string, body CreateSshPamResourceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSshPamResourceRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateSshPamResourceRequestWithBody generates requests for CreateSshPamResource with any type of body +func NewCreateSshPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/pam/resources/ssh") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewCreateProjectRequest calls the generic CreateProject builder with application/json body func NewCreateProjectRequest(server string, body CreateProjectJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -3332,6 +3606,11 @@ type ClientWithResponsesInterface interface { CreatePostgresPamAccountWithResponse(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) + // CreateSshPamAccountWithBodyWithResponse request with any body + CreateSshPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamAccountResponse, error) + + CreateSshPamAccountWithResponse(ctx context.Context, body CreateSshPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamAccountResponse, error) + // CreateKubernetesPamResourceWithBodyWithResponse request with any body CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) @@ -3347,6 +3626,11 @@ type ClientWithResponsesInterface interface { CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) + // CreateSshPamResourceWithBodyWithResponse request with any body + CreateSshPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) + + CreateSshPamResourceWithResponse(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) + // CreateProjectWithBodyWithResponse request with any body CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) @@ -4744,6 +5028,124 @@ func (r CreatePostgresPamAccountResponse) StatusCode() int { return 0 } +type CreateSshPamAccountResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Account struct { + CreatedAt time.Time `json:"createdAt"` + Credentials CreateSshPamAccount_200_Account_Credentials `json:"credentials"` + Description *string `json:"description"` + DiscoveryFingerprint *string `json:"discoveryFingerprint"` + EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` + FolderId *openapi_types.UUID `json:"folderId"` + Id openapi_types.UUID `json:"id"` + InternalMetadata interface{} `json:"internalMetadata"` + LastRotatedAt *time.Time `json:"lastRotatedAt"` + LastRotationMessage *string `json:"lastRotationMessage"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + RequireMfa *bool `json:"requireMfa"` + Resource struct { + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ResourceType string `json:"resourceType"` + RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` + } `json:"resource"` + ResourceId openapi_types.UUID `json:"resourceId"` + ResourceType CreateSshPamAccount200AccountResourceType `json:"resourceType"` + RotationEnabled *bool `json:"rotationEnabled,omitempty"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` + RotationStatus *string `json:"rotationStatus"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"account"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount500StatusCode `json:"statusCode"` + } +} +type CreateSshPamAccount200AccountCredentials0 struct { + AuthMethod CreateSshPamAccount200AccountCredentials0AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamAccount200AccountCredentials0AuthMethod string +type CreateSshPamAccount200AccountCredentials1 struct { + AuthMethod CreateSshPamAccount200AccountCredentials1AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamAccount200AccountCredentials1AuthMethod string +type CreateSshPamAccount200AccountCredentials2 struct { + AuthMethod CreateSshPamAccount200AccountCredentials2AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamAccount200AccountCredentials2AuthMethod string +type CreateSshPamAccount_200_Account_Credentials struct { + union json.RawMessage +} +type CreateSshPamAccount200AccountResourceType string +type CreateSshPamAccount400StatusCode float32 +type CreateSshPamAccount401StatusCode float32 +type CreateSshPamAccount403StatusCode float32 +type CreateSshPamAccount404StatusCode float32 +type CreateSshPamAccount422StatusCode float32 +type CreateSshPamAccount500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateSshPamAccountResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSshPamAccountResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type CreateKubernetesPamResourceResponse struct { Body []byte HTTPResponse *http.Response @@ -5033,12 +5435,120 @@ func (r CreateRedisPamResourceResponse) StatusCode() int { return 0 } -type CreateProjectResponse struct { +type CreateSshPamResourceResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Project struct { - UnderscoreId string `json:"_id"` + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + Host string `json:"host"` + Port float32 `json:"port"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + DiscoveryFingerprint *string `json:"discoveryFingerprint"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreateSshPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *CreateSshPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` + } + JSON400 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource400StatusCode `json:"statusCode"` + } + JSON401 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource401StatusCode `json:"statusCode"` + } + JSON403 *struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource403StatusCode `json:"statusCode"` + } + JSON404 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource404StatusCode `json:"statusCode"` + } + JSON422 *struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource422StatusCode `json:"statusCode"` + } + JSON500 *struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource500StatusCode `json:"statusCode"` + } +} +type CreateSshPamResource200ResourceResourceType string +type CreateSshPamResource200ResourceRotationAccountCredentials0 struct { + AuthMethod CreateSshPamResource200ResourceRotationAccountCredentials0AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamResource200ResourceRotationAccountCredentials0AuthMethod string +type CreateSshPamResource200ResourceRotationAccountCredentials1 struct { + AuthMethod CreateSshPamResource200ResourceRotationAccountCredentials1AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamResource200ResourceRotationAccountCredentials1AuthMethod string +type CreateSshPamResource200ResourceRotationAccountCredentials2 struct { + AuthMethod CreateSshPamResource200ResourceRotationAccountCredentials2AuthMethod `json:"authMethod"` + Username string `json:"username"` +} +type CreateSshPamResource200ResourceRotationAccountCredentials2AuthMethod string +type CreateSshPamResource_200_Resource_RotationAccountCredentials struct { + union json.RawMessage +} +type CreateSshPamResource400StatusCode float32 +type CreateSshPamResource401StatusCode float32 +type CreateSshPamResource403StatusCode float32 +type CreateSshPamResource404StatusCode float32 +type CreateSshPamResource422StatusCode float32 +type CreateSshPamResource500StatusCode float32 + +// Status returns HTTPResponse.Status +func (r CreateSshPamResourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSshPamResourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateProjectResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Project struct { + UnderscoreId string `json:"_id"` AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` AutoCapitalization *bool `json:"autoCapitalization"` CreatedAt time.Time `json:"createdAt"` @@ -6163,6 +6673,23 @@ func (c *ClientWithResponses) CreatePostgresPamAccountWithResponse(ctx context.C return ParseCreatePostgresPamAccountResponse(rsp) } +// CreateSshPamAccountWithBodyWithResponse request with arbitrary body returning *CreateSshPamAccountResponse +func (c *ClientWithResponses) CreateSshPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamAccountResponse, error) { + rsp, err := c.CreateSshPamAccountWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSshPamAccountResponse(rsp) +} + +func (c *ClientWithResponses) CreateSshPamAccountWithResponse(ctx context.Context, body CreateSshPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamAccountResponse, error) { + rsp, err := c.CreateSshPamAccount(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSshPamAccountResponse(rsp) +} + // CreateKubernetesPamResourceWithBodyWithResponse request with arbitrary body returning *CreateKubernetesPamResourceResponse func (c *ClientWithResponses) CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { rsp, err := c.CreateKubernetesPamResourceWithBody(ctx, contentType, body, reqEditors...) @@ -6214,6 +6741,23 @@ func (c *ClientWithResponses) CreateRedisPamResourceWithResponse(ctx context.Con return ParseCreateRedisPamResourceResponse(rsp) } +// CreateSshPamResourceWithBodyWithResponse request with arbitrary body returning *CreateSshPamResourceResponse +func (c *ClientWithResponses) CreateSshPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) { + rsp, err := c.CreateSshPamResourceWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSshPamResourceResponse(rsp) +} + +func (c *ClientWithResponses) CreateSshPamResourceWithResponse(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) { + rsp, err := c.CreateSshPamResource(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSshPamResourceResponse(rsp) +} + // CreateProjectWithBodyWithResponse request with arbitrary body returning *CreateProjectResponse func (c *ClientWithResponses) CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { rsp, err := c.CreateProjectWithBody(ctx, contentType, body, reqEditors...) @@ -8106,6 +8650,139 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP return response, nil } +// ParseCreateSshPamAccountResponse parses an HTTP response from a CreateSshPamAccountWithResponse call +func ParseCreateSshPamAccountResponse(rsp *http.Response) (*CreateSshPamAccountResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSshPamAccountResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Account struct { + CreatedAt time.Time `json:"createdAt"` + Credentials CreateSshPamAccount_200_Account_Credentials `json:"credentials"` + Description *string `json:"description"` + DiscoveryFingerprint *string `json:"discoveryFingerprint"` + EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` + FolderId *openapi_types.UUID `json:"folderId"` + Id openapi_types.UUID `json:"id"` + InternalMetadata interface{} `json:"internalMetadata"` + LastRotatedAt *time.Time `json:"lastRotatedAt"` + LastRotationMessage *string `json:"lastRotationMessage"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + RequireMfa *bool `json:"requireMfa"` + Resource struct { + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + ResourceType string `json:"resourceType"` + RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` + } `json:"resource"` + ResourceId openapi_types.UUID `json:"resourceId"` + ResourceType CreateSshPamAccount200AccountResourceType `json:"resourceType"` + RotationEnabled *bool `json:"rotationEnabled,omitempty"` + RotationIntervalSeconds *float32 `json:"rotationIntervalSeconds"` + RotationStatus *string `json:"rotationStatus"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"account"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamAccount500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreateKubernetesPamResourceResponse parses an HTTP response from a CreateKubernetesPamResourceWithResponse call func ParseCreateKubernetesPamResourceResponse(rsp *http.Response) (*CreateKubernetesPamResourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -8487,6 +9164,129 @@ func ParseCreateRedisPamResourceResponse(rsp *http.Response) (*CreateRedisPamRes return response, nil } +// ParseCreateSshPamResourceResponse parses an HTTP response from a CreateSshPamResourceWithResponse call +func ParseCreateSshPamResourceResponse(rsp *http.Response) (*CreateSshPamResourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSshPamResourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Resource struct { + AdServerResourceId *openapi_types.UUID `json:"adServerResourceId"` + ConnectionDetails struct { + Host string `json:"host"` + Port float32 `json:"port"` + } `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + DiscoveryFingerprint *string `json:"discoveryFingerprint"` + EncryptedResourceMetadata interface{} `json:"encryptedResourceMetadata"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + Id openapi_types.UUID `json:"id"` + Metadata *[]struct { + Id openapi_types.UUID `json:"id"` + Key string `json:"key"` + Value *string `json:"value"` + } `json:"metadata,omitempty"` + Name string `json:"name"` + ProjectId string `json:"projectId"` + ResourceType CreateSshPamResource200ResourceResourceType `json:"resourceType"` + RotationAccountCredentials *CreateSshPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"resource"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource400StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource401StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest struct { + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource403StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource404StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest struct { + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource422StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest struct { + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreateSshPamResource500StatusCode `json:"statusCode"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreateProjectResponse parses an HTTP response from a CreateProjectWithResponse call func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/e2e/pam/pam_helpers.go b/e2e/pam/pam_helpers.go deleted file mode 100644 index c00d97d6..00000000 --- a/e2e/pam/pam_helpers.go +++ /dev/null @@ -1,201 +0,0 @@ -package pam_test - -import ( - "context" - "encoding/base64" - "encoding/json" - "fmt" - "log/slog" - "net" - "net/http" - "os" - "path/filepath" - "testing" - - "github.com/compose-spec/compose-go/v2/types" - "github.com/infisical/cli/e2e-tests/packages/client" - helpers "github.com/infisical/cli/e2e-tests/util" - openapitypes "github.com/oapi-codegen/runtime/types" - "github.com/stretchr/testify/require" -) - -// getOutboundIP returns a non-loopback IPv4 address of the host. -// This IP is reachable from both Docker containers and host processes, -// unlike "host.docker.internal" which only resolves inside Docker. -// It enumerates local interfaces instead of dialing an external address, -// so it works in air-gapped and network-restricted CI environments. -func getOutboundIP(t *testing.T) string { - addrs, err := net.InterfaceAddrs() - require.NoError(t, err) - for _, addr := range addrs { - if ipNet, ok := addr.(*net.IPNet); ok && !ipNet.IP.IsLoopback() && ipNet.IP.To4() != nil { - return ipNet.IP.String() - } - } - t.Fatal("no non-loopback IPv4 address found") - return "" -} - -type PAMTestInfra struct { - Infisical *helpers.InfisicalService - ApiClient client.ClientWithResponsesInterface - Identity helpers.MachineIdentity - ProjectId string - GatewayId openapitypes.UUID - RelayCmd *helpers.Command - GatewayCmd *helpers.Command - ProvisionResult *client.ProvisionResult - SharedHomeDir string -} - -func SetupPAMInfra(t *testing.T, ctx context.Context) *PAMTestInfra { - infisical := helpers.NewInfisicalService(). - WithBackendEnvironment(types.NewMappingWithEquals([]string{ - "ALLOW_INTERNAL_IP_CONNECTIONS=true", - })). - Up(t, ctx) - - c := infisical.ApiClient() - identity := infisical.CreateMachineIdentity(t, ctx, helpers.WithTokenAuth()) - require.NotNil(t, identity) - - // Start relay. - // Use the host's outbound IP so the pam db access subprocess (which runs - // on the host) can resolve the relay address returned by the backend API. - relayHost := getOutboundIP(t) - relayName := helpers.RandomSlug(2) - relayCmd := &helpers.Command{ - Test: t, - Args: []string{"relay", "start", "--domain", infisical.ApiUrl(t)}, - Env: map[string]string{ - "INFISICAL_API_URL": infisical.ApiUrl(t), - "INFISICAL_RELAY_NAME": relayName, - "INFISICAL_RELAY_HOST": relayHost, - "INFISICAL_TOKEN": *identity.TokenAuthToken, - }, - } - relayCmd.Start(ctx) - t.Cleanup(relayCmd.Stop) - result := helpers.WaitForStderr(t, helpers.WaitForStderrOptions{ - EnsureCmdRunning: relayCmd, - ExpectedString: "Relay is reachable by Infisical", - }) - require.Equal(t, helpers.WaitSuccess, result) - - // Start gateway - tmpLogDir := t.TempDir() - sessionRecordingPath := filepath.Join(tmpLogDir, "session-recording") - require.NoError(t, os.MkdirAll(sessionRecordingPath, 0755)) - gatewayName := helpers.RandomSlug(2) - gatewayCmd := &helpers.Command{ - Test: t, - Args: []string{"gateway", "start", - fmt.Sprintf("--name=%s", gatewayName), - fmt.Sprintf("--pam-session-recording-path=%s", sessionRecordingPath), - }, - Env: map[string]string{ - "INFISICAL_API_URL": infisical.ApiUrl(t), - "INFISICAL_TOKEN": *identity.TokenAuthToken, - }, - } - gatewayCmd.Start(ctx) - t.Cleanup(gatewayCmd.Stop) - result = helpers.WaitForStderr(t, helpers.WaitForStderrOptions{ - EnsureCmdRunning: gatewayCmd, - ExpectedString: "Gateway is reachable by Infisical", - }) - require.Equal(t, helpers.WaitSuccess, result) - - // Find gateway ID - var gatewayId openapitypes.UUID - resp, err := c.ListGatewaysWithResponse(ctx) - require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode()) - for _, gateway := range *resp.JSON200 { - if gateway.Name == gatewayName && gateway.Heartbeat != nil { - gatewayId = gateway.Id - slog.Info("Found gateway ID", "gatewayId", gatewayId) - break - } - } - require.NotZero(t, gatewayId, "Gateway ID should be set") - - // Create PAM project - projDesc := "e2e tests for PAM postgres" - template := "default" - projectType := client.Pam - projectResp, err := c.CreateProjectWithResponse(ctx, client.CreateProjectJSONRequestBody{ - ProjectName: "pam-pg-tests", - ProjectDescription: &projDesc, - Template: &template, - Type: &projectType, - }) - require.NoError(t, err) - require.Equal(t, http.StatusOK, projectResp.StatusCode()) - projectId := projectResp.JSON200.Project.Id - - // Create shared HOME dir for login and pam commands. - // Pre-seed the config to use file-based vault so the CLI never - // attempts to access the system keychain. - sharedHomeDir := t.TempDir() - infisicalConfigDir := filepath.Join(sharedHomeDir, ".infisical") - require.NoError(t, os.MkdirAll(infisicalConfigDir, 0755)) - configData, err := json.Marshal(map[string]string{ - "vaultBackendType": "file", - "vaultBackendPassphrase": base64.StdEncoding.EncodeToString([]byte("e2e-test-passphrase")), - }) - require.NoError(t, err) - require.NoError(t, os.WriteFile( - filepath.Join(infisicalConfigDir, "infisical-config.json"), - configData, 0644, - )) - - return &PAMTestInfra{ - Infisical: infisical, - ApiClient: c, - Identity: identity, - ProjectId: projectId, - GatewayId: gatewayId, - RelayCmd: relayCmd, - GatewayCmd: gatewayCmd, - ProvisionResult: infisical.ProvisionResult(), - SharedHomeDir: sharedHomeDir, - } -} - -func LoginUser(t *testing.T, ctx context.Context, infra *PAMTestInfra) { - loginCmd := helpers.Command{ - Test: t, - RunMethod: helpers.RunMethodSubprocess, - DisableTempHomeDir: true, - Args: []string{ - "login", - "--email", infra.ProvisionResult.Email, - "--password", infra.ProvisionResult.Password, - "--organization-id", infra.ProvisionResult.OrgId, - "--domain", infra.Infisical.ApiUrl(t), - }, - Env: map[string]string{ - "HOME": infra.SharedHomeDir, - "INFISICAL_API_URL": infra.Infisical.ApiUrl(t), - }, - } - loginCmd.Start(ctx) - - // Login is a short-lived command that exits on completion. - // Do NOT use EnsureCmdRunning — it treats any exit as failure. - result := helpers.WaitFor(t, helpers.WaitForOptions{ - Condition: func() helpers.ConditionResult { - if !loginCmd.IsRunning() { - if loginCmd.ExitCode() == 0 { - slog.Info("Login completed successfully") - return helpers.ConditionSuccess - } - loginCmd.DumpOutput() - return helpers.ConditionBreakEarly - } - return helpers.ConditionWait - }, - }) - require.Equal(t, helpers.WaitSuccess, result, "Login should succeed") -} diff --git a/e2e/pam/postgres_test.go b/e2e/pam/postgres_test.go index 9ff752d7..abe40f98 100644 --- a/e2e/pam/postgres_test.go +++ b/e2e/pam/postgres_test.go @@ -5,7 +5,6 @@ import ( "fmt" "log/slog" "net/http" - "os" "strings" "testing" "time" @@ -14,16 +13,10 @@ import ( "github.com/infisical/cli/e2e-tests/packages/client" helpers "github.com/infisical/cli/e2e-tests/util" "github.com/jackc/pgx/v5" - "github.com/joho/godotenv" "github.com/stretchr/testify/require" tcpostgres "github.com/testcontainers/testcontainers-go/modules/postgres" ) -func TestMain(m *testing.M) { - _ = godotenv.Load("../.env") - os.Exit(m.Run()) -} - func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) t.Cleanup(cancel) diff --git a/e2e/pam/ssh_test.go b/e2e/pam/ssh_test.go index 21429ab0..240b273a 100644 --- a/e2e/pam/ssh_test.go +++ b/e2e/pam/ssh_test.go @@ -3,108 +3,108 @@ package pam_test import ( "bytes" "context" + "crypto/ed25519" + "crypto/rand" "encoding/json" + "encoding/pem" "fmt" "io" "log/slog" + "net" "net/http" "strings" "testing" "time" - "github.com/docker/go-connections/nat" + "github.com/docker/docker/api/types/container" "github.com/google/uuid" "github.com/infisical/cli/e2e-tests/packages/client" helpers "github.com/infisical/cli/e2e-tests/util" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" + "golang.org/x/crypto/ssh" ) -func TestPAM_SSH_ConnectToServer(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - t.Cleanup(cancel) - - infra := SetupPAMInfra(t, ctx) +const ( + // Matches the hardcoded values in testdata/ssh-server/entrypoint.sh. + sshUser = "testuser" + sshPassword = "testpass" +) - const ( - sshUser = "testuser" - sshPassword = "testpass" - ) +// sshTestCase defines a declarative SSH auth test. +// To add a new auth method: add a case to the table in TestPAM_SSH +// and handle it in runSSHAuthTest. +type sshTestCase struct { + Name string + Method string // "password", "public-key", "certificate" +} - // Start an SSH server container (linuxserver/openssh-server) - sshContainer, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ +func startSSHContainer(t *testing.T, ctx context.Context, env map[string]string) (testcontainers.Container, int) { + container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ ContainerRequest: testcontainers.ContainerRequest{ - Image: "linuxserver/openssh-server:latest", - ExposedPorts: []string{"2222/tcp"}, - Env: map[string]string{ - "PASSWORD_ACCESS": "true", - "USER_NAME": sshUser, - "USER_PASSWORD": sshPassword, - "PUID": "1000", - "PGID": "1000", + FromDockerfile: testcontainers.FromDockerfile{ + Context: "testdata/ssh-server", + Dockerfile: "Dockerfile", + }, + ExposedPorts: []string{"22/tcp"}, + Env: env, + HostConfigModifier: func(hc *container.HostConfig) { + hc.ExtraHosts = append(hc.ExtraHosts, "host.docker.internal:host-gateway") }, - WaitingFor: wait.ForListeningPort(nat.Port("2222/tcp")).WithStartupTimeout(60 * time.Second), + WaitingFor: wait.ForListeningPort("22/tcp").WithStartupTimeout(30 * time.Second), }, Started: true, }) require.NoError(t, err) t.Cleanup(func() { - if err := sshContainer.Terminate(ctx); err != nil { + if err := container.Terminate(ctx); err != nil { t.Logf("Failed to terminate SSH container: %v", err) } }) - sshPort, err := sshContainer.MappedPort(ctx, "2222") + port, err := container.MappedPort(ctx, "22") require.NoError(t, err) + return container, port.Int() +} - // Use the outbound IP so the gateway (running on the host) can reach the container - resourceHost := getOutboundIP(t) - slog.Info("SSH container started", "host", resourceHost, "port", sshPort.Int()) - - // Create SSH PAM resource via typed API - resourceName := "ssh-resource" - sshResResp, err := infra.ApiClient.CreateSshPamResourceWithResponse( +func createSSHPamResource(t *testing.T, ctx context.Context, infra *PAMTestInfra, name, host string, port int) uuid.UUID { + resp, err := infra.ApiClient.CreateSshPamResourceWithResponse( ctx, client.CreateSshPamResourceJSONRequestBody{ ProjectId: uuid.MustParse(infra.ProjectId), GatewayId: infra.GatewayId, - Name: resourceName, + Name: name, ConnectionDetails: struct { Host string `json:"host"` Port float32 `json:"port"` }{ - Host: resourceHost, - Port: float32(sshPort.Int()), + Host: host, + Port: float32(port), }, }, ) require.NoError(t, err) - require.Equal(t, http.StatusOK, sshResResp.StatusCode()) - resourceId := sshResResp.JSON200.Resource.Id - slog.Info("Created SSH PAM resource", "resourceId", resourceId) + require.Equal(t, http.StatusOK, resp.StatusCode()) + slog.Info("Created SSH PAM resource", "resourceId", resp.JSON200.Resource.Id, "name", name) + return resp.JSON200.Resource.Id +} - // Create SSH PAM account (raw JSON — oapi-codegen doesn't generate helpers for the anyOf credentials union) - accountName := "ssh-account" - sshAcctBody, err := json.Marshal(map[string]interface{}{ +func createSSHPamAccount(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceId uuid.UUID, name string, credentials map[string]interface{}) { + body, err := json.Marshal(map[string]interface{}{ "resourceId": resourceId.String(), - "name": accountName, + "name": name, "rotationEnabled": false, - "credentials": map[string]interface{}{ - "authMethod": "password", - "username": sshUser, - "password": sshPassword, - }, + "credentials": credentials, }) require.NoError(t, err) - // Retry — the backend may restart after resource creation, wait for it to come back - acctResult := helpers.WaitFor(t, helpers.WaitForOptions{ + result := helpers.WaitFor(t, helpers.WaitForOptions{ Timeout: 90 * time.Second, Interval: 3 * time.Second, Condition: func() helpers.ConditionResult { resp, callErr := infra.ApiClient.CreateSshPamAccountWithBodyWithResponse( - ctx, "application/json", bytes.NewReader(append([]byte(nil), sshAcctBody...)), + ctx, "application/json", bytes.NewReader(append([]byte(nil), body...)), ) if callErr != nil { slog.Warn("SSH PAM account creation attempt failed, retrying...", "error", callErr) @@ -117,16 +117,13 @@ func TestPAM_SSH_ConnectToServer(t *testing.T) { return helpers.ConditionSuccess }, }) - require.Equal(t, helpers.WaitSuccess, acctResult, "SSH PAM account creation should succeed") - slog.Info("Created SSH PAM account") - - // Login with provisioned admin user - LoginUser(t, ctx, infra) + require.Equal(t, helpers.WaitSuccess, result, "SSH PAM account creation should succeed for %s", name) + slog.Info("Created SSH PAM account", "name", name) +} - // Create a pipe for stdin — we'll send commands to the SSH session +func runSSHSessionAndVerify(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceName, accountName, command, expectedOutput string) { stdinReader, stdinWriter := io.Pipe() - // Run `pam ssh access` as a subprocess pamCmd := helpers.Command{ Test: t, RunMethod: helpers.RunMethodSubprocess, @@ -140,39 +137,38 @@ func TestPAM_SSH_ConnectToServer(t *testing.T) { "--duration", "5m", }, Env: map[string]string{ - "HOME": infra.SharedHomeDir, - "INFISICAL_API_URL": infra.Infisical.ApiUrl(t), - "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", + "HOME": infra.SharedHomeDir, + "INFISICAL_API_URL": infra.Infisical.ApiUrl(t), + "INFISICAL_LOG_LEVEL": "debug", + "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", }, } pamCmd.Start(ctx) t.Cleanup(pamCmd.Stop) - // Send echo command in a goroutine. The io.Pipe write blocks until - // the SSH client reads, so this naturally waits for the session to be ready. go func() { - fmt.Fprintln(stdinWriter, "echo hello-infisical") + fmt.Fprintln(stdinWriter, command) }() - // Wait for the echo output to appear in stdout echoResult := helpers.WaitFor(t, helpers.WaitForOptions{ EnsureCmdRunning: &pamCmd, Timeout: 60 * time.Second, Interval: 1 * time.Second, Condition: func() helpers.ConditionResult { - if strings.Contains(pamCmd.Stdout(), "hello-infisical") { + if strings.Contains(pamCmd.Stdout(), expectedOutput) { return helpers.ConditionSuccess } return helpers.ConditionWait }, }) - require.Equal(t, helpers.WaitSuccess, echoResult, "Should see echo output") + if echoResult != helpers.WaitSuccess { + pamCmd.DumpOutput() + } + require.Equal(t, helpers.WaitSuccess, echoResult, "Should see expected output %q", expectedOutput) - // Close stdin to end the SSH session (EOF causes the remote shell to exit) stdinWriter.Close() - // Wait for the subprocess to exit (SSH proxy calls os.Exit(0) after SSH client disconnects) - result := helpers.WaitFor(t, helpers.WaitForOptions{ + exitResult := helpers.WaitFor(t, helpers.WaitForOptions{ Timeout: 30 * time.Second, Interval: 2 * time.Second, Condition: func() helpers.ConditionResult { @@ -187,5 +183,115 @@ func TestPAM_SSH_ConnectToServer(t *testing.T) { return helpers.ConditionWait }, }) - require.Equal(t, helpers.WaitSuccess, result, "pam ssh access should complete successfully") + require.Equal(t, helpers.WaitSuccess, exitResult, "pam ssh access should complete successfully") +} + +// configureCertAuth replicates the real user flow for certificate auth setup: +// the frontend shows a `curl | sudo bash` command that the user +// runs on their SSH server. We do the same inside the container. +// The setup script configures /etc/ssh but can't restart sshd (no systemctl in alpine), +// so we send SIGHUP to reload the config afterward. +func configureCertAuth(t *testing.T, ctx context.Context, infra *PAMTestInfra, container testcontainers.Container, sshPort int, resourceId uuid.UUID) { + // ApiUrl returns a localhost URL which isn't reachable from inside the container. + // Use host.docker.internal (configured via ExtraHosts in startSSHContainer) instead. + apiURL := strings.Replace(infra.Infisical.ApiUrl(t), "localhost", "host.docker.internal", 1) + setupURL := fmt.Sprintf("%s/api/v1/pam/resources/ssh/%s/ssh-ca-setup", apiURL, resourceId) + curlCmd := fmt.Sprintf(`curl -sf -H "Authorization: Bearer %s" "%s" | bash`, infra.ProvisionResult.Token, setupURL) + + exitCode, _, err := container.Exec(ctx, []string{"bash", "-c", curlCmd}) + require.NoError(t, err) + require.Equal(t, 0, exitCode, "ssh-ca-setup script should succeed") + + // The setup script can't restart sshd in alpine (no systemctl/service). + // Reload config by sending SIGHUP to sshd (PID 1). + exitCode, _, err = container.Exec(ctx, []string{"kill", "-HUP", "1"}) + require.NoError(t, err) + require.Equal(t, 0, exitCode, "sshd reload should succeed") + + // Wait for sshd to be responsive after config reload. + result := helpers.WaitFor(t, helpers.WaitForOptions{ + Timeout: 10 * time.Second, + Interval: 500 * time.Millisecond, + Condition: func() helpers.ConditionResult { + conn, err := net.DialTimeout("tcp", fmt.Sprintf("localhost:%d", sshPort), time.Second) + if err != nil { + return helpers.ConditionWait + } + conn.Close() + return helpers.ConditionSuccess + }, + }) + require.Equal(t, helpers.WaitSuccess, result, "sshd should be responsive after cert auth config reload") +} + +// runSSHAuthTest handles all auth-method-specific setup and runs the SSH session test. +// Each auth method configures the container and PAM account differently: +// - password: uses hardcoded testuser/testpass from entrypoint; account gets username + password +// - public-key: container gets SSH_AUTHORIZED_KEY (generated ed25519); account gets username + privateKey +// - certificate: container configured via curl | bash (ssh-ca-setup endpoint); account gets just username +func runSSHAuthTest(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceHost string, tc sshTestCase) { + containerEnv := map[string]string{} + accountCreds := map[string]interface{}{ + "authMethod": tc.Method, + "username": sshUser, + } + + switch tc.Method { + case "password": + accountCreds["password"] = sshPassword + + case "public-key": + pubKey, privKey, err := ed25519.GenerateKey(rand.Reader) + require.NoError(t, err) + + sshPubKey, err := ssh.NewPublicKey(pubKey) + require.NoError(t, err) + containerEnv["SSH_AUTHORIZED_KEY"] = strings.TrimSpace(string(ssh.MarshalAuthorizedKey(sshPubKey))) + + privKeyPEM, err := ssh.MarshalPrivateKey(privKey, "") + require.NoError(t, err) + accountCreds["privateKey"] = string(pem.EncodeToMemory(privKeyPEM)) + + case "certificate": + // No extra container config needed. + // Cert auth is configured after resource creation via curl | bash. + } + + container, sshPort := startSSHContainer(t, ctx, containerEnv) + slog.Info("SSH container started", "method", tc.Method, "host", resourceHost, "port", sshPort) + + resourceName := fmt.Sprintf("ssh-%s-resource", tc.Method) + resourceId := createSSHPamResource(t, ctx, infra, resourceName, resourceHost, sshPort) + + if tc.Method == "certificate" { + configureCertAuth(t, ctx, infra, container, sshPort, resourceId) + } + + accountName := fmt.Sprintf("ssh-%s-account", tc.Method) + createSSHPamAccount(t, ctx, infra, resourceId, accountName, accountCreds) + + marker := fmt.Sprintf("hello-%s", tc.Method) + runSSHSessionAndVerify(t, ctx, infra, resourceName, accountName, "echo "+marker, marker) +} + +func TestPAM_SSH(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + t.Cleanup(cancel) + + infra := SetupPAMInfra(t, ctx) + LoginUser(t, ctx, infra) + + resourceHost := getOutboundIP(t) + + tests := []sshTestCase{ + {Name: "PasswordAuth", Method: "password"}, + {Name: "PublicKeyAuth", Method: "public-key"}, + {Name: "CertificateAuth", Method: "certificate"}, + } + + for _, tc := range tests { + t.Run(tc.Name, func(t *testing.T) { + runSSHAuthTest(t, ctx, infra, resourceHost, tc) + }) + } } diff --git a/e2e/pam/testdata/ssh-server/Dockerfile b/e2e/pam/testdata/ssh-server/Dockerfile new file mode 100644 index 00000000..5d24b852 --- /dev/null +++ b/e2e/pam/testdata/ssh-server/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine:3.21 + +RUN apk add --no-cache openssh-server curl bash + +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +EXPOSE 22 + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/e2e/pam/testdata/ssh-server/entrypoint.sh b/e2e/pam/testdata/ssh-server/entrypoint.sh new file mode 100644 index 00000000..659e459c --- /dev/null +++ b/e2e/pam/testdata/ssh-server/entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +ssh-keygen -A + +adduser -D testuser +echo "testuser:testpass" | chpasswd +sed -i 's/^#PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config +sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config + +if [ -n "$SSH_AUTHORIZED_KEY" ]; then + mkdir -p /home/testuser/.ssh + echo "$SSH_AUTHORIZED_KEY" > /home/testuser/.ssh/authorized_keys + chmod 700 /home/testuser/.ssh + chmod 600 /home/testuser/.ssh/authorized_keys + chown -R testuser:testuser /home/testuser/.ssh +fi + +exec /usr/sbin/sshd -D -e From f19908d4fda171543f8ee68e45b3ae46e1a7d8ad Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Mon, 9 Mar 2026 18:44:54 +0530 Subject: [PATCH 07/11] Update package declarations in PAM E2E tests from `pam_test` to `pam` --- e2e/pam/main_test.go | 2 +- e2e/pam/{pam_helpers_test.go => pam_helpers.go} | 2 +- e2e/pam/postgres_test.go | 2 +- e2e/pam/ssh_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename e2e/pam/{pam_helpers_test.go => pam_helpers.go} (99%) diff --git a/e2e/pam/main_test.go b/e2e/pam/main_test.go index 0b504e8e..d4e4e0f3 100644 --- a/e2e/pam/main_test.go +++ b/e2e/pam/main_test.go @@ -1,4 +1,4 @@ -package pam_test +package pam import ( "os" diff --git a/e2e/pam/pam_helpers_test.go b/e2e/pam/pam_helpers.go similarity index 99% rename from e2e/pam/pam_helpers_test.go rename to e2e/pam/pam_helpers.go index 558d992d..1f7b2491 100644 --- a/e2e/pam/pam_helpers_test.go +++ b/e2e/pam/pam_helpers.go @@ -1,4 +1,4 @@ -package pam_test +package pam import ( "context" diff --git a/e2e/pam/postgres_test.go b/e2e/pam/postgres_test.go index abe40f98..4f67ea77 100644 --- a/e2e/pam/postgres_test.go +++ b/e2e/pam/postgres_test.go @@ -1,4 +1,4 @@ -package pam_test +package pam import ( "context" diff --git a/e2e/pam/ssh_test.go b/e2e/pam/ssh_test.go index 240b273a..bfe01e46 100644 --- a/e2e/pam/ssh_test.go +++ b/e2e/pam/ssh_test.go @@ -1,4 +1,4 @@ -package pam_test +package pam import ( "bytes" From 9bfe960fe113232e9eb6f2aa37427efad043c877 Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Mon, 9 Mar 2026 19:54:14 +0530 Subject: [PATCH 08/11] Refactor SSH PAM E2E tests: remove `sshTestCase` struct and simplify test logic by iterating directly over auth methods. --- e2e/pam/ssh_test.go | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/e2e/pam/ssh_test.go b/e2e/pam/ssh_test.go index bfe01e46..62106e6c 100644 --- a/e2e/pam/ssh_test.go +++ b/e2e/pam/ssh_test.go @@ -32,14 +32,6 @@ const ( sshPassword = "testpass" ) -// sshTestCase defines a declarative SSH auth test. -// To add a new auth method: add a case to the table in TestPAM_SSH -// and handle it in runSSHAuthTest. -type sshTestCase struct { - Name string - Method string // "password", "public-key", "certificate" -} - func startSSHContainer(t *testing.T, ctx context.Context, env map[string]string) (testcontainers.Container, int) { container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ ContainerRequest: testcontainers.ContainerRequest{ @@ -229,14 +221,14 @@ func configureCertAuth(t *testing.T, ctx context.Context, infra *PAMTestInfra, c // - password: uses hardcoded testuser/testpass from entrypoint; account gets username + password // - public-key: container gets SSH_AUTHORIZED_KEY (generated ed25519); account gets username + privateKey // - certificate: container configured via curl | bash (ssh-ca-setup endpoint); account gets just username -func runSSHAuthTest(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceHost string, tc sshTestCase) { +func runSSHAuthTest(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceHost string, method string) { containerEnv := map[string]string{} accountCreds := map[string]interface{}{ - "authMethod": tc.Method, + "authMethod": method, "username": sshUser, } - switch tc.Method { + switch method { case "password": accountCreds["password"] = sshPassword @@ -258,19 +250,19 @@ func runSSHAuthTest(t *testing.T, ctx context.Context, infra *PAMTestInfra, reso } container, sshPort := startSSHContainer(t, ctx, containerEnv) - slog.Info("SSH container started", "method", tc.Method, "host", resourceHost, "port", sshPort) + slog.Info("SSH container started", "method", method, "host", resourceHost, "port", sshPort) - resourceName := fmt.Sprintf("ssh-%s-resource", tc.Method) + resourceName := fmt.Sprintf("ssh-%s-resource", method) resourceId := createSSHPamResource(t, ctx, infra, resourceName, resourceHost, sshPort) - if tc.Method == "certificate" { + if method == "certificate" { configureCertAuth(t, ctx, infra, container, sshPort, resourceId) } - accountName := fmt.Sprintf("ssh-%s-account", tc.Method) + accountName := fmt.Sprintf("ssh-%s-account", method) createSSHPamAccount(t, ctx, infra, resourceId, accountName, accountCreds) - marker := fmt.Sprintf("hello-%s", tc.Method) + marker := fmt.Sprintf("hello-%s", method) runSSHSessionAndVerify(t, ctx, infra, resourceName, accountName, "echo "+marker, marker) } @@ -283,15 +275,10 @@ func TestPAM_SSH(t *testing.T) { resourceHost := getOutboundIP(t) - tests := []sshTestCase{ - {Name: "PasswordAuth", Method: "password"}, - {Name: "PublicKeyAuth", Method: "public-key"}, - {Name: "CertificateAuth", Method: "certificate"}, - } - - for _, tc := range tests { - t.Run(tc.Name, func(t *testing.T) { - runSSHAuthTest(t, ctx, infra, resourceHost, tc) + methods := []string{"password", "public-key", "certificate"} + for _, method := range methods { + t.Run(method, func(t *testing.T) { + runSSHAuthTest(t, ctx, infra, resourceHost, method) }) } } From c20b0d7c8011ab885325b93350672a0416968974 Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:09:19 +0530 Subject: [PATCH 09/11] Document PAM E2E test setup and execution instructions in README.md --- e2e/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/e2e/README.md b/e2e/README.md index 7b84acc0..5ec7cf0d 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -176,6 +176,37 @@ go test github.com/infisical/cli/e2e-tests/pam **Note:** PAM tests use subprocess mode and require a built CLI binary. Build it first with `go build -o e2e/infisical-merge .` from the repo root. +### Running PAM tests + +The PAM tests validate end-to-end access through the PAM system. Each test spins up the required Docker containers, creates PAM resources and accounts, then verifies connectivity through the CLI. + +To run all PAM tests: + +```bash +cd e2e +go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/pam +``` + +To run a specific test (e.g., only SSH or only Postgres): + +```bash +cd e2e +go test -v -timeout 30m -count=1 -run TestPAM_SSH github.com/infisical/cli/e2e-tests/pam +go test -v -timeout 30m -count=1 -run TestPAM_Postgres github.com/infisical/cli/e2e-tests/pam +``` + +To run a specific sub-test (e.g., only certificate auth within SSH): + +```bash +cd e2e +go test -v -timeout 30m -count=1 -run TestPAM_SSH/certificate github.com/infisical/cli/e2e-tests/pam +``` + +**Prerequisites:** +- Docker must be running (tests use testcontainers to start resource containers) +- A built CLI binary (see note above) +- `INFISICAL_BACKEND_DIR` must be set (see [Setting the `INFISICAL_BACKEND_DIR` value](#setting-the-infisical_backend_dir-value)) + Alternatively, you can export environment variables manually: ```bash From 1f4d0071ac6c7b3085e8ec42f630a3e574304e9e Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Tue, 10 Mar 2026 04:42:29 +0530 Subject: [PATCH 10/11] Update dependencies: add `gopkg.in/yaml.v3` and remove unused entries from `go.mod` and `go.sum` --- e2e/go.mod | 2 +- e2e/go.sum | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/e2e/go.mod b/e2e/go.mod index 33ba49d4..4c13b036 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -23,6 +23,7 @@ require ( github.com/testcontainers/testcontainers-go/modules/postgres v0.40.0 github.com/testcontainers/testcontainers-go/modules/redis v0.40.0 golang.org/x/crypto v0.45.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -319,7 +320,6 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.32.3 // indirect k8s.io/apimachinery v0.32.3 // indirect k8s.io/client-go v0.32.3 // indirect diff --git a/e2e/go.sum b/e2e/go.sum index a46b9aa7..1c7eac9e 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -1079,8 +1079,6 @@ golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= -golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= From 5bca22853951aed9772e0d38aee1159e084f7a1a Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Tue, 10 Mar 2026 12:44:30 +0530 Subject: [PATCH 11/11] Use system `PATH` environment variable in SSH PAM E2E tests instead of hardcoding it. --- e2e/pam/ssh_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/pam/ssh_test.go b/e2e/pam/ssh_test.go index 62106e6c..4d79b1d4 100644 --- a/e2e/pam/ssh_test.go +++ b/e2e/pam/ssh_test.go @@ -12,6 +12,7 @@ import ( "log/slog" "net" "net/http" + "os" "strings" "testing" "time" @@ -129,10 +130,9 @@ func runSSHSessionAndVerify(t *testing.T, ctx context.Context, infra *PAMTestInf "--duration", "5m", }, Env: map[string]string{ - "HOME": infra.SharedHomeDir, - "INFISICAL_API_URL": infra.Infisical.ApiUrl(t), - "INFISICAL_LOG_LEVEL": "debug", - "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", + "HOME": infra.SharedHomeDir, + "INFISICAL_API_URL": infra.Infisical.ApiUrl(t), + "PATH": os.Getenv("PATH"), }, } pamCmd.Start(ctx)