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 1/5] 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 2/5] 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 3/5] 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 4/5] 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 37a422989005f4d914746a319577b56de9511a07 Mon Sep 17 00:00:00 2001 From: saif <11242541+saifsmailbox98@users.noreply.github.com> Date: Sat, 7 Mar 2026 02:39:02 +0530 Subject: [PATCH 5/5] Add support for CreatePostgresPamAccount and CreatePostgresPamResource in client; update generated code. --- e2e/packages/client/client.gen.go | 696 ++++++++++++++++++++++++++++++ 1 file changed, 696 insertions(+) diff --git a/e2e/packages/client/client.gen.go b/e2e/packages/client/client.gen.go index f2e23aa6..c63c2a92 100644 --- a/e2e/packages/client/client.gen.go +++ b/e2e/packages/client/client.gen.go @@ -745,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 { @@ -776,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 { @@ -1060,9 +1102,15 @@ 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 @@ -1217,11 +1265,21 @@ type ClientInterface interface { 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) @@ -1565,6 +1623,30 @@ func (c *Client) CreateMachineIdentity(ctx context.Context, body CreateMachineId 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 { @@ -1589,6 +1671,30 @@ func (c *Client) CreateKubernetesPamResource(ctx context.Context, body CreateKub 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 { @@ -2323,6 +2429,46 @@ 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) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/pam/accounts/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 +} + // NewCreateKubernetesPamResourceRequest calls the generic CreateKubernetesPamResource builder with application/json body func NewCreateKubernetesPamResourceRequest(server string, body CreateKubernetesPamResourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -2363,6 +2509,46 @@ func NewCreateKubernetesPamResourceRequestWithBody(server string, contentType st 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 @@ -3141,11 +3327,21 @@ type ClientWithResponsesInterface interface { 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) @@ -4446,6 +4642,108 @@ func (r CreateMachineIdentityResponse) StatusCode() int { 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"` + 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 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 @@ -4458,6 +4756,7 @@ type CreateKubernetesPamResourceResponse struct { Url string `json:"url"` } `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"` @@ -4543,6 +4842,102 @@ func (r CreateKubernetesPamResourceResponse) StatusCode() int { 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"` + 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 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 @@ -4557,6 +4952,7 @@ type CreateRedisPamResourceResponse struct { SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` } `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"` @@ -5750,6 +6146,23 @@ func (c *ClientWithResponses) CreateMachineIdentityWithResponse(ctx context.Cont 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...) @@ -5767,6 +6180,23 @@ func (c *ClientWithResponses) CreateKubernetesPamResourceWithResponse(ctx contex 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...) @@ -7541,6 +7971,141 @@ 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"` + 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 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) @@ -7565,6 +8130,7 @@ func ParseCreateKubernetesPamResourceResponse(rsp *http.Response) (*CreateKubern Url string `json:"url"` } `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"` @@ -7664,6 +8230,135 @@ 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"` + 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 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) @@ -7690,6 +8385,7 @@ func ParseCreateRedisPamResourceResponse(rsp *http.Response) (*CreateRedisPamRes SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` } `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"`