From f52b74fb13cb582efd36733c8a304c7f8d9dde86 Mon Sep 17 00:00:00 2001 From: Matthew Cummings Date: Sun, 10 Dec 2023 20:47:40 -0500 Subject: [PATCH] Step 1: update the generated Go client code (#81) * Step 1: update the generated Go client code * TF doc update * CI Go update, prep for actual end user ReadMe, add project name pattern field in doc and tests * Debugging a deserialization issue with parameters. . . * Revert to an older version of the openapitools/openapi-generator-cli image * unindent a test file --- .github/workflows/release.yml | 1 + .github/workflows/test.yml | 27 +- GNUmakefile | 8 +- README.md | 54 - cloudtruth/resource_environment.go | 4 +- cloudtruth/resource_parameter.go | 8 +- cloudtruth/resource_parameter_value.go | 4 +- cloudtruth/resource_project.go | 14 +- cloudtruth/resource_project_test.go | 24 +- cloudtruth/resource_template.go | 4 +- cloudtruth/resource_type.go | 17 +- docs/resources/project.md | 1 + pkg/cloudtruthapi/api_environments.go | 196 +- pkg/cloudtruthapi/api_features.go | 123 + pkg/cloudtruthapi/api_integrations.go | 12 +- pkg/cloudtruthapi/api_projects.go | 678 +- pkg/cloudtruthapi/api_serviceaccounts.go | 16 +- pkg/cloudtruthapi/api_types.go | 94 +- pkg/cloudtruthapi/client.go | 8 + pkg/cloudtruthapi/configuration.go | 3 + pkg/cloudtruthapi/model_audit_trail_user.go | 16 +- pkg/cloudtruthapi/model_aws_integration.go | 30 +- pkg/cloudtruthapi/model_aws_pull.go | 26 +- .../model_aws_pull_latest_task.go | 16 +- pkg/cloudtruthapi/model_aws_pull_task.go | 16 +- pkg/cloudtruthapi/model_aws_pull_task_step.go | 16 +- pkg/cloudtruthapi/model_aws_push.go | 16 +- .../model_aws_push_latest_task.go | 16 +- pkg/cloudtruthapi/model_aws_push_task.go | 16 +- pkg/cloudtruthapi/model_aws_push_task_step.go | 16 +- .../model_azure_key_vault_integration.go | 30 +- .../model_azure_key_vault_pull.go | 26 +- .../model_azure_key_vault_pull_latest_task.go | 16 +- .../model_azure_key_vault_pull_task.go | 16 +- .../model_azure_key_vault_pull_task_step.go | 16 +- .../model_azure_key_vault_push.go | 16 +- .../model_azure_key_vault_push_latest_task.go | 16 +- .../model_azure_key_vault_push_task.go | 16 +- .../model_azure_key_vault_push_task_step.go | 16 +- .../model_backup_parameter_value_external.go | 154 - .../model_backup_parameter_values_value.go | 355 - pkg/cloudtruthapi/model_discovery_result.go | 12 +- pkg/cloudtruthapi/model_environment.go | 80 +- pkg/cloudtruthapi/model_environment_copy.go | 231 + pkg/cloudtruthapi/model_environment_update.go | 381 + pkg/cloudtruthapi/model_features_response.go | 199 + .../model_git_hub_integration.go | 30 +- pkg/cloudtruthapi/model_git_hub_pull.go | 26 +- .../model_git_hub_pull_latest_task.go | 16 +- pkg/cloudtruthapi/model_git_hub_pull_task.go | 16 +- .../model_git_hub_pull_task_step.go | 16 +- pkg/cloudtruthapi/model_grant.go | 16 +- pkg/cloudtruthapi/model_group.go | 16 +- pkg/cloudtruthapi/model_membership.go | 16 +- pkg/cloudtruthapi/model_organization.go | 145 +- .../model_organization_create.go | 37 + pkg/cloudtruthapi/model_parameter.go | 120 +- pkg/cloudtruthapi/model_parameter_copy.go | 184 + pkg/cloudtruthapi/model_parameter_create.go | 8 +- .../model_parameter_duality_t1.go | 553 - pkg/cloudtruthapi/model_parameter_rule.go | 44 +- .../model_parameter_rule_update.go | 257 + .../model_parameter_timeline_entry.go | 97 +- ...el_parameter_timeline_entry_environment.go | 30 +- ...ameter_timeline_entry_history_parameter.go | 30 +- ...odel_parameter_timeline_entry_parameter.go | 30 +- pkg/cloudtruthapi/model_parameter_type.go | 82 +- .../model_parameter_type_create.go | 45 +- .../model_parameter_type_rule.go | 44 +- .../model_parameter_type_rule_update.go | 257 + .../model_parameter_type_update.go | 296 + pkg/cloudtruthapi/model_parameter_update.go | 333 + .../model_parameter_values_value.go | 731 - .../model_patched_aws_integration.go | 64 +- pkg/cloudtruthapi/model_patched_aws_pull.go | 44 +- ...del_patched_azure_key_vault_integration.go | 64 +- .../model_patched_azure_key_vault_pull.go | 44 +- ...go => model_patched_environment_update.go} | 193 +- .../model_patched_git_hub_pull.go | 44 +- pkg/cloudtruthapi/model_patched_grant.go | 32 +- pkg/cloudtruthapi/model_patched_group.go | 32 +- pkg/cloudtruthapi/model_patched_membership.go | 32 +- .../model_patched_organization.go | 179 +- pkg/cloudtruthapi/model_patched_parameter.go | 658 - ...=> model_patched_parameter_rule_update.go} | 160 +- .../model_patched_parameter_type.go | 442 - ...del_patched_parameter_type_rule_update.go} | 160 +- .../model_patched_parameter_type_update.go | 358 + .../model_patched_parameter_update.go | 395 + ...ect.go => model_patched_project_update.go} | 297 +- .../model_patched_service_account.go | 78 +- .../model_patched_service_account_user.go | 422 - pkg/cloudtruthapi/model_patched_tag_update.go | 37 + pkg/cloudtruthapi/model_patched_template.go | 571 - .../model_patched_template_update.go | 358 + pkg/cloudtruthapi/model_patched_value.go | 888 - .../model_patched_value_update.go | 499 + pkg/cloudtruthapi/model_project.go | 131 +- pkg/cloudtruthapi/model_project_copy.go | 278 + pkg/cloudtruthapi/model_project_create.go | 37 + pkg/cloudtruthapi/model_project_update.go | 390 + pkg/cloudtruthapi/model_service_account.go | 62 +- .../model_service_account_create_request.go | 74 + .../model_service_account_create_response.go | 62 +- .../model_service_account_update_request.go | 193 + pkg/cloudtruthapi/model_tag.go | 40 +- pkg/cloudtruthapi/model_tag_create.go | 37 + pkg/cloudtruthapi/model_tag_update.go | 37 + pkg/cloudtruthapi/model_tag_usage.go | 178 - pkg/cloudtruthapi/model_task_step.go | 16 +- pkg/cloudtruthapi/model_template.go | 80 +- .../model_template_timeline_entry.go | 97 +- ...emplate_timeline_entry_history_template.go | 31 +- .../model_template_timeline_entry_template.go | 31 +- pkg/cloudtruthapi/model_template_update.go | 305 + pkg/cloudtruthapi/model_user.go | 16 +- pkg/cloudtruthapi/model_value.go | 288 +- pkg/cloudtruthapi/model_value_create.go | 2 +- ...atus.go => model_value_external_status.go} | 274 +- pkg/cloudtruthapi/model_value_update.go | 430 + pkg/cloudtruthapi/model_version_enum.go | 116 + pkg/openapi.yml | 15357 ++++++++++++++++ 122 files changed, 24287 insertions(+), 6861 deletions(-) create mode 100644 pkg/cloudtruthapi/api_features.go delete mode 100644 pkg/cloudtruthapi/model_backup_parameter_value_external.go delete mode 100644 pkg/cloudtruthapi/model_backup_parameter_values_value.go create mode 100644 pkg/cloudtruthapi/model_environment_copy.go create mode 100644 pkg/cloudtruthapi/model_environment_update.go create mode 100644 pkg/cloudtruthapi/model_features_response.go create mode 100644 pkg/cloudtruthapi/model_parameter_copy.go delete mode 100644 pkg/cloudtruthapi/model_parameter_duality_t1.go create mode 100644 pkg/cloudtruthapi/model_parameter_rule_update.go create mode 100644 pkg/cloudtruthapi/model_parameter_type_rule_update.go create mode 100644 pkg/cloudtruthapi/model_parameter_type_update.go create mode 100644 pkg/cloudtruthapi/model_parameter_update.go delete mode 100644 pkg/cloudtruthapi/model_parameter_values_value.go rename pkg/cloudtruthapi/{model_patched_environment.go => model_patched_environment_update.go} (64%) delete mode 100644 pkg/cloudtruthapi/model_patched_parameter.go rename pkg/cloudtruthapi/{model_patched_parameter_rule.go => model_patched_parameter_rule_update.go} (55%) delete mode 100644 pkg/cloudtruthapi/model_patched_parameter_type.go rename pkg/cloudtruthapi/{model_patched_parameter_type_rule.go => model_patched_parameter_type_rule_update.go} (53%) create mode 100644 pkg/cloudtruthapi/model_patched_parameter_type_update.go create mode 100644 pkg/cloudtruthapi/model_patched_parameter_update.go rename pkg/cloudtruthapi/{model_patched_project.go => model_patched_project_update.go} (53%) delete mode 100644 pkg/cloudtruthapi/model_patched_service_account_user.go delete mode 100644 pkg/cloudtruthapi/model_patched_template.go create mode 100644 pkg/cloudtruthapi/model_patched_template_update.go delete mode 100644 pkg/cloudtruthapi/model_patched_value.go create mode 100644 pkg/cloudtruthapi/model_patched_value_update.go create mode 100644 pkg/cloudtruthapi/model_project_copy.go create mode 100644 pkg/cloudtruthapi/model_project_update.go create mode 100644 pkg/cloudtruthapi/model_service_account_update_request.go delete mode 100644 pkg/cloudtruthapi/model_tag_usage.go create mode 100644 pkg/cloudtruthapi/model_template_update.go rename pkg/cloudtruthapi/{model_patched_value_external_status.go => model_value_external_status.go} (72%) create mode 100644 pkg/cloudtruthapi/model_value_update.go create mode 100644 pkg/cloudtruthapi/model_version_enum.go create mode 100644 pkg/openapi.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3cba9ee..cd1d58c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,7 @@ jobs: name: Set up Go uses: actions/setup-go@v5 with: + go-version: '>=1.21.5' go-version-file: 'go.mod' cache: true - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index afc1238..b7955cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: '>=1.21.5' check-latest: true cache: false id: go @@ -45,7 +45,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: '>=1.21.5' check-latest: true cache: false - uses: actions/checkout@v4 @@ -73,7 +73,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: '>=1.21.5' check-latest: true cache: false id: go @@ -102,13 +102,14 @@ jobs: run: | go test -timeout 60m -v -cover ./cloudtruth - - name: TF acceptance tests (prod backend) - timeout-minutes: 60 - env: - TF_ACC: "1" # Enables provider acceptance test mode - TF_VAR_cloudtruth_api_key: ${{ secrets.ACCEPTANCE_TEST_TOKEN }} - CLOUDTRUTH_API_KEY: ${{ secrets.ACCEPTANCE_TEST_TOKEN }} # for tests without provider defs - CLOUDTRUTH_PROJECT: AcceptanceTest - CLOUDTRUTH_ENVIRONMENT: default - run: | - go test -timeout 60m -v -cover ./cloudtruth +# DISABLED FOR NOW, RE-ENABLE WHEN DB CLEANUP IS DONE +# - name: TF acceptance tests (prod backend) +# timeout-minutes: 60 +# env: +# TF_ACC: "1" # Enables provider acceptance test mode +# TF_VAR_cloudtruth_api_key: ${{ secrets.ACCEPTANCE_TEST_TOKEN }} +# CLOUDTRUTH_API_KEY: ${{ secrets.ACCEPTANCE_TEST_TOKEN }} # for tests without provider defs +# CLOUDTRUTH_PROJECT: AcceptanceTest +# CLOUDTRUTH_ENVIRONMENT: default +# run: | +# go test -timeout 60m -v -cover ./cloudtruth diff --git a/GNUmakefile b/GNUmakefile index 8c91372..91ca957 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -75,7 +75,7 @@ pkg/cloudtruth/client.go: pkg/openapi.yml docker run --rm \ -v "$(shell pwd)/pkg:/pkg" \ --user "$(shell id -u):$(shell id -g)" \ - openapitools/openapi-generator-cli generate \ + openapitools/openapi-generator-cli:v7.0.0 generate \ -i /pkg/openapi.yml \ -g go \ -o /pkg/cloudtruthapi \ @@ -83,7 +83,11 @@ pkg/cloudtruth/client.go: pkg/openapi.yml --additional-properties packageVersion=1.0.0 \ --additional-properties enumClassPrefix=true \ --type-mappings=object=interface{} - rm pkg/cloudtruthapi/go.mod pkg/cloudtruthapi/go.sum # These files are unecessary and break local imports + # These files are unecessary and break local imports + rm pkg/cloudtruthapi/go.mod pkg/cloudtruthapi/go.sum + # These files are unecessary + rm -rf pkg/cloudtruthapi/test pkg/cloudtruthapi/api pkg/cloudtruthapi/.openapi-generator pkg/cloudtruthapi/docs + rm pkg/cloudtruthapi/.travis.yml pkg/cloudtruthapi/git_push.sh pkg/cloudtruthapi/README.md pkg/openapi.yml: pkg curl -s https://api.cloudtruth.io/api/schema/ > pkg/openapi.yml diff --git a/README.md b/README.md index 01791bc..d948e73 100644 --- a/README.md +++ b/README.md @@ -2,57 +2,3 @@ This is the official Terraform provider for [CloudTruth](https://cloudtruth.com/) -## Requirements - -- [Terraform](https://www.terraform.io/downloads.html) >= 0.15.x -- [Go](https://golang.org/doc/install) >= 1.20 - -## Building The Provider - -1. Clone the repository -1. Enter the repository directory -1. Build the provider using the Go `install` command: -```sh -$ go install -``` - -## Adding Dependencies - -This provider uses [Go modules](https://github.com/golang/go/wiki/Modules). -Please see the Go documentation for the most up to date information about using Go modules. - -To add a new dependency `github.com/author/dependency` to your Terraform provider: - -``` -go get github.com/author/dependency -go mod tidy -``` - -Then commit the changes to `go.mod` and `go.sum`. - -## Developing the Provider - -If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (see [Requirements](#requirements) above). - -To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory. - -To generate or update documentation, run `go generate`. - -In order to run the full suite of Acceptance tests, run `make testacc`. - -*Note:* Acceptance tests create real resources, and often cost money to run. - -If you run the tests in a fork of this repo, you will need to recreate the boilerplate CloudTruth resources which exist in the dedicated -acceptance test account. We will provide a bootstrapping script to ensure that these resource exist in your account. - -Additionally, you will need to specify the target CloudTruth project and environment(s) as well as your CloudTruth API key. You can -specify the API key with a `TF_VAR_cloudtruth_api_key` environment variable or with a `CLOUDTRUTH_API_KEY` environment variable (a la the CloudTruth -CLI). You can specify the the project and/or environments inline in your HCL files or via the `CLOUDTRUTH_PROJECT` and `CLOUDTRUTH_ENVIRONMENT` -environment variables. - -```sh -$ make testacc -``` - -### Commit hooks -To enable the commit hooks stored in `.githooks` in your local repo, run `git config --local core.hooksPath .githooks/` diff --git a/cloudtruth/resource_environment.go b/cloudtruth/resource_environment.go index 2c1c03e..6b198c8 100644 --- a/cloudtruth/resource_environment.go +++ b/cloudtruth/resource_environment.go @@ -151,7 +151,7 @@ func resourceEnvironmentUpdate(ctx context.Context, d *schema.ResourceData, meta envID := d.Id() envName := d.Get("name").(string) envDesc := d.Get("description").(string) - patchedEnv := cloudtruthapi.PatchedEnvironment{} + patchedEnv := cloudtruthapi.PatchedEnvironmentUpdate{} hasChange := false if d.HasChange("name") { patchedEnv.SetName(envName) @@ -167,7 +167,7 @@ func resourceEnvironmentUpdate(ctx context.Context, d *schema.ResourceData, meta var r *http.Response var err error _, r, err = c.openAPIClient.EnvironmentsAPI.EnvironmentsPartialUpdate(ctx, - envID).PatchedEnvironment(patchedEnv).Execute() + envID).PatchedEnvironmentUpdate(patchedEnv).Execute() if err != nil { return handleAPIError(fmt.Sprintf("resourceEnvironmentUpdate: error updating environment %s", envName), r, err) } diff --git a/cloudtruth/resource_parameter.go b/cloudtruth/resource_parameter.go index 766d087..d56c83a 100644 --- a/cloudtruth/resource_parameter.go +++ b/cloudtruth/resource_parameter.go @@ -319,7 +319,7 @@ func updateParameter(ctx context.Context, paramID, projID string, d *schema.Reso c *cloudTruthClient) (*http.Response, error) { tflog.Debug(ctx, "entering updateParameter") defer tflog.Debug(ctx, "exiting updateParameter") - patchedParam := cloudtruthapi.PatchedParameter{} + patchedParam := cloudtruthapi.PatchedParameterUpdate{} hasParamChange := false if d.HasChange("name") { paramName := d.Get("name").(string) @@ -341,7 +341,7 @@ func updateParameter(ctx context.Context, paramID, projID string, d *schema.Reso if hasParamChange { // The caller handles retries _, r, err = c.openAPIClient.ProjectsAPI.ProjectsParametersPartialUpdate(ctx, paramID, projID). - PatchedParameter(patchedParam).Execute() + PatchedParameterUpdate(patchedParam).Execute() if err != nil { return r, err } @@ -367,7 +367,7 @@ func updateParameterRule(ctx context.Context, paramID, projID, ruleName, ruleID, if err != nil { return nil, err } - paramRule := cloudtruthapi.NewParameterRuleWithDefaults() + paramRule := cloudtruthapi.NewParameterRuleUpdateWithDefaults() paramRule.SetId(ruleID) paramRule.SetConstraint(ruleVal) paramRule.SetType(*ruleType) @@ -376,7 +376,7 @@ func updateParameterRule(ctx context.Context, paramID, projID, ruleName, ruleID, var r *http.Response for retryCount < ruleOperationRetries { - ruleUpdateRequest = c.openAPIClient.ProjectsAPI.ProjectsParametersRulesUpdate(ctx, ruleID, paramID, projID).ParameterRule(*paramRule) + ruleUpdateRequest = c.openAPIClient.ProjectsAPI.ProjectsParametersRulesUpdate(ctx, ruleID, paramID, projID).ParameterRuleUpdate(*paramRule) _, r, err = ruleUpdateRequest.Execute() if r.StatusCode >= 500 { tflog.Debug(ctx, fmt.Sprintf("updateParameterRule: error updating rule %s: %+v", ruleName, err)) diff --git a/cloudtruth/resource_parameter_value.go b/cloudtruth/resource_parameter_value.go index 9c7e627..6cff37c 100644 --- a/cloudtruth/resource_parameter_value.go +++ b/cloudtruth/resource_parameter_value.go @@ -252,7 +252,7 @@ func resourceParameterValueRead(ctx context.Context, d *schema.ResourceData, met } func updateParameterValue(ctx context.Context, paramID, paramValueID, projID string, d *schema.ResourceData, c *cloudTruthClient) (*http.Response, error) { - updateValue := cloudtruthapi.NewValueWithDefaults() + updateValue := cloudtruthapi.NewValueUpdateWithDefaults() hasParamValueChange := false if d.HasChange("value") { value := d.Get("value").(string) @@ -309,7 +309,7 @@ func updateParameterValue(ctx context.Context, paramID, paramValueID, projID str if hasParamValueChange { // No retry logic here, the caller handles that _, r, err = c.openAPIClient.ProjectsAPI.ProjectsParametersValuesUpdate(ctx, paramValueID, paramID, - projID).Value(*updateValue).Execute() + projID).ValueUpdate(*updateValue).Execute() if err != nil { return r, err } diff --git a/cloudtruth/resource_project.go b/cloudtruth/resource_project.go index 42ebda3..845b4de 100644 --- a/cloudtruth/resource_project.go +++ b/cloudtruth/resource_project.go @@ -30,6 +30,12 @@ func resourceProject() *schema.Resource { Type: schema.TypeString, Required: true, }, + "parameter_name_pattern": { + Description: "A regular expression parameter names must match", + Type: schema.TypeString, + Optional: true, + Default: "", + }, "description": { Description: "Description of the project", Type: schema.TypeString, @@ -51,11 +57,15 @@ func resourceProjectCreate(ctx context.Context, d *schema.ResourceData, meta any defer tflog.Debug(ctx, "exiting resourceProjectCreate") c := meta.(*cloudTruthClient) projectName := d.Get("name").(string) + //parameterNamePattern := d.Get("parameter_name_pattern").(string) projectDesc := d.Get("description").(string) projectCreate := cloudtruthapi.NewProjectCreate(projectName) if projectDesc != "" { projectCreate.SetDescription(projectDesc) } + /*if parameterNamePattern != "" { + projectCreate. + }*/ projectParent := d.Get("parent").(string) if projectParent != "" { parent, err := c.getProjectURL(ctx, projectParent) @@ -149,7 +159,7 @@ func resourceProjectUpdate(ctx context.Context, d *schema.ResourceData, meta any projectName := d.Get("name").(string) projectDesc := d.Get("description").(string) - patchedProject := cloudtruthapi.PatchedProject{} + patchedProject := cloudtruthapi.PatchedProjectUpdate{} hasChange := false // explicitly not checking for/allowing reparenting from the provider because the UI does not allow it @@ -167,7 +177,7 @@ func resourceProjectUpdate(ctx context.Context, d *schema.ResourceData, meta any var r *http.Response var err error _, r, err = c.openAPIClient.ProjectsAPI.ProjectsPartialUpdate(ctx, - projectID).PatchedProject(patchedProject).Execute() + projectID).PatchedProjectUpdate(patchedProject).Execute() if err != nil { return handleAPIError(fmt.Sprintf("resourceProjectUpdate: error updating project %s", projectName), r, err) } diff --git a/cloudtruth/resource_project_test.go b/cloudtruth/resource_project_test.go index f37da68..87f3564 100644 --- a/cloudtruth/resource_project_test.go +++ b/cloudtruth/resource_project_test.go @@ -9,6 +9,8 @@ import ( const desc = "Just a description of a project" const updateDesc = "A new description of a project" +const parameterNamePattern = "foo-*" +const updateParameterNamePattern = "foobar-*" func TestAccResourceProjectBasic(t *testing.T) { createProjName := fmt.Sprintf("TestProject-%s", uuid.New().String()) @@ -20,23 +22,19 @@ func TestAccResourceProjectBasic(t *testing.T) { PreventPostDestroyRefresh: true, Steps: []resource.TestStep{ { - Config: testAccResourceProjectCreateBasic(createProjName, desc), + Config: testAccResourceProjectCreateBasic(createProjName, desc, parameterNamePattern), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "name", createProjName), resource.TestCheckResourceAttr(resourceName, "description", desc), + resource.TestCheckResourceAttr(resourceName, "parameter_name_pattern", parameterNamePattern), ), }, - /* This is leading to occasional timing issues which appear to be only affecting the tests { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - },*/ - { - Config: testAccResourceProjectUpdateBasic(updateProjName, updateDesc), + Config: testAccResourceProjectUpdateBasic(updateProjName, updateDesc, updateParameterNamePattern), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "name", updateProjName), resource.TestCheckResourceAttr(resourceName, "description", updateDesc), + resource.TestCheckResourceAttr(resourceName, "parameter_name_pattern", updateParameterNamePattern), ), }, }, @@ -63,22 +61,24 @@ func TestAccResourceProjectNested(t *testing.T) { }) } -func testAccResourceProjectCreateBasic(projName, desc string) string { +func testAccResourceProjectCreateBasic(projName, desc, paramNamePattern string) string { return fmt.Sprintf(` resource "cloudtruth_project" "basic" { name = "%s" description = "%s" + parameter_name_pattern = "%s" } - `, projName, desc) + `, projName, desc, paramNamePattern) } -func testAccResourceProjectUpdateBasic(projName, desc string) string { +func testAccResourceProjectUpdateBasic(projName, desc, paramNamePattern string) string { return fmt.Sprintf(` resource "cloudtruth_project" "basic" { name = "%s" description = "%s" + parameter_name_pattern = "%s" } - `, projName, desc) + `, projName, desc, paramNamePattern) } func testAccResourceProjectNested(projectOne, projectTwo, projectThree string) string { diff --git a/cloudtruth/resource_template.go b/cloudtruth/resource_template.go index f29d20b..c49659a 100644 --- a/cloudtruth/resource_template.go +++ b/cloudtruth/resource_template.go @@ -146,7 +146,7 @@ func resourceTemplateUpdate(ctx context.Context, d *schema.ResourceData, meta an templateDesc := d.Get("description").(string) templateID := d.Id() - patchedTemplate := cloudtruthapi.PatchedTemplate{} + patchedTemplate := cloudtruthapi.PatchedTemplateUpdate{} hasChange := false if d.HasChange("name") { patchedTemplate.SetName(templateName) @@ -165,7 +165,7 @@ func resourceTemplateUpdate(ctx context.Context, d *schema.ResourceData, meta an var r *http.Response var err error _, r, err = c.openAPIClient.ProjectsAPI.ProjectsTemplatesPartialUpdate(ctx, templateID, - *projID).PatchedTemplate(patchedTemplate).Execute() + *projID).PatchedTemplateUpdate(patchedTemplate).Execute() if err != nil { return handleAPIError(fmt.Sprintf("resourceTemplateUpdate: error updating template %s", templateName), r, err) } diff --git a/cloudtruth/resource_type.go b/cloudtruth/resource_type.go index 6101659..7f6fa9d 100644 --- a/cloudtruth/resource_type.go +++ b/cloudtruth/resource_type.go @@ -85,15 +85,14 @@ func resourceTypeCreate(ctx context.Context, d *schema.ResourceData, meta any) d defer tflog.Debug(ctx, "exiting resourceTypeCreate") c := meta.(*cloudTruthClient) typeName := d.Get("name").(string) - typeCreate := cloudtruthapi.NewParameterTypeCreate(typeName) + // concreteType is the underlying type (builtin or custom) of the cloudtruth_type resource + concreteType := c.lookupType(ctx, d.Get("type").(string)) + baseParamType := getBaseParamType(ctx, concreteType, c) + typeCreate := cloudtruthapi.NewParameterTypeCreate(typeName, baseParamType) typeDesc := d.Get("description").(string) if typeDesc != "" { typeCreate.SetDescription(typeDesc) } - // concreteType is the underlying type (builtin or custom) of the cloudtruth_type resource - concreteType := c.lookupType(ctx, d.Get("type").(string)) - baseParamType := getBaseParamType(ctx, concreteType, c) - var rules map[string]any var err error if rules, err = validateAndFetchRules(ctx, c, d, concreteType); err != nil { @@ -282,14 +281,14 @@ func updateTypeRule(ctx context.Context, paramID, ruleName, ruleID, baseParamTyp if err != nil { return nil, err } - paramTypeRule := cloudtruthapi.NewParameterTypeRuleWithDefaults() + paramTypeRule := cloudtruthapi.NewParameterTypeRuleUpdateWithDefaults() paramTypeRule.SetId(ruleID) paramTypeRule.SetConstraint(ruleVal) paramTypeRule.SetType(*ruleType) var r *http.Response for retryCount < ruleOperationRetries { - ruleUpdateRequest = c.openAPIClient.TypesAPI.TypesRulesUpdate(ctx, ruleID, paramID).ParameterTypeRule(*paramTypeRule) + ruleUpdateRequest = c.openAPIClient.TypesAPI.TypesRulesUpdate(ctx, ruleID, paramID).ParameterTypeRuleUpdate(*paramTypeRule) _, r, err = ruleUpdateRequest.Execute() if r.StatusCode >= 500 { tflog.Debug(ctx, fmt.Sprintf("updateTypeRule: error updating rule %s: %+v", ruleName, err)) @@ -338,7 +337,7 @@ func resourceTypeUpdate(ctx context.Context, d *schema.ResourceData, meta any) d c := meta.(*cloudTruthClient) typeName := d.Get("name").(string) hasChange := false - patchedTypeUpdate := cloudtruthapi.NewPatchedParameterType() + patchedTypeUpdate := cloudtruthapi.NewPatchedParameterTypeUpdate() if d.HasChange("description") { typeDesc := d.Get("description").(string) patchedTypeUpdate.SetDescription(typeDesc) @@ -350,7 +349,7 @@ func resourceTypeUpdate(ctx context.Context, d *schema.ResourceData, meta any) d retryError := retry.RetryContext(ctx, d.Timeout(schema.TimeoutUpdate), func() *retry.RetryError { var r *http.Response var err error - _, r, err = c.openAPIClient.TypesAPI.TypesPartialUpdate(ctx, typeID).PatchedParameterType(*patchedTypeUpdate).Execute() + _, r, err = c.openAPIClient.TypesAPI.TypesPartialUpdate(ctx, typeID).PatchedParameterTypeUpdate(*patchedTypeUpdate).Execute() if err != nil { return handleAPIError(fmt.Sprintf("resourceTypeUpdate: error updating type %s", typeName), r, err) } diff --git a/docs/resources/project.md b/docs/resources/project.md index 672b479..a8fe114 100644 --- a/docs/resources/project.md +++ b/docs/resources/project.md @@ -22,6 +22,7 @@ A CloudTruth project. ### Optional - `description` (String) Description of the project +- `parameter_name_pattern` (String) A regular expression parameter names must match - `parent` (String) The parent CloudTruth project, defaults to no parent i.e. a top level project ### Read-Only diff --git a/pkg/cloudtruthapi/api_environments.go b/pkg/cloudtruthapi/api_environments.go index 264e57a..79b8b34 100644 --- a/pkg/cloudtruthapi/api_environments.go +++ b/pkg/cloudtruthapi/api_environments.go @@ -25,6 +25,146 @@ import ( // EnvironmentsAPIService EnvironmentsAPI service type EnvironmentsAPIService service +type ApiEnvironmentsCopyCreateRequest struct { + ctx context.Context + ApiService *EnvironmentsAPIService + id string + environmentCopy *EnvironmentCopy +} + +func (r ApiEnvironmentsCopyCreateRequest) EnvironmentCopy(environmentCopy EnvironmentCopy) ApiEnvironmentsCopyCreateRequest { + r.environmentCopy = &environmentCopy + return r +} + +func (r ApiEnvironmentsCopyCreateRequest) Execute() (*Environment, *http.Response, error) { + return r.ApiService.EnvironmentsCopyCreateExecute(r) +} + +/* +EnvironmentsCopyCreate Method for EnvironmentsCopyCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiEnvironmentsCopyCreateRequest +*/ +func (a *EnvironmentsAPIService) EnvironmentsCopyCreate(ctx context.Context, id string) ApiEnvironmentsCopyCreateRequest { + return ApiEnvironmentsCopyCreateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return Environment +func (a *EnvironmentsAPIService) EnvironmentsCopyCreateExecute(r ApiEnvironmentsCopyCreateRequest) (*Environment, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Environment + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentsAPIService.EnvironmentsCopyCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/environments/{id}/copy/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.environmentCopy == nil { + return localVarReturnValue, nil, reportError("environmentCopy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.environmentCopy + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["JWTAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiEnvironmentsCreateRequest struct { ctx context.Context ApiService *EnvironmentsAPIService @@ -288,8 +428,6 @@ type ApiEnvironmentsListRequest struct { ordering *string page *int32 pageSize *int32 - parentName *string - parentNameIcontains *string } func (r ApiEnvironmentsListRequest) DescriptionIcontains(descriptionIcontains string) ApiEnvironmentsListRequest { @@ -325,16 +463,6 @@ func (r ApiEnvironmentsListRequest) PageSize(pageSize int32) ApiEnvironmentsList return r } -func (r ApiEnvironmentsListRequest) ParentName(parentName string) ApiEnvironmentsListRequest { - r.parentName = &parentName - return r -} - -func (r ApiEnvironmentsListRequest) ParentNameIcontains(parentNameIcontains string) ApiEnvironmentsListRequest { - r.parentNameIcontains = &parentNameIcontains - return r -} - func (r ApiEnvironmentsListRequest) Execute() (*PaginatedEnvironmentList, *http.Response, error) { return r.ApiService.EnvironmentsListExecute(r) } @@ -391,12 +519,6 @@ func (a *EnvironmentsAPIService) EnvironmentsListExecute(r ApiEnvironmentsListRe if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } - if r.parentName != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "parent__name", r.parentName, "") - } - if r.parentNameIcontains != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "parent__name__icontains", r.parentNameIcontains, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -483,15 +605,15 @@ type ApiEnvironmentsPartialUpdateRequest struct { ctx context.Context ApiService *EnvironmentsAPIService id string - patchedEnvironment *PatchedEnvironment + patchedEnvironmentUpdate *PatchedEnvironmentUpdate } -func (r ApiEnvironmentsPartialUpdateRequest) PatchedEnvironment(patchedEnvironment PatchedEnvironment) ApiEnvironmentsPartialUpdateRequest { - r.patchedEnvironment = &patchedEnvironment +func (r ApiEnvironmentsPartialUpdateRequest) PatchedEnvironmentUpdate(patchedEnvironmentUpdate PatchedEnvironmentUpdate) ApiEnvironmentsPartialUpdateRequest { + r.patchedEnvironmentUpdate = &patchedEnvironmentUpdate return r } -func (r ApiEnvironmentsPartialUpdateRequest) Execute() (*Environment, *http.Response, error) { +func (r ApiEnvironmentsPartialUpdateRequest) Execute() (*EnvironmentUpdate, *http.Response, error) { return r.ApiService.EnvironmentsPartialUpdateExecute(r) } @@ -511,13 +633,13 @@ func (a *EnvironmentsAPIService) EnvironmentsPartialUpdate(ctx context.Context, } // Execute executes the request -// @return Environment -func (a *EnvironmentsAPIService) EnvironmentsPartialUpdateExecute(r ApiEnvironmentsPartialUpdateRequest) (*Environment, *http.Response, error) { +// @return EnvironmentUpdate +func (a *EnvironmentsAPIService) EnvironmentsPartialUpdateExecute(r ApiEnvironmentsPartialUpdateRequest) (*EnvironmentUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Environment + localVarReturnValue *EnvironmentUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentsAPIService.EnvironmentsPartialUpdate") @@ -550,7 +672,7 @@ func (a *EnvironmentsAPIService) EnvironmentsPartialUpdateExecute(r ApiEnvironme localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.patchedEnvironment + localVarPostBody = r.patchedEnvironmentUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -791,7 +913,7 @@ func (r ApiEnvironmentsRetrieveRequest) Execute() (*Environment, *http.Response, EnvironmentsRetrieve Method for EnvironmentsRetrieve @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id + @param id A UUID string identifying this environment ledger. @return ApiEnvironmentsRetrieveRequest */ func (a *EnvironmentsAPIService) EnvironmentsRetrieve(ctx context.Context, id string) ApiEnvironmentsRetrieveRequest { @@ -1833,15 +1955,15 @@ type ApiEnvironmentsUpdateRequest struct { ctx context.Context ApiService *EnvironmentsAPIService id string - environment *Environment + environmentUpdate *EnvironmentUpdate } -func (r ApiEnvironmentsUpdateRequest) Environment(environment Environment) ApiEnvironmentsUpdateRequest { - r.environment = &environment +func (r ApiEnvironmentsUpdateRequest) EnvironmentUpdate(environmentUpdate EnvironmentUpdate) ApiEnvironmentsUpdateRequest { + r.environmentUpdate = &environmentUpdate return r } -func (r ApiEnvironmentsUpdateRequest) Execute() (*Environment, *http.Response, error) { +func (r ApiEnvironmentsUpdateRequest) Execute() (*EnvironmentUpdate, *http.Response, error) { return r.ApiService.EnvironmentsUpdateExecute(r) } @@ -1861,13 +1983,13 @@ func (a *EnvironmentsAPIService) EnvironmentsUpdate(ctx context.Context, id stri } // Execute executes the request -// @return Environment -func (a *EnvironmentsAPIService) EnvironmentsUpdateExecute(r ApiEnvironmentsUpdateRequest) (*Environment, *http.Response, error) { +// @return EnvironmentUpdate +func (a *EnvironmentsAPIService) EnvironmentsUpdateExecute(r ApiEnvironmentsUpdateRequest) (*EnvironmentUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Environment + localVarReturnValue *EnvironmentUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentsAPIService.EnvironmentsUpdate") @@ -1881,8 +2003,8 @@ func (a *EnvironmentsAPIService) EnvironmentsUpdateExecute(r ApiEnvironmentsUpda localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.environment == nil { - return localVarReturnValue, nil, reportError("environment is required and must be specified") + if r.environmentUpdate == nil { + return localVarReturnValue, nil, reportError("environmentUpdate is required and must be specified") } // to determine the Content-Type header @@ -1903,7 +2025,7 @@ func (a *EnvironmentsAPIService) EnvironmentsUpdateExecute(r ApiEnvironmentsUpda localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.environment + localVarPostBody = r.environmentUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { diff --git a/pkg/cloudtruthapi/api_features.go b/pkg/cloudtruthapi/api_features.go new file mode 100644 index 0000000..f737144 --- /dev/null +++ b/pkg/cloudtruthapi/api_features.go @@ -0,0 +1,123 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// FeaturesAPIService FeaturesAPI service +type FeaturesAPIService service + +type ApiFeaturesRetrieveRequest struct { + ctx context.Context + ApiService *FeaturesAPIService +} + +func (r ApiFeaturesRetrieveRequest) Execute() (*FeaturesResponse, *http.Response, error) { + return r.ApiService.FeaturesRetrieveExecute(r) +} + +/* +FeaturesRetrieve Method for FeaturesRetrieve + +Returns a dictionary of features and whether or not they are enabled + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFeaturesRetrieveRequest +*/ +func (a *FeaturesAPIService) FeaturesRetrieve(ctx context.Context) ApiFeaturesRetrieveRequest { + return ApiFeaturesRetrieveRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return FeaturesResponse +func (a *FeaturesAPIService) FeaturesRetrieveExecute(r ApiFeaturesRetrieveRequest) (*FeaturesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FeaturesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FeaturesAPIService.FeaturesRetrieve") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/features/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/cloudtruthapi/api_integrations.go b/pkg/cloudtruthapi/api_integrations.go index 6fbf6d8..f025cb7 100644 --- a/pkg/cloudtruthapi/api_integrations.go +++ b/pkg/cloudtruthapi/api_integrations.go @@ -4698,7 +4698,7 @@ func (r ApiIntegrationsAzureKeyVaultDestroyRequest) Execute() (*http.Response, e } /* -IntegrationsAzureKeyVaultDestroy Delete an AWS integration. +IntegrationsAzureKeyVaultDestroy Delete an Azure Key Vault integration. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id @@ -9045,6 +9045,7 @@ type ApiIntegrationsExploreListRequest struct { ordering *string page *int32 pageSize *int32 + pageToken *string } // FQN (URL-like) for third-party integration. @@ -9077,6 +9078,12 @@ func (r ApiIntegrationsExploreListRequest) PageSize(pageSize int32) ApiIntegrati return r } +// When paginating, this is the value that came back in the last page's next +func (r ApiIntegrationsExploreListRequest) PageToken(pageToken string) ApiIntegrationsExploreListRequest { + r.pageToken = &pageToken + return r +} + func (r ApiIntegrationsExploreListRequest) Execute() (*PaginatedIntegrationNodeList, *http.Response, error) { return r.ApiService.IntegrationsExploreListExecute(r) } @@ -9137,6 +9144,9 @@ func (a *IntegrationsAPIService) IntegrationsExploreListExecute(r ApiIntegration if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } + if r.pageToken != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_token", r.pageToken, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/pkg/cloudtruthapi/api_projects.go b/pkg/cloudtruthapi/api_projects.go index 41a7e12..25d4d55 100644 --- a/pkg/cloudtruthapi/api_projects.go +++ b/pkg/cloudtruthapi/api_projects.go @@ -25,6 +25,146 @@ import ( // ProjectsAPIService ProjectsAPI service type ProjectsAPIService service +type ApiProjectsCopyCreateRequest struct { + ctx context.Context + ApiService *ProjectsAPIService + id string + projectCopy *ProjectCopy +} + +func (r ApiProjectsCopyCreateRequest) ProjectCopy(projectCopy ProjectCopy) ApiProjectsCopyCreateRequest { + r.projectCopy = &projectCopy + return r +} + +func (r ApiProjectsCopyCreateRequest) Execute() (*Project, *http.Response, error) { + return r.ApiService.ProjectsCopyCreateExecute(r) +} + +/* +ProjectsCopyCreate Method for ProjectsCopyCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiProjectsCopyCreateRequest +*/ +func (a *ProjectsAPIService) ProjectsCopyCreate(ctx context.Context, id string) ApiProjectsCopyCreateRequest { + return ApiProjectsCopyCreateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return Project +func (a *ProjectsAPIService) ProjectsCopyCreateExecute(r ApiProjectsCopyCreateRequest) (*Project, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Project + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectsAPIService.ProjectsCopyCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/projects/{id}/copy/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectCopy == nil { + return localVarReturnValue, nil, reportError("projectCopy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.projectCopy + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["JWTAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiProjectsCreateRequest struct { ctx context.Context ApiService *ProjectsAPIService @@ -475,7 +615,6 @@ type ApiProjectsParameterExportListRequest struct { output *string startswith *string tag *string - wrap *bool } // Specify a point in time to retrieve configuration from. Cannot be specified with `tag`. @@ -538,12 +677,6 @@ func (r ApiProjectsParameterExportListRequest) Tag(tag string) ApiProjectsParame return r } -// Indicates all secrets are wrapped. For more information on secret wrapping, see the documentation. -func (r ApiProjectsParameterExportListRequest) Wrap(wrap bool) ApiProjectsParameterExportListRequest { - r.wrap = &wrap - return r -} - func (r ApiProjectsParameterExportListRequest) Execute() (*ParameterExport, *http.Response, error) { return r.ApiService.ProjectsParameterExportListExecute(r) } @@ -623,9 +756,6 @@ func (a *ProjectsAPIService) ProjectsParameterExportListExecute(r ApiProjectsPar if r.tag != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "") } - if r.wrap != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wrap", r.wrap, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -718,6 +848,150 @@ func (a *ProjectsAPIService) ProjectsParameterExportListExecute(r ApiProjectsPar return localVarReturnValue, localVarHTTPResponse, nil } +type ApiProjectsParametersCopyCreateRequest struct { + ctx context.Context + ApiService *ProjectsAPIService + id string + projectPk string + parameterCopy *ParameterCopy +} + +func (r ApiProjectsParametersCopyCreateRequest) ParameterCopy(parameterCopy ParameterCopy) ApiProjectsParametersCopyCreateRequest { + r.parameterCopy = ¶meterCopy + return r +} + +func (r ApiProjectsParametersCopyCreateRequest) Execute() (*Parameter, *http.Response, error) { + return r.ApiService.ProjectsParametersCopyCreateExecute(r) +} + +/* +ProjectsParametersCopyCreate Method for ProjectsParametersCopyCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @param projectPk + @return ApiProjectsParametersCopyCreateRequest +*/ +func (a *ProjectsAPIService) ProjectsParametersCopyCreate(ctx context.Context, id string, projectPk string) ApiProjectsParametersCopyCreateRequest { + return ApiProjectsParametersCopyCreateRequest{ + ApiService: a, + ctx: ctx, + id: id, + projectPk: projectPk, + } +} + +// Execute executes the request +// @return Parameter +func (a *ProjectsAPIService) ProjectsParametersCopyCreateExecute(r ApiProjectsParametersCopyCreateRequest) (*Parameter, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Parameter + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectsAPIService.ProjectsParametersCopyCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/projects/{project_pk}/parameters/{id}/copy/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"project_pk"+"}", url.PathEscape(parameterValueToString(r.projectPk, "projectPk")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.parameterCopy == nil { + return localVarReturnValue, nil, reportError("parameterCopy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.parameterCopy + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["JWTAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiProjectsParametersCreateRequest struct { ctx context.Context ApiService *ProjectsAPIService @@ -987,6 +1261,7 @@ type ApiProjectsParametersDualityListRequest struct { difference *bool environment *string evaluate *bool + immediateParameters *bool maskSecrets *bool name *string nameContains *string @@ -1003,7 +1278,6 @@ type ApiProjectsParametersDualityListRequest struct { t2AsOf *time.Time t2Tag *string values *bool - wrap *bool } // Compare the values at `t1` and `t2` and if they are the same, omit the parameter from the result. @@ -1012,7 +1286,7 @@ func (r ApiProjectsParametersDualityListRequest) Difference(difference bool) Api return r } -// Name or id (uuid) of the environment to get parameter values for. Cannot be used with `values`. +// Name or id (uuid) of the environment(s) to get parameter values for. Cannot be used with `values`. func (r ApiProjectsParametersDualityListRequest) Environment(environment string) ApiProjectsParametersDualityListRequest { r.environment = &environment return r @@ -1024,6 +1298,12 @@ func (r ApiProjectsParametersDualityListRequest) Evaluate(evaluate bool) ApiProj return r } +// If true, filter by current project parameters only. Otherwise, include both of the inherited and current project parameters. +func (r ApiProjectsParametersDualityListRequest) ImmediateParameters(immediateParameters bool) ApiProjectsParametersDualityListRequest { + r.immediateParameters = &immediateParameters + return r +} + // If true, replaces all secrets with `*****`. func (r ApiProjectsParametersDualityListRequest) MaskSecrets(maskSecrets bool) ApiProjectsParametersDualityListRequest { r.maskSecrets = &maskSecrets @@ -1113,12 +1393,6 @@ func (r ApiProjectsParametersDualityListRequest) Values(values bool) ApiProjects return r } -// Wrap secrets. -func (r ApiProjectsParametersDualityListRequest) Wrap(wrap bool) ApiProjectsParametersDualityListRequest { - r.wrap = &wrap - return r -} - func (r ApiProjectsParametersDualityListRequest) Execute() (*PaginatedParameterDualityList, *http.Response, error) { return r.ApiService.ProjectsParametersDualityListExecute(r) } @@ -1179,6 +1453,9 @@ func (a *ProjectsAPIService) ProjectsParametersDualityListExecute(r ApiProjectsP if r.evaluate != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "evaluate", r.evaluate, "") } + if r.immediateParameters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "immediate_parameters", r.immediateParameters, "") + } if r.maskSecrets != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "mask_secrets", r.maskSecrets, "") } @@ -1227,9 +1504,6 @@ func (a *ProjectsAPIService) ProjectsParametersDualityListExecute(r ApiProjectsP if r.values != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "values", r.values, "") } - if r.wrap != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wrap", r.wrap, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1321,7 +1595,7 @@ type ApiProjectsParametersListRequest struct { difference *string environment *string evaluate *bool - idIn *[]string + immediateParameters *bool maskSecrets *bool name *string nameContains *string @@ -1332,16 +1606,9 @@ type ApiProjectsParametersListRequest struct { ordering *string page *int32 pageSize *int32 - projectName *string - projectNameContains *string - projectNameIcontains *string - projectNameIexact *string - projectNameIstartswith *string - projectNameStartswith *string secret *bool tag *string values *bool - wrap *bool } // Specify a point in time to retrieve configuration from. Cannot be specified with `tag`. @@ -1355,13 +1622,13 @@ func (r ApiProjectsParametersListRequest) DescriptionIcontains(descriptionIconta return r } -// Specify a list of comma-separated environment names or ids (uuid) to compare values. Only returns a parameter if there is a difference. Cannot be used with `environment`, `wrap` or `values`. If used with `mask_secrets` then no secret parameters will be included in the result. +// Specify a list of comma-separated environment names or ids (uuid) to compare values. Only returns a parameter if there is a difference. Cannot be used with `environment` or `values`. If used with `mask_secrets` then no secret parameters will be included in the result. func (r ApiProjectsParametersListRequest) Difference(difference string) ApiProjectsParametersListRequest { r.difference = &difference return r } -// Name or id (uuid) of the environment to get parameter values for. Cannot be used with `values`. +// Name or id (uuid) of the environment(s) to get parameter values for. Cannot be used with `values`. func (r ApiProjectsParametersListRequest) Environment(environment string) ApiProjectsParametersListRequest { r.environment = &environment return r @@ -1373,9 +1640,9 @@ func (r ApiProjectsParametersListRequest) Evaluate(evaluate bool) ApiProjectsPar return r } -// Multiple values may be separated by commas. -func (r ApiProjectsParametersListRequest) IdIn(idIn []string) ApiProjectsParametersListRequest { - r.idIn = &idIn +// If true, filter by current project parameters only. Otherwise, include both of the inherited and current project parameters. +func (r ApiProjectsParametersListRequest) ImmediateParameters(immediateParameters bool) ApiProjectsParametersListRequest { + r.immediateParameters = &immediateParameters return r } @@ -1433,36 +1700,6 @@ func (r ApiProjectsParametersListRequest) PageSize(pageSize int32) ApiProjectsPa return r } -func (r ApiProjectsParametersListRequest) ProjectName(projectName string) ApiProjectsParametersListRequest { - r.projectName = &projectName - return r -} - -func (r ApiProjectsParametersListRequest) ProjectNameContains(projectNameContains string) ApiProjectsParametersListRequest { - r.projectNameContains = &projectNameContains - return r -} - -func (r ApiProjectsParametersListRequest) ProjectNameIcontains(projectNameIcontains string) ApiProjectsParametersListRequest { - r.projectNameIcontains = &projectNameIcontains - return r -} - -func (r ApiProjectsParametersListRequest) ProjectNameIexact(projectNameIexact string) ApiProjectsParametersListRequest { - r.projectNameIexact = &projectNameIexact - return r -} - -func (r ApiProjectsParametersListRequest) ProjectNameIstartswith(projectNameIstartswith string) ApiProjectsParametersListRequest { - r.projectNameIstartswith = &projectNameIstartswith - return r -} - -func (r ApiProjectsParametersListRequest) ProjectNameStartswith(projectNameStartswith string) ApiProjectsParametersListRequest { - r.projectNameStartswith = &projectNameStartswith - return r -} - func (r ApiProjectsParametersListRequest) Secret(secret bool) ApiProjectsParametersListRequest { r.secret = &secret return r @@ -1480,12 +1717,6 @@ func (r ApiProjectsParametersListRequest) Values(values bool) ApiProjectsParamet return r } -// Wrap secrets. -func (r ApiProjectsParametersListRequest) Wrap(wrap bool) ApiProjectsParametersListRequest { - r.wrap = &wrap - return r -} - func (r ApiProjectsParametersListRequest) Execute() (*PaginatedParameterList, *http.Response, error) { return r.ApiService.ProjectsParametersListExecute(r) } @@ -1542,8 +1773,8 @@ func (a *ProjectsAPIService) ProjectsParametersListExecute(r ApiProjectsParamete if r.evaluate != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "evaluate", r.evaluate, "") } - if r.idIn != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "id__in", r.idIn, "csv") + if r.immediateParameters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "immediate_parameters", r.immediateParameters, "") } if r.maskSecrets != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "mask_secrets", r.maskSecrets, "") @@ -1575,24 +1806,6 @@ func (a *ProjectsAPIService) ProjectsParametersListExecute(r ApiProjectsParamete if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } - if r.projectName != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "project__name", r.projectName, "") - } - if r.projectNameContains != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "project__name__contains", r.projectNameContains, "") - } - if r.projectNameIcontains != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "project__name__icontains", r.projectNameIcontains, "") - } - if r.projectNameIexact != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "project__name__iexact", r.projectNameIexact, "") - } - if r.projectNameIstartswith != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "project__name__istartswith", r.projectNameIstartswith, "") - } - if r.projectNameStartswith != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "project__name__startswith", r.projectNameStartswith, "") - } if r.secret != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "secret", r.secret, "") } @@ -1602,9 +1815,6 @@ func (a *ProjectsAPIService) ProjectsParametersListExecute(r ApiProjectsParamete if r.values != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "values", r.values, "") } - if r.wrap != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wrap", r.wrap, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1692,11 +1902,11 @@ type ApiProjectsParametersPartialUpdateRequest struct { ApiService *ProjectsAPIService id string projectPk string - patchedParameter *PatchedParameter + patchedParameterUpdate *PatchedParameterUpdate } -func (r ApiProjectsParametersPartialUpdateRequest) PatchedParameter(patchedParameter PatchedParameter) ApiProjectsParametersPartialUpdateRequest { - r.patchedParameter = &patchedParameter +func (r ApiProjectsParametersPartialUpdateRequest) PatchedParameterUpdate(patchedParameterUpdate PatchedParameterUpdate) ApiProjectsParametersPartialUpdateRequest { + r.patchedParameterUpdate = &patchedParameterUpdate return r } @@ -1762,7 +1972,7 @@ func (a *ProjectsAPIService) ProjectsParametersPartialUpdateExecute(r ApiProject localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.patchedParameter + localVarPostBody = r.patchedParameterUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -2021,10 +2231,10 @@ type ApiProjectsParametersRetrieveRequest struct { asOf *time.Time environment *string evaluate *bool + immediateParameters *bool maskSecrets *bool tag *string values *bool - wrap *bool } // Specify a point in time to retrieve configuration from. Cannot be specified with `tag`. @@ -2033,7 +2243,7 @@ func (r ApiProjectsParametersRetrieveRequest) AsOf(asOf time.Time) ApiProjectsPa return r } -// Name or id (uuid) of the environment to get parameter values for. Cannot be used with `values`. +// Name or id (uuid) of the environment(s) to get parameter values for. Cannot be used with `values`. func (r ApiProjectsParametersRetrieveRequest) Environment(environment string) ApiProjectsParametersRetrieveRequest { r.environment = &environment return r @@ -2045,6 +2255,12 @@ func (r ApiProjectsParametersRetrieveRequest) Evaluate(evaluate bool) ApiProject return r } +// If true, filter by current project parameters only. Otherwise, include both of the inherited and current project parameters. +func (r ApiProjectsParametersRetrieveRequest) ImmediateParameters(immediateParameters bool) ApiProjectsParametersRetrieveRequest { + r.immediateParameters = &immediateParameters + return r +} + // If true, replaces all secrets with `*****`. func (r ApiProjectsParametersRetrieveRequest) MaskSecrets(maskSecrets bool) ApiProjectsParametersRetrieveRequest { r.maskSecrets = &maskSecrets @@ -2063,12 +2279,6 @@ func (r ApiProjectsParametersRetrieveRequest) Values(values bool) ApiProjectsPar return r } -// Wrap secrets. -func (r ApiProjectsParametersRetrieveRequest) Wrap(wrap bool) ApiProjectsParametersRetrieveRequest { - r.wrap = &wrap - return r -} - func (r ApiProjectsParametersRetrieveRequest) Execute() (*Parameter, *http.Response, error) { return r.ApiService.ProjectsParametersRetrieveExecute(r) } @@ -2077,7 +2287,7 @@ func (r ApiProjectsParametersRetrieveRequest) Execute() (*Parameter, *http.Respo ProjectsParametersRetrieve Method for ProjectsParametersRetrieve @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id + @param id A UUID string identifying this parameter ledger. @param projectPk @return ApiProjectsParametersRetrieveRequest */ @@ -2122,6 +2332,9 @@ func (a *ProjectsAPIService) ProjectsParametersRetrieveExecute(r ApiProjectsPara if r.evaluate != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "evaluate", r.evaluate, "") } + if r.immediateParameters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "immediate_parameters", r.immediateParameters, "") + } if r.maskSecrets != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "mask_secrets", r.maskSecrets, "") } @@ -2131,9 +2344,6 @@ func (a *ProjectsAPIService) ProjectsParametersRetrieveExecute(r ApiProjectsPara if r.values != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "values", r.values, "") } - if r.wrap != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wrap", r.wrap, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2664,15 +2874,15 @@ type ApiProjectsParametersRulesPartialUpdateRequest struct { id string parameterPk string projectPk string - patchedParameterRule *PatchedParameterRule + patchedParameterRuleUpdate *PatchedParameterRuleUpdate } -func (r ApiProjectsParametersRulesPartialUpdateRequest) PatchedParameterRule(patchedParameterRule PatchedParameterRule) ApiProjectsParametersRulesPartialUpdateRequest { - r.patchedParameterRule = &patchedParameterRule +func (r ApiProjectsParametersRulesPartialUpdateRequest) PatchedParameterRuleUpdate(patchedParameterRuleUpdate PatchedParameterRuleUpdate) ApiProjectsParametersRulesPartialUpdateRequest { + r.patchedParameterRuleUpdate = &patchedParameterRuleUpdate return r } -func (r ApiProjectsParametersRulesPartialUpdateRequest) Execute() (*ParameterRule, *http.Response, error) { +func (r ApiProjectsParametersRulesPartialUpdateRequest) Execute() (*ParameterRuleUpdate, *http.Response, error) { return r.ApiService.ProjectsParametersRulesPartialUpdateExecute(r) } @@ -2696,13 +2906,13 @@ func (a *ProjectsAPIService) ProjectsParametersRulesPartialUpdate(ctx context.Co } // Execute executes the request -// @return ParameterRule -func (a *ProjectsAPIService) ProjectsParametersRulesPartialUpdateExecute(r ApiProjectsParametersRulesPartialUpdateRequest) (*ParameterRule, *http.Response, error) { +// @return ParameterRuleUpdate +func (a *ProjectsAPIService) ProjectsParametersRulesPartialUpdateExecute(r ApiProjectsParametersRulesPartialUpdateRequest) (*ParameterRuleUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ParameterRule + localVarReturnValue *ParameterRuleUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectsAPIService.ProjectsParametersRulesPartialUpdate") @@ -2737,7 +2947,7 @@ func (a *ProjectsAPIService) ProjectsParametersRulesPartialUpdateExecute(r ApiPr localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.patchedParameterRule + localVarPostBody = r.patchedParameterRuleUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -2819,7 +3029,7 @@ func (r ApiProjectsParametersRulesRetrieveRequest) Execute() (*ParameterRule, *h ProjectsParametersRulesRetrieve Method for ProjectsParametersRulesRetrieve @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id A UUID string identifying this parameter rule. + @param id A UUID string identifying this parameter rule ledger. @param parameterPk The parameter id. @param projectPk The project id. @return ApiProjectsParametersRulesRetrieveRequest @@ -2946,15 +3156,15 @@ type ApiProjectsParametersRulesUpdateRequest struct { id string parameterPk string projectPk string - parameterRule *ParameterRule + parameterRuleUpdate *ParameterRuleUpdate } -func (r ApiProjectsParametersRulesUpdateRequest) ParameterRule(parameterRule ParameterRule) ApiProjectsParametersRulesUpdateRequest { - r.parameterRule = ¶meterRule +func (r ApiProjectsParametersRulesUpdateRequest) ParameterRuleUpdate(parameterRuleUpdate ParameterRuleUpdate) ApiProjectsParametersRulesUpdateRequest { + r.parameterRuleUpdate = ¶meterRuleUpdate return r } -func (r ApiProjectsParametersRulesUpdateRequest) Execute() (*ParameterRule, *http.Response, error) { +func (r ApiProjectsParametersRulesUpdateRequest) Execute() (*ParameterRuleUpdate, *http.Response, error) { return r.ApiService.ProjectsParametersRulesUpdateExecute(r) } @@ -2978,13 +3188,13 @@ func (a *ProjectsAPIService) ProjectsParametersRulesUpdate(ctx context.Context, } // Execute executes the request -// @return ParameterRule -func (a *ProjectsAPIService) ProjectsParametersRulesUpdateExecute(r ApiProjectsParametersRulesUpdateRequest) (*ParameterRule, *http.Response, error) { +// @return ParameterRuleUpdate +func (a *ProjectsAPIService) ProjectsParametersRulesUpdateExecute(r ApiProjectsParametersRulesUpdateRequest) (*ParameterRuleUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ParameterRule + localVarReturnValue *ParameterRuleUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectsAPIService.ProjectsParametersRulesUpdate") @@ -3000,8 +3210,8 @@ func (a *ProjectsAPIService) ProjectsParametersRulesUpdateExecute(r ApiProjectsP localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.parameterRule == nil { - return localVarReturnValue, nil, reportError("parameterRule is required and must be specified") + if r.parameterRuleUpdate == nil { + return localVarReturnValue, nil, reportError("parameterRuleUpdate is required and must be specified") } // to determine the Content-Type header @@ -3022,7 +3232,7 @@ func (a *ProjectsAPIService) ProjectsParametersRulesUpdateExecute(r ApiProjectsP localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.parameterRule + localVarPostBody = r.parameterRuleUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -3122,7 +3332,7 @@ The time range of historical information available depends on your subscription. Any changes to the parameter itself, including rules and values, is included. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id + @param id A UUID string identifying this parameter ledger. @param projectPk @return ApiProjectsParametersTimelineRetrieveRequest */ @@ -3405,11 +3615,11 @@ type ApiProjectsParametersUpdateRequest struct { ApiService *ProjectsAPIService id string projectPk string - parameter *Parameter + parameterUpdate *ParameterUpdate } -func (r ApiProjectsParametersUpdateRequest) Parameter(parameter Parameter) ApiProjectsParametersUpdateRequest { - r.parameter = ¶meter +func (r ApiProjectsParametersUpdateRequest) ParameterUpdate(parameterUpdate ParameterUpdate) ApiProjectsParametersUpdateRequest { + r.parameterUpdate = ¶meterUpdate return r } @@ -3456,8 +3666,8 @@ func (a *ProjectsAPIService) ProjectsParametersUpdateExecute(r ApiProjectsParame localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.parameter == nil { - return localVarReturnValue, nil, reportError("parameter is required and must be specified") + if r.parameterUpdate == nil { + return localVarReturnValue, nil, reportError("parameterUpdate is required and must be specified") } // to determine the Content-Type header @@ -3478,7 +3688,7 @@ func (a *ProjectsAPIService) ProjectsParametersUpdateExecute(r ApiProjectsParame localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.parameter + localVarPostBody = r.parameterUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -3550,8 +3760,8 @@ type ApiProjectsParametersValuesCreateRequest struct { parameterPk string projectPk string valueCreate *ValueCreate + environment *string evaluate *bool - wrap *bool } func (r ApiProjectsParametersValuesCreateRequest) ValueCreate(valueCreate ValueCreate) ApiProjectsParametersValuesCreateRequest { @@ -3559,15 +3769,15 @@ func (r ApiProjectsParametersValuesCreateRequest) ValueCreate(valueCreate ValueC return r } -// If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. No effect on values that are not interpolated. -func (r ApiProjectsParametersValuesCreateRequest) Evaluate(evaluate bool) ApiProjectsParametersValuesCreateRequest { - r.evaluate = &evaluate +// When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. No effect on values that are not dynamic. +func (r ApiProjectsParametersValuesCreateRequest) Environment(environment string) ApiProjectsParametersValuesCreateRequest { + r.environment = &environment return r } -// Indicates the `internal_value` is a wrapped secret. For more information on secret wrapping, see the documentation. -func (r ApiProjectsParametersValuesCreateRequest) Wrap(wrap bool) ApiProjectsParametersValuesCreateRequest { - r.wrap = &wrap +// If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. No effect on values that are not interpolated. +func (r ApiProjectsParametersValuesCreateRequest) Evaluate(evaluate bool) ApiProjectsParametersValuesCreateRequest { + r.evaluate = &evaluate return r } @@ -3620,12 +3830,12 @@ func (a *ProjectsAPIService) ProjectsParametersValuesCreateExecute(r ApiProjects return localVarReturnValue, nil, reportError("valueCreate is required and must be specified") } + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } if r.evaluate != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "evaluate", r.evaluate, "") } - if r.wrap != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wrap", r.wrap, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} @@ -3716,9 +3926,16 @@ type ApiProjectsParametersValuesDestroyRequest struct { id string parameterPk string projectPk string + environment *string evaluate *bool } +// When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. No effect on values that are not dynamic. +func (r ApiProjectsParametersValuesDestroyRequest) Environment(environment string) ApiProjectsParametersValuesDestroyRequest { + r.environment = &environment + return r +} + // If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. No effect on values that are not interpolated. func (r ApiProjectsParametersValuesDestroyRequest) Evaluate(evaluate bool) ApiProjectsParametersValuesDestroyRequest { r.evaluate = &evaluate @@ -3772,6 +3989,9 @@ func (a *ProjectsAPIService) ProjectsParametersValuesDestroyExecute(r ApiProject localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } if r.evaluate != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "evaluate", r.evaluate, "") } @@ -3862,7 +4082,6 @@ type ApiProjectsParametersValuesListRequest struct { page *int32 pageSize *int32 tag *string - wrap *bool } // Specify a point in time to retrieve configuration from. Cannot be specified with `tag`. @@ -3871,7 +4090,7 @@ func (r ApiProjectsParametersValuesListRequest) AsOf(asOf time.Time) ApiProjects return r } -// Name or id of the environment to limit the result to. If this is not specified then the result will contain a value for any environment in which it is set. You cannot use this option to retrieve the _effective_ value of a parameter in an environment for which is is not explicitly set. To see _effective_ values use the Parameters API (see the `values` field). +// When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. No effect on values that are not dynamic. func (r ApiProjectsParametersValuesListRequest) Environment(environment string) ApiProjectsParametersValuesListRequest { r.environment = &environment return r @@ -3919,12 +4138,6 @@ func (r ApiProjectsParametersValuesListRequest) Tag(tag string) ApiProjectsParam return r } -// For writes, indicates `internal_value` is wrapped; for reads, indicates `value` is wrapped. For more information on secret wrapping, see the documentation. -func (r ApiProjectsParametersValuesListRequest) Wrap(wrap bool) ApiProjectsParametersValuesListRequest { - r.wrap = &wrap - return r -} - func (r ApiProjectsParametersValuesListRequest) Execute() (*PaginatedValueList, *http.Response, error) { return r.ApiService.ProjectsParametersValuesListExecute(r) } @@ -4002,9 +4215,6 @@ func (a *ProjectsAPIService) ProjectsParametersValuesListExecute(r ApiProjectsPa if r.tag != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "") } - if r.wrap != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wrap", r.wrap, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4093,29 +4303,29 @@ type ApiProjectsParametersValuesPartialUpdateRequest struct { id string parameterPk string projectPk string + environment *string evaluate *bool - wrap *bool - patchedValue *PatchedValue + patchedValueUpdate *PatchedValueUpdate } -// If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. No effect on values that are not interpolated. -func (r ApiProjectsParametersValuesPartialUpdateRequest) Evaluate(evaluate bool) ApiProjectsParametersValuesPartialUpdateRequest { - r.evaluate = &evaluate +// When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. No effect on values that are not dynamic. +func (r ApiProjectsParametersValuesPartialUpdateRequest) Environment(environment string) ApiProjectsParametersValuesPartialUpdateRequest { + r.environment = &environment return r } -// Indicates the `internal_value` is a wrapped secret. For more information on secret wrapping, see the documentation. -func (r ApiProjectsParametersValuesPartialUpdateRequest) Wrap(wrap bool) ApiProjectsParametersValuesPartialUpdateRequest { - r.wrap = &wrap +// If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. No effect on values that are not interpolated. +func (r ApiProjectsParametersValuesPartialUpdateRequest) Evaluate(evaluate bool) ApiProjectsParametersValuesPartialUpdateRequest { + r.evaluate = &evaluate return r } -func (r ApiProjectsParametersValuesPartialUpdateRequest) PatchedValue(patchedValue PatchedValue) ApiProjectsParametersValuesPartialUpdateRequest { - r.patchedValue = &patchedValue +func (r ApiProjectsParametersValuesPartialUpdateRequest) PatchedValueUpdate(patchedValueUpdate PatchedValueUpdate) ApiProjectsParametersValuesPartialUpdateRequest { + r.patchedValueUpdate = &patchedValueUpdate return r } -func (r ApiProjectsParametersValuesPartialUpdateRequest) Execute() (*Value, *http.Response, error) { +func (r ApiProjectsParametersValuesPartialUpdateRequest) Execute() (*ValueUpdate, *http.Response, error) { return r.ApiService.ProjectsParametersValuesPartialUpdateExecute(r) } @@ -4141,13 +4351,13 @@ func (a *ProjectsAPIService) ProjectsParametersValuesPartialUpdate(ctx context.C } // Execute executes the request -// @return Value -func (a *ProjectsAPIService) ProjectsParametersValuesPartialUpdateExecute(r ApiProjectsParametersValuesPartialUpdateRequest) (*Value, *http.Response, error) { +// @return ValueUpdate +func (a *ProjectsAPIService) ProjectsParametersValuesPartialUpdateExecute(r ApiProjectsParametersValuesPartialUpdateRequest) (*ValueUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Value + localVarReturnValue *ValueUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectsAPIService.ProjectsParametersValuesPartialUpdate") @@ -4164,12 +4374,12 @@ func (a *ProjectsAPIService) ProjectsParametersValuesPartialUpdateExecute(r ApiP localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } if r.evaluate != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "evaluate", r.evaluate, "") } - if r.wrap != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wrap", r.wrap, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} @@ -4188,7 +4398,7 @@ func (a *ProjectsAPIService) ProjectsParametersValuesPartialUpdateExecute(r ApiP localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.patchedValue + localVarPostBody = r.patchedValueUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -4261,12 +4471,12 @@ type ApiProjectsParametersValuesRetrieveRequest struct { parameterPk string projectPk string asOf *time.Time + environment *string evaluate *bool exclude *string include *string maskSecrets *bool tag *string - wrap *bool } // Specify a point in time to retrieve configuration from. Cannot be specified with `tag`. @@ -4275,6 +4485,12 @@ func (r ApiProjectsParametersValuesRetrieveRequest) AsOf(asOf time.Time) ApiProj return r } +// When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. No effect on values that are not dynamic. +func (r ApiProjectsParametersValuesRetrieveRequest) Environment(environment string) ApiProjectsParametersValuesRetrieveRequest { + r.environment = &environment + return r +} + // If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. No effect on values that are not interpolated. func (r ApiProjectsParametersValuesRetrieveRequest) Evaluate(evaluate bool) ApiProjectsParametersValuesRetrieveRequest { r.evaluate = &evaluate @@ -4305,12 +4521,6 @@ func (r ApiProjectsParametersValuesRetrieveRequest) Tag(tag string) ApiProjectsP return r } -// For writes, indicates `internal_value` is wrapped; for reads, indicates `value` is wrapped. For more information on secret wrapping, see the documentation. -func (r ApiProjectsParametersValuesRetrieveRequest) Wrap(wrap bool) ApiProjectsParametersValuesRetrieveRequest { - r.wrap = &wrap - return r -} - func (r ApiProjectsParametersValuesRetrieveRequest) Execute() (*Value, *http.Response, error) { return r.ApiService.ProjectsParametersValuesRetrieveExecute(r) } @@ -4321,7 +4531,7 @@ ProjectsParametersValuesRetrieve Retrieve a value. Retrieve the value of a parameter in an environment. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id + @param id A UUID string identifying this value ledger. @param parameterPk The parameter id. @param projectPk The project id. @return ApiProjectsParametersValuesRetrieveRequest @@ -4363,6 +4573,9 @@ func (a *ProjectsAPIService) ProjectsParametersValuesRetrieveExecute(r ApiProjec if r.asOf != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "as_of", r.asOf, "") } + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } if r.evaluate != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "evaluate", r.evaluate, "") } @@ -4378,9 +4591,6 @@ func (a *ProjectsAPIService) ProjectsParametersValuesRetrieveExecute(r ApiProjec if r.tag != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "") } - if r.wrap != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wrap", r.wrap, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4469,29 +4679,29 @@ type ApiProjectsParametersValuesUpdateRequest struct { id string parameterPk string projectPk string + environment *string evaluate *bool - wrap *bool - value *Value + valueUpdate *ValueUpdate } -// If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. No effect on values that are not interpolated. -func (r ApiProjectsParametersValuesUpdateRequest) Evaluate(evaluate bool) ApiProjectsParametersValuesUpdateRequest { - r.evaluate = &evaluate +// When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. No effect on values that are not dynamic. +func (r ApiProjectsParametersValuesUpdateRequest) Environment(environment string) ApiProjectsParametersValuesUpdateRequest { + r.environment = &environment return r } -// Indicates the `internal_value` is a wrapped secret. For more information on secret wrapping, see the documentation. -func (r ApiProjectsParametersValuesUpdateRequest) Wrap(wrap bool) ApiProjectsParametersValuesUpdateRequest { - r.wrap = &wrap +// If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. No effect on values that are not interpolated. +func (r ApiProjectsParametersValuesUpdateRequest) Evaluate(evaluate bool) ApiProjectsParametersValuesUpdateRequest { + r.evaluate = &evaluate return r } -func (r ApiProjectsParametersValuesUpdateRequest) Value(value Value) ApiProjectsParametersValuesUpdateRequest { - r.value = &value +func (r ApiProjectsParametersValuesUpdateRequest) ValueUpdate(valueUpdate ValueUpdate) ApiProjectsParametersValuesUpdateRequest { + r.valueUpdate = &valueUpdate return r } -func (r ApiProjectsParametersValuesUpdateRequest) Execute() (*Value, *http.Response, error) { +func (r ApiProjectsParametersValuesUpdateRequest) Execute() (*ValueUpdate, *http.Response, error) { return r.ApiService.ProjectsParametersValuesUpdateExecute(r) } @@ -4517,13 +4727,13 @@ func (a *ProjectsAPIService) ProjectsParametersValuesUpdate(ctx context.Context, } // Execute executes the request -// @return Value -func (a *ProjectsAPIService) ProjectsParametersValuesUpdateExecute(r ApiProjectsParametersValuesUpdateRequest) (*Value, *http.Response, error) { +// @return ValueUpdate +func (a *ProjectsAPIService) ProjectsParametersValuesUpdateExecute(r ApiProjectsParametersValuesUpdateRequest) (*ValueUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Value + localVarReturnValue *ValueUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectsAPIService.ProjectsParametersValuesUpdate") @@ -4540,12 +4750,12 @@ func (a *ProjectsAPIService) ProjectsParametersValuesUpdateExecute(r ApiProjects localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.environment != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "environment", r.environment, "") + } if r.evaluate != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "evaluate", r.evaluate, "") } - if r.wrap != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wrap", r.wrap, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} @@ -4564,7 +4774,7 @@ func (a *ProjectsAPIService) ProjectsParametersValuesUpdateExecute(r ApiProjects localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.value + localVarPostBody = r.valueUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -4634,15 +4844,15 @@ type ApiProjectsPartialUpdateRequest struct { ctx context.Context ApiService *ProjectsAPIService id string - patchedProject *PatchedProject + patchedProjectUpdate *PatchedProjectUpdate } -func (r ApiProjectsPartialUpdateRequest) PatchedProject(patchedProject PatchedProject) ApiProjectsPartialUpdateRequest { - r.patchedProject = &patchedProject +func (r ApiProjectsPartialUpdateRequest) PatchedProjectUpdate(patchedProjectUpdate PatchedProjectUpdate) ApiProjectsPartialUpdateRequest { + r.patchedProjectUpdate = &patchedProjectUpdate return r } -func (r ApiProjectsPartialUpdateRequest) Execute() (*Project, *http.Response, error) { +func (r ApiProjectsPartialUpdateRequest) Execute() (*ProjectUpdate, *http.Response, error) { return r.ApiService.ProjectsPartialUpdateExecute(r) } @@ -4662,13 +4872,13 @@ func (a *ProjectsAPIService) ProjectsPartialUpdate(ctx context.Context, id strin } // Execute executes the request -// @return Project -func (a *ProjectsAPIService) ProjectsPartialUpdateExecute(r ApiProjectsPartialUpdateRequest) (*Project, *http.Response, error) { +// @return ProjectUpdate +func (a *ProjectsAPIService) ProjectsPartialUpdateExecute(r ApiProjectsPartialUpdateRequest) (*ProjectUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Project + localVarReturnValue *ProjectUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectsAPIService.ProjectsPartialUpdate") @@ -4701,7 +4911,7 @@ func (a *ProjectsAPIService) ProjectsPartialUpdateExecute(r ApiProjectsPartialUp localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.patchedProject + localVarPostBody = r.patchedProjectUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -4781,7 +4991,7 @@ func (r ApiProjectsRetrieveRequest) Execute() (*Project, *http.Response, error) ProjectsRetrieve Method for ProjectsRetrieve @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id + @param id A UUID string identifying this project ledger. @return ApiProjectsRetrieveRequest */ func (a *ProjectsAPIService) ProjectsRetrieve(ctx context.Context, id string) ApiProjectsRetrieveRequest { @@ -5603,11 +5813,11 @@ type ApiProjectsTemplatesPartialUpdateRequest struct { ApiService *ProjectsAPIService id string projectPk string - patchedTemplate *PatchedTemplate + patchedTemplateUpdate *PatchedTemplateUpdate } -func (r ApiProjectsTemplatesPartialUpdateRequest) PatchedTemplate(patchedTemplate PatchedTemplate) ApiProjectsTemplatesPartialUpdateRequest { - r.patchedTemplate = &patchedTemplate +func (r ApiProjectsTemplatesPartialUpdateRequest) PatchedTemplateUpdate(patchedTemplateUpdate PatchedTemplateUpdate) ApiProjectsTemplatesPartialUpdateRequest { + r.patchedTemplateUpdate = &patchedTemplateUpdate return r } @@ -5673,7 +5883,7 @@ func (a *ProjectsAPIService) ProjectsTemplatesPartialUpdateExecute(r ApiProjects localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.patchedTemplate + localVarPostBody = r.patchedTemplateUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -5799,7 +6009,7 @@ func (r ApiProjectsTemplatesRetrieveRequest) Execute() (*Template, *http.Respons ProjectsTemplatesRetrieve Method for ProjectsTemplatesRetrieve @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id + @param id A UUID string identifying this parameter ledger. @param projectPk @return ApiProjectsTemplatesRetrieveRequest */ @@ -5983,7 +6193,7 @@ The time range of historical information available depends on your subscription. Any changes to the template itself is included. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id + @param id A UUID string identifying this parameter ledger. @param projectPk @return ApiProjectsTemplatesTimelineRetrieveRequest */ @@ -6279,11 +6489,11 @@ type ApiProjectsTemplatesUpdateRequest struct { ApiService *ProjectsAPIService id string projectPk string - template *Template + templateUpdate *TemplateUpdate } -func (r ApiProjectsTemplatesUpdateRequest) Template(template Template) ApiProjectsTemplatesUpdateRequest { - r.template = &template +func (r ApiProjectsTemplatesUpdateRequest) TemplateUpdate(templateUpdate TemplateUpdate) ApiProjectsTemplatesUpdateRequest { + r.templateUpdate = &templateUpdate return r } @@ -6330,8 +6540,8 @@ func (a *ProjectsAPIService) ProjectsTemplatesUpdateExecute(r ApiProjectsTemplat localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.template == nil { - return localVarReturnValue, nil, reportError("template is required and must be specified") + if r.templateUpdate == nil { + return localVarReturnValue, nil, reportError("templateUpdate is required and must be specified") } // to determine the Content-Type header @@ -6352,7 +6562,7 @@ func (a *ProjectsAPIService) ProjectsTemplatesUpdateExecute(r ApiProjectsTemplat localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.template + localVarPostBody = r.templateUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -6432,15 +6642,15 @@ type ApiProjectsUpdateRequest struct { ctx context.Context ApiService *ProjectsAPIService id string - project *Project + projectUpdate *ProjectUpdate } -func (r ApiProjectsUpdateRequest) Project(project Project) ApiProjectsUpdateRequest { - r.project = &project +func (r ApiProjectsUpdateRequest) ProjectUpdate(projectUpdate ProjectUpdate) ApiProjectsUpdateRequest { + r.projectUpdate = &projectUpdate return r } -func (r ApiProjectsUpdateRequest) Execute() (*Project, *http.Response, error) { +func (r ApiProjectsUpdateRequest) Execute() (*ProjectUpdate, *http.Response, error) { return r.ApiService.ProjectsUpdateExecute(r) } @@ -6460,13 +6670,13 @@ func (a *ProjectsAPIService) ProjectsUpdate(ctx context.Context, id string) ApiP } // Execute executes the request -// @return Project -func (a *ProjectsAPIService) ProjectsUpdateExecute(r ApiProjectsUpdateRequest) (*Project, *http.Response, error) { +// @return ProjectUpdate +func (a *ProjectsAPIService) ProjectsUpdateExecute(r ApiProjectsUpdateRequest) (*ProjectUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Project + localVarReturnValue *ProjectUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProjectsAPIService.ProjectsUpdate") @@ -6480,8 +6690,8 @@ func (a *ProjectsAPIService) ProjectsUpdateExecute(r ApiProjectsUpdateRequest) ( localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.project == nil { - return localVarReturnValue, nil, reportError("project is required and must be specified") + if r.projectUpdate == nil { + return localVarReturnValue, nil, reportError("projectUpdate is required and must be specified") } // to determine the Content-Type header @@ -6502,7 +6712,7 @@ func (a *ProjectsAPIService) ProjectsUpdateExecute(r ApiProjectsUpdateRequest) ( localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.project + localVarPostBody = r.projectUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { diff --git a/pkg/cloudtruthapi/api_serviceaccounts.go b/pkg/cloudtruthapi/api_serviceaccounts.go index a227eea..5fdfe71 100644 --- a/pkg/cloudtruthapi/api_serviceaccounts.go +++ b/pkg/cloudtruthapi/api_serviceaccounts.go @@ -714,15 +714,15 @@ type ApiServiceaccountsUpdateRequest struct { ctx context.Context ApiService *ServiceaccountsAPIService id string - serviceAccount *ServiceAccount + serviceAccountUpdateRequest *ServiceAccountUpdateRequest } -func (r ApiServiceaccountsUpdateRequest) ServiceAccount(serviceAccount ServiceAccount) ApiServiceaccountsUpdateRequest { - r.serviceAccount = &serviceAccount +func (r ApiServiceaccountsUpdateRequest) ServiceAccountUpdateRequest(serviceAccountUpdateRequest ServiceAccountUpdateRequest) ApiServiceaccountsUpdateRequest { + r.serviceAccountUpdateRequest = &serviceAccountUpdateRequest return r } -func (r ApiServiceaccountsUpdateRequest) Execute() (*ServiceAccount, *http.Response, error) { +func (r ApiServiceaccountsUpdateRequest) Execute() (*ServiceAccountUpdateRequest, *http.Response, error) { return r.ApiService.ServiceaccountsUpdateExecute(r) } @@ -742,13 +742,13 @@ func (a *ServiceaccountsAPIService) ServiceaccountsUpdate(ctx context.Context, i } // Execute executes the request -// @return ServiceAccount -func (a *ServiceaccountsAPIService) ServiceaccountsUpdateExecute(r ApiServiceaccountsUpdateRequest) (*ServiceAccount, *http.Response, error) { +// @return ServiceAccountUpdateRequest +func (a *ServiceaccountsAPIService) ServiceaccountsUpdateExecute(r ApiServiceaccountsUpdateRequest) (*ServiceAccountUpdateRequest, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ServiceAccount + localVarReturnValue *ServiceAccountUpdateRequest ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServiceaccountsAPIService.ServiceaccountsUpdate") @@ -781,7 +781,7 @@ func (a *ServiceaccountsAPIService) ServiceaccountsUpdateExecute(r ApiServiceacc localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.serviceAccount + localVarPostBody = r.serviceAccountUpdateRequest if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { diff --git a/pkg/cloudtruthapi/api_types.go b/pkg/cloudtruthapi/api_types.go index 5966e35..236ba3a 100644 --- a/pkg/cloudtruthapi/api_types.go +++ b/pkg/cloudtruthapi/api_types.go @@ -287,8 +287,6 @@ type ApiTypesListRequest struct { ordering *string page *int32 pageSize *int32 - parentNameIcontains *string - parentNameIexact *string } func (r ApiTypesListRequest) DescriptionIcontains(descriptionIcontains string) ApiTypesListRequest { @@ -324,16 +322,6 @@ func (r ApiTypesListRequest) PageSize(pageSize int32) ApiTypesListRequest { return r } -func (r ApiTypesListRequest) ParentNameIcontains(parentNameIcontains string) ApiTypesListRequest { - r.parentNameIcontains = &parentNameIcontains - return r -} - -func (r ApiTypesListRequest) ParentNameIexact(parentNameIexact string) ApiTypesListRequest { - r.parentNameIexact = &parentNameIexact - return r -} - func (r ApiTypesListRequest) Execute() (*PaginatedParameterTypeList, *http.Response, error) { return r.ApiService.TypesListExecute(r) } @@ -390,12 +378,6 @@ func (a *TypesAPIService) TypesListExecute(r ApiTypesListRequest) (*PaginatedPar if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } - if r.parentNameIcontains != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "parent__name__icontains", r.parentNameIcontains, "") - } - if r.parentNameIexact != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "parent__name__iexact", r.parentNameIexact, "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -482,15 +464,15 @@ type ApiTypesPartialUpdateRequest struct { ctx context.Context ApiService *TypesAPIService id string - patchedParameterType *PatchedParameterType + patchedParameterTypeUpdate *PatchedParameterTypeUpdate } -func (r ApiTypesPartialUpdateRequest) PatchedParameterType(patchedParameterType PatchedParameterType) ApiTypesPartialUpdateRequest { - r.patchedParameterType = &patchedParameterType +func (r ApiTypesPartialUpdateRequest) PatchedParameterTypeUpdate(patchedParameterTypeUpdate PatchedParameterTypeUpdate) ApiTypesPartialUpdateRequest { + r.patchedParameterTypeUpdate = &patchedParameterTypeUpdate return r } -func (r ApiTypesPartialUpdateRequest) Execute() (*ParameterType, *http.Response, error) { +func (r ApiTypesPartialUpdateRequest) Execute() (*ParameterTypeUpdate, *http.Response, error) { return r.ApiService.TypesPartialUpdateExecute(r) } @@ -510,13 +492,13 @@ func (a *TypesAPIService) TypesPartialUpdate(ctx context.Context, id string) Api } // Execute executes the request -// @return ParameterType -func (a *TypesAPIService) TypesPartialUpdateExecute(r ApiTypesPartialUpdateRequest) (*ParameterType, *http.Response, error) { +// @return ParameterTypeUpdate +func (a *TypesAPIService) TypesPartialUpdateExecute(r ApiTypesPartialUpdateRequest) (*ParameterTypeUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ParameterType + localVarReturnValue *ParameterTypeUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TypesAPIService.TypesPartialUpdate") @@ -549,7 +531,7 @@ func (a *TypesAPIService) TypesPartialUpdateExecute(r ApiTypesPartialUpdateReque localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.patchedParameterType + localVarPostBody = r.patchedParameterTypeUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -629,7 +611,7 @@ func (r ApiTypesRetrieveRequest) Execute() (*ParameterType, *http.Response, erro TypesRetrieve Method for TypesRetrieve @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id + @param id A UUID string identifying this parameter type ledger. @return ApiTypesRetrieveRequest */ func (a *TypesAPIService) TypesRetrieve(ctx context.Context, id string) ApiTypesRetrieveRequest { @@ -1179,15 +1161,15 @@ type ApiTypesRulesPartialUpdateRequest struct { ApiService *TypesAPIService id string parametertypePk string - patchedParameterTypeRule *PatchedParameterTypeRule + patchedParameterTypeRuleUpdate *PatchedParameterTypeRuleUpdate } -func (r ApiTypesRulesPartialUpdateRequest) PatchedParameterTypeRule(patchedParameterTypeRule PatchedParameterTypeRule) ApiTypesRulesPartialUpdateRequest { - r.patchedParameterTypeRule = &patchedParameterTypeRule +func (r ApiTypesRulesPartialUpdateRequest) PatchedParameterTypeRuleUpdate(patchedParameterTypeRuleUpdate PatchedParameterTypeRuleUpdate) ApiTypesRulesPartialUpdateRequest { + r.patchedParameterTypeRuleUpdate = &patchedParameterTypeRuleUpdate return r } -func (r ApiTypesRulesPartialUpdateRequest) Execute() (*ParameterTypeRule, *http.Response, error) { +func (r ApiTypesRulesPartialUpdateRequest) Execute() (*ParameterTypeRuleUpdate, *http.Response, error) { return r.ApiService.TypesRulesPartialUpdateExecute(r) } @@ -1209,13 +1191,13 @@ func (a *TypesAPIService) TypesRulesPartialUpdate(ctx context.Context, id string } // Execute executes the request -// @return ParameterTypeRule -func (a *TypesAPIService) TypesRulesPartialUpdateExecute(r ApiTypesRulesPartialUpdateRequest) (*ParameterTypeRule, *http.Response, error) { +// @return ParameterTypeRuleUpdate +func (a *TypesAPIService) TypesRulesPartialUpdateExecute(r ApiTypesRulesPartialUpdateRequest) (*ParameterTypeRuleUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ParameterTypeRule + localVarReturnValue *ParameterTypeRuleUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TypesAPIService.TypesRulesPartialUpdate") @@ -1249,7 +1231,7 @@ func (a *TypesAPIService) TypesRulesPartialUpdateExecute(r ApiTypesRulesPartialU localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.patchedParameterTypeRule + localVarPostBody = r.patchedParameterTypeRuleUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -1330,7 +1312,7 @@ func (r ApiTypesRulesRetrieveRequest) Execute() (*ParameterTypeRule, *http.Respo TypesRulesRetrieve Method for TypesRulesRetrieve @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id A UUID string identifying this parameter type rule. + @param id A UUID string identifying this parameter type rule ledger. @param parametertypePk The parameter type id. @return ApiTypesRulesRetrieveRequest */ @@ -1453,15 +1435,15 @@ type ApiTypesRulesUpdateRequest struct { ApiService *TypesAPIService id string parametertypePk string - parameterTypeRule *ParameterTypeRule + parameterTypeRuleUpdate *ParameterTypeRuleUpdate } -func (r ApiTypesRulesUpdateRequest) ParameterTypeRule(parameterTypeRule ParameterTypeRule) ApiTypesRulesUpdateRequest { - r.parameterTypeRule = ¶meterTypeRule +func (r ApiTypesRulesUpdateRequest) ParameterTypeRuleUpdate(parameterTypeRuleUpdate ParameterTypeRuleUpdate) ApiTypesRulesUpdateRequest { + r.parameterTypeRuleUpdate = ¶meterTypeRuleUpdate return r } -func (r ApiTypesRulesUpdateRequest) Execute() (*ParameterTypeRule, *http.Response, error) { +func (r ApiTypesRulesUpdateRequest) Execute() (*ParameterTypeRuleUpdate, *http.Response, error) { return r.ApiService.TypesRulesUpdateExecute(r) } @@ -1483,13 +1465,13 @@ func (a *TypesAPIService) TypesRulesUpdate(ctx context.Context, id string, param } // Execute executes the request -// @return ParameterTypeRule -func (a *TypesAPIService) TypesRulesUpdateExecute(r ApiTypesRulesUpdateRequest) (*ParameterTypeRule, *http.Response, error) { +// @return ParameterTypeRuleUpdate +func (a *TypesAPIService) TypesRulesUpdateExecute(r ApiTypesRulesUpdateRequest) (*ParameterTypeRuleUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ParameterTypeRule + localVarReturnValue *ParameterTypeRuleUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TypesAPIService.TypesRulesUpdate") @@ -1504,8 +1486,8 @@ func (a *TypesAPIService) TypesRulesUpdateExecute(r ApiTypesRulesUpdateRequest) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.parameterTypeRule == nil { - return localVarReturnValue, nil, reportError("parameterTypeRule is required and must be specified") + if r.parameterTypeRuleUpdate == nil { + return localVarReturnValue, nil, reportError("parameterTypeRuleUpdate is required and must be specified") } // to determine the Content-Type header @@ -1526,7 +1508,7 @@ func (a *TypesAPIService) TypesRulesUpdateExecute(r ApiTypesRulesUpdateRequest) localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.parameterTypeRule + localVarPostBody = r.parameterTypeRuleUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -1596,15 +1578,15 @@ type ApiTypesUpdateRequest struct { ctx context.Context ApiService *TypesAPIService id string - parameterType *ParameterType + parameterTypeUpdate *ParameterTypeUpdate } -func (r ApiTypesUpdateRequest) ParameterType(parameterType ParameterType) ApiTypesUpdateRequest { - r.parameterType = ¶meterType +func (r ApiTypesUpdateRequest) ParameterTypeUpdate(parameterTypeUpdate ParameterTypeUpdate) ApiTypesUpdateRequest { + r.parameterTypeUpdate = ¶meterTypeUpdate return r } -func (r ApiTypesUpdateRequest) Execute() (*ParameterType, *http.Response, error) { +func (r ApiTypesUpdateRequest) Execute() (*ParameterTypeUpdate, *http.Response, error) { return r.ApiService.TypesUpdateExecute(r) } @@ -1624,13 +1606,13 @@ func (a *TypesAPIService) TypesUpdate(ctx context.Context, id string) ApiTypesUp } // Execute executes the request -// @return ParameterType -func (a *TypesAPIService) TypesUpdateExecute(r ApiTypesUpdateRequest) (*ParameterType, *http.Response, error) { +// @return ParameterTypeUpdate +func (a *TypesAPIService) TypesUpdateExecute(r ApiTypesUpdateRequest) (*ParameterTypeUpdate, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ParameterType + localVarReturnValue *ParameterTypeUpdate ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TypesAPIService.TypesUpdate") @@ -1644,8 +1626,8 @@ func (a *TypesAPIService) TypesUpdateExecute(r ApiTypesUpdateRequest) (*Paramete localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.parameterType == nil { - return localVarReturnValue, nil, reportError("parameterType is required and must be specified") + if r.parameterTypeUpdate == nil { + return localVarReturnValue, nil, reportError("parameterTypeUpdate is required and must be specified") } // to determine the Content-Type header @@ -1666,7 +1648,7 @@ func (a *TypesAPIService) TypesUpdateExecute(r ApiTypesUpdateRequest) (*Paramete localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.parameterType + localVarPostBody = r.parameterTypeUpdate if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { diff --git a/pkg/cloudtruthapi/client.go b/pkg/cloudtruthapi/client.go index 4899096..f0a8146 100644 --- a/pkg/cloudtruthapi/client.go +++ b/pkg/cloudtruthapi/client.go @@ -58,6 +58,8 @@ type APIClient struct { EnvironmentsAPI *EnvironmentsAPIService + FeaturesAPI *FeaturesAPIService + GrantsAPI *GrantsAPIService GroupsAPI *GroupsAPIService @@ -103,6 +105,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.AuditAPI = (*AuditAPIService)(&c.common) c.BackupAPI = (*BackupAPIService)(&c.common) c.EnvironmentsAPI = (*EnvironmentsAPIService)(&c.common) + c.FeaturesAPI = (*FeaturesAPIService)(&c.common) c.GrantsAPI = (*GrantsAPIService)(&c.common) c.GroupsAPI = (*GroupsAPIService)(&c.common) c.ImportAPI = (*ImportAPIService)(&c.common) @@ -456,6 +459,11 @@ func (c *APIClient) prepareRequest( // Walk through any authentication. + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + } for header, value := range c.cfg.DefaultHeader { diff --git a/pkg/cloudtruthapi/configuration.go b/pkg/cloudtruthapi/configuration.go index 49c10f4..09a7e48 100644 --- a/pkg/cloudtruthapi/configuration.go +++ b/pkg/cloudtruthapi/configuration.go @@ -29,6 +29,9 @@ func (c contextKey) String() string { } var ( + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") diff --git a/pkg/cloudtruthapi/model_audit_trail_user.go b/pkg/cloudtruthapi/model_audit_trail_user.go index 2d707ea..3582308 100644 --- a/pkg/cloudtruthapi/model_audit_trail_user.go +++ b/pkg/cloudtruthapi/model_audit_trail_user.go @@ -36,14 +36,14 @@ type AuditTrailUser struct { Email NullableString `json:"email"` PictureUrl NullableString `json:"picture_url"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAuditTrailUser instantiates a new AuditTrailUser object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAuditTrailUser(url string, id string, name NullableString, organizationName NullableString, membershipId NullableString, role NullableString, email NullableString, pictureUrl NullableString, createdAt time.Time, modifiedAt time.Time) *AuditTrailUser { +func NewAuditTrailUser(url string, id string, name NullableString, organizationName NullableString, membershipId NullableString, role NullableString, email NullableString, pictureUrl NullableString, createdAt time.Time, modifiedAt NullableTime) *AuditTrailUser { this := AuditTrailUser{} this.Url = url this.Id = id @@ -327,27 +327,29 @@ func (o *AuditTrailUser) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AuditTrailUser) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AuditTrailUser) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AuditTrailUser) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AuditTrailUser) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o AuditTrailUser) ToMap() (map[string]interface{}, error) { toSerialize["email"] = o.Email.Get() toSerialize["picture_url"] = o.PictureUrl.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_aws_integration.go b/pkg/cloudtruthapi/model_aws_integration.go index 9d3abb5..308c6e4 100644 --- a/pkg/cloudtruthapi/model_aws_integration.go +++ b/pkg/cloudtruthapi/model_aws_integration.go @@ -31,9 +31,9 @@ type AwsIntegration struct { // If an error occurs, more details will be available in this field. StatusDetail string `json:"status_detail"` // The last time the status was evaluated. - StatusLastCheckedAt time.Time `json:"status_last_checked_at"` + StatusLastCheckedAt NullableTime `json:"status_last_checked_at"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` Fqn string `json:"fqn"` // The type of integration. Type string `json:"type"` @@ -57,7 +57,7 @@ type AwsIntegration struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAwsIntegration(url string, id string, name string, status StatusEnum, statusDetail string, statusLastCheckedAt time.Time, createdAt time.Time, modifiedAt time.Time, fqn string, type_ string, awsAccountId string, awsEnabledRegions []AwsRegionEnum, awsEnabledServices []AwsServiceEnum, awsExternalId string, awsRoleName string) *AwsIntegration { +func NewAwsIntegration(url string, id string, name string, status StatusEnum, statusDetail string, statusLastCheckedAt NullableTime, createdAt time.Time, modifiedAt NullableTime, fqn string, type_ string, awsAccountId string, awsEnabledRegions []AwsRegionEnum, awsEnabledServices []AwsServiceEnum, awsExternalId string, awsRoleName string) *AwsIntegration { this := AwsIntegration{} this.Url = url this.Id = id @@ -238,27 +238,29 @@ func (o *AwsIntegration) SetStatusDetail(v string) { } // GetStatusLastCheckedAt returns the StatusLastCheckedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsIntegration) GetStatusLastCheckedAt() time.Time { - if o == nil { + if o == nil || o.StatusLastCheckedAt.Get() == nil { var ret time.Time return ret } - return o.StatusLastCheckedAt + return *o.StatusLastCheckedAt.Get() } // GetStatusLastCheckedAtOk returns a tuple with the StatusLastCheckedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsIntegration) GetStatusLastCheckedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.StatusLastCheckedAt, true + return o.StatusLastCheckedAt.Get(), o.StatusLastCheckedAt.IsSet() } // SetStatusLastCheckedAt sets field value func (o *AwsIntegration) SetStatusLastCheckedAt(v time.Time) { - o.StatusLastCheckedAt = v + o.StatusLastCheckedAt.Set(&v) } // GetCreatedAt returns the CreatedAt field value @@ -286,27 +288,29 @@ func (o *AwsIntegration) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsIntegration) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsIntegration) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AwsIntegration) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetFqn returns the Fqn field value @@ -569,9 +573,9 @@ func (o AwsIntegration) ToMap() (map[string]interface{}, error) { } toSerialize["status"] = o.Status toSerialize["status_detail"] = o.StatusDetail - toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt + toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() toSerialize["fqn"] = o.Fqn toSerialize["type"] = o.Type if !IsNil(o.Writable) { diff --git a/pkg/cloudtruthapi/model_aws_pull.go b/pkg/cloudtruthapi/model_aws_pull.go index bc93dcc..64ea111 100644 --- a/pkg/cloudtruthapi/model_aws_pull.go +++ b/pkg/cloudtruthapi/model_aws_pull.go @@ -30,7 +30,7 @@ type AwsPull struct { Description *string `json:"description,omitempty"` LatestTask NullableAwsPullLatestTask `json:"latest_task"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` // Allow the pull to create environments. Any automatically created environments will be children of the `default` environment. If an environment needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. CreateEnvironments *bool `json:"create_environments,omitempty"` // Allow the pull to create projects. If a project needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. @@ -38,7 +38,7 @@ type AwsPull struct { // When set to dry-run mode an action will report the changes that it would have made in task steps, however those changes are not actually performed. DryRun *bool `json:"dry_run,omitempty"` // Values being managed by a mapped pull. - MappedValues []Value `json:"mapped_values"` + MappedValues []ValueCreate `json:"mapped_values"` Mode ModeEnum `json:"mode"` Region AwsRegionEnum `json:"region"` Service AwsServiceEnum `json:"service"` @@ -50,7 +50,7 @@ type AwsPull struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAwsPull(url string, id string, name string, latestTask NullableAwsPullLatestTask, createdAt time.Time, modifiedAt time.Time, mappedValues []Value, mode ModeEnum, region AwsRegionEnum, service AwsServiceEnum, resource NullableString) *AwsPull { +func NewAwsPull(url string, id string, name string, latestTask NullableAwsPullLatestTask, createdAt time.Time, modifiedAt NullableTime, mappedValues []ValueCreate, mode ModeEnum, region AwsRegionEnum, service AwsServiceEnum, resource NullableString) *AwsPull { this := AwsPull{} this.Url = url this.Id = id @@ -229,27 +229,29 @@ func (o *AwsPull) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsPull) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsPull) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AwsPull) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetCreateEnvironments returns the CreateEnvironments field value if set, zero value otherwise. @@ -349,9 +351,9 @@ func (o *AwsPull) SetDryRun(v bool) { } // GetMappedValues returns the MappedValues field value -func (o *AwsPull) GetMappedValues() []Value { +func (o *AwsPull) GetMappedValues() []ValueCreate { if o == nil { - var ret []Value + var ret []ValueCreate return ret } @@ -360,7 +362,7 @@ func (o *AwsPull) GetMappedValues() []Value { // GetMappedValuesOk returns a tuple with the MappedValues field value // and a boolean to check if the value has been set. -func (o *AwsPull) GetMappedValuesOk() ([]Value, bool) { +func (o *AwsPull) GetMappedValuesOk() ([]ValueCreate, bool) { if o == nil { return nil, false } @@ -368,7 +370,7 @@ func (o *AwsPull) GetMappedValuesOk() ([]Value, bool) { } // SetMappedValues sets field value -func (o *AwsPull) SetMappedValues(v []Value) { +func (o *AwsPull) SetMappedValues(v []ValueCreate) { o.MappedValues = v } @@ -488,7 +490,7 @@ func (o AwsPull) ToMap() (map[string]interface{}, error) { } toSerialize["latest_task"] = o.LatestTask.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() if !IsNil(o.CreateEnvironments) { toSerialize["create_environments"] = o.CreateEnvironments } diff --git a/pkg/cloudtruthapi/model_aws_pull_latest_task.go b/pkg/cloudtruthapi/model_aws_pull_latest_task.go index 89d5f41..634be28 100644 --- a/pkg/cloudtruthapi/model_aws_pull_latest_task.go +++ b/pkg/cloudtruthapi/model_aws_pull_latest_task.go @@ -34,14 +34,14 @@ type AwsPullLatestTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAwsPullLatestTask instantiates a new AwsPullLatestTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAwsPullLatestTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *AwsPullLatestTask { +func NewAwsPullLatestTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *AwsPullLatestTask { this := AwsPullLatestTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *AwsPullLatestTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsPullLatestTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsPullLatestTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AwsPullLatestTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AwsPullLatestTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o AwsPullLatestTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_aws_pull_task.go b/pkg/cloudtruthapi/model_aws_pull_task.go index 6d19d86..9a3dfe7 100644 --- a/pkg/cloudtruthapi/model_aws_pull_task.go +++ b/pkg/cloudtruthapi/model_aws_pull_task.go @@ -34,14 +34,14 @@ type AwsPullTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAwsPullTask instantiates a new AwsPullTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAwsPullTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *AwsPullTask { +func NewAwsPullTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *AwsPullTask { this := AwsPullTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *AwsPullTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsPullTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsPullTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AwsPullTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AwsPullTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o AwsPullTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_aws_pull_task_step.go b/pkg/cloudtruthapi/model_aws_pull_task_step.go index ab2260d..3a9504a 100644 --- a/pkg/cloudtruthapi/model_aws_pull_task_step.go +++ b/pkg/cloudtruthapi/model_aws_pull_task_step.go @@ -60,14 +60,14 @@ type AwsPullTaskStep struct { // Details on the error that occurred during processing. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAwsPullTaskStep instantiates a new AwsPullTaskStep object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAwsPullTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt time.Time) *AwsPullTaskStep { +func NewAwsPullTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt NullableTime) *AwsPullTaskStep { this := AwsPullTaskStep{} this.Url = url this.Id = id @@ -851,27 +851,29 @@ func (o *AwsPullTaskStep) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsPullTaskStep) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsPullTaskStep) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AwsPullTaskStep) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AwsPullTaskStep) MarshalJSON() ([]byte, error) { @@ -933,7 +935,7 @@ func (o AwsPullTaskStep) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_aws_push.go b/pkg/cloudtruthapi/model_aws_push.go index d2f1b59..fee0ed4 100644 --- a/pkg/cloudtruthapi/model_aws_push.go +++ b/pkg/cloudtruthapi/model_aws_push.go @@ -30,7 +30,7 @@ type AwsPush struct { Description *string `json:"description,omitempty"` LatestTask NullableAwsPushLatestTask `json:"latest_task"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` // This setting allows parameters (non-secrets) to be pushed to a destination that only supports storing secrets. This may increase your overall cost from the cloud provider as some cloud providers charge a premium for secrets-only storage. CoerceParameters *bool `json:"coerce_parameters,omitempty"` // Include parameters (non-secrets) in the values being pushed. This setting requires the destination to support parameters or for the `coerce_parameters` flag to be enabled, otherwise the push will fail. @@ -59,7 +59,7 @@ type AwsPush struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAwsPush(url string, id string, name string, latestTask NullableAwsPushLatestTask, createdAt time.Time, modifiedAt time.Time, projects []string, tags []string, region AwsRegionEnum, service AwsServiceEnum, resource NullableString) *AwsPush { +func NewAwsPush(url string, id string, name string, latestTask NullableAwsPushLatestTask, createdAt time.Time, modifiedAt NullableTime, projects []string, tags []string, region AwsRegionEnum, service AwsServiceEnum, resource NullableString) *AwsPush { this := AwsPush{} this.Url = url this.Id = id @@ -238,27 +238,29 @@ func (o *AwsPush) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsPush) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsPush) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AwsPush) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetCoerceParameters returns the CoerceParameters field value if set, zero value otherwise. @@ -625,7 +627,7 @@ func (o AwsPush) ToMap() (map[string]interface{}, error) { } toSerialize["latest_task"] = o.LatestTask.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() if !IsNil(o.CoerceParameters) { toSerialize["coerce_parameters"] = o.CoerceParameters } diff --git a/pkg/cloudtruthapi/model_aws_push_latest_task.go b/pkg/cloudtruthapi/model_aws_push_latest_task.go index 464e43f..1bf57fa 100644 --- a/pkg/cloudtruthapi/model_aws_push_latest_task.go +++ b/pkg/cloudtruthapi/model_aws_push_latest_task.go @@ -34,14 +34,14 @@ type AwsPushLatestTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAwsPushLatestTask instantiates a new AwsPushLatestTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAwsPushLatestTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *AwsPushLatestTask { +func NewAwsPushLatestTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *AwsPushLatestTask { this := AwsPushLatestTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *AwsPushLatestTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsPushLatestTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsPushLatestTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AwsPushLatestTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AwsPushLatestTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o AwsPushLatestTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_aws_push_task.go b/pkg/cloudtruthapi/model_aws_push_task.go index 378cd82..858400a 100644 --- a/pkg/cloudtruthapi/model_aws_push_task.go +++ b/pkg/cloudtruthapi/model_aws_push_task.go @@ -34,14 +34,14 @@ type AwsPushTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAwsPushTask instantiates a new AwsPushTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAwsPushTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *AwsPushTask { +func NewAwsPushTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *AwsPushTask { this := AwsPushTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *AwsPushTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsPushTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsPushTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AwsPushTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AwsPushTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o AwsPushTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_aws_push_task_step.go b/pkg/cloudtruthapi/model_aws_push_task_step.go index 998eb9c..6a1cd5a 100644 --- a/pkg/cloudtruthapi/model_aws_push_task_step.go +++ b/pkg/cloudtruthapi/model_aws_push_task_step.go @@ -60,14 +60,14 @@ type AwsPushTaskStep struct { // Details on the error that occurred during processing. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAwsPushTaskStep instantiates a new AwsPushTaskStep object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAwsPushTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt time.Time) *AwsPushTaskStep { +func NewAwsPushTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt NullableTime) *AwsPushTaskStep { this := AwsPushTaskStep{} this.Url = url this.Id = id @@ -851,27 +851,29 @@ func (o *AwsPushTaskStep) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AwsPushTaskStep) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AwsPushTaskStep) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AwsPushTaskStep) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AwsPushTaskStep) MarshalJSON() ([]byte, error) { @@ -933,7 +935,7 @@ func (o AwsPushTaskStep) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_azure_key_vault_integration.go b/pkg/cloudtruthapi/model_azure_key_vault_integration.go index 89cbeee..24f09c6 100644 --- a/pkg/cloudtruthapi/model_azure_key_vault_integration.go +++ b/pkg/cloudtruthapi/model_azure_key_vault_integration.go @@ -31,9 +31,9 @@ type AzureKeyVaultIntegration struct { // If an error occurs, more details will be available in this field. StatusDetail string `json:"status_detail"` // The last time the status was evaluated. - StatusLastCheckedAt time.Time `json:"status_last_checked_at"` + StatusLastCheckedAt NullableTime `json:"status_last_checked_at"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` Fqn string `json:"fqn"` // The type of integration. Type string `json:"type"` @@ -49,7 +49,7 @@ type AzureKeyVaultIntegration struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAzureKeyVaultIntegration(url string, id string, name string, status StatusEnum, statusDetail string, statusLastCheckedAt time.Time, createdAt time.Time, modifiedAt time.Time, fqn string, type_ string, vaultName string, tenantId string) *AzureKeyVaultIntegration { +func NewAzureKeyVaultIntegration(url string, id string, name string, status StatusEnum, statusDetail string, statusLastCheckedAt NullableTime, createdAt time.Time, modifiedAt NullableTime, fqn string, type_ string, vaultName string, tenantId string) *AzureKeyVaultIntegration { this := AzureKeyVaultIntegration{} this.Url = url this.Id = id @@ -227,27 +227,29 @@ func (o *AzureKeyVaultIntegration) SetStatusDetail(v string) { } // GetStatusLastCheckedAt returns the StatusLastCheckedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultIntegration) GetStatusLastCheckedAt() time.Time { - if o == nil { + if o == nil || o.StatusLastCheckedAt.Get() == nil { var ret time.Time return ret } - return o.StatusLastCheckedAt + return *o.StatusLastCheckedAt.Get() } // GetStatusLastCheckedAtOk returns a tuple with the StatusLastCheckedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultIntegration) GetStatusLastCheckedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.StatusLastCheckedAt, true + return o.StatusLastCheckedAt.Get(), o.StatusLastCheckedAt.IsSet() } // SetStatusLastCheckedAt sets field value func (o *AzureKeyVaultIntegration) SetStatusLastCheckedAt(v time.Time) { - o.StatusLastCheckedAt = v + o.StatusLastCheckedAt.Set(&v) } // GetCreatedAt returns the CreatedAt field value @@ -275,27 +277,29 @@ func (o *AzureKeyVaultIntegration) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultIntegration) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultIntegration) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AzureKeyVaultIntegration) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetFqn returns the Fqn field value @@ -444,9 +448,9 @@ func (o AzureKeyVaultIntegration) ToMap() (map[string]interface{}, error) { } toSerialize["status"] = o.Status toSerialize["status_detail"] = o.StatusDetail - toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt + toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() toSerialize["fqn"] = o.Fqn toSerialize["type"] = o.Type if !IsNil(o.Writable) { diff --git a/pkg/cloudtruthapi/model_azure_key_vault_pull.go b/pkg/cloudtruthapi/model_azure_key_vault_pull.go index 9f37d29..70c5d31 100644 --- a/pkg/cloudtruthapi/model_azure_key_vault_pull.go +++ b/pkg/cloudtruthapi/model_azure_key_vault_pull.go @@ -30,7 +30,7 @@ type AzureKeyVaultPull struct { Description *string `json:"description,omitempty"` LatestTask NullableAzureKeyVaultPullLatestTask `json:"latest_task"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` // Allow the pull to create environments. Any automatically created environments will be children of the `default` environment. If an environment needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. CreateEnvironments *bool `json:"create_environments,omitempty"` // Allow the pull to create projects. If a project needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. @@ -38,7 +38,7 @@ type AzureKeyVaultPull struct { // When set to dry-run mode an action will report the changes that it would have made in task steps, however those changes are not actually performed. DryRun *bool `json:"dry_run,omitempty"` // Values being managed by a mapped pull. - MappedValues []Value `json:"mapped_values"` + MappedValues []ValueCreate `json:"mapped_values"` Mode ModeEnum `json:"mode"` // Defines a pattern matching string that contains either mustache or regular expression syntax (with named capture groups) that locate the environment, project, and parameter name of the content you are looking for. If you are using mustache pattern matching, use: - ``{{ environment }}`` to identify the environment name - ``{{ parameter }}`` to identify the parameter name - ``{{ project }}`` to identify the project name If you are using a regular expression, use Python syntax with named capture groups that locate the `environment`, `project`, and `parameter`. Resource NullableString `json:"resource"` @@ -48,7 +48,7 @@ type AzureKeyVaultPull struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAzureKeyVaultPull(url string, id string, name string, latestTask NullableAzureKeyVaultPullLatestTask, createdAt time.Time, modifiedAt time.Time, mappedValues []Value, mode ModeEnum, resource NullableString) *AzureKeyVaultPull { +func NewAzureKeyVaultPull(url string, id string, name string, latestTask NullableAzureKeyVaultPullLatestTask, createdAt time.Time, modifiedAt NullableTime, mappedValues []ValueCreate, mode ModeEnum, resource NullableString) *AzureKeyVaultPull { this := AzureKeyVaultPull{} this.Url = url this.Id = id @@ -225,27 +225,29 @@ func (o *AzureKeyVaultPull) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultPull) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultPull) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AzureKeyVaultPull) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetCreateEnvironments returns the CreateEnvironments field value if set, zero value otherwise. @@ -345,9 +347,9 @@ func (o *AzureKeyVaultPull) SetDryRun(v bool) { } // GetMappedValues returns the MappedValues field value -func (o *AzureKeyVaultPull) GetMappedValues() []Value { +func (o *AzureKeyVaultPull) GetMappedValues() []ValueCreate { if o == nil { - var ret []Value + var ret []ValueCreate return ret } @@ -356,7 +358,7 @@ func (o *AzureKeyVaultPull) GetMappedValues() []Value { // GetMappedValuesOk returns a tuple with the MappedValues field value // and a boolean to check if the value has been set. -func (o *AzureKeyVaultPull) GetMappedValuesOk() ([]Value, bool) { +func (o *AzureKeyVaultPull) GetMappedValuesOk() ([]ValueCreate, bool) { if o == nil { return nil, false } @@ -364,7 +366,7 @@ func (o *AzureKeyVaultPull) GetMappedValuesOk() ([]Value, bool) { } // SetMappedValues sets field value -func (o *AzureKeyVaultPull) SetMappedValues(v []Value) { +func (o *AzureKeyVaultPull) SetMappedValues(v []ValueCreate) { o.MappedValues = v } @@ -436,7 +438,7 @@ func (o AzureKeyVaultPull) ToMap() (map[string]interface{}, error) { } toSerialize["latest_task"] = o.LatestTask.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() if !IsNil(o.CreateEnvironments) { toSerialize["create_environments"] = o.CreateEnvironments } diff --git a/pkg/cloudtruthapi/model_azure_key_vault_pull_latest_task.go b/pkg/cloudtruthapi/model_azure_key_vault_pull_latest_task.go index 5fbfb7e..3029e92 100644 --- a/pkg/cloudtruthapi/model_azure_key_vault_pull_latest_task.go +++ b/pkg/cloudtruthapi/model_azure_key_vault_pull_latest_task.go @@ -34,14 +34,14 @@ type AzureKeyVaultPullLatestTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAzureKeyVaultPullLatestTask instantiates a new AzureKeyVaultPullLatestTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAzureKeyVaultPullLatestTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *AzureKeyVaultPullLatestTask { +func NewAzureKeyVaultPullLatestTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *AzureKeyVaultPullLatestTask { this := AzureKeyVaultPullLatestTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *AzureKeyVaultPullLatestTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultPullLatestTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultPullLatestTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AzureKeyVaultPullLatestTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AzureKeyVaultPullLatestTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o AzureKeyVaultPullLatestTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_azure_key_vault_pull_task.go b/pkg/cloudtruthapi/model_azure_key_vault_pull_task.go index 6ceff12..07f727b 100644 --- a/pkg/cloudtruthapi/model_azure_key_vault_pull_task.go +++ b/pkg/cloudtruthapi/model_azure_key_vault_pull_task.go @@ -34,14 +34,14 @@ type AzureKeyVaultPullTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAzureKeyVaultPullTask instantiates a new AzureKeyVaultPullTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAzureKeyVaultPullTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *AzureKeyVaultPullTask { +func NewAzureKeyVaultPullTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *AzureKeyVaultPullTask { this := AzureKeyVaultPullTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *AzureKeyVaultPullTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultPullTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultPullTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AzureKeyVaultPullTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AzureKeyVaultPullTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o AzureKeyVaultPullTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_azure_key_vault_pull_task_step.go b/pkg/cloudtruthapi/model_azure_key_vault_pull_task_step.go index d019008..4e777e6 100644 --- a/pkg/cloudtruthapi/model_azure_key_vault_pull_task_step.go +++ b/pkg/cloudtruthapi/model_azure_key_vault_pull_task_step.go @@ -60,14 +60,14 @@ type AzureKeyVaultPullTaskStep struct { // Details on the error that occurred during processing. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAzureKeyVaultPullTaskStep instantiates a new AzureKeyVaultPullTaskStep object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAzureKeyVaultPullTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt time.Time) *AzureKeyVaultPullTaskStep { +func NewAzureKeyVaultPullTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt NullableTime) *AzureKeyVaultPullTaskStep { this := AzureKeyVaultPullTaskStep{} this.Url = url this.Id = id @@ -851,27 +851,29 @@ func (o *AzureKeyVaultPullTaskStep) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultPullTaskStep) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultPullTaskStep) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AzureKeyVaultPullTaskStep) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AzureKeyVaultPullTaskStep) MarshalJSON() ([]byte, error) { @@ -933,7 +935,7 @@ func (o AzureKeyVaultPullTaskStep) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_azure_key_vault_push.go b/pkg/cloudtruthapi/model_azure_key_vault_push.go index bac1d71..ab58bf1 100644 --- a/pkg/cloudtruthapi/model_azure_key_vault_push.go +++ b/pkg/cloudtruthapi/model_azure_key_vault_push.go @@ -30,7 +30,7 @@ type AzureKeyVaultPush struct { Description *string `json:"description,omitempty"` LatestTask NullableAzureKeyVaultPushLatestTask `json:"latest_task"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` // This setting allows parameters (non-secrets) to be pushed to a destination that only supports storing secrets. This may increase your overall cost from the cloud provider as some cloud providers charge a premium for secrets-only storage. CoerceParameters *bool `json:"coerce_parameters,omitempty"` // Include parameters (non-secrets) in the values being pushed. This setting requires the destination to support parameters or for the `coerce_parameters` flag to be enabled, otherwise the push will fail. @@ -57,7 +57,7 @@ type AzureKeyVaultPush struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAzureKeyVaultPush(url string, id string, name string, latestTask NullableAzureKeyVaultPushLatestTask, createdAt time.Time, modifiedAt time.Time, projects []string, tags []string, resource NullableString) *AzureKeyVaultPush { +func NewAzureKeyVaultPush(url string, id string, name string, latestTask NullableAzureKeyVaultPushLatestTask, createdAt time.Time, modifiedAt NullableTime, projects []string, tags []string, resource NullableString) *AzureKeyVaultPush { this := AzureKeyVaultPush{} this.Url = url this.Id = id @@ -234,27 +234,29 @@ func (o *AzureKeyVaultPush) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultPush) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultPush) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AzureKeyVaultPush) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetCoerceParameters returns the CoerceParameters field value if set, zero value otherwise. @@ -573,7 +575,7 @@ func (o AzureKeyVaultPush) ToMap() (map[string]interface{}, error) { } toSerialize["latest_task"] = o.LatestTask.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() if !IsNil(o.CoerceParameters) { toSerialize["coerce_parameters"] = o.CoerceParameters } diff --git a/pkg/cloudtruthapi/model_azure_key_vault_push_latest_task.go b/pkg/cloudtruthapi/model_azure_key_vault_push_latest_task.go index f75515b..9e38e43 100644 --- a/pkg/cloudtruthapi/model_azure_key_vault_push_latest_task.go +++ b/pkg/cloudtruthapi/model_azure_key_vault_push_latest_task.go @@ -34,14 +34,14 @@ type AzureKeyVaultPushLatestTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAzureKeyVaultPushLatestTask instantiates a new AzureKeyVaultPushLatestTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAzureKeyVaultPushLatestTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *AzureKeyVaultPushLatestTask { +func NewAzureKeyVaultPushLatestTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *AzureKeyVaultPushLatestTask { this := AzureKeyVaultPushLatestTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *AzureKeyVaultPushLatestTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultPushLatestTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultPushLatestTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AzureKeyVaultPushLatestTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AzureKeyVaultPushLatestTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o AzureKeyVaultPushLatestTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_azure_key_vault_push_task.go b/pkg/cloudtruthapi/model_azure_key_vault_push_task.go index 85eef20..0828de9 100644 --- a/pkg/cloudtruthapi/model_azure_key_vault_push_task.go +++ b/pkg/cloudtruthapi/model_azure_key_vault_push_task.go @@ -34,14 +34,14 @@ type AzureKeyVaultPushTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAzureKeyVaultPushTask instantiates a new AzureKeyVaultPushTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAzureKeyVaultPushTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *AzureKeyVaultPushTask { +func NewAzureKeyVaultPushTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *AzureKeyVaultPushTask { this := AzureKeyVaultPushTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *AzureKeyVaultPushTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultPushTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultPushTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AzureKeyVaultPushTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AzureKeyVaultPushTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o AzureKeyVaultPushTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_azure_key_vault_push_task_step.go b/pkg/cloudtruthapi/model_azure_key_vault_push_task_step.go index 6d95f53..b831dea 100644 --- a/pkg/cloudtruthapi/model_azure_key_vault_push_task_step.go +++ b/pkg/cloudtruthapi/model_azure_key_vault_push_task_step.go @@ -60,14 +60,14 @@ type AzureKeyVaultPushTaskStep struct { // Details on the error that occurred during processing. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewAzureKeyVaultPushTaskStep instantiates a new AzureKeyVaultPushTaskStep object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAzureKeyVaultPushTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt time.Time) *AzureKeyVaultPushTaskStep { +func NewAzureKeyVaultPushTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt NullableTime) *AzureKeyVaultPushTaskStep { this := AzureKeyVaultPushTaskStep{} this.Url = url this.Id = id @@ -851,27 +851,29 @@ func (o *AzureKeyVaultPushTaskStep) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *AzureKeyVaultPushTaskStep) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AzureKeyVaultPushTaskStep) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *AzureKeyVaultPushTaskStep) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o AzureKeyVaultPushTaskStep) MarshalJSON() ([]byte, error) { @@ -933,7 +935,7 @@ func (o AzureKeyVaultPushTaskStep) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_backup_parameter_value_external.go b/pkg/cloudtruthapi/model_backup_parameter_value_external.go deleted file mode 100644 index f8f2d77..0000000 --- a/pkg/cloudtruthapi/model_backup_parameter_value_external.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" -) - -// BackupParameterValueExternal struct for BackupParameterValueExternal -type BackupParameterValueExternal struct { - Fqn string `json:"fqn"` - JmesPath NullableString `json:"jmes_path,omitempty"` -} - -// NewBackupParameterValueExternal instantiates a new BackupParameterValueExternal object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBackupParameterValueExternal(fqn string) *BackupParameterValueExternal { - this := BackupParameterValueExternal{} - this.Fqn = fqn - return &this -} - -// NewBackupParameterValueExternalWithDefaults instantiates a new BackupParameterValueExternal object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBackupParameterValueExternalWithDefaults() *BackupParameterValueExternal { - this := BackupParameterValueExternal{} - return &this -} - -// GetFqn returns the Fqn field value -func (o *BackupParameterValueExternal) GetFqn() string { - if o == nil { - var ret string - return ret - } - - return o.Fqn -} - -// GetFqnOk returns a tuple with the Fqn field value -// and a boolean to check if the value has been set. -func (o *BackupParameterValueExternal) GetFqnOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Fqn, true -} - -// SetFqn sets field value -func (o *BackupParameterValueExternal) SetFqn(v string) { - o.Fqn = v -} - -// GetJmesPath returns the JmesPath field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BackupParameterValueExternal) GetJmesPath() string { - if o == nil || o.JmesPath.Get() == nil { - var ret string - return ret - } - return *o.JmesPath.Get() -} - -// GetJmesPathOk returns a tuple with the JmesPath field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupParameterValueExternal) GetJmesPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.JmesPath.Get(), o.JmesPath.IsSet() -} - -// HasJmesPath returns a boolean if a field has been set. -func (o *BackupParameterValueExternal) HasJmesPath() bool { - if o != nil && o.JmesPath.IsSet() { - return true - } - - return false -} - -// SetJmesPath gets a reference to the given NullableString and assigns it to the JmesPath field. -func (o *BackupParameterValueExternal) SetJmesPath(v string) { - o.JmesPath.Set(&v) -} - -// SetJmesPathNil sets the value for JmesPath to be an explicit nil -func (o *BackupParameterValueExternal) SetJmesPathNil() { - o.JmesPath.Set(nil) -} - -// UnsetJmesPath ensures that no value is present for JmesPath, not even an explicit nil -func (o *BackupParameterValueExternal) UnsetJmesPath() { - o.JmesPath.Unset() -} - -func (o BackupParameterValueExternal) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["fqn"] = o.Fqn - } - if o.JmesPath.IsSet() { - toSerialize["jmes_path"] = o.JmesPath.Get() - } - return json.Marshal(toSerialize) -} - -type NullableBackupParameterValueExternal struct { - value *BackupParameterValueExternal - isSet bool -} - -func (v NullableBackupParameterValueExternal) Get() *BackupParameterValueExternal { - return v.value -} - -func (v *NullableBackupParameterValueExternal) Set(val *BackupParameterValueExternal) { - v.value = val - v.isSet = true -} - -func (v NullableBackupParameterValueExternal) IsSet() bool { - return v.isSet -} - -func (v *NullableBackupParameterValueExternal) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBackupParameterValueExternal(val *BackupParameterValueExternal) *NullableBackupParameterValueExternal { - return &NullableBackupParameterValueExternal{value: val, isSet: true} -} - -func (v NullableBackupParameterValueExternal) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBackupParameterValueExternal) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/cloudtruthapi/model_backup_parameter_values_value.go b/pkg/cloudtruthapi/model_backup_parameter_values_value.go deleted file mode 100644 index 2a887a1..0000000 --- a/pkg/cloudtruthapi/model_backup_parameter_values_value.go +++ /dev/null @@ -1,355 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" -) - -// BackupParameterValuesValue struct for BackupParameterValuesValue -type BackupParameterValuesValue struct { - External NullableBackupParameterValueExternal `json:"external"` - Environment string `json:"environment"` - Evaluated bool `json:"evaluated"` - Source NullableString `json:"source,omitempty"` - Project NullableString `json:"project,omitempty"` - Value NullableString `json:"value,omitempty"` - Raw NullableString `json:"raw,omitempty"` -} - -// NewBackupParameterValuesValue instantiates a new BackupParameterValuesValue object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBackupParameterValuesValue(external NullableBackupParameterValueExternal, environment string, evaluated bool) *BackupParameterValuesValue { - this := BackupParameterValuesValue{} - this.External = external - this.Environment = environment - this.Evaluated = evaluated - return &this -} - -// NewBackupParameterValuesValueWithDefaults instantiates a new BackupParameterValuesValue object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBackupParameterValuesValueWithDefaults() *BackupParameterValuesValue { - this := BackupParameterValuesValue{} - return &this -} - -// GetExternal returns the External field value -// If the value is explicit nil, the zero value for BackupParameterValueExternal will be returned -func (o *BackupParameterValuesValue) GetExternal() BackupParameterValueExternal { - if o == nil || o.External.Get() == nil { - var ret BackupParameterValueExternal - return ret - } - - return *o.External.Get() -} - -// GetExternalOk returns a tuple with the External field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupParameterValuesValue) GetExternalOk() (*BackupParameterValueExternal, bool) { - if o == nil { - return nil, false - } - return o.External.Get(), o.External.IsSet() -} - -// SetExternal sets field value -func (o *BackupParameterValuesValue) SetExternal(v BackupParameterValueExternal) { - o.External.Set(&v) -} - -// GetEnvironment returns the Environment field value -func (o *BackupParameterValuesValue) GetEnvironment() string { - if o == nil { - var ret string - return ret - } - - return o.Environment -} - -// GetEnvironmentOk returns a tuple with the Environment field value -// and a boolean to check if the value has been set. -func (o *BackupParameterValuesValue) GetEnvironmentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Environment, true -} - -// SetEnvironment sets field value -func (o *BackupParameterValuesValue) SetEnvironment(v string) { - o.Environment = v -} - -// GetEvaluated returns the Evaluated field value -func (o *BackupParameterValuesValue) GetEvaluated() bool { - if o == nil { - var ret bool - return ret - } - - return o.Evaluated -} - -// GetEvaluatedOk returns a tuple with the Evaluated field value -// and a boolean to check if the value has been set. -func (o *BackupParameterValuesValue) GetEvaluatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Evaluated, true -} - -// SetEvaluated sets field value -func (o *BackupParameterValuesValue) SetEvaluated(v bool) { - o.Evaluated = v -} - -// GetSource returns the Source field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BackupParameterValuesValue) GetSource() string { - if o == nil || o.Source.Get() == nil { - var ret string - return ret - } - return *o.Source.Get() -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupParameterValuesValue) GetSourceOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Source.Get(), o.Source.IsSet() -} - -// HasSource returns a boolean if a field has been set. -func (o *BackupParameterValuesValue) HasSource() bool { - if o != nil && o.Source.IsSet() { - return true - } - - return false -} - -// SetSource gets a reference to the given NullableString and assigns it to the Source field. -func (o *BackupParameterValuesValue) SetSource(v string) { - o.Source.Set(&v) -} - -// SetSourceNil sets the value for Source to be an explicit nil -func (o *BackupParameterValuesValue) SetSourceNil() { - o.Source.Set(nil) -} - -// UnsetSource ensures that no value is present for Source, not even an explicit nil -func (o *BackupParameterValuesValue) UnsetSource() { - o.Source.Unset() -} - -// GetProject returns the Project field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BackupParameterValuesValue) GetProject() string { - if o == nil || o.Project.Get() == nil { - var ret string - return ret - } - return *o.Project.Get() -} - -// GetProjectOk returns a tuple with the Project field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupParameterValuesValue) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project.Get(), o.Project.IsSet() -} - -// HasProject returns a boolean if a field has been set. -func (o *BackupParameterValuesValue) HasProject() bool { - if o != nil && o.Project.IsSet() { - return true - } - - return false -} - -// SetProject gets a reference to the given NullableString and assigns it to the Project field. -func (o *BackupParameterValuesValue) SetProject(v string) { - o.Project.Set(&v) -} - -// SetProjectNil sets the value for Project to be an explicit nil -func (o *BackupParameterValuesValue) SetProjectNil() { - o.Project.Set(nil) -} - -// UnsetProject ensures that no value is present for Project, not even an explicit nil -func (o *BackupParameterValuesValue) UnsetProject() { - o.Project.Unset() -} - -// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BackupParameterValuesValue) GetValue() string { - if o == nil || o.Value.Get() == nil { - var ret string - return ret - } - return *o.Value.Get() -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupParameterValuesValue) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Value.Get(), o.Value.IsSet() -} - -// HasValue returns a boolean if a field has been set. -func (o *BackupParameterValuesValue) HasValue() bool { - if o != nil && o.Value.IsSet() { - return true - } - - return false -} - -// SetValue gets a reference to the given NullableString and assigns it to the Value field. -func (o *BackupParameterValuesValue) SetValue(v string) { - o.Value.Set(&v) -} - -// SetValueNil sets the value for Value to be an explicit nil -func (o *BackupParameterValuesValue) SetValueNil() { - o.Value.Set(nil) -} - -// UnsetValue ensures that no value is present for Value, not even an explicit nil -func (o *BackupParameterValuesValue) UnsetValue() { - o.Value.Unset() -} - -// GetRaw returns the Raw field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BackupParameterValuesValue) GetRaw() string { - if o == nil || o.Raw.Get() == nil { - var ret string - return ret - } - return *o.Raw.Get() -} - -// GetRawOk returns a tuple with the Raw field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupParameterValuesValue) GetRawOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Raw.Get(), o.Raw.IsSet() -} - -// HasRaw returns a boolean if a field has been set. -func (o *BackupParameterValuesValue) HasRaw() bool { - if o != nil && o.Raw.IsSet() { - return true - } - - return false -} - -// SetRaw gets a reference to the given NullableString and assigns it to the Raw field. -func (o *BackupParameterValuesValue) SetRaw(v string) { - o.Raw.Set(&v) -} - -// SetRawNil sets the value for Raw to be an explicit nil -func (o *BackupParameterValuesValue) SetRawNil() { - o.Raw.Set(nil) -} - -// UnsetRaw ensures that no value is present for Raw, not even an explicit nil -func (o *BackupParameterValuesValue) UnsetRaw() { - o.Raw.Unset() -} - -func (o BackupParameterValuesValue) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["external"] = o.External.Get() - } - if true { - toSerialize["environment"] = o.Environment - } - if true { - toSerialize["evaluated"] = o.Evaluated - } - if o.Source.IsSet() { - toSerialize["source"] = o.Source.Get() - } - if o.Project.IsSet() { - toSerialize["project"] = o.Project.Get() - } - if o.Value.IsSet() { - toSerialize["value"] = o.Value.Get() - } - if o.Raw.IsSet() { - toSerialize["raw"] = o.Raw.Get() - } - return json.Marshal(toSerialize) -} - -type NullableBackupParameterValuesValue struct { - value *BackupParameterValuesValue - isSet bool -} - -func (v NullableBackupParameterValuesValue) Get() *BackupParameterValuesValue { - return v.value -} - -func (v *NullableBackupParameterValuesValue) Set(val *BackupParameterValuesValue) { - v.value = val - v.isSet = true -} - -func (v NullableBackupParameterValuesValue) IsSet() bool { - return v.isSet -} - -func (v *NullableBackupParameterValuesValue) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBackupParameterValuesValue(val *BackupParameterValuesValue) *NullableBackupParameterValuesValue { - return &NullableBackupParameterValuesValue{value: val, isSet: true} -} - -func (v NullableBackupParameterValuesValue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBackupParameterValuesValue) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/cloudtruthapi/model_discovery_result.go b/pkg/cloudtruthapi/model_discovery_result.go index 2091099..8faf343 100644 --- a/pkg/cloudtruthapi/model_discovery_result.go +++ b/pkg/cloudtruthapi/model_discovery_result.go @@ -20,7 +20,7 @@ var _ MappedNullable = &DiscoveryResult{} // DiscoveryResult struct for DiscoveryResult type DiscoveryResult struct { - Matched map[string]DiscoveredContent `json:"matched"` + Matched map[string][]DiscoveredContent `json:"matched"` Skipped map[string]string `json:"skipped"` } @@ -28,7 +28,7 @@ type DiscoveryResult struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDiscoveryResult(matched map[string]DiscoveredContent, skipped map[string]string) *DiscoveryResult { +func NewDiscoveryResult(matched map[string][]DiscoveredContent, skipped map[string]string) *DiscoveryResult { this := DiscoveryResult{} this.Matched = matched this.Skipped = skipped @@ -44,9 +44,9 @@ func NewDiscoveryResultWithDefaults() *DiscoveryResult { } // GetMatched returns the Matched field value -func (o *DiscoveryResult) GetMatched() map[string]DiscoveredContent { +func (o *DiscoveryResult) GetMatched() map[string][]DiscoveredContent { if o == nil { - var ret map[string]DiscoveredContent + var ret map[string][]DiscoveredContent return ret } @@ -55,7 +55,7 @@ func (o *DiscoveryResult) GetMatched() map[string]DiscoveredContent { // GetMatchedOk returns a tuple with the Matched field value // and a boolean to check if the value has been set. -func (o *DiscoveryResult) GetMatchedOk() (*map[string]DiscoveredContent, bool) { +func (o *DiscoveryResult) GetMatchedOk() (*map[string][]DiscoveredContent, bool) { if o == nil { return nil, false } @@ -63,7 +63,7 @@ func (o *DiscoveryResult) GetMatchedOk() (*map[string]DiscoveredContent, bool) { } // SetMatched sets field value -func (o *DiscoveryResult) SetMatched(v map[string]DiscoveredContent) { +func (o *DiscoveryResult) SetMatched(v map[string][]DiscoveredContent) { o.Matched = v } diff --git a/pkg/cloudtruthapi/model_environment.go b/pkg/cloudtruthapi/model_environment.go index 2e59c93..01fdbe3 100644 --- a/pkg/cloudtruthapi/model_environment.go +++ b/pkg/cloudtruthapi/model_environment.go @@ -21,33 +21,36 @@ var _ MappedNullable = &Environment{} // Environment struct for Environment type Environment struct { + // The URL for the environment. Url string `json:"url"` - // A unique identifier for the environment. Id string `json:"id"` + LedgerId string `json:"ledger_id"` // The environment name. Name string `json:"name"` // A description of the environment. You may find it helpful to document how this environment is used to assist others when they need to maintain software that uses this content. Description *string `json:"description,omitempty"` // Environments can inherit from a single parent environment which provides values for parameters when specific environments do not have a value set. Every organization has one default environment that cannot be removed. - Parent NullableString `json:"parent,omitempty"` + Parent NullableString `json:"parent"` // This is the opposite of `parent`, see that field for more details. Children []string `json:"children"` // Indicates if access control is being enforced through grants. AccessControlled *bool `json:"access_controlled,omitempty"` Role NullableRoleEnum `json:"role"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewEnvironment instantiates a new Environment object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewEnvironment(url string, id string, name string, children []string, role NullableRoleEnum, createdAt time.Time, modifiedAt time.Time) *Environment { +func NewEnvironment(url string, id string, ledgerId string, name string, parent NullableString, children []string, role NullableRoleEnum, createdAt time.Time, modifiedAt NullableTime) *Environment { this := Environment{} this.Url = url this.Id = id + this.LedgerId = ledgerId this.Name = name + this.Parent = parent this.Children = children this.Role = role this.CreatedAt = createdAt @@ -111,6 +114,30 @@ func (o *Environment) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *Environment) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *Environment) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *Environment) SetLedgerId(v string) { + o.LedgerId = v +} + // GetName returns the Name field value func (o *Environment) GetName() string { if o == nil { @@ -167,16 +194,18 @@ func (o *Environment) SetDescription(v string) { o.Description = &v } -// GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). +// GetParent returns the Parent field value +// If the value is explicit nil, the zero value for string will be returned func (o *Environment) GetParent() string { - if o == nil || IsNil(o.Parent.Get()) { + if o == nil || o.Parent.Get() == nil { var ret string return ret } + return *o.Parent.Get() } -// GetParentOk returns a tuple with the Parent field value if set, nil otherwise +// GetParentOk returns a tuple with the Parent field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Environment) GetParentOk() (*string, bool) { @@ -186,28 +215,10 @@ func (o *Environment) GetParentOk() (*string, bool) { return o.Parent.Get(), o.Parent.IsSet() } -// HasParent returns a boolean if a field has been set. -func (o *Environment) HasParent() bool { - if o != nil && o.Parent.IsSet() { - return true - } - - return false -} - -// SetParent gets a reference to the given NullableString and assigns it to the Parent field. +// SetParent sets field value func (o *Environment) SetParent(v string) { o.Parent.Set(&v) } -// SetParentNil sets the value for Parent to be an explicit nil -func (o *Environment) SetParentNil() { - o.Parent.Set(nil) -} - -// UnsetParent ensures that no value is present for Parent, not even an explicit nil -func (o *Environment) UnsetParent() { - o.Parent.Unset() -} // GetChildren returns the Children field value func (o *Environment) GetChildren() []string { @@ -316,27 +327,29 @@ func (o *Environment) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *Environment) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Environment) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *Environment) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o Environment) MarshalJSON() ([]byte, error) { @@ -351,20 +364,19 @@ func (o Environment) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId toSerialize["name"] = o.Name if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.Parent.IsSet() { - toSerialize["parent"] = o.Parent.Get() - } + toSerialize["parent"] = o.Parent.Get() toSerialize["children"] = o.Children if !IsNil(o.AccessControlled) { toSerialize["access_controlled"] = o.AccessControlled } toSerialize["role"] = o.Role.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_environment_copy.go b/pkg/cloudtruthapi/model_environment_copy.go new file mode 100644 index 0000000..ee65ca2 --- /dev/null +++ b/pkg/cloudtruthapi/model_environment_copy.go @@ -0,0 +1,231 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" +) + +// checks if the EnvironmentCopy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentCopy{} + +// EnvironmentCopy struct for EnvironmentCopy +type EnvironmentCopy struct { + // The environment name. + Name string `json:"name"` + // A description of the environment. You may find it helpful to document how this environment is used to assist others when they need to maintain software that uses this content. + Description *string `json:"description,omitempty"` + // When copying child Environments, this indicates what name to use for each Environment. If no name is provided for a given child Environment, a \"-1\" will be appended to its name. Note that this name mapping can be used for Environments of any level of depth in the parent-child hierarchy. + ChildEnvironmentNames map[string]string `json:"child_environment_names,omitempty"` + // If true, copy child environments recursively. If false, only copy the specified project. + Recursive *bool `json:"recursive,omitempty"` +} + +// NewEnvironmentCopy instantiates a new EnvironmentCopy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentCopy(name string) *EnvironmentCopy { + this := EnvironmentCopy{} + this.Name = name + return &this +} + +// NewEnvironmentCopyWithDefaults instantiates a new EnvironmentCopy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentCopyWithDefaults() *EnvironmentCopy { + this := EnvironmentCopy{} + return &this +} + +// GetName returns the Name field value +func (o *EnvironmentCopy) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EnvironmentCopy) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EnvironmentCopy) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *EnvironmentCopy) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentCopy) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *EnvironmentCopy) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *EnvironmentCopy) SetDescription(v string) { + o.Description = &v +} + +// GetChildEnvironmentNames returns the ChildEnvironmentNames field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentCopy) GetChildEnvironmentNames() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + return o.ChildEnvironmentNames +} + +// GetChildEnvironmentNamesOk returns a tuple with the ChildEnvironmentNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentCopy) GetChildEnvironmentNamesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.ChildEnvironmentNames) { + return nil, false + } + return &o.ChildEnvironmentNames, true +} + +// HasChildEnvironmentNames returns a boolean if a field has been set. +func (o *EnvironmentCopy) HasChildEnvironmentNames() bool { + if o != nil && IsNil(o.ChildEnvironmentNames) { + return true + } + + return false +} + +// SetChildEnvironmentNames gets a reference to the given map[string]string and assigns it to the ChildEnvironmentNames field. +func (o *EnvironmentCopy) SetChildEnvironmentNames(v map[string]string) { + o.ChildEnvironmentNames = v +} + +// GetRecursive returns the Recursive field value if set, zero value otherwise. +func (o *EnvironmentCopy) GetRecursive() bool { + if o == nil || IsNil(o.Recursive) { + var ret bool + return ret + } + return *o.Recursive +} + +// GetRecursiveOk returns a tuple with the Recursive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentCopy) GetRecursiveOk() (*bool, bool) { + if o == nil || IsNil(o.Recursive) { + return nil, false + } + return o.Recursive, true +} + +// HasRecursive returns a boolean if a field has been set. +func (o *EnvironmentCopy) HasRecursive() bool { + if o != nil && !IsNil(o.Recursive) { + return true + } + + return false +} + +// SetRecursive gets a reference to the given bool and assigns it to the Recursive field. +func (o *EnvironmentCopy) SetRecursive(v bool) { + o.Recursive = &v +} + +func (o EnvironmentCopy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentCopy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if o.ChildEnvironmentNames != nil { + toSerialize["child_environment_names"] = o.ChildEnvironmentNames + } + if !IsNil(o.Recursive) { + toSerialize["recursive"] = o.Recursive + } + return toSerialize, nil +} + +type NullableEnvironmentCopy struct { + value *EnvironmentCopy + isSet bool +} + +func (v NullableEnvironmentCopy) Get() *EnvironmentCopy { + return v.value +} + +func (v *NullableEnvironmentCopy) Set(val *EnvironmentCopy) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentCopy) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentCopy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentCopy(val *EnvironmentCopy) *NullableEnvironmentCopy { + return &NullableEnvironmentCopy{value: val, isSet: true} +} + +func (v NullableEnvironmentCopy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentCopy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_environment_update.go b/pkg/cloudtruthapi/model_environment_update.go new file mode 100644 index 0000000..d46c103 --- /dev/null +++ b/pkg/cloudtruthapi/model_environment_update.go @@ -0,0 +1,381 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the EnvironmentUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnvironmentUpdate{} + +// EnvironmentUpdate struct for EnvironmentUpdate +type EnvironmentUpdate struct { + Id string `json:"id"` + // The environment name. + Name string `json:"name"` + // A description of the environment. You may find it helpful to document how this environment is used to assist others when they need to maintain software that uses this content. + Description *string `json:"description,omitempty"` + // Environments can inherit from a single parent environment which provides values for parameters when specific environments do not have a value set. Every organization has one default environment that cannot be removed. + Parent NullableString `json:"parent,omitempty"` + // This is the opposite of `parent`, see that field for more details. + Children []string `json:"children"` + // Indicates if access control is being enforced through grants. + AccessControlled *bool `json:"access_controlled,omitempty"` + Role NullableRoleEnum `json:"role"` + CreatedAt time.Time `json:"created_at"` + ModifiedAt NullableTime `json:"modified_at"` +} + +// NewEnvironmentUpdate instantiates a new EnvironmentUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnvironmentUpdate(id string, name string, children []string, role NullableRoleEnum, createdAt time.Time, modifiedAt NullableTime) *EnvironmentUpdate { + this := EnvironmentUpdate{} + this.Id = id + this.Name = name + this.Children = children + this.Role = role + this.CreatedAt = createdAt + this.ModifiedAt = modifiedAt + return &this +} + +// NewEnvironmentUpdateWithDefaults instantiates a new EnvironmentUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnvironmentUpdateWithDefaults() *EnvironmentUpdate { + this := EnvironmentUpdate{} + return &this +} + +// GetId returns the Id field value +func (o *EnvironmentUpdate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EnvironmentUpdate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EnvironmentUpdate) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *EnvironmentUpdate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EnvironmentUpdate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EnvironmentUpdate) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *EnvironmentUpdate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentUpdate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *EnvironmentUpdate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *EnvironmentUpdate) SetDescription(v string) { + o.Description = &v +} + +// GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnvironmentUpdate) GetParent() string { + if o == nil || IsNil(o.Parent.Get()) { + var ret string + return ret + } + return *o.Parent.Get() +} + +// GetParentOk returns a tuple with the Parent field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentUpdate) GetParentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Parent.Get(), o.Parent.IsSet() +} + +// HasParent returns a boolean if a field has been set. +func (o *EnvironmentUpdate) HasParent() bool { + if o != nil && o.Parent.IsSet() { + return true + } + + return false +} + +// SetParent gets a reference to the given NullableString and assigns it to the Parent field. +func (o *EnvironmentUpdate) SetParent(v string) { + o.Parent.Set(&v) +} +// SetParentNil sets the value for Parent to be an explicit nil +func (o *EnvironmentUpdate) SetParentNil() { + o.Parent.Set(nil) +} + +// UnsetParent ensures that no value is present for Parent, not even an explicit nil +func (o *EnvironmentUpdate) UnsetParent() { + o.Parent.Unset() +} + +// GetChildren returns the Children field value +func (o *EnvironmentUpdate) GetChildren() []string { + if o == nil { + var ret []string + return ret + } + + return o.Children +} + +// GetChildrenOk returns a tuple with the Children field value +// and a boolean to check if the value has been set. +func (o *EnvironmentUpdate) GetChildrenOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Children, true +} + +// SetChildren sets field value +func (o *EnvironmentUpdate) SetChildren(v []string) { + o.Children = v +} + +// GetAccessControlled returns the AccessControlled field value if set, zero value otherwise. +func (o *EnvironmentUpdate) GetAccessControlled() bool { + if o == nil || IsNil(o.AccessControlled) { + var ret bool + return ret + } + return *o.AccessControlled +} + +// GetAccessControlledOk returns a tuple with the AccessControlled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnvironmentUpdate) GetAccessControlledOk() (*bool, bool) { + if o == nil || IsNil(o.AccessControlled) { + return nil, false + } + return o.AccessControlled, true +} + +// HasAccessControlled returns a boolean if a field has been set. +func (o *EnvironmentUpdate) HasAccessControlled() bool { + if o != nil && !IsNil(o.AccessControlled) { + return true + } + + return false +} + +// SetAccessControlled gets a reference to the given bool and assigns it to the AccessControlled field. +func (o *EnvironmentUpdate) SetAccessControlled(v bool) { + o.AccessControlled = &v +} + +// GetRole returns the Role field value +// If the value is explicit nil, the zero value for RoleEnum will be returned +func (o *EnvironmentUpdate) GetRole() RoleEnum { + if o == nil || o.Role.Get() == nil { + var ret RoleEnum + return ret + } + + return *o.Role.Get() +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentUpdate) GetRoleOk() (*RoleEnum, bool) { + if o == nil { + return nil, false + } + return o.Role.Get(), o.Role.IsSet() +} + +// SetRole sets field value +func (o *EnvironmentUpdate) SetRole(v RoleEnum) { + o.Role.Set(&v) +} + +// GetCreatedAt returns the CreatedAt field value +func (o *EnvironmentUpdate) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *EnvironmentUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *EnvironmentUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *EnvironmentUpdate) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// SetModifiedAt sets field value +func (o *EnvironmentUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} + +func (o EnvironmentUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnvironmentUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if o.Parent.IsSet() { + toSerialize["parent"] = o.Parent.Get() + } + toSerialize["children"] = o.Children + if !IsNil(o.AccessControlled) { + toSerialize["access_controlled"] = o.AccessControlled + } + toSerialize["role"] = o.Role.Get() + toSerialize["created_at"] = o.CreatedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() + return toSerialize, nil +} + +type NullableEnvironmentUpdate struct { + value *EnvironmentUpdate + isSet bool +} + +func (v NullableEnvironmentUpdate) Get() *EnvironmentUpdate { + return v.value +} + +func (v *NullableEnvironmentUpdate) Set(val *EnvironmentUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableEnvironmentUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvironmentUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvironmentUpdate(val *EnvironmentUpdate) *NullableEnvironmentUpdate { + return &NullableEnvironmentUpdate{value: val, isSet: true} +} + +func (v NullableEnvironmentUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvironmentUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_features_response.go b/pkg/cloudtruthapi/model_features_response.go new file mode 100644 index 0000000..6a517bc --- /dev/null +++ b/pkg/cloudtruthapi/model_features_response.go @@ -0,0 +1,199 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" +) + +// checks if the FeaturesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeaturesResponse{} + +// FeaturesResponse struct for FeaturesResponse +type FeaturesResponse struct { + SelfHosted bool `json:"self_hosted"` + AwsIntegration bool `json:"aws_integration"` + AzureIntegration bool `json:"azure_integration"` + GithubIntegration bool `json:"github_integration"` +} + +// NewFeaturesResponse instantiates a new FeaturesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeaturesResponse(selfHosted bool, awsIntegration bool, azureIntegration bool, githubIntegration bool) *FeaturesResponse { + this := FeaturesResponse{} + this.SelfHosted = selfHosted + this.AwsIntegration = awsIntegration + this.AzureIntegration = azureIntegration + this.GithubIntegration = githubIntegration + return &this +} + +// NewFeaturesResponseWithDefaults instantiates a new FeaturesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeaturesResponseWithDefaults() *FeaturesResponse { + this := FeaturesResponse{} + return &this +} + +// GetSelfHosted returns the SelfHosted field value +func (o *FeaturesResponse) GetSelfHosted() bool { + if o == nil { + var ret bool + return ret + } + + return o.SelfHosted +} + +// GetSelfHostedOk returns a tuple with the SelfHosted field value +// and a boolean to check if the value has been set. +func (o *FeaturesResponse) GetSelfHostedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.SelfHosted, true +} + +// SetSelfHosted sets field value +func (o *FeaturesResponse) SetSelfHosted(v bool) { + o.SelfHosted = v +} + +// GetAwsIntegration returns the AwsIntegration field value +func (o *FeaturesResponse) GetAwsIntegration() bool { + if o == nil { + var ret bool + return ret + } + + return o.AwsIntegration +} + +// GetAwsIntegrationOk returns a tuple with the AwsIntegration field value +// and a boolean to check if the value has been set. +func (o *FeaturesResponse) GetAwsIntegrationOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AwsIntegration, true +} + +// SetAwsIntegration sets field value +func (o *FeaturesResponse) SetAwsIntegration(v bool) { + o.AwsIntegration = v +} + +// GetAzureIntegration returns the AzureIntegration field value +func (o *FeaturesResponse) GetAzureIntegration() bool { + if o == nil { + var ret bool + return ret + } + + return o.AzureIntegration +} + +// GetAzureIntegrationOk returns a tuple with the AzureIntegration field value +// and a boolean to check if the value has been set. +func (o *FeaturesResponse) GetAzureIntegrationOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AzureIntegration, true +} + +// SetAzureIntegration sets field value +func (o *FeaturesResponse) SetAzureIntegration(v bool) { + o.AzureIntegration = v +} + +// GetGithubIntegration returns the GithubIntegration field value +func (o *FeaturesResponse) GetGithubIntegration() bool { + if o == nil { + var ret bool + return ret + } + + return o.GithubIntegration +} + +// GetGithubIntegrationOk returns a tuple with the GithubIntegration field value +// and a boolean to check if the value has been set. +func (o *FeaturesResponse) GetGithubIntegrationOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.GithubIntegration, true +} + +// SetGithubIntegration sets field value +func (o *FeaturesResponse) SetGithubIntegration(v bool) { + o.GithubIntegration = v +} + +func (o FeaturesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeaturesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["self_hosted"] = o.SelfHosted + toSerialize["aws_integration"] = o.AwsIntegration + toSerialize["azure_integration"] = o.AzureIntegration + toSerialize["github_integration"] = o.GithubIntegration + return toSerialize, nil +} + +type NullableFeaturesResponse struct { + value *FeaturesResponse + isSet bool +} + +func (v NullableFeaturesResponse) Get() *FeaturesResponse { + return v.value +} + +func (v *NullableFeaturesResponse) Set(val *FeaturesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFeaturesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFeaturesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeaturesResponse(val *FeaturesResponse) *NullableFeaturesResponse { + return &NullableFeaturesResponse{value: val, isSet: true} +} + +func (v NullableFeaturesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeaturesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_git_hub_integration.go b/pkg/cloudtruthapi/model_git_hub_integration.go index 66888ec..3d88c9c 100644 --- a/pkg/cloudtruthapi/model_git_hub_integration.go +++ b/pkg/cloudtruthapi/model_git_hub_integration.go @@ -31,9 +31,9 @@ type GitHubIntegration struct { // If an error occurs, more details will be available in this field. StatusDetail string `json:"status_detail"` // The last time the status was evaluated. - StatusLastCheckedAt time.Time `json:"status_last_checked_at"` + StatusLastCheckedAt NullableTime `json:"status_last_checked_at"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` Fqn string `json:"fqn"` // The type of integration. Type string `json:"type"` @@ -47,7 +47,7 @@ type GitHubIntegration struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGitHubIntegration(url string, id string, name string, status StatusEnum, statusDetail string, statusLastCheckedAt time.Time, createdAt time.Time, modifiedAt time.Time, fqn string, type_ string, ghInstallationId int32, ghOrganizationSlug string) *GitHubIntegration { +func NewGitHubIntegration(url string, id string, name string, status StatusEnum, statusDetail string, statusLastCheckedAt NullableTime, createdAt time.Time, modifiedAt NullableTime, fqn string, type_ string, ghInstallationId int32, ghOrganizationSlug string) *GitHubIntegration { this := GitHubIntegration{} this.Url = url this.Id = id @@ -225,27 +225,29 @@ func (o *GitHubIntegration) SetStatusDetail(v string) { } // GetStatusLastCheckedAt returns the StatusLastCheckedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *GitHubIntegration) GetStatusLastCheckedAt() time.Time { - if o == nil { + if o == nil || o.StatusLastCheckedAt.Get() == nil { var ret time.Time return ret } - return o.StatusLastCheckedAt + return *o.StatusLastCheckedAt.Get() } // GetStatusLastCheckedAtOk returns a tuple with the StatusLastCheckedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GitHubIntegration) GetStatusLastCheckedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.StatusLastCheckedAt, true + return o.StatusLastCheckedAt.Get(), o.StatusLastCheckedAt.IsSet() } // SetStatusLastCheckedAt sets field value func (o *GitHubIntegration) SetStatusLastCheckedAt(v time.Time) { - o.StatusLastCheckedAt = v + o.StatusLastCheckedAt.Set(&v) } // GetCreatedAt returns the CreatedAt field value @@ -273,27 +275,29 @@ func (o *GitHubIntegration) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *GitHubIntegration) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GitHubIntegration) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *GitHubIntegration) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetFqn returns the Fqn field value @@ -442,9 +446,9 @@ func (o GitHubIntegration) ToMap() (map[string]interface{}, error) { } toSerialize["status"] = o.Status toSerialize["status_detail"] = o.StatusDetail - toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt + toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() toSerialize["fqn"] = o.Fqn toSerialize["type"] = o.Type if !IsNil(o.Writable) { diff --git a/pkg/cloudtruthapi/model_git_hub_pull.go b/pkg/cloudtruthapi/model_git_hub_pull.go index e0ab3b5..c9771da 100644 --- a/pkg/cloudtruthapi/model_git_hub_pull.go +++ b/pkg/cloudtruthapi/model_git_hub_pull.go @@ -30,7 +30,7 @@ type GitHubPull struct { Description *string `json:"description,omitempty"` LatestTask NullableGitHubPullLatestTask `json:"latest_task"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` // Allow the pull to create environments. Any automatically created environments will be children of the `default` environment. If an environment needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. CreateEnvironments *bool `json:"create_environments,omitempty"` // Allow the pull to create projects. If a project needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. @@ -38,7 +38,7 @@ type GitHubPull struct { // When set to dry-run mode an action will report the changes that it would have made in task steps, however those changes are not actually performed. DryRun *bool `json:"dry_run,omitempty"` // Values being managed by a mapped pull. - MappedValues []Value `json:"mapped_values"` + MappedValues []ValueCreate `json:"mapped_values"` Mode ModeEnum `json:"mode"` } @@ -46,7 +46,7 @@ type GitHubPull struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGitHubPull(url string, id string, name string, latestTask NullableGitHubPullLatestTask, createdAt time.Time, modifiedAt time.Time, mappedValues []Value, mode ModeEnum) *GitHubPull { +func NewGitHubPull(url string, id string, name string, latestTask NullableGitHubPullLatestTask, createdAt time.Time, modifiedAt NullableTime, mappedValues []ValueCreate, mode ModeEnum) *GitHubPull { this := GitHubPull{} this.Url = url this.Id = id @@ -222,27 +222,29 @@ func (o *GitHubPull) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *GitHubPull) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GitHubPull) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *GitHubPull) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetCreateEnvironments returns the CreateEnvironments field value if set, zero value otherwise. @@ -342,9 +344,9 @@ func (o *GitHubPull) SetDryRun(v bool) { } // GetMappedValues returns the MappedValues field value -func (o *GitHubPull) GetMappedValues() []Value { +func (o *GitHubPull) GetMappedValues() []ValueCreate { if o == nil { - var ret []Value + var ret []ValueCreate return ret } @@ -353,7 +355,7 @@ func (o *GitHubPull) GetMappedValues() []Value { // GetMappedValuesOk returns a tuple with the MappedValues field value // and a boolean to check if the value has been set. -func (o *GitHubPull) GetMappedValuesOk() ([]Value, bool) { +func (o *GitHubPull) GetMappedValuesOk() ([]ValueCreate, bool) { if o == nil { return nil, false } @@ -361,7 +363,7 @@ func (o *GitHubPull) GetMappedValuesOk() ([]Value, bool) { } // SetMappedValues sets field value -func (o *GitHubPull) SetMappedValues(v []Value) { +func (o *GitHubPull) SetMappedValues(v []ValueCreate) { o.MappedValues = v } @@ -407,7 +409,7 @@ func (o GitHubPull) ToMap() (map[string]interface{}, error) { } toSerialize["latest_task"] = o.LatestTask.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() if !IsNil(o.CreateEnvironments) { toSerialize["create_environments"] = o.CreateEnvironments } diff --git a/pkg/cloudtruthapi/model_git_hub_pull_latest_task.go b/pkg/cloudtruthapi/model_git_hub_pull_latest_task.go index 4fc5c21..aa9ca53 100644 --- a/pkg/cloudtruthapi/model_git_hub_pull_latest_task.go +++ b/pkg/cloudtruthapi/model_git_hub_pull_latest_task.go @@ -34,14 +34,14 @@ type GitHubPullLatestTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewGitHubPullLatestTask instantiates a new GitHubPullLatestTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGitHubPullLatestTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *GitHubPullLatestTask { +func NewGitHubPullLatestTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *GitHubPullLatestTask { this := GitHubPullLatestTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *GitHubPullLatestTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *GitHubPullLatestTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GitHubPullLatestTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *GitHubPullLatestTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o GitHubPullLatestTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o GitHubPullLatestTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_git_hub_pull_task.go b/pkg/cloudtruthapi/model_git_hub_pull_task.go index 955c23a..3244f57 100644 --- a/pkg/cloudtruthapi/model_git_hub_pull_task.go +++ b/pkg/cloudtruthapi/model_git_hub_pull_task.go @@ -34,14 +34,14 @@ type GitHubPullTask struct { // If an error occurs early during processing, before attempting to process values, this detail may be helpful in determining the problem. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewGitHubPullTask instantiates a new GitHubPullTask object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGitHubPullTask(url string, id string, createdAt time.Time, modifiedAt time.Time) *GitHubPullTask { +func NewGitHubPullTask(url string, id string, createdAt time.Time, modifiedAt NullableTime) *GitHubPullTask { this := GitHubPullTask{} this.Url = url this.Id = id @@ -321,27 +321,29 @@ func (o *GitHubPullTask) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *GitHubPullTask) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GitHubPullTask) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *GitHubPullTask) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o GitHubPullTask) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o GitHubPullTask) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_git_hub_pull_task_step.go b/pkg/cloudtruthapi/model_git_hub_pull_task_step.go index 7561e47..b716f9a 100644 --- a/pkg/cloudtruthapi/model_git_hub_pull_task_step.go +++ b/pkg/cloudtruthapi/model_git_hub_pull_task_step.go @@ -60,14 +60,14 @@ type GitHubPullTaskStep struct { // Details on the error that occurred during processing. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewGitHubPullTaskStep instantiates a new GitHubPullTaskStep object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGitHubPullTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt time.Time) *GitHubPullTaskStep { +func NewGitHubPullTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt NullableTime) *GitHubPullTaskStep { this := GitHubPullTaskStep{} this.Url = url this.Id = id @@ -851,27 +851,29 @@ func (o *GitHubPullTaskStep) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *GitHubPullTaskStep) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GitHubPullTaskStep) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *GitHubPullTaskStep) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o GitHubPullTaskStep) MarshalJSON() ([]byte, error) { @@ -933,7 +935,7 @@ func (o GitHubPullTaskStep) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_grant.go b/pkg/cloudtruthapi/model_grant.go index d13af46..b69834f 100644 --- a/pkg/cloudtruthapi/model_grant.go +++ b/pkg/cloudtruthapi/model_grant.go @@ -30,14 +30,14 @@ type Grant struct { Scope string `json:"scope"` Role RoleEnum `json:"role"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewGrant instantiates a new Grant object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGrant(url string, id string, principal string, scope string, role RoleEnum, createdAt time.Time, modifiedAt time.Time) *Grant { +func NewGrant(url string, id string, principal string, scope string, role RoleEnum, createdAt time.Time, modifiedAt NullableTime) *Grant { this := Grant{} this.Url = url this.Id = id @@ -202,27 +202,29 @@ func (o *Grant) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *Grant) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Grant) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *Grant) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o Grant) MarshalJSON() ([]byte, error) { @@ -241,7 +243,7 @@ func (o Grant) ToMap() (map[string]interface{}, error) { toSerialize["scope"] = o.Scope toSerialize["role"] = o.Role toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_group.go b/pkg/cloudtruthapi/model_group.go index 01d5e62..1c15e58 100644 --- a/pkg/cloudtruthapi/model_group.go +++ b/pkg/cloudtruthapi/model_group.go @@ -30,14 +30,14 @@ type Group struct { Description *string `json:"description,omitempty"` Users []string `json:"users"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewGroup instantiates a new Group object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGroup(url string, id string, name string, users []string, createdAt time.Time, modifiedAt time.Time) *Group { +func NewGroup(url string, id string, name string, users []string, createdAt time.Time, modifiedAt NullableTime) *Group { this := Group{} this.Url = url this.Id = id @@ -209,27 +209,29 @@ func (o *Group) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *Group) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Group) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *Group) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o Group) MarshalJSON() ([]byte, error) { @@ -250,7 +252,7 @@ func (o Group) ToMap() (map[string]interface{}, error) { } toSerialize["users"] = o.Users toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_membership.go b/pkg/cloudtruthapi/model_membership.go index 4262486..f42c7e6 100644 --- a/pkg/cloudtruthapi/model_membership.go +++ b/pkg/cloudtruthapi/model_membership.go @@ -30,14 +30,14 @@ type Membership struct { Organization string `json:"organization"` Role RoleEnum `json:"role"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewMembership instantiates a new Membership object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewMembership(url string, id string, user string, organization string, role RoleEnum, createdAt time.Time, modifiedAt time.Time) *Membership { +func NewMembership(url string, id string, user string, organization string, role RoleEnum, createdAt time.Time, modifiedAt NullableTime) *Membership { this := Membership{} this.Url = url this.Id = id @@ -202,27 +202,29 @@ func (o *Membership) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *Membership) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Membership) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *Membership) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o Membership) MarshalJSON() ([]byte, error) { @@ -241,7 +243,7 @@ func (o Membership) ToMap() (map[string]interface{}, error) { toSerialize["organization"] = o.Organization toSerialize["role"] = o.Role toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_organization.go b/pkg/cloudtruthapi/model_organization.go index 07b5539..bd2cdfb 100644 --- a/pkg/cloudtruthapi/model_organization.go +++ b/pkg/cloudtruthapi/model_organization.go @@ -26,6 +26,13 @@ type Organization struct { Id string `json:"id"` // The organization name. Name string `json:"name"` + // A regular expression project names must match + ProjectNamePattern *string `json:"project_name_pattern,omitempty"` + // If set, we are performing maintenance on this organization and have disabled making changes + Maintenance bool `json:"maintenance"` + // Multi-factor authentication for the organization + MfaEnabled *bool `json:"mfa_enabled,omitempty"` + Version VersionEnum `json:"version"` // Indicates if this Organization is the one currently targeted by the Bearer token used by the client to authorize. Current bool `json:"current"` Role RoleEnum `json:"role"` @@ -35,18 +42,20 @@ type Organization struct { SubscriptionPlanId NullableString `json:"subscription_plan_id"` SubscriptionPlanName NullableString `json:"subscription_plan_name"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewOrganization instantiates a new Organization object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewOrganization(url string, id string, name string, current bool, role RoleEnum, subscriptionExpiresAt NullableTime, subscriptionFeatures []string, subscriptionId NullableString, subscriptionPlanId NullableString, subscriptionPlanName NullableString, createdAt time.Time, modifiedAt time.Time) *Organization { +func NewOrganization(url string, id string, name string, maintenance bool, version VersionEnum, current bool, role RoleEnum, subscriptionExpiresAt NullableTime, subscriptionFeatures []string, subscriptionId NullableString, subscriptionPlanId NullableString, subscriptionPlanName NullableString, createdAt time.Time, modifiedAt NullableTime) *Organization { this := Organization{} this.Url = url this.Id = id this.Name = name + this.Maintenance = maintenance + this.Version = version this.Current = current this.Role = role this.SubscriptionExpiresAt = subscriptionExpiresAt @@ -139,6 +148,118 @@ func (o *Organization) SetName(v string) { o.Name = v } +// GetProjectNamePattern returns the ProjectNamePattern field value if set, zero value otherwise. +func (o *Organization) GetProjectNamePattern() string { + if o == nil || IsNil(o.ProjectNamePattern) { + var ret string + return ret + } + return *o.ProjectNamePattern +} + +// GetProjectNamePatternOk returns a tuple with the ProjectNamePattern field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetProjectNamePatternOk() (*string, bool) { + if o == nil || IsNil(o.ProjectNamePattern) { + return nil, false + } + return o.ProjectNamePattern, true +} + +// HasProjectNamePattern returns a boolean if a field has been set. +func (o *Organization) HasProjectNamePattern() bool { + if o != nil && !IsNil(o.ProjectNamePattern) { + return true + } + + return false +} + +// SetProjectNamePattern gets a reference to the given string and assigns it to the ProjectNamePattern field. +func (o *Organization) SetProjectNamePattern(v string) { + o.ProjectNamePattern = &v +} + +// GetMaintenance returns the Maintenance field value +func (o *Organization) GetMaintenance() bool { + if o == nil { + var ret bool + return ret + } + + return o.Maintenance +} + +// GetMaintenanceOk returns a tuple with the Maintenance field value +// and a boolean to check if the value has been set. +func (o *Organization) GetMaintenanceOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Maintenance, true +} + +// SetMaintenance sets field value +func (o *Organization) SetMaintenance(v bool) { + o.Maintenance = v +} + +// GetMfaEnabled returns the MfaEnabled field value if set, zero value otherwise. +func (o *Organization) GetMfaEnabled() bool { + if o == nil || IsNil(o.MfaEnabled) { + var ret bool + return ret + } + return *o.MfaEnabled +} + +// GetMfaEnabledOk returns a tuple with the MfaEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetMfaEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.MfaEnabled) { + return nil, false + } + return o.MfaEnabled, true +} + +// HasMfaEnabled returns a boolean if a field has been set. +func (o *Organization) HasMfaEnabled() bool { + if o != nil && !IsNil(o.MfaEnabled) { + return true + } + + return false +} + +// SetMfaEnabled gets a reference to the given bool and assigns it to the MfaEnabled field. +func (o *Organization) SetMfaEnabled(v bool) { + o.MfaEnabled = &v +} + +// GetVersion returns the Version field value +func (o *Organization) GetVersion() VersionEnum { + if o == nil { + var ret VersionEnum + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Organization) GetVersionOk() (*VersionEnum, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *Organization) SetVersion(v VersionEnum) { + o.Version = v +} + // GetCurrent returns the Current field value func (o *Organization) GetCurrent() bool { if o == nil { @@ -340,27 +461,29 @@ func (o *Organization) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *Organization) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Organization) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *Organization) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o Organization) MarshalJSON() ([]byte, error) { @@ -376,6 +499,14 @@ func (o Organization) ToMap() (map[string]interface{}, error) { toSerialize["url"] = o.Url toSerialize["id"] = o.Id toSerialize["name"] = o.Name + if !IsNil(o.ProjectNamePattern) { + toSerialize["project_name_pattern"] = o.ProjectNamePattern + } + toSerialize["maintenance"] = o.Maintenance + if !IsNil(o.MfaEnabled) { + toSerialize["mfa_enabled"] = o.MfaEnabled + } + toSerialize["version"] = o.Version toSerialize["current"] = o.Current toSerialize["role"] = o.Role toSerialize["subscription_expires_at"] = o.SubscriptionExpiresAt.Get() @@ -384,7 +515,7 @@ func (o Organization) ToMap() (map[string]interface{}, error) { toSerialize["subscription_plan_id"] = o.SubscriptionPlanId.Get() toSerialize["subscription_plan_name"] = o.SubscriptionPlanName.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_organization_create.go b/pkg/cloudtruthapi/model_organization_create.go index 27778df..bab308d 100644 --- a/pkg/cloudtruthapi/model_organization_create.go +++ b/pkg/cloudtruthapi/model_organization_create.go @@ -22,6 +22,8 @@ var _ MappedNullable = &OrganizationCreate{} type OrganizationCreate struct { // The organization name. Name string `json:"name"` + // Multi-factor authentication for the organization + MfaEnabled *bool `json:"mfa_enabled,omitempty"` } // NewOrganizationCreate instantiates a new OrganizationCreate object @@ -66,6 +68,38 @@ func (o *OrganizationCreate) SetName(v string) { o.Name = v } +// GetMfaEnabled returns the MfaEnabled field value if set, zero value otherwise. +func (o *OrganizationCreate) GetMfaEnabled() bool { + if o == nil || IsNil(o.MfaEnabled) { + var ret bool + return ret + } + return *o.MfaEnabled +} + +// GetMfaEnabledOk returns a tuple with the MfaEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationCreate) GetMfaEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.MfaEnabled) { + return nil, false + } + return o.MfaEnabled, true +} + +// HasMfaEnabled returns a boolean if a field has been set. +func (o *OrganizationCreate) HasMfaEnabled() bool { + if o != nil && !IsNil(o.MfaEnabled) { + return true + } + + return false +} + +// SetMfaEnabled gets a reference to the given bool and assigns it to the MfaEnabled field. +func (o *OrganizationCreate) SetMfaEnabled(v bool) { + o.MfaEnabled = &v +} + func (o OrganizationCreate) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -77,6 +111,9 @@ func (o OrganizationCreate) MarshalJSON() ([]byte, error) { func (o OrganizationCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["name"] = o.Name + if !IsNil(o.MfaEnabled) { + toSerialize["mfa_enabled"] = o.MfaEnabled + } return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_parameter.go b/pkg/cloudtruthapi/model_parameter.go index 5172f05..e253832 100644 --- a/pkg/cloudtruthapi/model_parameter.go +++ b/pkg/cloudtruthapi/model_parameter.go @@ -21,52 +21,54 @@ var _ MappedNullable = &Parameter{} // Parameter A single parameter inside of a project. type Parameter struct { + // The parameter url. Url string `json:"url"` - // A unique identifier for the parameter. Id string `json:"id"` + LedgerId string `json:"ledger_id"` // The parameter name. Name string `json:"name"` - // A description of the parameter. You may find it helpful to document how this parameter is used to assist others when they need to maintain software that uses this content. Description *string `json:"description,omitempty"` - // Indicates if this content is secret or not. When a parameter is considered to be a secret, any internal values are stored in a dedicated vault for your organization for maximum security. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used. - Secret *bool `json:"secret,omitempty"` - // The type of this Parameter. + Secret bool `json:"secret"` + // The type of this Parameter. If not provided, this will default to a string for Parameters that are not overrides or to the overridden Parameter's type for Parameters that are overrides. Type *string `json:"type,omitempty"` // Rules applied to this parameter. Rules []ParameterRule `json:"rules"` - // The project that the parameter is within. + // The project url. Project string `json:"project"` // The project name that the parameter is within. ProjectName string `json:"project_name"` - // Templates that reference this Parameter. + // Templates that reference this Parameter. This field is not valid for history requests. ReferencingTemplates []string `json:"referencing_templates"` - // Dynamic values that reference this Parameter. + // Dynamic values that reference this Parameter. This field is not valid for history requests. ReferencingValues []string `json:"referencing_values"` // This dictionary has keys that correspond to environment urls, and values that correspond to the effective value for this parameter in that environment. Each parameter has an effective value in every environment based on project dependencies and environment inheritance. The effective value is found by looking (within the keyed environment) up the project dependencies by parameter name. If a value is not found, the parent environment is consulted with the same logic to locate a value. It is possible for there to be a `null` value record for an environment, which means there is no value set; it is also possible for there to be a value record with a `value` of `null`, which means the value was explicitly set to `null`. If the value's parameter does not match the enclosing parameter (holding the values array) then that value is flowing in through project dependencies. Clients must recognize this in case the user asks to modify the value; in this case the client must POST a new Value to the current parameter to override the value coming in from the project dependency. If the Value.environment matches the key, then it is an explicit value set for that environment. If they differ, the value was obtained from a parent environment (directly or indirectly). If the value is None then no value has ever been set in any environment for this parameter within all the project dependencies. Values map[string]Value `json:"values"` + // Identical to values, except the dictionary is flattened to a list. Note that in this case, the environment in the Value is the environment asked for, not the environment where it was obtained. + ValuesFlat []Value `json:"values_flat"` // If this parameter's project depends on another project which provides a parameter of the same name, this parameter overrides the one provided by the dependee. You can use this field to determine if there will be side-effects the user should know about when deleting a parameter. Deleting a parameter that overrides another one due to an identical name will uncover the one from the dependee project. Overrides NullableString `json:"overrides"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewParameter instantiates a new Parameter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParameter(url string, id string, name string, rules []ParameterRule, project string, projectName string, referencingTemplates []string, referencingValues []string, values map[string]Value, overrides NullableString, createdAt time.Time, modifiedAt time.Time) *Parameter { +func NewParameter(url string, id string, ledgerId string, name string, secret bool, rules []ParameterRule, project string, projectName string, referencingTemplates []string, referencingValues []string, values map[string]Value, valuesFlat []Value, overrides NullableString, createdAt time.Time, modifiedAt NullableTime) *Parameter { this := Parameter{} this.Url = url this.Id = id + this.LedgerId = ledgerId this.Name = name - var type_ string = "string" - this.Type = &type_ + this.Secret = secret this.Rules = rules this.Project = project this.ProjectName = projectName this.ReferencingTemplates = referencingTemplates this.ReferencingValues = referencingValues this.Values = values + this.ValuesFlat = valuesFlat this.Overrides = overrides this.CreatedAt = createdAt this.ModifiedAt = modifiedAt @@ -78,8 +80,6 @@ func NewParameter(url string, id string, name string, rules []ParameterRule, pro // but it doesn't guarantee that properties required by API are set func NewParameterWithDefaults() *Parameter { this := Parameter{} - var type_ string = "string" - this.Type = &type_ return &this } @@ -131,6 +131,30 @@ func (o *Parameter) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *Parameter) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *Parameter) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *Parameter) SetLedgerId(v string) { + o.LedgerId = v +} + // GetName returns the Name field value func (o *Parameter) GetName() string { if o == nil { @@ -187,36 +211,28 @@ func (o *Parameter) SetDescription(v string) { o.Description = &v } -// GetSecret returns the Secret field value if set, zero value otherwise. +// GetSecret returns the Secret field value func (o *Parameter) GetSecret() bool { - if o == nil || IsNil(o.Secret) { + if o == nil { var ret bool return ret } - return *o.Secret + + return o.Secret } -// GetSecretOk returns a tuple with the Secret field value if set, nil otherwise +// GetSecretOk returns a tuple with the Secret field value // and a boolean to check if the value has been set. func (o *Parameter) GetSecretOk() (*bool, bool) { - if o == nil || IsNil(o.Secret) { + if o == nil { return nil, false } - return o.Secret, true + return &o.Secret, true } -// HasSecret returns a boolean if a field has been set. -func (o *Parameter) HasSecret() bool { - if o != nil && !IsNil(o.Secret) { - return true - } - - return false -} - -// SetSecret gets a reference to the given bool and assigns it to the Secret field. +// SetSecret sets field value func (o *Parameter) SetSecret(v bool) { - o.Secret = &v + o.Secret = v } // GetType returns the Type field value if set, zero value otherwise. @@ -395,6 +411,30 @@ func (o *Parameter) SetValues(v map[string]Value) { o.Values = v } +// GetValuesFlat returns the ValuesFlat field value +func (o *Parameter) GetValuesFlat() []Value { + if o == nil { + var ret []Value + return ret + } + + return o.ValuesFlat +} + +// GetValuesFlatOk returns a tuple with the ValuesFlat field value +// and a boolean to check if the value has been set. +func (o *Parameter) GetValuesFlatOk() ([]Value, bool) { + if o == nil { + return nil, false + } + return o.ValuesFlat, true +} + +// SetValuesFlat sets field value +func (o *Parameter) SetValuesFlat(v []Value) { + o.ValuesFlat = v +} + // GetOverrides returns the Overrides field value // If the value is explicit nil, the zero value for string will be returned func (o *Parameter) GetOverrides() string { @@ -446,27 +486,29 @@ func (o *Parameter) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *Parameter) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Parameter) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *Parameter) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o Parameter) MarshalJSON() ([]byte, error) { @@ -481,13 +523,12 @@ func (o Parameter) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId toSerialize["name"] = o.Name if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.Secret) { - toSerialize["secret"] = o.Secret - } + toSerialize["secret"] = o.Secret if !IsNil(o.Type) { toSerialize["type"] = o.Type } @@ -497,9 +538,10 @@ func (o Parameter) ToMap() (map[string]interface{}, error) { toSerialize["referencing_templates"] = o.ReferencingTemplates toSerialize["referencing_values"] = o.ReferencingValues toSerialize["values"] = o.Values + toSerialize["values_flat"] = o.ValuesFlat toSerialize["overrides"] = o.Overrides.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_parameter_copy.go b/pkg/cloudtruthapi/model_parameter_copy.go new file mode 100644 index 0000000..b059711 --- /dev/null +++ b/pkg/cloudtruthapi/model_parameter_copy.go @@ -0,0 +1,184 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" +) + +// checks if the ParameterCopy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ParameterCopy{} + +// ParameterCopy A single parameter inside of a project. +type ParameterCopy struct { + // The parameter name. + Name string `json:"name"` + // A description of the parameter. You may find it helpful to document how this parameter is used to assist others when they need to maintain software that uses this content. + Description *string `json:"description,omitempty"` + // The project url. + Project string `json:"project"` +} + +// NewParameterCopy instantiates a new ParameterCopy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewParameterCopy(name string, project string) *ParameterCopy { + this := ParameterCopy{} + this.Name = name + this.Project = project + return &this +} + +// NewParameterCopyWithDefaults instantiates a new ParameterCopy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewParameterCopyWithDefaults() *ParameterCopy { + this := ParameterCopy{} + return &this +} + +// GetName returns the Name field value +func (o *ParameterCopy) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ParameterCopy) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ParameterCopy) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ParameterCopy) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ParameterCopy) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ParameterCopy) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ParameterCopy) SetDescription(v string) { + o.Description = &v +} + +// GetProject returns the Project field value +func (o *ParameterCopy) GetProject() string { + if o == nil { + var ret string + return ret + } + + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value +// and a boolean to check if the value has been set. +func (o *ParameterCopy) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Project, true +} + +// SetProject sets field value +func (o *ParameterCopy) SetProject(v string) { + o.Project = v +} + +func (o ParameterCopy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ParameterCopy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["project"] = o.Project + return toSerialize, nil +} + +type NullableParameterCopy struct { + value *ParameterCopy + isSet bool +} + +func (v NullableParameterCopy) Get() *ParameterCopy { + return v.value +} + +func (v *NullableParameterCopy) Set(val *ParameterCopy) { + v.value = val + v.isSet = true +} + +func (v NullableParameterCopy) IsSet() bool { + return v.isSet +} + +func (v *NullableParameterCopy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableParameterCopy(val *ParameterCopy) *NullableParameterCopy { + return &NullableParameterCopy{value: val, isSet: true} +} + +func (v NullableParameterCopy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableParameterCopy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_parameter_create.go b/pkg/cloudtruthapi/model_parameter_create.go index 13cd0b5..cc5baaf 100644 --- a/pkg/cloudtruthapi/model_parameter_create.go +++ b/pkg/cloudtruthapi/model_parameter_create.go @@ -24,9 +24,9 @@ type ParameterCreate struct { Name string `json:"name"` // A description of the parameter. You may find it helpful to document how this parameter is used to assist others when they need to maintain software that uses this content. Description *string `json:"description,omitempty"` - // Indicates if this content is secret or not. When a parameter is considered to be a secret, any internal values are stored in a dedicated vault for your organization for maximum security. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used. + // Indicates if this content is secret or not. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used. Secret *bool `json:"secret,omitempty"` - // The type of this Parameter. + // The type of this Parameter. If not provided, this will default to a string for Parameters that are not overrides or to the overridden Parameter's type for Parameters that are overrides. Type *string `json:"type,omitempty"` } @@ -37,8 +37,6 @@ type ParameterCreate struct { func NewParameterCreate(name string) *ParameterCreate { this := ParameterCreate{} this.Name = name - var type_ string = "string" - this.Type = &type_ return &this } @@ -47,8 +45,6 @@ func NewParameterCreate(name string) *ParameterCreate { // but it doesn't guarantee that properties required by API are set func NewParameterCreateWithDefaults() *ParameterCreate { this := ParameterCreate{} - var type_ string = "string" - this.Type = &type_ return &this } diff --git a/pkg/cloudtruthapi/model_parameter_duality_t1.go b/pkg/cloudtruthapi/model_parameter_duality_t1.go deleted file mode 100644 index 635a442..0000000 --- a/pkg/cloudtruthapi/model_parameter_duality_t1.go +++ /dev/null @@ -1,553 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" - "time" -) - -// ParameterDualityT1 struct for ParameterDualityT1 -type ParameterDualityT1 struct { - Url string `json:"url"` - // A unique identifier for the parameter. - Id string `json:"id"` - // The parameter name. - Name string `json:"name"` - // A description of the parameter. You may find it helpful to document how this parameter is used to assist others when they need to maintain software that uses this content. - Description *string `json:"description,omitempty"` - // Indicates if this content is secret or not. When a parameter is considered to be a secret, any internal values are stored in a dedicated vault for your organization for maximum security. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used. - Secret *bool `json:"secret,omitempty"` - // The type of this Parameter. - Type *string `json:"type,omitempty"` - // Rules applied to this parameter. - Rules []ParameterRule `json:"rules"` - // The project that the parameter is within. - Project string `json:"project"` - // The project name that the parameter is within. - ProjectName string `json:"project_name"` - // Templates that reference this Parameter. - ReferencingTemplates []string `json:"referencing_templates"` - // Dynamic values that reference this Parameter. - ReferencingValues []string `json:"referencing_values"` - // This dictionary has keys that correspond to environment urls, and values that correspond to the effective value for this parameter in that environment. Each parameter has an effective value in every environment based on project dependencies and environment inheritance. The effective value is found by looking (within the keyed environment) up the project dependencies by parameter name. If a value is not found, the parent environment is consulted with the same logic to locate a value. It is possible for there to be a `null` value record for an environment, which means there is no value set; it is also possible for there to be a value record with a `value` of `null`, which means the value was explicitly set to `null`. If the value's parameter does not match the enclosing parameter (holding the values array) then that value is flowing in through project dependencies. Clients must recognize this in case the user asks to modify the value; in this case the client must POST a new Value to the current parameter to override the value coming in from the project dependency. If the Value.environment matches the key, then it is an explicit value set for that environment. If they differ, the value was obtained from a parent environment (directly or indirectly). If the value is None then no value has ever been set in any environment for this parameter within all the project dependencies. - Values map[string]ParameterValuesValue `json:"values"` - // If this parameter's project depends on another project which provides a parameter of the same name, this parameter overrides the one provided by the dependee. You can use this field to determine if there will be side-effects the user should know about when deleting a parameter. Deleting a parameter that overrides another one due to an identical name will uncover the one from the dependee project. - Overrides NullableString `json:"overrides"` - CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` -} - -// NewParameterDualityT1 instantiates a new ParameterDualityT1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewParameterDualityT1(url string, id string, name string, rules []ParameterRule, project string, projectName string, referencingTemplates []string, referencingValues []string, values map[string]ParameterValuesValue, overrides NullableString, createdAt time.Time, modifiedAt time.Time) *ParameterDualityT1 { - this := ParameterDualityT1{} - this.Url = url - this.Id = id - this.Name = name - var type_ string = "string" - this.Type = &type_ - this.Rules = rules - this.Project = project - this.ProjectName = projectName - this.ReferencingTemplates = referencingTemplates - this.ReferencingValues = referencingValues - this.Values = values - this.Overrides = overrides - this.CreatedAt = createdAt - this.ModifiedAt = modifiedAt - return &this -} - -// NewParameterDualityT1WithDefaults instantiates a new ParameterDualityT1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewParameterDualityT1WithDefaults() *ParameterDualityT1 { - this := ParameterDualityT1{} - var type_ string = "string" - this.Type = &type_ - return &this -} - -// GetUrl returns the Url field value -func (o *ParameterDualityT1) GetUrl() string { - if o == nil { - var ret string - return ret - } - - return o.Url -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Url, true -} - -// SetUrl sets field value -func (o *ParameterDualityT1) SetUrl(v string) { - o.Url = v -} - -// GetId returns the Id field value -func (o *ParameterDualityT1) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ParameterDualityT1) SetId(v string) { - o.Id = v -} - -// GetName returns the Name field value -func (o *ParameterDualityT1) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ParameterDualityT1) SetName(v string) { - o.Name = v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *ParameterDualityT1) GetDescription() string { - if o == nil || o.Description == nil { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *ParameterDualityT1) HasDescription() bool { - if o != nil && o.Description != nil { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ParameterDualityT1) SetDescription(v string) { - o.Description = &v -} - -// GetSecret returns the Secret field value if set, zero value otherwise. -func (o *ParameterDualityT1) GetSecret() bool { - if o == nil || o.Secret == nil { - var ret bool - return ret - } - return *o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetSecretOk() (*bool, bool) { - if o == nil || o.Secret == nil { - return nil, false - } - return o.Secret, true -} - -// HasSecret returns a boolean if a field has been set. -func (o *ParameterDualityT1) HasSecret() bool { - if o != nil && o.Secret != nil { - return true - } - - return false -} - -// SetSecret gets a reference to the given bool and assigns it to the Secret field. -func (o *ParameterDualityT1) SetSecret(v bool) { - o.Secret = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *ParameterDualityT1) GetType() string { - if o == nil || o.Type == nil { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *ParameterDualityT1) HasType() bool { - if o != nil && o.Type != nil { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *ParameterDualityT1) SetType(v string) { - o.Type = &v -} - -// GetRules returns the Rules field value -func (o *ParameterDualityT1) GetRules() []ParameterRule { - if o == nil { - var ret []ParameterRule - return ret - } - - return o.Rules -} - -// GetRulesOk returns a tuple with the Rules field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetRulesOk() ([]ParameterRule, bool) { - if o == nil { - return nil, false - } - return o.Rules, true -} - -// SetRules sets field value -func (o *ParameterDualityT1) SetRules(v []ParameterRule) { - o.Rules = v -} - -// GetProject returns the Project field value -func (o *ParameterDualityT1) GetProject() string { - if o == nil { - var ret string - return ret - } - - return o.Project -} - -// GetProjectOk returns a tuple with the Project field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Project, true -} - -// SetProject sets field value -func (o *ParameterDualityT1) SetProject(v string) { - o.Project = v -} - -// GetProjectName returns the ProjectName field value -func (o *ParameterDualityT1) GetProjectName() string { - if o == nil { - var ret string - return ret - } - - return o.ProjectName -} - -// GetProjectNameOk returns a tuple with the ProjectName field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetProjectNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ProjectName, true -} - -// SetProjectName sets field value -func (o *ParameterDualityT1) SetProjectName(v string) { - o.ProjectName = v -} - -// GetReferencingTemplates returns the ReferencingTemplates field value -func (o *ParameterDualityT1) GetReferencingTemplates() []string { - if o == nil { - var ret []string - return ret - } - - return o.ReferencingTemplates -} - -// GetReferencingTemplatesOk returns a tuple with the ReferencingTemplates field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetReferencingTemplatesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ReferencingTemplates, true -} - -// SetReferencingTemplates sets field value -func (o *ParameterDualityT1) SetReferencingTemplates(v []string) { - o.ReferencingTemplates = v -} - -// GetReferencingValues returns the ReferencingValues field value -func (o *ParameterDualityT1) GetReferencingValues() []string { - if o == nil { - var ret []string - return ret - } - - return o.ReferencingValues -} - -// GetReferencingValuesOk returns a tuple with the ReferencingValues field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetReferencingValuesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ReferencingValues, true -} - -// SetReferencingValues sets field value -func (o *ParameterDualityT1) SetReferencingValues(v []string) { - o.ReferencingValues = v -} - -// GetValues returns the Values field value -func (o *ParameterDualityT1) GetValues() map[string]ParameterValuesValue { - if o == nil { - var ret map[string]ParameterValuesValue - return ret - } - - return o.Values -} - -// GetValuesOk returns a tuple with the Values field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetValuesOk() (*map[string]ParameterValuesValue, bool) { - if o == nil { - return nil, false - } - return &o.Values, true -} - -// SetValues sets field value -func (o *ParameterDualityT1) SetValues(v map[string]ParameterValuesValue) { - o.Values = v -} - -// GetOverrides returns the Overrides field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ParameterDualityT1) GetOverrides() string { - if o == nil || o.Overrides.Get() == nil { - var ret string - return ret - } - - return *o.Overrides.Get() -} - -// GetOverridesOk returns a tuple with the Overrides field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ParameterDualityT1) GetOverridesOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Overrides.Get(), o.Overrides.IsSet() -} - -// SetOverrides sets field value -func (o *ParameterDualityT1) SetOverrides(v string) { - o.Overrides.Set(&v) -} - -// GetCreatedAt returns the CreatedAt field value -func (o *ParameterDualityT1) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *ParameterDualityT1) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetModifiedAt returns the ModifiedAt field value -func (o *ParameterDualityT1) GetModifiedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ModifiedAt -} - -// GetModifiedAtOk returns a tuple with the ModifiedAt field value -// and a boolean to check if the value has been set. -func (o *ParameterDualityT1) GetModifiedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ModifiedAt, true -} - -// SetModifiedAt sets field value -func (o *ParameterDualityT1) SetModifiedAt(v time.Time) { - o.ModifiedAt = v -} - -func (o ParameterDualityT1) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["url"] = o.Url - } - if true { - toSerialize["id"] = o.Id - } - if true { - toSerialize["name"] = o.Name - } - if o.Description != nil { - toSerialize["description"] = o.Description - } - if o.Secret != nil { - toSerialize["secret"] = o.Secret - } - if o.Type != nil { - toSerialize["type"] = o.Type - } - if true { - toSerialize["rules"] = o.Rules - } - if true { - toSerialize["project"] = o.Project - } - if true { - toSerialize["project_name"] = o.ProjectName - } - if true { - toSerialize["referencing_templates"] = o.ReferencingTemplates - } - if true { - toSerialize["referencing_values"] = o.ReferencingValues - } - if true { - toSerialize["values"] = o.Values - } - if true { - toSerialize["overrides"] = o.Overrides.Get() - } - if true { - toSerialize["created_at"] = o.CreatedAt - } - if true { - toSerialize["modified_at"] = o.ModifiedAt - } - return json.Marshal(toSerialize) -} - -type NullableParameterDualityT1 struct { - value *ParameterDualityT1 - isSet bool -} - -func (v NullableParameterDualityT1) Get() *ParameterDualityT1 { - return v.value -} - -func (v *NullableParameterDualityT1) Set(val *ParameterDualityT1) { - v.value = val - v.isSet = true -} - -func (v NullableParameterDualityT1) IsSet() bool { - return v.isSet -} - -func (v *NullableParameterDualityT1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableParameterDualityT1(val *ParameterDualityT1) *NullableParameterDualityT1 { - return &NullableParameterDualityT1{value: val, isSet: true} -} - -func (v NullableParameterDualityT1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableParameterDualityT1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/cloudtruthapi/model_parameter_rule.go b/pkg/cloudtruthapi/model_parameter_rule.go index 44301f3..2d04ac5 100644 --- a/pkg/cloudtruthapi/model_parameter_rule.go +++ b/pkg/cloudtruthapi/model_parameter_rule.go @@ -21,24 +21,27 @@ var _ MappedNullable = &ParameterRule{} // ParameterRule A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead of primary key relationships. Specifically: * A 'url' field is included instead of the 'id' field. * Relationships to other instances are hyperlinks, instead of primary keys. NOTE: this only works with DRF 3.1.0 and above. type ParameterRule struct { + // The URL for the parameter rule. Url string `json:"url"` Id string `json:"id"` + LedgerId string `json:"ledger_id"` // The parameter this rule is for. Parameter string `json:"parameter"` Type ParameterRuleTypeEnum `json:"type"` Constraint string `json:"constraint"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewParameterRule instantiates a new ParameterRule object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParameterRule(url string, id string, parameter string, type_ ParameterRuleTypeEnum, constraint string, createdAt time.Time, modifiedAt time.Time) *ParameterRule { +func NewParameterRule(url string, id string, ledgerId string, parameter string, type_ ParameterRuleTypeEnum, constraint string, createdAt time.Time, modifiedAt NullableTime) *ParameterRule { this := ParameterRule{} this.Url = url this.Id = id + this.LedgerId = ledgerId this.Parameter = parameter this.Type = type_ this.Constraint = constraint @@ -103,6 +106,30 @@ func (o *ParameterRule) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *ParameterRule) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *ParameterRule) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *ParameterRule) SetLedgerId(v string) { + o.LedgerId = v +} + // GetParameter returns the Parameter field value func (o *ParameterRule) GetParameter() string { if o == nil { @@ -200,27 +227,29 @@ func (o *ParameterRule) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *ParameterRule) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ParameterRule) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *ParameterRule) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o ParameterRule) MarshalJSON() ([]byte, error) { @@ -235,11 +264,12 @@ func (o ParameterRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId toSerialize["parameter"] = o.Parameter toSerialize["type"] = o.Type toSerialize["constraint"] = o.Constraint toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_parameter_rule_update.go b/pkg/cloudtruthapi/model_parameter_rule_update.go new file mode 100644 index 0000000..cde6fa4 --- /dev/null +++ b/pkg/cloudtruthapi/model_parameter_rule_update.go @@ -0,0 +1,257 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the ParameterRuleUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ParameterRuleUpdate{} + +// ParameterRuleUpdate A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead of primary key relationships. Specifically: * A 'url' field is included instead of the 'id' field. * Relationships to other instances are hyperlinks, instead of primary keys. NOTE: this only works with DRF 3.1.0 and above. +type ParameterRuleUpdate struct { + Id string `json:"id"` + // The parameter this rule is for. + Parameter string `json:"parameter"` + Type ParameterRuleTypeEnum `json:"type"` + Constraint string `json:"constraint"` + CreatedAt time.Time `json:"created_at"` + ModifiedAt NullableTime `json:"modified_at"` +} + +// NewParameterRuleUpdate instantiates a new ParameterRuleUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewParameterRuleUpdate(id string, parameter string, type_ ParameterRuleTypeEnum, constraint string, createdAt time.Time, modifiedAt NullableTime) *ParameterRuleUpdate { + this := ParameterRuleUpdate{} + this.Id = id + this.Parameter = parameter + this.Type = type_ + this.Constraint = constraint + this.CreatedAt = createdAt + this.ModifiedAt = modifiedAt + return &this +} + +// NewParameterRuleUpdateWithDefaults instantiates a new ParameterRuleUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewParameterRuleUpdateWithDefaults() *ParameterRuleUpdate { + this := ParameterRuleUpdate{} + return &this +} + +// GetId returns the Id field value +func (o *ParameterRuleUpdate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ParameterRuleUpdate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ParameterRuleUpdate) SetId(v string) { + o.Id = v +} + +// GetParameter returns the Parameter field value +func (o *ParameterRuleUpdate) GetParameter() string { + if o == nil { + var ret string + return ret + } + + return o.Parameter +} + +// GetParameterOk returns a tuple with the Parameter field value +// and a boolean to check if the value has been set. +func (o *ParameterRuleUpdate) GetParameterOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Parameter, true +} + +// SetParameter sets field value +func (o *ParameterRuleUpdate) SetParameter(v string) { + o.Parameter = v +} + +// GetType returns the Type field value +func (o *ParameterRuleUpdate) GetType() ParameterRuleTypeEnum { + if o == nil { + var ret ParameterRuleTypeEnum + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ParameterRuleUpdate) GetTypeOk() (*ParameterRuleTypeEnum, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ParameterRuleUpdate) SetType(v ParameterRuleTypeEnum) { + o.Type = v +} + +// GetConstraint returns the Constraint field value +func (o *ParameterRuleUpdate) GetConstraint() string { + if o == nil { + var ret string + return ret + } + + return o.Constraint +} + +// GetConstraintOk returns a tuple with the Constraint field value +// and a boolean to check if the value has been set. +func (o *ParameterRuleUpdate) GetConstraintOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Constraint, true +} + +// SetConstraint sets field value +func (o *ParameterRuleUpdate) SetConstraint(v string) { + o.Constraint = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ParameterRuleUpdate) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ParameterRuleUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ParameterRuleUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ParameterRuleUpdate) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ParameterRuleUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// SetModifiedAt sets field value +func (o *ParameterRuleUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} + +func (o ParameterRuleUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ParameterRuleUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["parameter"] = o.Parameter + toSerialize["type"] = o.Type + toSerialize["constraint"] = o.Constraint + toSerialize["created_at"] = o.CreatedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() + return toSerialize, nil +} + +type NullableParameterRuleUpdate struct { + value *ParameterRuleUpdate + isSet bool +} + +func (v NullableParameterRuleUpdate) Get() *ParameterRuleUpdate { + return v.value +} + +func (v *NullableParameterRuleUpdate) Set(val *ParameterRuleUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableParameterRuleUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableParameterRuleUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableParameterRuleUpdate(val *ParameterRuleUpdate) *NullableParameterRuleUpdate { + return &NullableParameterRuleUpdate{value: val, isSet: true} +} + +func (v NullableParameterRuleUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableParameterRuleUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_parameter_timeline_entry.go b/pkg/cloudtruthapi/model_parameter_timeline_entry.go index b957156..a34c228 100644 --- a/pkg/cloudtruthapi/model_parameter_timeline_entry.go +++ b/pkg/cloudtruthapi/model_parameter_timeline_entry.go @@ -21,10 +21,9 @@ var _ MappedNullable = &ParameterTimelineEntry{} // ParameterTimelineEntry Details about a single change. type ParameterTimelineEntry struct { - HistoryDate time.Time `json:"history_date"` HistoryType HistoryTypeEnum `json:"history_type"` - // The unique identifier of a user. - HistoryUser NullableString `json:"history_user,omitempty"` + ModifiedAt NullableTime `json:"modified_at"` + ModifiedBy *string `json:"modified_by,omitempty"` // The affected environment(s). HistoryEnvironments []ParameterTimelineEntryEnvironment `json:"history_environments"` HistoryModel HistoryModelEnum `json:"history_model"` @@ -35,10 +34,10 @@ type ParameterTimelineEntry struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParameterTimelineEntry(historyDate time.Time, historyType HistoryTypeEnum, historyEnvironments []ParameterTimelineEntryEnvironment, historyModel HistoryModelEnum, historyParameter ParameterTimelineEntryHistoryParameter) *ParameterTimelineEntry { +func NewParameterTimelineEntry(historyType HistoryTypeEnum, modifiedAt NullableTime, historyEnvironments []ParameterTimelineEntryEnvironment, historyModel HistoryModelEnum, historyParameter ParameterTimelineEntryHistoryParameter) *ParameterTimelineEntry { this := ParameterTimelineEntry{} - this.HistoryDate = historyDate this.HistoryType = historyType + this.ModifiedAt = modifiedAt this.HistoryEnvironments = historyEnvironments this.HistoryModel = historyModel this.HistoryParameter = historyParameter @@ -53,94 +52,86 @@ func NewParameterTimelineEntryWithDefaults() *ParameterTimelineEntry { return &this } -// GetHistoryDate returns the HistoryDate field value -func (o *ParameterTimelineEntry) GetHistoryDate() time.Time { +// GetHistoryType returns the HistoryType field value +func (o *ParameterTimelineEntry) GetHistoryType() HistoryTypeEnum { if o == nil { - var ret time.Time + var ret HistoryTypeEnum return ret } - return o.HistoryDate + return o.HistoryType } -// GetHistoryDateOk returns a tuple with the HistoryDate field value +// GetHistoryTypeOk returns a tuple with the HistoryType field value // and a boolean to check if the value has been set. -func (o *ParameterTimelineEntry) GetHistoryDateOk() (*time.Time, bool) { +func (o *ParameterTimelineEntry) GetHistoryTypeOk() (*HistoryTypeEnum, bool) { if o == nil { return nil, false } - return &o.HistoryDate, true + return &o.HistoryType, true } -// SetHistoryDate sets field value -func (o *ParameterTimelineEntry) SetHistoryDate(v time.Time) { - o.HistoryDate = v +// SetHistoryType sets field value +func (o *ParameterTimelineEntry) SetHistoryType(v HistoryTypeEnum) { + o.HistoryType = v } -// GetHistoryType returns the HistoryType field value -func (o *ParameterTimelineEntry) GetHistoryType() HistoryTypeEnum { - if o == nil { - var ret HistoryTypeEnum +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ParameterTimelineEntry) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time return ret } - return o.HistoryType + return *o.ModifiedAt.Get() } -// GetHistoryTypeOk returns a tuple with the HistoryType field value +// GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. -func (o *ParameterTimelineEntry) GetHistoryTypeOk() (*HistoryTypeEnum, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ParameterTimelineEntry) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.HistoryType, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } -// SetHistoryType sets field value -func (o *ParameterTimelineEntry) SetHistoryType(v HistoryTypeEnum) { - o.HistoryType = v +// SetModifiedAt sets field value +func (o *ParameterTimelineEntry) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) } -// GetHistoryUser returns the HistoryUser field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ParameterTimelineEntry) GetHistoryUser() string { - if o == nil || IsNil(o.HistoryUser.Get()) { +// GetModifiedBy returns the ModifiedBy field value if set, zero value otherwise. +func (o *ParameterTimelineEntry) GetModifiedBy() string { + if o == nil || IsNil(o.ModifiedBy) { var ret string return ret } - return *o.HistoryUser.Get() + return *o.ModifiedBy } -// GetHistoryUserOk returns a tuple with the HistoryUser field value if set, nil otherwise +// GetModifiedByOk returns a tuple with the ModifiedBy field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ParameterTimelineEntry) GetHistoryUserOk() (*string, bool) { - if o == nil { +func (o *ParameterTimelineEntry) GetModifiedByOk() (*string, bool) { + if o == nil || IsNil(o.ModifiedBy) { return nil, false } - return o.HistoryUser.Get(), o.HistoryUser.IsSet() + return o.ModifiedBy, true } -// HasHistoryUser returns a boolean if a field has been set. -func (o *ParameterTimelineEntry) HasHistoryUser() bool { - if o != nil && o.HistoryUser.IsSet() { +// HasModifiedBy returns a boolean if a field has been set. +func (o *ParameterTimelineEntry) HasModifiedBy() bool { + if o != nil && !IsNil(o.ModifiedBy) { return true } return false } -// SetHistoryUser gets a reference to the given NullableString and assigns it to the HistoryUser field. -func (o *ParameterTimelineEntry) SetHistoryUser(v string) { - o.HistoryUser.Set(&v) -} -// SetHistoryUserNil sets the value for HistoryUser to be an explicit nil -func (o *ParameterTimelineEntry) SetHistoryUserNil() { - o.HistoryUser.Set(nil) -} - -// UnsetHistoryUser ensures that no value is present for HistoryUser, not even an explicit nil -func (o *ParameterTimelineEntry) UnsetHistoryUser() { - o.HistoryUser.Unset() +// SetModifiedBy gets a reference to the given string and assigns it to the ModifiedBy field. +func (o *ParameterTimelineEntry) SetModifiedBy(v string) { + o.ModifiedBy = &v } // GetHistoryEnvironments returns the HistoryEnvironments field value @@ -225,10 +216,10 @@ func (o ParameterTimelineEntry) MarshalJSON() ([]byte, error) { func (o ParameterTimelineEntry) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["history_date"] = o.HistoryDate toSerialize["history_type"] = o.HistoryType - if o.HistoryUser.IsSet() { - toSerialize["history_user"] = o.HistoryUser.Get() + toSerialize["modified_at"] = o.ModifiedAt.Get() + if !IsNil(o.ModifiedBy) { + toSerialize["modified_by"] = o.ModifiedBy } toSerialize["history_environments"] = o.HistoryEnvironments toSerialize["history_model"] = o.HistoryModel diff --git a/pkg/cloudtruthapi/model_parameter_timeline_entry_environment.go b/pkg/cloudtruthapi/model_parameter_timeline_entry_environment.go index 9262359..e6deae6 100644 --- a/pkg/cloudtruthapi/model_parameter_timeline_entry_environment.go +++ b/pkg/cloudtruthapi/model_parameter_timeline_entry_environment.go @@ -21,7 +21,7 @@ var _ MappedNullable = &ParameterTimelineEntryEnvironment{} // ParameterTimelineEntryEnvironment struct for ParameterTimelineEntryEnvironment type ParameterTimelineEntryEnvironment struct { // A unique identifier for the environment. - Id string `json:"id"` + EnvironmentId NullableString `json:"environment_id"` // The environment name. Name string `json:"name"` // Indicates if the value change was direct or if it flowed into the environment. If `true` then the value was actually set directly into this environment. If `false` then the environment has no value set directly so it inherited the value from its parent. @@ -32,9 +32,9 @@ type ParameterTimelineEntryEnvironment struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParameterTimelineEntryEnvironment(id string, name string, override bool) *ParameterTimelineEntryEnvironment { +func NewParameterTimelineEntryEnvironment(environmentId NullableString, name string, override bool) *ParameterTimelineEntryEnvironment { this := ParameterTimelineEntryEnvironment{} - this.Id = id + this.EnvironmentId = environmentId this.Name = name this.Override = override return &this @@ -48,28 +48,30 @@ func NewParameterTimelineEntryEnvironmentWithDefaults() *ParameterTimelineEntryE return &this } -// GetId returns the Id field value -func (o *ParameterTimelineEntryEnvironment) GetId() string { - if o == nil { +// GetEnvironmentId returns the EnvironmentId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ParameterTimelineEntryEnvironment) GetEnvironmentId() string { + if o == nil || o.EnvironmentId.Get() == nil { var ret string return ret } - return o.Id + return *o.EnvironmentId.Get() } -// GetIdOk returns a tuple with the Id field value +// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value // and a boolean to check if the value has been set. -func (o *ParameterTimelineEntryEnvironment) GetIdOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ParameterTimelineEntryEnvironment) GetEnvironmentIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Id, true + return o.EnvironmentId.Get(), o.EnvironmentId.IsSet() } -// SetId sets field value -func (o *ParameterTimelineEntryEnvironment) SetId(v string) { - o.Id = v +// SetEnvironmentId sets field value +func (o *ParameterTimelineEntryEnvironment) SetEnvironmentId(v string) { + o.EnvironmentId.Set(&v) } // GetName returns the Name field value @@ -130,7 +132,7 @@ func (o ParameterTimelineEntryEnvironment) MarshalJSON() ([]byte, error) { func (o ParameterTimelineEntryEnvironment) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id + toSerialize["environment_id"] = o.EnvironmentId.Get() toSerialize["name"] = o.Name toSerialize["override"] = o.Override return toSerialize, nil diff --git a/pkg/cloudtruthapi/model_parameter_timeline_entry_history_parameter.go b/pkg/cloudtruthapi/model_parameter_timeline_entry_history_parameter.go index 325db45..af1d6e3 100644 --- a/pkg/cloudtruthapi/model_parameter_timeline_entry_history_parameter.go +++ b/pkg/cloudtruthapi/model_parameter_timeline_entry_history_parameter.go @@ -21,7 +21,7 @@ var _ MappedNullable = &ParameterTimelineEntryHistoryParameter{} // ParameterTimelineEntryHistoryParameter The affected parameter. type ParameterTimelineEntryHistoryParameter struct { // A unique identifier for the parameter. - Id string `json:"id"` + ParameterId NullableString `json:"parameter_id"` // The parameter name. Name string `json:"name"` } @@ -30,9 +30,9 @@ type ParameterTimelineEntryHistoryParameter struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParameterTimelineEntryHistoryParameter(id string, name string) *ParameterTimelineEntryHistoryParameter { +func NewParameterTimelineEntryHistoryParameter(parameterId NullableString, name string) *ParameterTimelineEntryHistoryParameter { this := ParameterTimelineEntryHistoryParameter{} - this.Id = id + this.ParameterId = parameterId this.Name = name return &this } @@ -45,28 +45,30 @@ func NewParameterTimelineEntryHistoryParameterWithDefaults() *ParameterTimelineE return &this } -// GetId returns the Id field value -func (o *ParameterTimelineEntryHistoryParameter) GetId() string { - if o == nil { +// GetParameterId returns the ParameterId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ParameterTimelineEntryHistoryParameter) GetParameterId() string { + if o == nil || o.ParameterId.Get() == nil { var ret string return ret } - return o.Id + return *o.ParameterId.Get() } -// GetIdOk returns a tuple with the Id field value +// GetParameterIdOk returns a tuple with the ParameterId field value // and a boolean to check if the value has been set. -func (o *ParameterTimelineEntryHistoryParameter) GetIdOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ParameterTimelineEntryHistoryParameter) GetParameterIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Id, true + return o.ParameterId.Get(), o.ParameterId.IsSet() } -// SetId sets field value -func (o *ParameterTimelineEntryHistoryParameter) SetId(v string) { - o.Id = v +// SetParameterId sets field value +func (o *ParameterTimelineEntryHistoryParameter) SetParameterId(v string) { + o.ParameterId.Set(&v) } // GetName returns the Name field value @@ -103,7 +105,7 @@ func (o ParameterTimelineEntryHistoryParameter) MarshalJSON() ([]byte, error) { func (o ParameterTimelineEntryHistoryParameter) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id + toSerialize["parameter_id"] = o.ParameterId.Get() toSerialize["name"] = o.Name return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_parameter_timeline_entry_parameter.go b/pkg/cloudtruthapi/model_parameter_timeline_entry_parameter.go index c0b1f1a..74d3b3b 100644 --- a/pkg/cloudtruthapi/model_parameter_timeline_entry_parameter.go +++ b/pkg/cloudtruthapi/model_parameter_timeline_entry_parameter.go @@ -21,7 +21,7 @@ var _ MappedNullable = &ParameterTimelineEntryParameter{} // ParameterTimelineEntryParameter struct for ParameterTimelineEntryParameter type ParameterTimelineEntryParameter struct { // A unique identifier for the parameter. - Id string `json:"id"` + ParameterId NullableString `json:"parameter_id"` // The parameter name. Name string `json:"name"` } @@ -30,9 +30,9 @@ type ParameterTimelineEntryParameter struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParameterTimelineEntryParameter(id string, name string) *ParameterTimelineEntryParameter { +func NewParameterTimelineEntryParameter(parameterId NullableString, name string) *ParameterTimelineEntryParameter { this := ParameterTimelineEntryParameter{} - this.Id = id + this.ParameterId = parameterId this.Name = name return &this } @@ -45,28 +45,30 @@ func NewParameterTimelineEntryParameterWithDefaults() *ParameterTimelineEntryPar return &this } -// GetId returns the Id field value -func (o *ParameterTimelineEntryParameter) GetId() string { - if o == nil { +// GetParameterId returns the ParameterId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ParameterTimelineEntryParameter) GetParameterId() string { + if o == nil || o.ParameterId.Get() == nil { var ret string return ret } - return o.Id + return *o.ParameterId.Get() } -// GetIdOk returns a tuple with the Id field value +// GetParameterIdOk returns a tuple with the ParameterId field value // and a boolean to check if the value has been set. -func (o *ParameterTimelineEntryParameter) GetIdOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ParameterTimelineEntryParameter) GetParameterIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Id, true + return o.ParameterId.Get(), o.ParameterId.IsSet() } -// SetId sets field value -func (o *ParameterTimelineEntryParameter) SetId(v string) { - o.Id = v +// SetParameterId sets field value +func (o *ParameterTimelineEntryParameter) SetParameterId(v string) { + o.ParameterId.Set(&v) } // GetName returns the Name field value @@ -103,7 +105,7 @@ func (o ParameterTimelineEntryParameter) MarshalJSON() ([]byte, error) { func (o ParameterTimelineEntryParameter) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id + toSerialize["parameter_id"] = o.ParameterId.Get() toSerialize["name"] = o.Name return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_parameter_type.go b/pkg/cloudtruthapi/model_parameter_type.go index c836cb9..649e74c 100644 --- a/pkg/cloudtruthapi/model_parameter_type.go +++ b/pkg/cloudtruthapi/model_parameter_type.go @@ -21,33 +21,36 @@ var _ MappedNullable = &ParameterType{} // ParameterType struct for ParameterType type ParameterType struct { + // The URL for the parameter type. Url string `json:"url"` - // A unique identifier for the parameter type. Id string `json:"id"` + LedgerId string `json:"ledger_id"` // The parameter type name. Name string `json:"name"` // A description of the parameter type, provide documentation on how to use this type here. Description *string `json:"description,omitempty"` // Rules applied to this parameter. Rules []ParameterTypeRule `json:"rules"` - // All types must derive, either directly or indirectly, from one of the CloudTruth built-in types. This is the ParameterType that this type is derived from. - Parent NullableString `json:"parent,omitempty"` + // The URL for this parameter type's parent + Parent NullableString `json:"parent"` // Name of the parent ParameterType (if any). ParentName NullableString `json:"parent_name"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewParameterType instantiates a new ParameterType object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParameterType(url string, id string, name string, rules []ParameterTypeRule, parentName NullableString, createdAt time.Time, modifiedAt time.Time) *ParameterType { +func NewParameterType(url string, id string, ledgerId string, name string, rules []ParameterTypeRule, parent NullableString, parentName NullableString, createdAt time.Time, modifiedAt NullableTime) *ParameterType { this := ParameterType{} this.Url = url this.Id = id + this.LedgerId = ledgerId this.Name = name this.Rules = rules + this.Parent = parent this.ParentName = parentName this.CreatedAt = createdAt this.ModifiedAt = modifiedAt @@ -110,6 +113,30 @@ func (o *ParameterType) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *ParameterType) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *ParameterType) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *ParameterType) SetLedgerId(v string) { + o.LedgerId = v +} + // GetName returns the Name field value func (o *ParameterType) GetName() string { if o == nil { @@ -190,16 +217,18 @@ func (o *ParameterType) SetRules(v []ParameterTypeRule) { o.Rules = v } -// GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). +// GetParent returns the Parent field value +// If the value is explicit nil, the zero value for string will be returned func (o *ParameterType) GetParent() string { - if o == nil || IsNil(o.Parent.Get()) { + if o == nil || o.Parent.Get() == nil { var ret string return ret } + return *o.Parent.Get() } -// GetParentOk returns a tuple with the Parent field value if set, nil otherwise +// GetParentOk returns a tuple with the Parent field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ParameterType) GetParentOk() (*string, bool) { @@ -209,28 +238,10 @@ func (o *ParameterType) GetParentOk() (*string, bool) { return o.Parent.Get(), o.Parent.IsSet() } -// HasParent returns a boolean if a field has been set. -func (o *ParameterType) HasParent() bool { - if o != nil && o.Parent.IsSet() { - return true - } - - return false -} - -// SetParent gets a reference to the given NullableString and assigns it to the Parent field. +// SetParent sets field value func (o *ParameterType) SetParent(v string) { o.Parent.Set(&v) } -// SetParentNil sets the value for Parent to be an explicit nil -func (o *ParameterType) SetParentNil() { - o.Parent.Set(nil) -} - -// UnsetParent ensures that no value is present for Parent, not even an explicit nil -func (o *ParameterType) UnsetParent() { - o.Parent.Unset() -} // GetParentName returns the ParentName field value // If the value is explicit nil, the zero value for string will be returned @@ -283,27 +294,29 @@ func (o *ParameterType) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *ParameterType) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ParameterType) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *ParameterType) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o ParameterType) MarshalJSON() ([]byte, error) { @@ -318,17 +331,16 @@ func (o ParameterType) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId toSerialize["name"] = o.Name if !IsNil(o.Description) { toSerialize["description"] = o.Description } toSerialize["rules"] = o.Rules - if o.Parent.IsSet() { - toSerialize["parent"] = o.Parent.Get() - } + toSerialize["parent"] = o.Parent.Get() toSerialize["parent_name"] = o.ParentName.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_parameter_type_create.go b/pkg/cloudtruthapi/model_parameter_type_create.go index 76bee90..63f11e9 100644 --- a/pkg/cloudtruthapi/model_parameter_type_create.go +++ b/pkg/cloudtruthapi/model_parameter_type_create.go @@ -24,17 +24,18 @@ type ParameterTypeCreate struct { Name string `json:"name"` // A description of the parameter type, provide documentation on how to use this type here. Description *string `json:"description,omitempty"` - // All types must derive, either directly or indirectly, from one of the CloudTruth built-in types. This is the ParameterType that this type is derived from. - Parent NullableString `json:"parent,omitempty"` + // The URL for this parameter type's parent + Parent string `json:"parent"` } // NewParameterTypeCreate instantiates a new ParameterTypeCreate object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParameterTypeCreate(name string) *ParameterTypeCreate { +func NewParameterTypeCreate(name string, parent string) *ParameterTypeCreate { this := ParameterTypeCreate{} this.Name = name + this.Parent = parent return &this } @@ -102,46 +103,28 @@ func (o *ParameterTypeCreate) SetDescription(v string) { o.Description = &v } -// GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). +// GetParent returns the Parent field value func (o *ParameterTypeCreate) GetParent() string { - if o == nil || IsNil(o.Parent.Get()) { + if o == nil { var ret string return ret } - return *o.Parent.Get() + + return o.Parent } -// GetParentOk returns a tuple with the Parent field value if set, nil otherwise +// GetParentOk returns a tuple with the Parent field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ParameterTypeCreate) GetParentOk() (*string, bool) { if o == nil { return nil, false } - return o.Parent.Get(), o.Parent.IsSet() -} - -// HasParent returns a boolean if a field has been set. -func (o *ParameterTypeCreate) HasParent() bool { - if o != nil && o.Parent.IsSet() { - return true - } - - return false + return &o.Parent, true } -// SetParent gets a reference to the given NullableString and assigns it to the Parent field. +// SetParent sets field value func (o *ParameterTypeCreate) SetParent(v string) { - o.Parent.Set(&v) -} -// SetParentNil sets the value for Parent to be an explicit nil -func (o *ParameterTypeCreate) SetParentNil() { - o.Parent.Set(nil) -} - -// UnsetParent ensures that no value is present for Parent, not even an explicit nil -func (o *ParameterTypeCreate) UnsetParent() { - o.Parent.Unset() + o.Parent = v } func (o ParameterTypeCreate) MarshalJSON() ([]byte, error) { @@ -158,9 +141,7 @@ func (o ParameterTypeCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.Parent.IsSet() { - toSerialize["parent"] = o.Parent.Get() - } + toSerialize["parent"] = o.Parent return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_parameter_type_rule.go b/pkg/cloudtruthapi/model_parameter_type_rule.go index 5d7e1c1..73ea375 100644 --- a/pkg/cloudtruthapi/model_parameter_type_rule.go +++ b/pkg/cloudtruthapi/model_parameter_type_rule.go @@ -21,24 +21,27 @@ var _ MappedNullable = &ParameterTypeRule{} // ParameterTypeRule A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead of primary key relationships. Specifically: * A 'url' field is included instead of the 'id' field. * Relationships to other instances are hyperlinks, instead of primary keys. NOTE: this only works with DRF 3.1.0 and above. type ParameterTypeRule struct { + // The URL for the project. Url string `json:"url"` Id string `json:"id"` + LedgerId string `json:"ledger_id"` // The type this rule is for. ParameterType string `json:"parameter_type"` Type ParameterRuleTypeEnum `json:"type"` Constraint string `json:"constraint"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewParameterTypeRule instantiates a new ParameterTypeRule object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParameterTypeRule(url string, id string, parameterType string, type_ ParameterRuleTypeEnum, constraint string, createdAt time.Time, modifiedAt time.Time) *ParameterTypeRule { +func NewParameterTypeRule(url string, id string, ledgerId string, parameterType string, type_ ParameterRuleTypeEnum, constraint string, createdAt time.Time, modifiedAt NullableTime) *ParameterTypeRule { this := ParameterTypeRule{} this.Url = url this.Id = id + this.LedgerId = ledgerId this.ParameterType = parameterType this.Type = type_ this.Constraint = constraint @@ -103,6 +106,30 @@ func (o *ParameterTypeRule) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *ParameterTypeRule) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeRule) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *ParameterTypeRule) SetLedgerId(v string) { + o.LedgerId = v +} + // GetParameterType returns the ParameterType field value func (o *ParameterTypeRule) GetParameterType() string { if o == nil { @@ -200,27 +227,29 @@ func (o *ParameterTypeRule) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *ParameterTypeRule) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ParameterTypeRule) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *ParameterTypeRule) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o ParameterTypeRule) MarshalJSON() ([]byte, error) { @@ -235,11 +264,12 @@ func (o ParameterTypeRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId toSerialize["parameter_type"] = o.ParameterType toSerialize["type"] = o.Type toSerialize["constraint"] = o.Constraint toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_parameter_type_rule_update.go b/pkg/cloudtruthapi/model_parameter_type_rule_update.go new file mode 100644 index 0000000..4ec96b5 --- /dev/null +++ b/pkg/cloudtruthapi/model_parameter_type_rule_update.go @@ -0,0 +1,257 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the ParameterTypeRuleUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ParameterTypeRuleUpdate{} + +// ParameterTypeRuleUpdate A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead of primary key relationships. Specifically: * A 'url' field is included instead of the 'id' field. * Relationships to other instances are hyperlinks, instead of primary keys. NOTE: this only works with DRF 3.1.0 and above. +type ParameterTypeRuleUpdate struct { + Id string `json:"id"` + // The type this rule is for. + ParameterType string `json:"parameter_type"` + Type ParameterRuleTypeEnum `json:"type"` + Constraint string `json:"constraint"` + CreatedAt time.Time `json:"created_at"` + ModifiedAt NullableTime `json:"modified_at"` +} + +// NewParameterTypeRuleUpdate instantiates a new ParameterTypeRuleUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewParameterTypeRuleUpdate(id string, parameterType string, type_ ParameterRuleTypeEnum, constraint string, createdAt time.Time, modifiedAt NullableTime) *ParameterTypeRuleUpdate { + this := ParameterTypeRuleUpdate{} + this.Id = id + this.ParameterType = parameterType + this.Type = type_ + this.Constraint = constraint + this.CreatedAt = createdAt + this.ModifiedAt = modifiedAt + return &this +} + +// NewParameterTypeRuleUpdateWithDefaults instantiates a new ParameterTypeRuleUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewParameterTypeRuleUpdateWithDefaults() *ParameterTypeRuleUpdate { + this := ParameterTypeRuleUpdate{} + return &this +} + +// GetId returns the Id field value +func (o *ParameterTypeRuleUpdate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeRuleUpdate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ParameterTypeRuleUpdate) SetId(v string) { + o.Id = v +} + +// GetParameterType returns the ParameterType field value +func (o *ParameterTypeRuleUpdate) GetParameterType() string { + if o == nil { + var ret string + return ret + } + + return o.ParameterType +} + +// GetParameterTypeOk returns a tuple with the ParameterType field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeRuleUpdate) GetParameterTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ParameterType, true +} + +// SetParameterType sets field value +func (o *ParameterTypeRuleUpdate) SetParameterType(v string) { + o.ParameterType = v +} + +// GetType returns the Type field value +func (o *ParameterTypeRuleUpdate) GetType() ParameterRuleTypeEnum { + if o == nil { + var ret ParameterRuleTypeEnum + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeRuleUpdate) GetTypeOk() (*ParameterRuleTypeEnum, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ParameterTypeRuleUpdate) SetType(v ParameterRuleTypeEnum) { + o.Type = v +} + +// GetConstraint returns the Constraint field value +func (o *ParameterTypeRuleUpdate) GetConstraint() string { + if o == nil { + var ret string + return ret + } + + return o.Constraint +} + +// GetConstraintOk returns a tuple with the Constraint field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeRuleUpdate) GetConstraintOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Constraint, true +} + +// SetConstraint sets field value +func (o *ParameterTypeRuleUpdate) SetConstraint(v string) { + o.Constraint = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ParameterTypeRuleUpdate) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeRuleUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ParameterTypeRuleUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ParameterTypeRuleUpdate) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ParameterTypeRuleUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// SetModifiedAt sets field value +func (o *ParameterTypeRuleUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} + +func (o ParameterTypeRuleUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ParameterTypeRuleUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["parameter_type"] = o.ParameterType + toSerialize["type"] = o.Type + toSerialize["constraint"] = o.Constraint + toSerialize["created_at"] = o.CreatedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() + return toSerialize, nil +} + +type NullableParameterTypeRuleUpdate struct { + value *ParameterTypeRuleUpdate + isSet bool +} + +func (v NullableParameterTypeRuleUpdate) Get() *ParameterTypeRuleUpdate { + return v.value +} + +func (v *NullableParameterTypeRuleUpdate) Set(val *ParameterTypeRuleUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableParameterTypeRuleUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableParameterTypeRuleUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableParameterTypeRuleUpdate(val *ParameterTypeRuleUpdate) *NullableParameterTypeRuleUpdate { + return &NullableParameterTypeRuleUpdate{value: val, isSet: true} +} + +func (v NullableParameterTypeRuleUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableParameterTypeRuleUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_parameter_type_update.go b/pkg/cloudtruthapi/model_parameter_type_update.go new file mode 100644 index 0000000..285cf30 --- /dev/null +++ b/pkg/cloudtruthapi/model_parameter_type_update.go @@ -0,0 +1,296 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the ParameterTypeUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ParameterTypeUpdate{} + +// ParameterTypeUpdate struct for ParameterTypeUpdate +type ParameterTypeUpdate struct { + Id string `json:"id"` + // The parameter type name. + Name string `json:"name"` + // A description of the parameter type, provide documentation on how to use this type here. + Description *string `json:"description,omitempty"` + // The URL for this parameter type's parent + Parent string `json:"parent"` + // Rules applied to this parameter. + Rules []ParameterTypeRule `json:"rules"` + CreatedAt time.Time `json:"created_at"` + ModifiedAt NullableTime `json:"modified_at"` +} + +// NewParameterTypeUpdate instantiates a new ParameterTypeUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewParameterTypeUpdate(id string, name string, parent string, rules []ParameterTypeRule, createdAt time.Time, modifiedAt NullableTime) *ParameterTypeUpdate { + this := ParameterTypeUpdate{} + this.Id = id + this.Name = name + this.Parent = parent + this.Rules = rules + this.CreatedAt = createdAt + this.ModifiedAt = modifiedAt + return &this +} + +// NewParameterTypeUpdateWithDefaults instantiates a new ParameterTypeUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewParameterTypeUpdateWithDefaults() *ParameterTypeUpdate { + this := ParameterTypeUpdate{} + return &this +} + +// GetId returns the Id field value +func (o *ParameterTypeUpdate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeUpdate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ParameterTypeUpdate) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ParameterTypeUpdate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeUpdate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ParameterTypeUpdate) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ParameterTypeUpdate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ParameterTypeUpdate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ParameterTypeUpdate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ParameterTypeUpdate) SetDescription(v string) { + o.Description = &v +} + +// GetParent returns the Parent field value +func (o *ParameterTypeUpdate) GetParent() string { + if o == nil { + var ret string + return ret + } + + return o.Parent +} + +// GetParentOk returns a tuple with the Parent field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeUpdate) GetParentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Parent, true +} + +// SetParent sets field value +func (o *ParameterTypeUpdate) SetParent(v string) { + o.Parent = v +} + +// GetRules returns the Rules field value +func (o *ParameterTypeUpdate) GetRules() []ParameterTypeRule { + if o == nil { + var ret []ParameterTypeRule + return ret + } + + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeUpdate) GetRulesOk() ([]ParameterTypeRule, bool) { + if o == nil { + return nil, false + } + return o.Rules, true +} + +// SetRules sets field value +func (o *ParameterTypeUpdate) SetRules(v []ParameterTypeRule) { + o.Rules = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ParameterTypeUpdate) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ParameterTypeUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ParameterTypeUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ParameterTypeUpdate) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ParameterTypeUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// SetModifiedAt sets field value +func (o *ParameterTypeUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} + +func (o ParameterTypeUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ParameterTypeUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["parent"] = o.Parent + toSerialize["rules"] = o.Rules + toSerialize["created_at"] = o.CreatedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() + return toSerialize, nil +} + +type NullableParameterTypeUpdate struct { + value *ParameterTypeUpdate + isSet bool +} + +func (v NullableParameterTypeUpdate) Get() *ParameterTypeUpdate { + return v.value +} + +func (v *NullableParameterTypeUpdate) Set(val *ParameterTypeUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableParameterTypeUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableParameterTypeUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableParameterTypeUpdate(val *ParameterTypeUpdate) *NullableParameterTypeUpdate { + return &NullableParameterTypeUpdate{value: val, isSet: true} +} + +func (v NullableParameterTypeUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableParameterTypeUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_parameter_update.go b/pkg/cloudtruthapi/model_parameter_update.go new file mode 100644 index 0000000..da436fa --- /dev/null +++ b/pkg/cloudtruthapi/model_parameter_update.go @@ -0,0 +1,333 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the ParameterUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ParameterUpdate{} + +// ParameterUpdate A single parameter inside of a project. +type ParameterUpdate struct { + Id string `json:"id"` + // The parameter name. + Name string `json:"name"` + // A description of the parameter. You may find it helpful to document how this parameter is used to assist others when they need to maintain software that uses this content. + Description *string `json:"description,omitempty"` + // Indicates if this content is secret or not. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used. + Secret bool `json:"secret"` + // The type of this Parameter. If not provided, this will default to a string for Parameters that are not overrides or to the overridden Parameter's type for Parameters that are overrides. + Type *string `json:"type,omitempty"` + // The project url. + Project string `json:"project"` + CreatedAt time.Time `json:"created_at"` + ModifiedAt NullableTime `json:"modified_at"` +} + +// NewParameterUpdate instantiates a new ParameterUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewParameterUpdate(id string, name string, secret bool, project string, createdAt time.Time, modifiedAt NullableTime) *ParameterUpdate { + this := ParameterUpdate{} + this.Id = id + this.Name = name + this.Secret = secret + this.Project = project + this.CreatedAt = createdAt + this.ModifiedAt = modifiedAt + return &this +} + +// NewParameterUpdateWithDefaults instantiates a new ParameterUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewParameterUpdateWithDefaults() *ParameterUpdate { + this := ParameterUpdate{} + return &this +} + +// GetId returns the Id field value +func (o *ParameterUpdate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ParameterUpdate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ParameterUpdate) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ParameterUpdate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ParameterUpdate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ParameterUpdate) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ParameterUpdate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ParameterUpdate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ParameterUpdate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ParameterUpdate) SetDescription(v string) { + o.Description = &v +} + +// GetSecret returns the Secret field value +func (o *ParameterUpdate) GetSecret() bool { + if o == nil { + var ret bool + return ret + } + + return o.Secret +} + +// GetSecretOk returns a tuple with the Secret field value +// and a boolean to check if the value has been set. +func (o *ParameterUpdate) GetSecretOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Secret, true +} + +// SetSecret sets field value +func (o *ParameterUpdate) SetSecret(v bool) { + o.Secret = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ParameterUpdate) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ParameterUpdate) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ParameterUpdate) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ParameterUpdate) SetType(v string) { + o.Type = &v +} + +// GetProject returns the Project field value +func (o *ParameterUpdate) GetProject() string { + if o == nil { + var ret string + return ret + } + + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value +// and a boolean to check if the value has been set. +func (o *ParameterUpdate) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Project, true +} + +// SetProject sets field value +func (o *ParameterUpdate) SetProject(v string) { + o.Project = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ParameterUpdate) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ParameterUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ParameterUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ParameterUpdate) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ParameterUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// SetModifiedAt sets field value +func (o *ParameterUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} + +func (o ParameterUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ParameterUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["secret"] = o.Secret + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["project"] = o.Project + toSerialize["created_at"] = o.CreatedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() + return toSerialize, nil +} + +type NullableParameterUpdate struct { + value *ParameterUpdate + isSet bool +} + +func (v NullableParameterUpdate) Get() *ParameterUpdate { + return v.value +} + +func (v *NullableParameterUpdate) Set(val *ParameterUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableParameterUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableParameterUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableParameterUpdate(val *ParameterUpdate) *NullableParameterUpdate { + return &NullableParameterUpdate{value: val, isSet: true} +} + +func (v NullableParameterUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableParameterUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_parameter_values_value.go b/pkg/cloudtruthapi/model_parameter_values_value.go deleted file mode 100644 index b03934c..0000000 --- a/pkg/cloudtruthapi/model_parameter_values_value.go +++ /dev/null @@ -1,731 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" - "time" -) - -// ParameterValuesValue struct for ParameterValuesValue -type ParameterValuesValue struct { - Url string `json:"url"` - // A unique identifier for the value. - Id string `json:"id"` - // The environment this value is set in. - Environment string `json:"environment"` - // The environment name for this value. This is a convenience to avoid another query against the server to resolve the environment url into a name. - EnvironmentName string `json:"environment_name"` - // The earliest tag name this value appears in (within the value's environment). - EarliestTag NullableString `json:"earliest_tag"` - // The parameter this value is for. - Parameter string `json:"parameter"` - // An external parameter leverages a CloudTruth integration to retrieve content on-demand from an external source. When this is `false` the value is stored by CloudTruth and considered to be _internal_. When this is `true`, the `external_fqn` field must be set. - External *bool `json:"external,omitempty"` - // The FQN, or Fully-Qualified Name, is the path through the integration to get to the desired content. This must be present and reference a valid integration when the value is `external`. - ExternalFqn *string `json:"external_fqn,omitempty"` - // If the value is `external`, the content returned by the integration can be reduced by applying a JMESpath expression. This is valid as long as the content is structured and of a supported format. JMESpath expressions are supported on `json`, `yaml`, and `dotenv` content. - ExternalFilter *string `json:"external_filter,omitempty"` - // This field is deprecated and unused. - ExternalError NullableString `json:"external_error"` - ExternalStatus NullablePatchedValueExternalStatus `json:"external_status"` - // This is the content to use when resolving the Value for an internal non-secret, or when storing a secret. When storing a secret, this content is stored in your organization's dedicated vault and this field is cleared. This field is required if the value is being created or updated and is `internal`. This field cannot be specified when creating or updating an `external` value. - InternalValue NullableString `json:"internal_value,omitempty"` - // If `true`, apply template substitution rules to this value. If `false`, this value is a literal value. Note: secrets cannot be interpolated. - Interpolated *bool `json:"interpolated,omitempty"` - // This is the actual content of the Value for the given parameter in the given environment. If you request secret masking, no secret content will be included in the result and instead a series of asterisks will be used instead for the value. If you request wrapping, the secret content will be wrapped in an envelope that is bound to your JWT token. For more information about secret wrapping, see the docs. Clients applying this value to a shell environment should set `=` even if `value` is the empty string. If `value` is `null`, the client should unset that shell environment variable. - Value NullableString `json:"value"` - // If true, the `value` field has undergone template evaluation. - Evaluated bool `json:"evaluated"` - // Indicates the value content is a secret. Normally this is `true` when the parameter is a secret. It is possible for a parameter to be a secret with a external value that is not a secret. It is not possible to convert a parameter from a secret to a non-secret if any of the values are external and a secret. Clients can check this condition by leveraging this field. It is also possible for a parameter to not be a secret but for this value to be dynamic and reference a Parameter that is a secret. In this case, we indicate the value is a secret. - Secret NullableBool `json:"secret"` - // The parameters this value references, if interpolated. - ReferencedParameters []string `json:"referenced_parameters"` - // The templates this value references, if interpolated. - ReferencedTemplates []string `json:"referenced_templates"` - CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` -} - -// NewParameterValuesValue instantiates a new ParameterValuesValue object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewParameterValuesValue(url string, id string, environment string, environmentName string, earliestTag NullableString, parameter string, externalError NullableString, externalStatus NullablePatchedValueExternalStatus, value NullableString, evaluated bool, secret NullableBool, referencedParameters []string, referencedTemplates []string, createdAt time.Time, modifiedAt time.Time) *ParameterValuesValue { - this := ParameterValuesValue{} - this.Url = url - this.Id = id - this.Environment = environment - this.EnvironmentName = environmentName - this.EarliestTag = earliestTag - this.Parameter = parameter - this.ExternalError = externalError - this.ExternalStatus = externalStatus - this.Value = value - this.Evaluated = evaluated - this.Secret = secret - this.ReferencedParameters = referencedParameters - this.ReferencedTemplates = referencedTemplates - this.CreatedAt = createdAt - this.ModifiedAt = modifiedAt - return &this -} - -// NewParameterValuesValueWithDefaults instantiates a new ParameterValuesValue object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewParameterValuesValueWithDefaults() *ParameterValuesValue { - this := ParameterValuesValue{} - return &this -} - -// GetUrl returns the Url field value -func (o *ParameterValuesValue) GetUrl() string { - if o == nil { - var ret string - return ret - } - - return o.Url -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Url, true -} - -// SetUrl sets field value -func (o *ParameterValuesValue) SetUrl(v string) { - o.Url = v -} - -// GetId returns the Id field value -func (o *ParameterValuesValue) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ParameterValuesValue) SetId(v string) { - o.Id = v -} - -// GetEnvironment returns the Environment field value -func (o *ParameterValuesValue) GetEnvironment() string { - if o == nil { - var ret string - return ret - } - - return o.Environment -} - -// GetEnvironmentOk returns a tuple with the Environment field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetEnvironmentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Environment, true -} - -// SetEnvironment sets field value -func (o *ParameterValuesValue) SetEnvironment(v string) { - o.Environment = v -} - -// GetEnvironmentName returns the EnvironmentName field value -func (o *ParameterValuesValue) GetEnvironmentName() string { - if o == nil { - var ret string - return ret - } - - return o.EnvironmentName -} - -// GetEnvironmentNameOk returns a tuple with the EnvironmentName field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetEnvironmentNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EnvironmentName, true -} - -// SetEnvironmentName sets field value -func (o *ParameterValuesValue) SetEnvironmentName(v string) { - o.EnvironmentName = v -} - -// GetEarliestTag returns the EarliestTag field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ParameterValuesValue) GetEarliestTag() string { - if o == nil || o.EarliestTag.Get() == nil { - var ret string - return ret - } - - return *o.EarliestTag.Get() -} - -// GetEarliestTagOk returns a tuple with the EarliestTag field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ParameterValuesValue) GetEarliestTagOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.EarliestTag.Get(), o.EarliestTag.IsSet() -} - -// SetEarliestTag sets field value -func (o *ParameterValuesValue) SetEarliestTag(v string) { - o.EarliestTag.Set(&v) -} - -// GetParameter returns the Parameter field value -func (o *ParameterValuesValue) GetParameter() string { - if o == nil { - var ret string - return ret - } - - return o.Parameter -} - -// GetParameterOk returns a tuple with the Parameter field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetParameterOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Parameter, true -} - -// SetParameter sets field value -func (o *ParameterValuesValue) SetParameter(v string) { - o.Parameter = v -} - -// GetExternal returns the External field value if set, zero value otherwise. -func (o *ParameterValuesValue) GetExternal() bool { - if o == nil || o.External == nil { - var ret bool - return ret - } - return *o.External -} - -// GetExternalOk returns a tuple with the External field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetExternalOk() (*bool, bool) { - if o == nil || o.External == nil { - return nil, false - } - return o.External, true -} - -// HasExternal returns a boolean if a field has been set. -func (o *ParameterValuesValue) HasExternal() bool { - if o != nil && o.External != nil { - return true - } - - return false -} - -// SetExternal gets a reference to the given bool and assigns it to the External field. -func (o *ParameterValuesValue) SetExternal(v bool) { - o.External = &v -} - -// GetExternalFqn returns the ExternalFqn field value if set, zero value otherwise. -func (o *ParameterValuesValue) GetExternalFqn() string { - if o == nil || o.ExternalFqn == nil { - var ret string - return ret - } - return *o.ExternalFqn -} - -// GetExternalFqnOk returns a tuple with the ExternalFqn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetExternalFqnOk() (*string, bool) { - if o == nil || o.ExternalFqn == nil { - return nil, false - } - return o.ExternalFqn, true -} - -// HasExternalFqn returns a boolean if a field has been set. -func (o *ParameterValuesValue) HasExternalFqn() bool { - if o != nil && o.ExternalFqn != nil { - return true - } - - return false -} - -// SetExternalFqn gets a reference to the given string and assigns it to the ExternalFqn field. -func (o *ParameterValuesValue) SetExternalFqn(v string) { - o.ExternalFqn = &v -} - -// GetExternalFilter returns the ExternalFilter field value if set, zero value otherwise. -func (o *ParameterValuesValue) GetExternalFilter() string { - if o == nil || o.ExternalFilter == nil { - var ret string - return ret - } - return *o.ExternalFilter -} - -// GetExternalFilterOk returns a tuple with the ExternalFilter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetExternalFilterOk() (*string, bool) { - if o == nil || o.ExternalFilter == nil { - return nil, false - } - return o.ExternalFilter, true -} - -// HasExternalFilter returns a boolean if a field has been set. -func (o *ParameterValuesValue) HasExternalFilter() bool { - if o != nil && o.ExternalFilter != nil { - return true - } - - return false -} - -// SetExternalFilter gets a reference to the given string and assigns it to the ExternalFilter field. -func (o *ParameterValuesValue) SetExternalFilter(v string) { - o.ExternalFilter = &v -} - -// GetExternalError returns the ExternalError field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ParameterValuesValue) GetExternalError() string { - if o == nil || o.ExternalError.Get() == nil { - var ret string - return ret - } - - return *o.ExternalError.Get() -} - -// GetExternalErrorOk returns a tuple with the ExternalError field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ParameterValuesValue) GetExternalErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ExternalError.Get(), o.ExternalError.IsSet() -} - -// SetExternalError sets field value -func (o *ParameterValuesValue) SetExternalError(v string) { - o.ExternalError.Set(&v) -} - -// GetExternalStatus returns the ExternalStatus field value -// If the value is explicit nil, the zero value for PatchedValueExternalStatus will be returned -func (o *ParameterValuesValue) GetExternalStatus() PatchedValueExternalStatus { - if o == nil || o.ExternalStatus.Get() == nil { - var ret PatchedValueExternalStatus - return ret - } - - return *o.ExternalStatus.Get() -} - -// GetExternalStatusOk returns a tuple with the ExternalStatus field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ParameterValuesValue) GetExternalStatusOk() (*PatchedValueExternalStatus, bool) { - if o == nil { - return nil, false - } - return o.ExternalStatus.Get(), o.ExternalStatus.IsSet() -} - -// SetExternalStatus sets field value -func (o *ParameterValuesValue) SetExternalStatus(v PatchedValueExternalStatus) { - o.ExternalStatus.Set(&v) -} - -// GetInternalValue returns the InternalValue field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ParameterValuesValue) GetInternalValue() string { - if o == nil || o.InternalValue.Get() == nil { - var ret string - return ret - } - return *o.InternalValue.Get() -} - -// GetInternalValueOk returns a tuple with the InternalValue field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ParameterValuesValue) GetInternalValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.InternalValue.Get(), o.InternalValue.IsSet() -} - -// HasInternalValue returns a boolean if a field has been set. -func (o *ParameterValuesValue) HasInternalValue() bool { - if o != nil && o.InternalValue.IsSet() { - return true - } - - return false -} - -// SetInternalValue gets a reference to the given NullableString and assigns it to the InternalValue field. -func (o *ParameterValuesValue) SetInternalValue(v string) { - o.InternalValue.Set(&v) -} - -// SetInternalValueNil sets the value for InternalValue to be an explicit nil -func (o *ParameterValuesValue) SetInternalValueNil() { - o.InternalValue.Set(nil) -} - -// UnsetInternalValue ensures that no value is present for InternalValue, not even an explicit nil -func (o *ParameterValuesValue) UnsetInternalValue() { - o.InternalValue.Unset() -} - -// GetInterpolated returns the Interpolated field value if set, zero value otherwise. -func (o *ParameterValuesValue) GetInterpolated() bool { - if o == nil || o.Interpolated == nil { - var ret bool - return ret - } - return *o.Interpolated -} - -// GetInterpolatedOk returns a tuple with the Interpolated field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetInterpolatedOk() (*bool, bool) { - if o == nil || o.Interpolated == nil { - return nil, false - } - return o.Interpolated, true -} - -// HasInterpolated returns a boolean if a field has been set. -func (o *ParameterValuesValue) HasInterpolated() bool { - if o != nil && o.Interpolated != nil { - return true - } - - return false -} - -// SetInterpolated gets a reference to the given bool and assigns it to the Interpolated field. -func (o *ParameterValuesValue) SetInterpolated(v bool) { - o.Interpolated = &v -} - -// GetValue returns the Value field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ParameterValuesValue) GetValue() string { - if o == nil || o.Value.Get() == nil { - var ret string - return ret - } - - return *o.Value.Get() -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ParameterValuesValue) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Value.Get(), o.Value.IsSet() -} - -// SetValue sets field value -func (o *ParameterValuesValue) SetValue(v string) { - o.Value.Set(&v) -} - -// GetEvaluated returns the Evaluated field value -func (o *ParameterValuesValue) GetEvaluated() bool { - if o == nil { - var ret bool - return ret - } - - return o.Evaluated -} - -// GetEvaluatedOk returns a tuple with the Evaluated field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetEvaluatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Evaluated, true -} - -// SetEvaluated sets field value -func (o *ParameterValuesValue) SetEvaluated(v bool) { - o.Evaluated = v -} - -// GetSecret returns the Secret field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ParameterValuesValue) GetSecret() bool { - if o == nil || o.Secret.Get() == nil { - var ret bool - return ret - } - - return *o.Secret.Get() -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ParameterValuesValue) GetSecretOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Secret.Get(), o.Secret.IsSet() -} - -// SetSecret sets field value -func (o *ParameterValuesValue) SetSecret(v bool) { - o.Secret.Set(&v) -} - -// GetReferencedParameters returns the ReferencedParameters field value -func (o *ParameterValuesValue) GetReferencedParameters() []string { - if o == nil { - var ret []string - return ret - } - - return o.ReferencedParameters -} - -// GetReferencedParametersOk returns a tuple with the ReferencedParameters field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetReferencedParametersOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ReferencedParameters, true -} - -// SetReferencedParameters sets field value -func (o *ParameterValuesValue) SetReferencedParameters(v []string) { - o.ReferencedParameters = v -} - -// GetReferencedTemplates returns the ReferencedTemplates field value -func (o *ParameterValuesValue) GetReferencedTemplates() []string { - if o == nil { - var ret []string - return ret - } - - return o.ReferencedTemplates -} - -// GetReferencedTemplatesOk returns a tuple with the ReferencedTemplates field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetReferencedTemplatesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ReferencedTemplates, true -} - -// SetReferencedTemplates sets field value -func (o *ParameterValuesValue) SetReferencedTemplates(v []string) { - o.ReferencedTemplates = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *ParameterValuesValue) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *ParameterValuesValue) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetModifiedAt returns the ModifiedAt field value -func (o *ParameterValuesValue) GetModifiedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ModifiedAt -} - -// GetModifiedAtOk returns a tuple with the ModifiedAt field value -// and a boolean to check if the value has been set. -func (o *ParameterValuesValue) GetModifiedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ModifiedAt, true -} - -// SetModifiedAt sets field value -func (o *ParameterValuesValue) SetModifiedAt(v time.Time) { - o.ModifiedAt = v -} - -func (o ParameterValuesValue) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["url"] = o.Url - } - if true { - toSerialize["id"] = o.Id - } - if true { - toSerialize["environment"] = o.Environment - } - if true { - toSerialize["environment_name"] = o.EnvironmentName - } - if true { - toSerialize["earliest_tag"] = o.EarliestTag.Get() - } - if true { - toSerialize["parameter"] = o.Parameter - } - if o.External != nil { - toSerialize["external"] = o.External - } - if o.ExternalFqn != nil { - toSerialize["external_fqn"] = o.ExternalFqn - } - if o.ExternalFilter != nil { - toSerialize["external_filter"] = o.ExternalFilter - } - if true { - toSerialize["external_error"] = o.ExternalError.Get() - } - if true { - toSerialize["external_status"] = o.ExternalStatus.Get() - } - if o.InternalValue.IsSet() { - toSerialize["internal_value"] = o.InternalValue.Get() - } - if o.Interpolated != nil { - toSerialize["interpolated"] = o.Interpolated - } - if true { - toSerialize["value"] = o.Value.Get() - } - if true { - toSerialize["evaluated"] = o.Evaluated - } - if true { - toSerialize["secret"] = o.Secret.Get() - } - if true { - toSerialize["referenced_parameters"] = o.ReferencedParameters - } - if true { - toSerialize["referenced_templates"] = o.ReferencedTemplates - } - if true { - toSerialize["created_at"] = o.CreatedAt - } - if true { - toSerialize["modified_at"] = o.ModifiedAt - } - return json.Marshal(toSerialize) -} - -type NullableParameterValuesValue struct { - value *ParameterValuesValue - isSet bool -} - -func (v NullableParameterValuesValue) Get() *ParameterValuesValue { - return v.value -} - -func (v *NullableParameterValuesValue) Set(val *ParameterValuesValue) { - v.value = val - v.isSet = true -} - -func (v NullableParameterValuesValue) IsSet() bool { - return v.isSet -} - -func (v *NullableParameterValuesValue) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableParameterValuesValue(val *ParameterValuesValue) *NullableParameterValuesValue { - return &NullableParameterValuesValue{value: val, isSet: true} -} - -func (v NullableParameterValuesValue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableParameterValuesValue) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/cloudtruthapi/model_patched_aws_integration.go b/pkg/cloudtruthapi/model_patched_aws_integration.go index f06a808..2ad35bc 100644 --- a/pkg/cloudtruthapi/model_patched_aws_integration.go +++ b/pkg/cloudtruthapi/model_patched_aws_integration.go @@ -31,9 +31,9 @@ type PatchedAwsIntegration struct { // If an error occurs, more details will be available in this field. StatusDetail *string `json:"status_detail,omitempty"` // The last time the status was evaluated. - StatusLastCheckedAt *time.Time `json:"status_last_checked_at,omitempty"` + StatusLastCheckedAt NullableTime `json:"status_last_checked_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` Fqn *string `json:"fqn,omitempty"` // The type of integration. Type *string `json:"type,omitempty"` @@ -262,36 +262,46 @@ func (o *PatchedAwsIntegration) SetStatusDetail(v string) { o.StatusDetail = &v } -// GetStatusLastCheckedAt returns the StatusLastCheckedAt field value if set, zero value otherwise. +// GetStatusLastCheckedAt returns the StatusLastCheckedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAwsIntegration) GetStatusLastCheckedAt() time.Time { - if o == nil || IsNil(o.StatusLastCheckedAt) { + if o == nil || IsNil(o.StatusLastCheckedAt.Get()) { var ret time.Time return ret } - return *o.StatusLastCheckedAt + return *o.StatusLastCheckedAt.Get() } // GetStatusLastCheckedAtOk returns a tuple with the StatusLastCheckedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedAwsIntegration) GetStatusLastCheckedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.StatusLastCheckedAt) { + if o == nil { return nil, false } - return o.StatusLastCheckedAt, true + return o.StatusLastCheckedAt.Get(), o.StatusLastCheckedAt.IsSet() } // HasStatusLastCheckedAt returns a boolean if a field has been set. func (o *PatchedAwsIntegration) HasStatusLastCheckedAt() bool { - if o != nil && !IsNil(o.StatusLastCheckedAt) { + if o != nil && o.StatusLastCheckedAt.IsSet() { return true } return false } -// SetStatusLastCheckedAt gets a reference to the given time.Time and assigns it to the StatusLastCheckedAt field. +// SetStatusLastCheckedAt gets a reference to the given NullableTime and assigns it to the StatusLastCheckedAt field. func (o *PatchedAwsIntegration) SetStatusLastCheckedAt(v time.Time) { - o.StatusLastCheckedAt = &v + o.StatusLastCheckedAt.Set(&v) +} +// SetStatusLastCheckedAtNil sets the value for StatusLastCheckedAt to be an explicit nil +func (o *PatchedAwsIntegration) SetStatusLastCheckedAtNil() { + o.StatusLastCheckedAt.Set(nil) +} + +// UnsetStatusLastCheckedAt ensures that no value is present for StatusLastCheckedAt, not even an explicit nil +func (o *PatchedAwsIntegration) UnsetStatusLastCheckedAt() { + o.StatusLastCheckedAt.Unset() } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. @@ -326,36 +336,46 @@ func (o *PatchedAwsIntegration) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAwsIntegration) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedAwsIntegration) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedAwsIntegration) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedAwsIntegration) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedAwsIntegration) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedAwsIntegration) UnsetModifiedAt() { + o.ModifiedAt.Unset() } // GetFqn returns the Fqn field value if set, zero value otherwise. @@ -684,14 +704,14 @@ func (o PatchedAwsIntegration) ToMap() (map[string]interface{}, error) { if !IsNil(o.StatusDetail) { toSerialize["status_detail"] = o.StatusDetail } - if !IsNil(o.StatusLastCheckedAt) { - toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt + if o.StatusLastCheckedAt.IsSet() { + toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt.Get() } if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } if !IsNil(o.Fqn) { toSerialize["fqn"] = o.Fqn diff --git a/pkg/cloudtruthapi/model_patched_aws_pull.go b/pkg/cloudtruthapi/model_patched_aws_pull.go index 5dbd01a..56c7e17 100644 --- a/pkg/cloudtruthapi/model_patched_aws_pull.go +++ b/pkg/cloudtruthapi/model_patched_aws_pull.go @@ -30,7 +30,7 @@ type PatchedAwsPull struct { Description *string `json:"description,omitempty"` LatestTask NullableAwsPullLatestTask `json:"latest_task,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` // Allow the pull to create environments. Any automatically created environments will be children of the `default` environment. If an environment needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. CreateEnvironments *bool `json:"create_environments,omitempty"` // Allow the pull to create projects. If a project needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. @@ -38,7 +38,7 @@ type PatchedAwsPull struct { // When set to dry-run mode an action will report the changes that it would have made in task steps, however those changes are not actually performed. DryRun *bool `json:"dry_run,omitempty"` // Values being managed by a mapped pull. - MappedValues []Value `json:"mapped_values,omitempty"` + MappedValues []ValueCreate `json:"mapped_values,omitempty"` Mode *ModeEnum `json:"mode,omitempty"` Region *AwsRegionEnum `json:"region,omitempty"` Service *AwsServiceEnum `json:"service,omitempty"` @@ -265,36 +265,46 @@ func (o *PatchedAwsPull) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAwsPull) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedAwsPull) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedAwsPull) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedAwsPull) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedAwsPull) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedAwsPull) UnsetModifiedAt() { + o.ModifiedAt.Unset() } // GetCreateEnvironments returns the CreateEnvironments field value if set, zero value otherwise. @@ -394,9 +404,9 @@ func (o *PatchedAwsPull) SetDryRun(v bool) { } // GetMappedValues returns the MappedValues field value if set, zero value otherwise. -func (o *PatchedAwsPull) GetMappedValues() []Value { +func (o *PatchedAwsPull) GetMappedValues() []ValueCreate { if o == nil || IsNil(o.MappedValues) { - var ret []Value + var ret []ValueCreate return ret } return o.MappedValues @@ -404,7 +414,7 @@ func (o *PatchedAwsPull) GetMappedValues() []Value { // GetMappedValuesOk returns a tuple with the MappedValues field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedAwsPull) GetMappedValuesOk() ([]Value, bool) { +func (o *PatchedAwsPull) GetMappedValuesOk() ([]ValueCreate, bool) { if o == nil || IsNil(o.MappedValues) { return nil, false } @@ -420,8 +430,8 @@ func (o *PatchedAwsPull) HasMappedValues() bool { return false } -// SetMappedValues gets a reference to the given []Value and assigns it to the MappedValues field. -func (o *PatchedAwsPull) SetMappedValues(v []Value) { +// SetMappedValues gets a reference to the given []ValueCreate and assigns it to the MappedValues field. +func (o *PatchedAwsPull) SetMappedValues(v []ValueCreate) { o.MappedValues = v } @@ -591,8 +601,8 @@ func (o PatchedAwsPull) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } if !IsNil(o.CreateEnvironments) { toSerialize["create_environments"] = o.CreateEnvironments diff --git a/pkg/cloudtruthapi/model_patched_azure_key_vault_integration.go b/pkg/cloudtruthapi/model_patched_azure_key_vault_integration.go index 032f084..1bac1a7 100644 --- a/pkg/cloudtruthapi/model_patched_azure_key_vault_integration.go +++ b/pkg/cloudtruthapi/model_patched_azure_key_vault_integration.go @@ -31,9 +31,9 @@ type PatchedAzureKeyVaultIntegration struct { // If an error occurs, more details will be available in this field. StatusDetail *string `json:"status_detail,omitempty"` // The last time the status was evaluated. - StatusLastCheckedAt *time.Time `json:"status_last_checked_at,omitempty"` + StatusLastCheckedAt NullableTime `json:"status_last_checked_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` Fqn *string `json:"fqn,omitempty"` // The type of integration. Type *string `json:"type,omitempty"` @@ -254,36 +254,46 @@ func (o *PatchedAzureKeyVaultIntegration) SetStatusDetail(v string) { o.StatusDetail = &v } -// GetStatusLastCheckedAt returns the StatusLastCheckedAt field value if set, zero value otherwise. +// GetStatusLastCheckedAt returns the StatusLastCheckedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAzureKeyVaultIntegration) GetStatusLastCheckedAt() time.Time { - if o == nil || IsNil(o.StatusLastCheckedAt) { + if o == nil || IsNil(o.StatusLastCheckedAt.Get()) { var ret time.Time return ret } - return *o.StatusLastCheckedAt + return *o.StatusLastCheckedAt.Get() } // GetStatusLastCheckedAtOk returns a tuple with the StatusLastCheckedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedAzureKeyVaultIntegration) GetStatusLastCheckedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.StatusLastCheckedAt) { + if o == nil { return nil, false } - return o.StatusLastCheckedAt, true + return o.StatusLastCheckedAt.Get(), o.StatusLastCheckedAt.IsSet() } // HasStatusLastCheckedAt returns a boolean if a field has been set. func (o *PatchedAzureKeyVaultIntegration) HasStatusLastCheckedAt() bool { - if o != nil && !IsNil(o.StatusLastCheckedAt) { + if o != nil && o.StatusLastCheckedAt.IsSet() { return true } return false } -// SetStatusLastCheckedAt gets a reference to the given time.Time and assigns it to the StatusLastCheckedAt field. +// SetStatusLastCheckedAt gets a reference to the given NullableTime and assigns it to the StatusLastCheckedAt field. func (o *PatchedAzureKeyVaultIntegration) SetStatusLastCheckedAt(v time.Time) { - o.StatusLastCheckedAt = &v + o.StatusLastCheckedAt.Set(&v) +} +// SetStatusLastCheckedAtNil sets the value for StatusLastCheckedAt to be an explicit nil +func (o *PatchedAzureKeyVaultIntegration) SetStatusLastCheckedAtNil() { + o.StatusLastCheckedAt.Set(nil) +} + +// UnsetStatusLastCheckedAt ensures that no value is present for StatusLastCheckedAt, not even an explicit nil +func (o *PatchedAzureKeyVaultIntegration) UnsetStatusLastCheckedAt() { + o.StatusLastCheckedAt.Unset() } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. @@ -318,36 +328,46 @@ func (o *PatchedAzureKeyVaultIntegration) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAzureKeyVaultIntegration) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedAzureKeyVaultIntegration) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedAzureKeyVaultIntegration) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedAzureKeyVaultIntegration) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedAzureKeyVaultIntegration) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedAzureKeyVaultIntegration) UnsetModifiedAt() { + o.ModifiedAt.Unset() } // GetFqn returns the Fqn field value if set, zero value otherwise. @@ -538,14 +558,14 @@ func (o PatchedAzureKeyVaultIntegration) ToMap() (map[string]interface{}, error) if !IsNil(o.StatusDetail) { toSerialize["status_detail"] = o.StatusDetail } - if !IsNil(o.StatusLastCheckedAt) { - toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt + if o.StatusLastCheckedAt.IsSet() { + toSerialize["status_last_checked_at"] = o.StatusLastCheckedAt.Get() } if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } if !IsNil(o.Fqn) { toSerialize["fqn"] = o.Fqn diff --git a/pkg/cloudtruthapi/model_patched_azure_key_vault_pull.go b/pkg/cloudtruthapi/model_patched_azure_key_vault_pull.go index 721ce06..7e4e20b 100644 --- a/pkg/cloudtruthapi/model_patched_azure_key_vault_pull.go +++ b/pkg/cloudtruthapi/model_patched_azure_key_vault_pull.go @@ -30,7 +30,7 @@ type PatchedAzureKeyVaultPull struct { Description *string `json:"description,omitempty"` LatestTask NullableAzureKeyVaultPullLatestTask `json:"latest_task,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` // Allow the pull to create environments. Any automatically created environments will be children of the `default` environment. If an environment needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. CreateEnvironments *bool `json:"create_environments,omitempty"` // Allow the pull to create projects. If a project needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. @@ -38,7 +38,7 @@ type PatchedAzureKeyVaultPull struct { // When set to dry-run mode an action will report the changes that it would have made in task steps, however those changes are not actually performed. DryRun *bool `json:"dry_run,omitempty"` // Values being managed by a mapped pull. - MappedValues []Value `json:"mapped_values,omitempty"` + MappedValues []ValueCreate `json:"mapped_values,omitempty"` Mode *ModeEnum `json:"mode,omitempty"` // Defines a pattern matching string that contains either mustache or regular expression syntax (with named capture groups) that locate the environment, project, and parameter name of the content you are looking for. If you are using mustache pattern matching, use: - ``{{ environment }}`` to identify the environment name - ``{{ parameter }}`` to identify the parameter name - ``{{ project }}`` to identify the project name If you are using a regular expression, use Python syntax with named capture groups that locate the `environment`, `project`, and `parameter`. Resource NullableString `json:"resource,omitempty"` @@ -263,36 +263,46 @@ func (o *PatchedAzureKeyVaultPull) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAzureKeyVaultPull) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedAzureKeyVaultPull) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedAzureKeyVaultPull) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedAzureKeyVaultPull) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedAzureKeyVaultPull) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedAzureKeyVaultPull) UnsetModifiedAt() { + o.ModifiedAt.Unset() } // GetCreateEnvironments returns the CreateEnvironments field value if set, zero value otherwise. @@ -392,9 +402,9 @@ func (o *PatchedAzureKeyVaultPull) SetDryRun(v bool) { } // GetMappedValues returns the MappedValues field value if set, zero value otherwise. -func (o *PatchedAzureKeyVaultPull) GetMappedValues() []Value { +func (o *PatchedAzureKeyVaultPull) GetMappedValues() []ValueCreate { if o == nil || IsNil(o.MappedValues) { - var ret []Value + var ret []ValueCreate return ret } return o.MappedValues @@ -402,7 +412,7 @@ func (o *PatchedAzureKeyVaultPull) GetMappedValues() []Value { // GetMappedValuesOk returns a tuple with the MappedValues field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedAzureKeyVaultPull) GetMappedValuesOk() ([]Value, bool) { +func (o *PatchedAzureKeyVaultPull) GetMappedValuesOk() ([]ValueCreate, bool) { if o == nil || IsNil(o.MappedValues) { return nil, false } @@ -418,8 +428,8 @@ func (o *PatchedAzureKeyVaultPull) HasMappedValues() bool { return false } -// SetMappedValues gets a reference to the given []Value and assigns it to the MappedValues field. -func (o *PatchedAzureKeyVaultPull) SetMappedValues(v []Value) { +// SetMappedValues gets a reference to the given []ValueCreate and assigns it to the MappedValues field. +func (o *PatchedAzureKeyVaultPull) SetMappedValues(v []ValueCreate) { o.MappedValues = v } @@ -525,8 +535,8 @@ func (o PatchedAzureKeyVaultPull) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } if !IsNil(o.CreateEnvironments) { toSerialize["create_environments"] = o.CreateEnvironments diff --git a/pkg/cloudtruthapi/model_patched_environment.go b/pkg/cloudtruthapi/model_patched_environment_update.go similarity index 64% rename from pkg/cloudtruthapi/model_patched_environment.go rename to pkg/cloudtruthapi/model_patched_environment_update.go index 1b634f0..841bbe7 100644 --- a/pkg/cloudtruthapi/model_patched_environment.go +++ b/pkg/cloudtruthapi/model_patched_environment_update.go @@ -16,13 +16,11 @@ import ( "time" ) -// checks if the PatchedEnvironment type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchedEnvironment{} +// checks if the PatchedEnvironmentUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedEnvironmentUpdate{} -// PatchedEnvironment struct for PatchedEnvironment -type PatchedEnvironment struct { - Url *string `json:"url,omitempty"` - // A unique identifier for the environment. +// PatchedEnvironmentUpdate struct for PatchedEnvironmentUpdate +type PatchedEnvironmentUpdate struct { Id *string `json:"id,omitempty"` // The environment name. Name *string `json:"name,omitempty"` @@ -36,60 +34,28 @@ type PatchedEnvironment struct { AccessControlled *bool `json:"access_controlled,omitempty"` Role NullableRoleEnum `json:"role,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` } -// NewPatchedEnvironment instantiates a new PatchedEnvironment object +// NewPatchedEnvironmentUpdate instantiates a new PatchedEnvironmentUpdate object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPatchedEnvironment() *PatchedEnvironment { - this := PatchedEnvironment{} +func NewPatchedEnvironmentUpdate() *PatchedEnvironmentUpdate { + this := PatchedEnvironmentUpdate{} return &this } -// NewPatchedEnvironmentWithDefaults instantiates a new PatchedEnvironment object +// NewPatchedEnvironmentUpdateWithDefaults instantiates a new PatchedEnvironmentUpdate object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewPatchedEnvironmentWithDefaults() *PatchedEnvironment { - this := PatchedEnvironment{} +func NewPatchedEnvironmentUpdateWithDefaults() *PatchedEnvironmentUpdate { + this := PatchedEnvironmentUpdate{} return &this } -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *PatchedEnvironment) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedEnvironment) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *PatchedEnvironment) SetUrl(v string) { - o.Url = &v -} - // GetId returns the Id field value if set, zero value otherwise. -func (o *PatchedEnvironment) GetId() string { +func (o *PatchedEnvironmentUpdate) GetId() string { if o == nil || IsNil(o.Id) { var ret string return ret @@ -99,7 +65,7 @@ func (o *PatchedEnvironment) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedEnvironment) GetIdOk() (*string, bool) { +func (o *PatchedEnvironmentUpdate) GetIdOk() (*string, bool) { if o == nil || IsNil(o.Id) { return nil, false } @@ -107,7 +73,7 @@ func (o *PatchedEnvironment) GetIdOk() (*string, bool) { } // HasId returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasId() bool { +func (o *PatchedEnvironmentUpdate) HasId() bool { if o != nil && !IsNil(o.Id) { return true } @@ -116,12 +82,12 @@ func (o *PatchedEnvironment) HasId() bool { } // SetId gets a reference to the given string and assigns it to the Id field. -func (o *PatchedEnvironment) SetId(v string) { +func (o *PatchedEnvironmentUpdate) SetId(v string) { o.Id = &v } // GetName returns the Name field value if set, zero value otherwise. -func (o *PatchedEnvironment) GetName() string { +func (o *PatchedEnvironmentUpdate) GetName() string { if o == nil || IsNil(o.Name) { var ret string return ret @@ -131,7 +97,7 @@ func (o *PatchedEnvironment) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedEnvironment) GetNameOk() (*string, bool) { +func (o *PatchedEnvironmentUpdate) GetNameOk() (*string, bool) { if o == nil || IsNil(o.Name) { return nil, false } @@ -139,7 +105,7 @@ func (o *PatchedEnvironment) GetNameOk() (*string, bool) { } // HasName returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasName() bool { +func (o *PatchedEnvironmentUpdate) HasName() bool { if o != nil && !IsNil(o.Name) { return true } @@ -148,12 +114,12 @@ func (o *PatchedEnvironment) HasName() bool { } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *PatchedEnvironment) SetName(v string) { +func (o *PatchedEnvironmentUpdate) SetName(v string) { o.Name = &v } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *PatchedEnvironment) GetDescription() string { +func (o *PatchedEnvironmentUpdate) GetDescription() string { if o == nil || IsNil(o.Description) { var ret string return ret @@ -163,7 +129,7 @@ func (o *PatchedEnvironment) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedEnvironment) GetDescriptionOk() (*string, bool) { +func (o *PatchedEnvironmentUpdate) GetDescriptionOk() (*string, bool) { if o == nil || IsNil(o.Description) { return nil, false } @@ -171,7 +137,7 @@ func (o *PatchedEnvironment) GetDescriptionOk() (*string, bool) { } // HasDescription returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasDescription() bool { +func (o *PatchedEnvironmentUpdate) HasDescription() bool { if o != nil && !IsNil(o.Description) { return true } @@ -180,12 +146,12 @@ func (o *PatchedEnvironment) HasDescription() bool { } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PatchedEnvironment) SetDescription(v string) { +func (o *PatchedEnvironmentUpdate) SetDescription(v string) { o.Description = &v } // GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedEnvironment) GetParent() string { +func (o *PatchedEnvironmentUpdate) GetParent() string { if o == nil || IsNil(o.Parent.Get()) { var ret string return ret @@ -196,7 +162,7 @@ func (o *PatchedEnvironment) GetParent() string { // GetParentOk returns a tuple with the Parent field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedEnvironment) GetParentOk() (*string, bool) { +func (o *PatchedEnvironmentUpdate) GetParentOk() (*string, bool) { if o == nil { return nil, false } @@ -204,7 +170,7 @@ func (o *PatchedEnvironment) GetParentOk() (*string, bool) { } // HasParent returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasParent() bool { +func (o *PatchedEnvironmentUpdate) HasParent() bool { if o != nil && o.Parent.IsSet() { return true } @@ -213,21 +179,21 @@ func (o *PatchedEnvironment) HasParent() bool { } // SetParent gets a reference to the given NullableString and assigns it to the Parent field. -func (o *PatchedEnvironment) SetParent(v string) { +func (o *PatchedEnvironmentUpdate) SetParent(v string) { o.Parent.Set(&v) } // SetParentNil sets the value for Parent to be an explicit nil -func (o *PatchedEnvironment) SetParentNil() { +func (o *PatchedEnvironmentUpdate) SetParentNil() { o.Parent.Set(nil) } // UnsetParent ensures that no value is present for Parent, not even an explicit nil -func (o *PatchedEnvironment) UnsetParent() { +func (o *PatchedEnvironmentUpdate) UnsetParent() { o.Parent.Unset() } // GetChildren returns the Children field value if set, zero value otherwise. -func (o *PatchedEnvironment) GetChildren() []string { +func (o *PatchedEnvironmentUpdate) GetChildren() []string { if o == nil || IsNil(o.Children) { var ret []string return ret @@ -237,7 +203,7 @@ func (o *PatchedEnvironment) GetChildren() []string { // GetChildrenOk returns a tuple with the Children field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedEnvironment) GetChildrenOk() ([]string, bool) { +func (o *PatchedEnvironmentUpdate) GetChildrenOk() ([]string, bool) { if o == nil || IsNil(o.Children) { return nil, false } @@ -245,7 +211,7 @@ func (o *PatchedEnvironment) GetChildrenOk() ([]string, bool) { } // HasChildren returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasChildren() bool { +func (o *PatchedEnvironmentUpdate) HasChildren() bool { if o != nil && !IsNil(o.Children) { return true } @@ -254,12 +220,12 @@ func (o *PatchedEnvironment) HasChildren() bool { } // SetChildren gets a reference to the given []string and assigns it to the Children field. -func (o *PatchedEnvironment) SetChildren(v []string) { +func (o *PatchedEnvironmentUpdate) SetChildren(v []string) { o.Children = v } // GetAccessControlled returns the AccessControlled field value if set, zero value otherwise. -func (o *PatchedEnvironment) GetAccessControlled() bool { +func (o *PatchedEnvironmentUpdate) GetAccessControlled() bool { if o == nil || IsNil(o.AccessControlled) { var ret bool return ret @@ -269,7 +235,7 @@ func (o *PatchedEnvironment) GetAccessControlled() bool { // GetAccessControlledOk returns a tuple with the AccessControlled field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedEnvironment) GetAccessControlledOk() (*bool, bool) { +func (o *PatchedEnvironmentUpdate) GetAccessControlledOk() (*bool, bool) { if o == nil || IsNil(o.AccessControlled) { return nil, false } @@ -277,7 +243,7 @@ func (o *PatchedEnvironment) GetAccessControlledOk() (*bool, bool) { } // HasAccessControlled returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasAccessControlled() bool { +func (o *PatchedEnvironmentUpdate) HasAccessControlled() bool { if o != nil && !IsNil(o.AccessControlled) { return true } @@ -286,12 +252,12 @@ func (o *PatchedEnvironment) HasAccessControlled() bool { } // SetAccessControlled gets a reference to the given bool and assigns it to the AccessControlled field. -func (o *PatchedEnvironment) SetAccessControlled(v bool) { +func (o *PatchedEnvironmentUpdate) SetAccessControlled(v bool) { o.AccessControlled = &v } // GetRole returns the Role field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedEnvironment) GetRole() RoleEnum { +func (o *PatchedEnvironmentUpdate) GetRole() RoleEnum { if o == nil || IsNil(o.Role.Get()) { var ret RoleEnum return ret @@ -302,7 +268,7 @@ func (o *PatchedEnvironment) GetRole() RoleEnum { // GetRoleOk returns a tuple with the Role field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedEnvironment) GetRoleOk() (*RoleEnum, bool) { +func (o *PatchedEnvironmentUpdate) GetRoleOk() (*RoleEnum, bool) { if o == nil { return nil, false } @@ -310,7 +276,7 @@ func (o *PatchedEnvironment) GetRoleOk() (*RoleEnum, bool) { } // HasRole returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasRole() bool { +func (o *PatchedEnvironmentUpdate) HasRole() bool { if o != nil && o.Role.IsSet() { return true } @@ -319,21 +285,21 @@ func (o *PatchedEnvironment) HasRole() bool { } // SetRole gets a reference to the given NullableRoleEnum and assigns it to the Role field. -func (o *PatchedEnvironment) SetRole(v RoleEnum) { +func (o *PatchedEnvironmentUpdate) SetRole(v RoleEnum) { o.Role.Set(&v) } // SetRoleNil sets the value for Role to be an explicit nil -func (o *PatchedEnvironment) SetRoleNil() { +func (o *PatchedEnvironmentUpdate) SetRoleNil() { o.Role.Set(nil) } // UnsetRole ensures that no value is present for Role, not even an explicit nil -func (o *PatchedEnvironment) UnsetRole() { +func (o *PatchedEnvironmentUpdate) UnsetRole() { o.Role.Unset() } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *PatchedEnvironment) GetCreatedAt() time.Time { +func (o *PatchedEnvironmentUpdate) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { var ret time.Time return ret @@ -343,7 +309,7 @@ func (o *PatchedEnvironment) GetCreatedAt() time.Time { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedEnvironment) GetCreatedAtOk() (*time.Time, bool) { +func (o *PatchedEnvironmentUpdate) GetCreatedAtOk() (*time.Time, bool) { if o == nil || IsNil(o.CreatedAt) { return nil, false } @@ -351,7 +317,7 @@ func (o *PatchedEnvironment) GetCreatedAtOk() (*time.Time, bool) { } // HasCreatedAt returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasCreatedAt() bool { +func (o *PatchedEnvironmentUpdate) HasCreatedAt() bool { if o != nil && !IsNil(o.CreatedAt) { return true } @@ -360,43 +326,53 @@ func (o *PatchedEnvironment) HasCreatedAt() bool { } // SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *PatchedEnvironment) SetCreatedAt(v time.Time) { +func (o *PatchedEnvironmentUpdate) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. -func (o *PatchedEnvironment) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedEnvironmentUpdate) GetModifiedAt() time.Time { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedEnvironment) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedEnvironmentUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. -func (o *PatchedEnvironment) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { +func (o *PatchedEnvironmentUpdate) HasModifiedAt() bool { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. -func (o *PatchedEnvironment) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. +func (o *PatchedEnvironmentUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedEnvironmentUpdate) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedEnvironmentUpdate) UnsetModifiedAt() { + o.ModifiedAt.Unset() } -func (o PatchedEnvironment) MarshalJSON() ([]byte, error) { +func (o PatchedEnvironmentUpdate) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err @@ -404,11 +380,8 @@ func (o PatchedEnvironment) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o PatchedEnvironment) ToMap() (map[string]interface{}, error) { +func (o PatchedEnvironmentUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -433,44 +406,44 @@ func (o PatchedEnvironment) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } return toSerialize, nil } -type NullablePatchedEnvironment struct { - value *PatchedEnvironment +type NullablePatchedEnvironmentUpdate struct { + value *PatchedEnvironmentUpdate isSet bool } -func (v NullablePatchedEnvironment) Get() *PatchedEnvironment { +func (v NullablePatchedEnvironmentUpdate) Get() *PatchedEnvironmentUpdate { return v.value } -func (v *NullablePatchedEnvironment) Set(val *PatchedEnvironment) { +func (v *NullablePatchedEnvironmentUpdate) Set(val *PatchedEnvironmentUpdate) { v.value = val v.isSet = true } -func (v NullablePatchedEnvironment) IsSet() bool { +func (v NullablePatchedEnvironmentUpdate) IsSet() bool { return v.isSet } -func (v *NullablePatchedEnvironment) Unset() { +func (v *NullablePatchedEnvironmentUpdate) Unset() { v.value = nil v.isSet = false } -func NewNullablePatchedEnvironment(val *PatchedEnvironment) *NullablePatchedEnvironment { - return &NullablePatchedEnvironment{value: val, isSet: true} +func NewNullablePatchedEnvironmentUpdate(val *PatchedEnvironmentUpdate) *NullablePatchedEnvironmentUpdate { + return &NullablePatchedEnvironmentUpdate{value: val, isSet: true} } -func (v NullablePatchedEnvironment) MarshalJSON() ([]byte, error) { +func (v NullablePatchedEnvironmentUpdate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePatchedEnvironment) UnmarshalJSON(src []byte) error { +func (v *NullablePatchedEnvironmentUpdate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/pkg/cloudtruthapi/model_patched_git_hub_pull.go b/pkg/cloudtruthapi/model_patched_git_hub_pull.go index 1b41c0d..c28f601 100644 --- a/pkg/cloudtruthapi/model_patched_git_hub_pull.go +++ b/pkg/cloudtruthapi/model_patched_git_hub_pull.go @@ -30,7 +30,7 @@ type PatchedGitHubPull struct { Description *string `json:"description,omitempty"` LatestTask NullableGitHubPullLatestTask `json:"latest_task,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` // Allow the pull to create environments. Any automatically created environments will be children of the `default` environment. If an environment needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. CreateEnvironments *bool `json:"create_environments,omitempty"` // Allow the pull to create projects. If a project needs to be created but the action does not allow it, a task step will be added with a null operation, and success_detail will indicate the action did not allow it. @@ -38,7 +38,7 @@ type PatchedGitHubPull struct { // When set to dry-run mode an action will report the changes that it would have made in task steps, however those changes are not actually performed. DryRun *bool `json:"dry_run,omitempty"` // Values being managed by a mapped pull. - MappedValues []Value `json:"mapped_values,omitempty"` + MappedValues []ValueCreate `json:"mapped_values,omitempty"` Mode *ModeEnum `json:"mode,omitempty"` } @@ -261,36 +261,46 @@ func (o *PatchedGitHubPull) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedGitHubPull) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedGitHubPull) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedGitHubPull) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedGitHubPull) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedGitHubPull) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedGitHubPull) UnsetModifiedAt() { + o.ModifiedAt.Unset() } // GetCreateEnvironments returns the CreateEnvironments field value if set, zero value otherwise. @@ -390,9 +400,9 @@ func (o *PatchedGitHubPull) SetDryRun(v bool) { } // GetMappedValues returns the MappedValues field value if set, zero value otherwise. -func (o *PatchedGitHubPull) GetMappedValues() []Value { +func (o *PatchedGitHubPull) GetMappedValues() []ValueCreate { if o == nil || IsNil(o.MappedValues) { - var ret []Value + var ret []ValueCreate return ret } return o.MappedValues @@ -400,7 +410,7 @@ func (o *PatchedGitHubPull) GetMappedValues() []Value { // GetMappedValuesOk returns a tuple with the MappedValues field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedGitHubPull) GetMappedValuesOk() ([]Value, bool) { +func (o *PatchedGitHubPull) GetMappedValuesOk() ([]ValueCreate, bool) { if o == nil || IsNil(o.MappedValues) { return nil, false } @@ -416,8 +426,8 @@ func (o *PatchedGitHubPull) HasMappedValues() bool { return false } -// SetMappedValues gets a reference to the given []Value and assigns it to the MappedValues field. -func (o *PatchedGitHubPull) SetMappedValues(v []Value) { +// SetMappedValues gets a reference to the given []ValueCreate and assigns it to the MappedValues field. +func (o *PatchedGitHubPull) SetMappedValues(v []ValueCreate) { o.MappedValues = v } @@ -481,8 +491,8 @@ func (o PatchedGitHubPull) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } if !IsNil(o.CreateEnvironments) { toSerialize["create_environments"] = o.CreateEnvironments diff --git a/pkg/cloudtruthapi/model_patched_grant.go b/pkg/cloudtruthapi/model_patched_grant.go index 8868ca3..4ee821d 100644 --- a/pkg/cloudtruthapi/model_patched_grant.go +++ b/pkg/cloudtruthapi/model_patched_grant.go @@ -30,7 +30,7 @@ type PatchedGrant struct { Scope *string `json:"scope,omitempty"` Role *RoleEnum `json:"role,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` } // NewPatchedGrant instantiates a new PatchedGrant object @@ -242,36 +242,46 @@ func (o *PatchedGrant) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedGrant) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedGrant) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedGrant) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedGrant) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedGrant) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedGrant) UnsetModifiedAt() { + o.ModifiedAt.Unset() } func (o PatchedGrant) MarshalJSON() ([]byte, error) { @@ -302,8 +312,8 @@ func (o PatchedGrant) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_patched_group.go b/pkg/cloudtruthapi/model_patched_group.go index 6256f34..0fe57b4 100644 --- a/pkg/cloudtruthapi/model_patched_group.go +++ b/pkg/cloudtruthapi/model_patched_group.go @@ -30,7 +30,7 @@ type PatchedGroup struct { Description *string `json:"description,omitempty"` Users []string `json:"users,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` } // NewPatchedGroup instantiates a new PatchedGroup object @@ -242,36 +242,46 @@ func (o *PatchedGroup) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedGroup) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedGroup) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedGroup) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedGroup) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedGroup) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedGroup) UnsetModifiedAt() { + o.ModifiedAt.Unset() } func (o PatchedGroup) MarshalJSON() ([]byte, error) { @@ -302,8 +312,8 @@ func (o PatchedGroup) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_patched_membership.go b/pkg/cloudtruthapi/model_patched_membership.go index b957d77..fa9d60c 100644 --- a/pkg/cloudtruthapi/model_patched_membership.go +++ b/pkg/cloudtruthapi/model_patched_membership.go @@ -30,7 +30,7 @@ type PatchedMembership struct { Organization *string `json:"organization,omitempty"` Role *RoleEnum `json:"role,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` } // NewPatchedMembership instantiates a new PatchedMembership object @@ -242,36 +242,46 @@ func (o *PatchedMembership) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedMembership) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedMembership) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedMembership) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedMembership) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedMembership) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedMembership) UnsetModifiedAt() { + o.ModifiedAt.Unset() } func (o PatchedMembership) MarshalJSON() ([]byte, error) { @@ -302,8 +312,8 @@ func (o PatchedMembership) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_patched_organization.go b/pkg/cloudtruthapi/model_patched_organization.go index ca9be80..8eb3d36 100644 --- a/pkg/cloudtruthapi/model_patched_organization.go +++ b/pkg/cloudtruthapi/model_patched_organization.go @@ -26,6 +26,13 @@ type PatchedOrganization struct { Id *string `json:"id,omitempty"` // The organization name. Name *string `json:"name,omitempty"` + // A regular expression project names must match + ProjectNamePattern *string `json:"project_name_pattern,omitempty"` + // If set, we are performing maintenance on this organization and have disabled making changes + Maintenance *bool `json:"maintenance,omitempty"` + // Multi-factor authentication for the organization + MfaEnabled *bool `json:"mfa_enabled,omitempty"` + Version *VersionEnum `json:"version,omitempty"` // Indicates if this Organization is the one currently targeted by the Bearer token used by the client to authorize. Current *bool `json:"current,omitempty"` Role *RoleEnum `json:"role,omitempty"` @@ -35,7 +42,7 @@ type PatchedOrganization struct { SubscriptionPlanId NullableString `json:"subscription_plan_id,omitempty"` SubscriptionPlanName NullableString `json:"subscription_plan_name,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` } // NewPatchedOrganization instantiates a new PatchedOrganization object @@ -151,6 +158,134 @@ func (o *PatchedOrganization) SetName(v string) { o.Name = &v } +// GetProjectNamePattern returns the ProjectNamePattern field value if set, zero value otherwise. +func (o *PatchedOrganization) GetProjectNamePattern() string { + if o == nil || IsNil(o.ProjectNamePattern) { + var ret string + return ret + } + return *o.ProjectNamePattern +} + +// GetProjectNamePatternOk returns a tuple with the ProjectNamePattern field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedOrganization) GetProjectNamePatternOk() (*string, bool) { + if o == nil || IsNil(o.ProjectNamePattern) { + return nil, false + } + return o.ProjectNamePattern, true +} + +// HasProjectNamePattern returns a boolean if a field has been set. +func (o *PatchedOrganization) HasProjectNamePattern() bool { + if o != nil && !IsNil(o.ProjectNamePattern) { + return true + } + + return false +} + +// SetProjectNamePattern gets a reference to the given string and assigns it to the ProjectNamePattern field. +func (o *PatchedOrganization) SetProjectNamePattern(v string) { + o.ProjectNamePattern = &v +} + +// GetMaintenance returns the Maintenance field value if set, zero value otherwise. +func (o *PatchedOrganization) GetMaintenance() bool { + if o == nil || IsNil(o.Maintenance) { + var ret bool + return ret + } + return *o.Maintenance +} + +// GetMaintenanceOk returns a tuple with the Maintenance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedOrganization) GetMaintenanceOk() (*bool, bool) { + if o == nil || IsNil(o.Maintenance) { + return nil, false + } + return o.Maintenance, true +} + +// HasMaintenance returns a boolean if a field has been set. +func (o *PatchedOrganization) HasMaintenance() bool { + if o != nil && !IsNil(o.Maintenance) { + return true + } + + return false +} + +// SetMaintenance gets a reference to the given bool and assigns it to the Maintenance field. +func (o *PatchedOrganization) SetMaintenance(v bool) { + o.Maintenance = &v +} + +// GetMfaEnabled returns the MfaEnabled field value if set, zero value otherwise. +func (o *PatchedOrganization) GetMfaEnabled() bool { + if o == nil || IsNil(o.MfaEnabled) { + var ret bool + return ret + } + return *o.MfaEnabled +} + +// GetMfaEnabledOk returns a tuple with the MfaEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedOrganization) GetMfaEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.MfaEnabled) { + return nil, false + } + return o.MfaEnabled, true +} + +// HasMfaEnabled returns a boolean if a field has been set. +func (o *PatchedOrganization) HasMfaEnabled() bool { + if o != nil && !IsNil(o.MfaEnabled) { + return true + } + + return false +} + +// SetMfaEnabled gets a reference to the given bool and assigns it to the MfaEnabled field. +func (o *PatchedOrganization) SetMfaEnabled(v bool) { + o.MfaEnabled = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PatchedOrganization) GetVersion() VersionEnum { + if o == nil || IsNil(o.Version) { + var ret VersionEnum + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedOrganization) GetVersionOk() (*VersionEnum, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PatchedOrganization) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given VersionEnum and assigns it to the Version field. +func (o *PatchedOrganization) SetVersion(v VersionEnum) { + o.Version = &v +} + // GetCurrent returns the Current field value if set, zero value otherwise. func (o *PatchedOrganization) GetCurrent() bool { if o == nil || IsNil(o.Current) { @@ -447,36 +582,46 @@ func (o *PatchedOrganization) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOrganization) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedOrganization) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedOrganization) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedOrganization) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedOrganization) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedOrganization) UnsetModifiedAt() { + o.ModifiedAt.Unset() } func (o PatchedOrganization) MarshalJSON() ([]byte, error) { @@ -498,6 +643,18 @@ func (o PatchedOrganization) ToMap() (map[string]interface{}, error) { if !IsNil(o.Name) { toSerialize["name"] = o.Name } + if !IsNil(o.ProjectNamePattern) { + toSerialize["project_name_pattern"] = o.ProjectNamePattern + } + if !IsNil(o.Maintenance) { + toSerialize["maintenance"] = o.Maintenance + } + if !IsNil(o.MfaEnabled) { + toSerialize["mfa_enabled"] = o.MfaEnabled + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } if !IsNil(o.Current) { toSerialize["current"] = o.Current } @@ -522,8 +679,8 @@ func (o PatchedOrganization) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_patched_parameter.go b/pkg/cloudtruthapi/model_patched_parameter.go deleted file mode 100644 index edd573f..0000000 --- a/pkg/cloudtruthapi/model_patched_parameter.go +++ /dev/null @@ -1,658 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" - "time" -) - -// checks if the PatchedParameter type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchedParameter{} - -// PatchedParameter A single parameter inside of a project. -type PatchedParameter struct { - Url *string `json:"url,omitempty"` - // A unique identifier for the parameter. - Id *string `json:"id,omitempty"` - // The parameter name. - Name *string `json:"name,omitempty"` - // A description of the parameter. You may find it helpful to document how this parameter is used to assist others when they need to maintain software that uses this content. - Description *string `json:"description,omitempty"` - // Indicates if this content is secret or not. When a parameter is considered to be a secret, any internal values are stored in a dedicated vault for your organization for maximum security. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used. - Secret *bool `json:"secret,omitempty"` - // The type of this Parameter. - Type *string `json:"type,omitempty"` - // Rules applied to this parameter. - Rules []ParameterRule `json:"rules,omitempty"` - // The project that the parameter is within. - Project *string `json:"project,omitempty"` - // The project name that the parameter is within. - ProjectName *string `json:"project_name,omitempty"` - // Templates that reference this Parameter. - ReferencingTemplates []string `json:"referencing_templates,omitempty"` - // Dynamic values that reference this Parameter. - ReferencingValues []string `json:"referencing_values,omitempty"` - // This dictionary has keys that correspond to environment urls, and values that correspond to the effective value for this parameter in that environment. Each parameter has an effective value in every environment based on project dependencies and environment inheritance. The effective value is found by looking (within the keyed environment) up the project dependencies by parameter name. If a value is not found, the parent environment is consulted with the same logic to locate a value. It is possible for there to be a `null` value record for an environment, which means there is no value set; it is also possible for there to be a value record with a `value` of `null`, which means the value was explicitly set to `null`. If the value's parameter does not match the enclosing parameter (holding the values array) then that value is flowing in through project dependencies. Clients must recognize this in case the user asks to modify the value; in this case the client must POST a new Value to the current parameter to override the value coming in from the project dependency. If the Value.environment matches the key, then it is an explicit value set for that environment. If they differ, the value was obtained from a parent environment (directly or indirectly). If the value is None then no value has ever been set in any environment for this parameter within all the project dependencies. - Values map[string]Value `json:"values,omitempty"` - // If this parameter's project depends on another project which provides a parameter of the same name, this parameter overrides the one provided by the dependee. You can use this field to determine if there will be side-effects the user should know about when deleting a parameter. Deleting a parameter that overrides another one due to an identical name will uncover the one from the dependee project. - Overrides NullableString `json:"overrides,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` -} - -// NewPatchedParameter instantiates a new PatchedParameter object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPatchedParameter() *PatchedParameter { - this := PatchedParameter{} - var type_ string = "string" - this.Type = &type_ - return &this -} - -// NewPatchedParameterWithDefaults instantiates a new PatchedParameter object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPatchedParameterWithDefaults() *PatchedParameter { - this := PatchedParameter{} - var type_ string = "string" - this.Type = &type_ - return &this -} - -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *PatchedParameter) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *PatchedParameter) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *PatchedParameter) SetUrl(v string) { - o.Url = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *PatchedParameter) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *PatchedParameter) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *PatchedParameter) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *PatchedParameter) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *PatchedParameter) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *PatchedParameter) SetName(v string) { - o.Name = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *PatchedParameter) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *PatchedParameter) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PatchedParameter) SetDescription(v string) { - o.Description = &v -} - -// GetSecret returns the Secret field value if set, zero value otherwise. -func (o *PatchedParameter) GetSecret() bool { - if o == nil || IsNil(o.Secret) { - var ret bool - return ret - } - return *o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetSecretOk() (*bool, bool) { - if o == nil || IsNil(o.Secret) { - return nil, false - } - return o.Secret, true -} - -// HasSecret returns a boolean if a field has been set. -func (o *PatchedParameter) HasSecret() bool { - if o != nil && !IsNil(o.Secret) { - return true - } - - return false -} - -// SetSecret gets a reference to the given bool and assigns it to the Secret field. -func (o *PatchedParameter) SetSecret(v bool) { - o.Secret = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *PatchedParameter) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *PatchedParameter) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *PatchedParameter) SetType(v string) { - o.Type = &v -} - -// GetRules returns the Rules field value if set, zero value otherwise. -func (o *PatchedParameter) GetRules() []ParameterRule { - if o == nil || IsNil(o.Rules) { - var ret []ParameterRule - return ret - } - return o.Rules -} - -// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetRulesOk() ([]ParameterRule, bool) { - if o == nil || IsNil(o.Rules) { - return nil, false - } - return o.Rules, true -} - -// HasRules returns a boolean if a field has been set. -func (o *PatchedParameter) HasRules() bool { - if o != nil && !IsNil(o.Rules) { - return true - } - - return false -} - -// SetRules gets a reference to the given []ParameterRule and assigns it to the Rules field. -func (o *PatchedParameter) SetRules(v []ParameterRule) { - o.Rules = v -} - -// GetProject returns the Project field value if set, zero value otherwise. -func (o *PatchedParameter) GetProject() string { - if o == nil || IsNil(o.Project) { - var ret string - return ret - } - return *o.Project -} - -// GetProjectOk returns a tuple with the Project field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetProjectOk() (*string, bool) { - if o == nil || IsNil(o.Project) { - return nil, false - } - return o.Project, true -} - -// HasProject returns a boolean if a field has been set. -func (o *PatchedParameter) HasProject() bool { - if o != nil && !IsNil(o.Project) { - return true - } - - return false -} - -// SetProject gets a reference to the given string and assigns it to the Project field. -func (o *PatchedParameter) SetProject(v string) { - o.Project = &v -} - -// GetProjectName returns the ProjectName field value if set, zero value otherwise. -func (o *PatchedParameter) GetProjectName() string { - if o == nil || IsNil(o.ProjectName) { - var ret string - return ret - } - return *o.ProjectName -} - -// GetProjectNameOk returns a tuple with the ProjectName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetProjectNameOk() (*string, bool) { - if o == nil || IsNil(o.ProjectName) { - return nil, false - } - return o.ProjectName, true -} - -// HasProjectName returns a boolean if a field has been set. -func (o *PatchedParameter) HasProjectName() bool { - if o != nil && !IsNil(o.ProjectName) { - return true - } - - return false -} - -// SetProjectName gets a reference to the given string and assigns it to the ProjectName field. -func (o *PatchedParameter) SetProjectName(v string) { - o.ProjectName = &v -} - -// GetReferencingTemplates returns the ReferencingTemplates field value if set, zero value otherwise. -func (o *PatchedParameter) GetReferencingTemplates() []string { - if o == nil || IsNil(o.ReferencingTemplates) { - var ret []string - return ret - } - return o.ReferencingTemplates -} - -// GetReferencingTemplatesOk returns a tuple with the ReferencingTemplates field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetReferencingTemplatesOk() ([]string, bool) { - if o == nil || IsNil(o.ReferencingTemplates) { - return nil, false - } - return o.ReferencingTemplates, true -} - -// HasReferencingTemplates returns a boolean if a field has been set. -func (o *PatchedParameter) HasReferencingTemplates() bool { - if o != nil && !IsNil(o.ReferencingTemplates) { - return true - } - - return false -} - -// SetReferencingTemplates gets a reference to the given []string and assigns it to the ReferencingTemplates field. -func (o *PatchedParameter) SetReferencingTemplates(v []string) { - o.ReferencingTemplates = v -} - -// GetReferencingValues returns the ReferencingValues field value if set, zero value otherwise. -func (o *PatchedParameter) GetReferencingValues() []string { - if o == nil || IsNil(o.ReferencingValues) { - var ret []string - return ret - } - return o.ReferencingValues -} - -// GetReferencingValuesOk returns a tuple with the ReferencingValues field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetReferencingValuesOk() ([]string, bool) { - if o == nil || IsNil(o.ReferencingValues) { - return nil, false - } - return o.ReferencingValues, true -} - -// HasReferencingValues returns a boolean if a field has been set. -func (o *PatchedParameter) HasReferencingValues() bool { - if o != nil && !IsNil(o.ReferencingValues) { - return true - } - - return false -} - -// SetReferencingValues gets a reference to the given []string and assigns it to the ReferencingValues field. -func (o *PatchedParameter) SetReferencingValues(v []string) { - o.ReferencingValues = v -} - -// GetValues returns the Values field value if set, zero value otherwise. -func (o *PatchedParameter) GetValues() map[string]Value { - if o == nil || IsNil(o.Values) { - var ret map[string]Value - return ret - } - return o.Values -} - -// GetValuesOk returns a tuple with the Values field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetValuesOk() (map[string]Value, bool) { - if o == nil || IsNil(o.Values) { - return map[string]Value{}, false - } - return o.Values, true -} - -// HasValues returns a boolean if a field has been set. -func (o *PatchedParameter) HasValues() bool { - if o != nil && !IsNil(o.Values) { - return true - } - - return false -} - -// SetValues gets a reference to the given map[string]Value and assigns it to the Values field. -func (o *PatchedParameter) SetValues(v map[string]Value) { - o.Values = v -} - -// GetOverrides returns the Overrides field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedParameter) GetOverrides() string { - if o == nil || IsNil(o.Overrides.Get()) { - var ret string - return ret - } - return *o.Overrides.Get() -} - -// GetOverridesOk returns a tuple with the Overrides field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedParameter) GetOverridesOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Overrides.Get(), o.Overrides.IsSet() -} - -// HasOverrides returns a boolean if a field has been set. -func (o *PatchedParameter) HasOverrides() bool { - if o != nil && o.Overrides.IsSet() { - return true - } - - return false -} - -// SetOverrides gets a reference to the given NullableString and assigns it to the Overrides field. -func (o *PatchedParameter) SetOverrides(v string) { - o.Overrides.Set(&v) -} -// SetOverridesNil sets the value for Overrides to be an explicit nil -func (o *PatchedParameter) SetOverridesNil() { - o.Overrides.Set(nil) -} - -// UnsetOverrides ensures that no value is present for Overrides, not even an explicit nil -func (o *PatchedParameter) UnsetOverrides() { - o.Overrides.Unset() -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *PatchedParameter) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *PatchedParameter) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *PatchedParameter) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. -func (o *PatchedParameter) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { - var ret time.Time - return ret - } - return *o.ModifiedAt -} - -// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameter) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { - return nil, false - } - return o.ModifiedAt, true -} - -// HasModifiedAt returns a boolean if a field has been set. -func (o *PatchedParameter) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { - return true - } - - return false -} - -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. -func (o *PatchedParameter) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v -} - -func (o PatchedParameter) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PatchedParameter) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Secret) { - toSerialize["secret"] = o.Secret - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.Rules) { - toSerialize["rules"] = o.Rules - } - if !IsNil(o.Project) { - toSerialize["project"] = o.Project - } - if !IsNil(o.ProjectName) { - toSerialize["project_name"] = o.ProjectName - } - if !IsNil(o.ReferencingTemplates) { - toSerialize["referencing_templates"] = o.ReferencingTemplates - } - if !IsNil(o.ReferencingValues) { - toSerialize["referencing_values"] = o.ReferencingValues - } - if !IsNil(o.Values) { - toSerialize["values"] = o.Values - } - if o.Overrides.IsSet() { - toSerialize["overrides"] = o.Overrides.Get() - } - if !IsNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt - } - return toSerialize, nil -} - -type NullablePatchedParameter struct { - value *PatchedParameter - isSet bool -} - -func (v NullablePatchedParameter) Get() *PatchedParameter { - return v.value -} - -func (v *NullablePatchedParameter) Set(val *PatchedParameter) { - v.value = val - v.isSet = true -} - -func (v NullablePatchedParameter) IsSet() bool { - return v.isSet -} - -func (v *NullablePatchedParameter) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePatchedParameter(val *PatchedParameter) *NullablePatchedParameter { - return &NullablePatchedParameter{value: val, isSet: true} -} - -func (v NullablePatchedParameter) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePatchedParameter) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pkg/cloudtruthapi/model_patched_parameter_rule.go b/pkg/cloudtruthapi/model_patched_parameter_rule_update.go similarity index 55% rename from pkg/cloudtruthapi/model_patched_parameter_rule.go rename to pkg/cloudtruthapi/model_patched_parameter_rule_update.go index 0ddfb0b..a1ba606 100644 --- a/pkg/cloudtruthapi/model_patched_parameter_rule.go +++ b/pkg/cloudtruthapi/model_patched_parameter_rule_update.go @@ -16,72 +16,39 @@ import ( "time" ) -// checks if the PatchedParameterRule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchedParameterRule{} +// checks if the PatchedParameterRuleUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedParameterRuleUpdate{} -// PatchedParameterRule A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead of primary key relationships. Specifically: * A 'url' field is included instead of the 'id' field. * Relationships to other instances are hyperlinks, instead of primary keys. NOTE: this only works with DRF 3.1.0 and above. -type PatchedParameterRule struct { - Url *string `json:"url,omitempty"` +// PatchedParameterRuleUpdate A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead of primary key relationships. Specifically: * A 'url' field is included instead of the 'id' field. * Relationships to other instances are hyperlinks, instead of primary keys. NOTE: this only works with DRF 3.1.0 and above. +type PatchedParameterRuleUpdate struct { Id *string `json:"id,omitempty"` // The parameter this rule is for. Parameter *string `json:"parameter,omitempty"` Type *ParameterRuleTypeEnum `json:"type,omitempty"` Constraint *string `json:"constraint,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` } -// NewPatchedParameterRule instantiates a new PatchedParameterRule object +// NewPatchedParameterRuleUpdate instantiates a new PatchedParameterRuleUpdate object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPatchedParameterRule() *PatchedParameterRule { - this := PatchedParameterRule{} +func NewPatchedParameterRuleUpdate() *PatchedParameterRuleUpdate { + this := PatchedParameterRuleUpdate{} return &this } -// NewPatchedParameterRuleWithDefaults instantiates a new PatchedParameterRule object +// NewPatchedParameterRuleUpdateWithDefaults instantiates a new PatchedParameterRuleUpdate object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewPatchedParameterRuleWithDefaults() *PatchedParameterRule { - this := PatchedParameterRule{} +func NewPatchedParameterRuleUpdateWithDefaults() *PatchedParameterRuleUpdate { + this := PatchedParameterRuleUpdate{} return &this } -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *PatchedParameterRule) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameterRule) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *PatchedParameterRule) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *PatchedParameterRule) SetUrl(v string) { - o.Url = &v -} - // GetId returns the Id field value if set, zero value otherwise. -func (o *PatchedParameterRule) GetId() string { +func (o *PatchedParameterRuleUpdate) GetId() string { if o == nil || IsNil(o.Id) { var ret string return ret @@ -91,7 +58,7 @@ func (o *PatchedParameterRule) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterRule) GetIdOk() (*string, bool) { +func (o *PatchedParameterRuleUpdate) GetIdOk() (*string, bool) { if o == nil || IsNil(o.Id) { return nil, false } @@ -99,7 +66,7 @@ func (o *PatchedParameterRule) GetIdOk() (*string, bool) { } // HasId returns a boolean if a field has been set. -func (o *PatchedParameterRule) HasId() bool { +func (o *PatchedParameterRuleUpdate) HasId() bool { if o != nil && !IsNil(o.Id) { return true } @@ -108,12 +75,12 @@ func (o *PatchedParameterRule) HasId() bool { } // SetId gets a reference to the given string and assigns it to the Id field. -func (o *PatchedParameterRule) SetId(v string) { +func (o *PatchedParameterRuleUpdate) SetId(v string) { o.Id = &v } // GetParameter returns the Parameter field value if set, zero value otherwise. -func (o *PatchedParameterRule) GetParameter() string { +func (o *PatchedParameterRuleUpdate) GetParameter() string { if o == nil || IsNil(o.Parameter) { var ret string return ret @@ -123,7 +90,7 @@ func (o *PatchedParameterRule) GetParameter() string { // GetParameterOk returns a tuple with the Parameter field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterRule) GetParameterOk() (*string, bool) { +func (o *PatchedParameterRuleUpdate) GetParameterOk() (*string, bool) { if o == nil || IsNil(o.Parameter) { return nil, false } @@ -131,7 +98,7 @@ func (o *PatchedParameterRule) GetParameterOk() (*string, bool) { } // HasParameter returns a boolean if a field has been set. -func (o *PatchedParameterRule) HasParameter() bool { +func (o *PatchedParameterRuleUpdate) HasParameter() bool { if o != nil && !IsNil(o.Parameter) { return true } @@ -140,12 +107,12 @@ func (o *PatchedParameterRule) HasParameter() bool { } // SetParameter gets a reference to the given string and assigns it to the Parameter field. -func (o *PatchedParameterRule) SetParameter(v string) { +func (o *PatchedParameterRuleUpdate) SetParameter(v string) { o.Parameter = &v } // GetType returns the Type field value if set, zero value otherwise. -func (o *PatchedParameterRule) GetType() ParameterRuleTypeEnum { +func (o *PatchedParameterRuleUpdate) GetType() ParameterRuleTypeEnum { if o == nil || IsNil(o.Type) { var ret ParameterRuleTypeEnum return ret @@ -155,7 +122,7 @@ func (o *PatchedParameterRule) GetType() ParameterRuleTypeEnum { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterRule) GetTypeOk() (*ParameterRuleTypeEnum, bool) { +func (o *PatchedParameterRuleUpdate) GetTypeOk() (*ParameterRuleTypeEnum, bool) { if o == nil || IsNil(o.Type) { return nil, false } @@ -163,7 +130,7 @@ func (o *PatchedParameterRule) GetTypeOk() (*ParameterRuleTypeEnum, bool) { } // HasType returns a boolean if a field has been set. -func (o *PatchedParameterRule) HasType() bool { +func (o *PatchedParameterRuleUpdate) HasType() bool { if o != nil && !IsNil(o.Type) { return true } @@ -172,12 +139,12 @@ func (o *PatchedParameterRule) HasType() bool { } // SetType gets a reference to the given ParameterRuleTypeEnum and assigns it to the Type field. -func (o *PatchedParameterRule) SetType(v ParameterRuleTypeEnum) { +func (o *PatchedParameterRuleUpdate) SetType(v ParameterRuleTypeEnum) { o.Type = &v } // GetConstraint returns the Constraint field value if set, zero value otherwise. -func (o *PatchedParameterRule) GetConstraint() string { +func (o *PatchedParameterRuleUpdate) GetConstraint() string { if o == nil || IsNil(o.Constraint) { var ret string return ret @@ -187,7 +154,7 @@ func (o *PatchedParameterRule) GetConstraint() string { // GetConstraintOk returns a tuple with the Constraint field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterRule) GetConstraintOk() (*string, bool) { +func (o *PatchedParameterRuleUpdate) GetConstraintOk() (*string, bool) { if o == nil || IsNil(o.Constraint) { return nil, false } @@ -195,7 +162,7 @@ func (o *PatchedParameterRule) GetConstraintOk() (*string, bool) { } // HasConstraint returns a boolean if a field has been set. -func (o *PatchedParameterRule) HasConstraint() bool { +func (o *PatchedParameterRuleUpdate) HasConstraint() bool { if o != nil && !IsNil(o.Constraint) { return true } @@ -204,12 +171,12 @@ func (o *PatchedParameterRule) HasConstraint() bool { } // SetConstraint gets a reference to the given string and assigns it to the Constraint field. -func (o *PatchedParameterRule) SetConstraint(v string) { +func (o *PatchedParameterRuleUpdate) SetConstraint(v string) { o.Constraint = &v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *PatchedParameterRule) GetCreatedAt() time.Time { +func (o *PatchedParameterRuleUpdate) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { var ret time.Time return ret @@ -219,7 +186,7 @@ func (o *PatchedParameterRule) GetCreatedAt() time.Time { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterRule) GetCreatedAtOk() (*time.Time, bool) { +func (o *PatchedParameterRuleUpdate) GetCreatedAtOk() (*time.Time, bool) { if o == nil || IsNil(o.CreatedAt) { return nil, false } @@ -227,7 +194,7 @@ func (o *PatchedParameterRule) GetCreatedAtOk() (*time.Time, bool) { } // HasCreatedAt returns a boolean if a field has been set. -func (o *PatchedParameterRule) HasCreatedAt() bool { +func (o *PatchedParameterRuleUpdate) HasCreatedAt() bool { if o != nil && !IsNil(o.CreatedAt) { return true } @@ -236,43 +203,53 @@ func (o *PatchedParameterRule) HasCreatedAt() bool { } // SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *PatchedParameterRule) SetCreatedAt(v time.Time) { +func (o *PatchedParameterRuleUpdate) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. -func (o *PatchedParameterRule) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedParameterRuleUpdate) GetModifiedAt() time.Time { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterRule) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedParameterRuleUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. -func (o *PatchedParameterRule) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { +func (o *PatchedParameterRuleUpdate) HasModifiedAt() bool { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. -func (o *PatchedParameterRule) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. +func (o *PatchedParameterRuleUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedParameterRuleUpdate) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) } -func (o PatchedParameterRule) MarshalJSON() ([]byte, error) { +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedParameterRuleUpdate) UnsetModifiedAt() { + o.ModifiedAt.Unset() +} + +func (o PatchedParameterRuleUpdate) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err @@ -280,11 +257,8 @@ func (o PatchedParameterRule) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o PatchedParameterRule) ToMap() (map[string]interface{}, error) { +func (o PatchedParameterRuleUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -300,44 +274,44 @@ func (o PatchedParameterRule) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } return toSerialize, nil } -type NullablePatchedParameterRule struct { - value *PatchedParameterRule +type NullablePatchedParameterRuleUpdate struct { + value *PatchedParameterRuleUpdate isSet bool } -func (v NullablePatchedParameterRule) Get() *PatchedParameterRule { +func (v NullablePatchedParameterRuleUpdate) Get() *PatchedParameterRuleUpdate { return v.value } -func (v *NullablePatchedParameterRule) Set(val *PatchedParameterRule) { +func (v *NullablePatchedParameterRuleUpdate) Set(val *PatchedParameterRuleUpdate) { v.value = val v.isSet = true } -func (v NullablePatchedParameterRule) IsSet() bool { +func (v NullablePatchedParameterRuleUpdate) IsSet() bool { return v.isSet } -func (v *NullablePatchedParameterRule) Unset() { +func (v *NullablePatchedParameterRuleUpdate) Unset() { v.value = nil v.isSet = false } -func NewNullablePatchedParameterRule(val *PatchedParameterRule) *NullablePatchedParameterRule { - return &NullablePatchedParameterRule{value: val, isSet: true} +func NewNullablePatchedParameterRuleUpdate(val *PatchedParameterRuleUpdate) *NullablePatchedParameterRuleUpdate { + return &NullablePatchedParameterRuleUpdate{value: val, isSet: true} } -func (v NullablePatchedParameterRule) MarshalJSON() ([]byte, error) { +func (v NullablePatchedParameterRuleUpdate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePatchedParameterRule) UnmarshalJSON(src []byte) error { +func (v *NullablePatchedParameterRuleUpdate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/pkg/cloudtruthapi/model_patched_parameter_type.go b/pkg/cloudtruthapi/model_patched_parameter_type.go deleted file mode 100644 index da4c7bd..0000000 --- a/pkg/cloudtruthapi/model_patched_parameter_type.go +++ /dev/null @@ -1,442 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" - "time" -) - -// checks if the PatchedParameterType type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchedParameterType{} - -// PatchedParameterType struct for PatchedParameterType -type PatchedParameterType struct { - Url *string `json:"url,omitempty"` - // A unique identifier for the parameter type. - Id *string `json:"id,omitempty"` - // The parameter type name. - Name *string `json:"name,omitempty"` - // A description of the parameter type, provide documentation on how to use this type here. - Description *string `json:"description,omitempty"` - // Rules applied to this parameter. - Rules []ParameterTypeRule `json:"rules,omitempty"` - // All types must derive, either directly or indirectly, from one of the CloudTruth built-in types. This is the ParameterType that this type is derived from. - Parent NullableString `json:"parent,omitempty"` - // Name of the parent ParameterType (if any). - ParentName NullableString `json:"parent_name,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` -} - -// NewPatchedParameterType instantiates a new PatchedParameterType object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPatchedParameterType() *PatchedParameterType { - this := PatchedParameterType{} - return &this -} - -// NewPatchedParameterTypeWithDefaults instantiates a new PatchedParameterType object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPatchedParameterTypeWithDefaults() *PatchedParameterType { - this := PatchedParameterType{} - return &this -} - -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *PatchedParameterType) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameterType) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *PatchedParameterType) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *PatchedParameterType) SetUrl(v string) { - o.Url = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *PatchedParameterType) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameterType) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *PatchedParameterType) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *PatchedParameterType) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *PatchedParameterType) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameterType) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *PatchedParameterType) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *PatchedParameterType) SetName(v string) { - o.Name = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *PatchedParameterType) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameterType) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *PatchedParameterType) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PatchedParameterType) SetDescription(v string) { - o.Description = &v -} - -// GetRules returns the Rules field value if set, zero value otherwise. -func (o *PatchedParameterType) GetRules() []ParameterTypeRule { - if o == nil || IsNil(o.Rules) { - var ret []ParameterTypeRule - return ret - } - return o.Rules -} - -// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameterType) GetRulesOk() ([]ParameterTypeRule, bool) { - if o == nil || IsNil(o.Rules) { - return nil, false - } - return o.Rules, true -} - -// HasRules returns a boolean if a field has been set. -func (o *PatchedParameterType) HasRules() bool { - if o != nil && !IsNil(o.Rules) { - return true - } - - return false -} - -// SetRules gets a reference to the given []ParameterTypeRule and assigns it to the Rules field. -func (o *PatchedParameterType) SetRules(v []ParameterTypeRule) { - o.Rules = v -} - -// GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedParameterType) GetParent() string { - if o == nil || IsNil(o.Parent.Get()) { - var ret string - return ret - } - return *o.Parent.Get() -} - -// GetParentOk returns a tuple with the Parent field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedParameterType) GetParentOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Parent.Get(), o.Parent.IsSet() -} - -// HasParent returns a boolean if a field has been set. -func (o *PatchedParameterType) HasParent() bool { - if o != nil && o.Parent.IsSet() { - return true - } - - return false -} - -// SetParent gets a reference to the given NullableString and assigns it to the Parent field. -func (o *PatchedParameterType) SetParent(v string) { - o.Parent.Set(&v) -} -// SetParentNil sets the value for Parent to be an explicit nil -func (o *PatchedParameterType) SetParentNil() { - o.Parent.Set(nil) -} - -// UnsetParent ensures that no value is present for Parent, not even an explicit nil -func (o *PatchedParameterType) UnsetParent() { - o.Parent.Unset() -} - -// GetParentName returns the ParentName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedParameterType) GetParentName() string { - if o == nil || IsNil(o.ParentName.Get()) { - var ret string - return ret - } - return *o.ParentName.Get() -} - -// GetParentNameOk returns a tuple with the ParentName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedParameterType) GetParentNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ParentName.Get(), o.ParentName.IsSet() -} - -// HasParentName returns a boolean if a field has been set. -func (o *PatchedParameterType) HasParentName() bool { - if o != nil && o.ParentName.IsSet() { - return true - } - - return false -} - -// SetParentName gets a reference to the given NullableString and assigns it to the ParentName field. -func (o *PatchedParameterType) SetParentName(v string) { - o.ParentName.Set(&v) -} -// SetParentNameNil sets the value for ParentName to be an explicit nil -func (o *PatchedParameterType) SetParentNameNil() { - o.ParentName.Set(nil) -} - -// UnsetParentName ensures that no value is present for ParentName, not even an explicit nil -func (o *PatchedParameterType) UnsetParentName() { - o.ParentName.Unset() -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *PatchedParameterType) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameterType) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *PatchedParameterType) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *PatchedParameterType) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. -func (o *PatchedParameterType) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { - var ret time.Time - return ret - } - return *o.ModifiedAt -} - -// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameterType) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { - return nil, false - } - return o.ModifiedAt, true -} - -// HasModifiedAt returns a boolean if a field has been set. -func (o *PatchedParameterType) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { - return true - } - - return false -} - -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. -func (o *PatchedParameterType) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v -} - -func (o PatchedParameterType) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PatchedParameterType) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Rules) { - toSerialize["rules"] = o.Rules - } - if o.Parent.IsSet() { - toSerialize["parent"] = o.Parent.Get() - } - if o.ParentName.IsSet() { - toSerialize["parent_name"] = o.ParentName.Get() - } - if !IsNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt - } - return toSerialize, nil -} - -type NullablePatchedParameterType struct { - value *PatchedParameterType - isSet bool -} - -func (v NullablePatchedParameterType) Get() *PatchedParameterType { - return v.value -} - -func (v *NullablePatchedParameterType) Set(val *PatchedParameterType) { - v.value = val - v.isSet = true -} - -func (v NullablePatchedParameterType) IsSet() bool { - return v.isSet -} - -func (v *NullablePatchedParameterType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePatchedParameterType(val *PatchedParameterType) *NullablePatchedParameterType { - return &NullablePatchedParameterType{value: val, isSet: true} -} - -func (v NullablePatchedParameterType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePatchedParameterType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pkg/cloudtruthapi/model_patched_parameter_type_rule.go b/pkg/cloudtruthapi/model_patched_parameter_type_rule_update.go similarity index 53% rename from pkg/cloudtruthapi/model_patched_parameter_type_rule.go rename to pkg/cloudtruthapi/model_patched_parameter_type_rule_update.go index c1819f5..2c9758c 100644 --- a/pkg/cloudtruthapi/model_patched_parameter_type_rule.go +++ b/pkg/cloudtruthapi/model_patched_parameter_type_rule_update.go @@ -16,72 +16,39 @@ import ( "time" ) -// checks if the PatchedParameterTypeRule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchedParameterTypeRule{} +// checks if the PatchedParameterTypeRuleUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedParameterTypeRuleUpdate{} -// PatchedParameterTypeRule A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead of primary key relationships. Specifically: * A 'url' field is included instead of the 'id' field. * Relationships to other instances are hyperlinks, instead of primary keys. NOTE: this only works with DRF 3.1.0 and above. -type PatchedParameterTypeRule struct { - Url *string `json:"url,omitempty"` +// PatchedParameterTypeRuleUpdate A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead of primary key relationships. Specifically: * A 'url' field is included instead of the 'id' field. * Relationships to other instances are hyperlinks, instead of primary keys. NOTE: this only works with DRF 3.1.0 and above. +type PatchedParameterTypeRuleUpdate struct { Id *string `json:"id,omitempty"` // The type this rule is for. ParameterType *string `json:"parameter_type,omitempty"` Type *ParameterRuleTypeEnum `json:"type,omitempty"` Constraint *string `json:"constraint,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` } -// NewPatchedParameterTypeRule instantiates a new PatchedParameterTypeRule object +// NewPatchedParameterTypeRuleUpdate instantiates a new PatchedParameterTypeRuleUpdate object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPatchedParameterTypeRule() *PatchedParameterTypeRule { - this := PatchedParameterTypeRule{} +func NewPatchedParameterTypeRuleUpdate() *PatchedParameterTypeRuleUpdate { + this := PatchedParameterTypeRuleUpdate{} return &this } -// NewPatchedParameterTypeRuleWithDefaults instantiates a new PatchedParameterTypeRule object +// NewPatchedParameterTypeRuleUpdateWithDefaults instantiates a new PatchedParameterTypeRuleUpdate object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewPatchedParameterTypeRuleWithDefaults() *PatchedParameterTypeRule { - this := PatchedParameterTypeRule{} +func NewPatchedParameterTypeRuleUpdateWithDefaults() *PatchedParameterTypeRuleUpdate { + this := PatchedParameterTypeRuleUpdate{} return &this } -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *PatchedParameterTypeRule) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedParameterTypeRule) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *PatchedParameterTypeRule) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *PatchedParameterTypeRule) SetUrl(v string) { - o.Url = &v -} - // GetId returns the Id field value if set, zero value otherwise. -func (o *PatchedParameterTypeRule) GetId() string { +func (o *PatchedParameterTypeRuleUpdate) GetId() string { if o == nil || IsNil(o.Id) { var ret string return ret @@ -91,7 +58,7 @@ func (o *PatchedParameterTypeRule) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterTypeRule) GetIdOk() (*string, bool) { +func (o *PatchedParameterTypeRuleUpdate) GetIdOk() (*string, bool) { if o == nil || IsNil(o.Id) { return nil, false } @@ -99,7 +66,7 @@ func (o *PatchedParameterTypeRule) GetIdOk() (*string, bool) { } // HasId returns a boolean if a field has been set. -func (o *PatchedParameterTypeRule) HasId() bool { +func (o *PatchedParameterTypeRuleUpdate) HasId() bool { if o != nil && !IsNil(o.Id) { return true } @@ -108,12 +75,12 @@ func (o *PatchedParameterTypeRule) HasId() bool { } // SetId gets a reference to the given string and assigns it to the Id field. -func (o *PatchedParameterTypeRule) SetId(v string) { +func (o *PatchedParameterTypeRuleUpdate) SetId(v string) { o.Id = &v } // GetParameterType returns the ParameterType field value if set, zero value otherwise. -func (o *PatchedParameterTypeRule) GetParameterType() string { +func (o *PatchedParameterTypeRuleUpdate) GetParameterType() string { if o == nil || IsNil(o.ParameterType) { var ret string return ret @@ -123,7 +90,7 @@ func (o *PatchedParameterTypeRule) GetParameterType() string { // GetParameterTypeOk returns a tuple with the ParameterType field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterTypeRule) GetParameterTypeOk() (*string, bool) { +func (o *PatchedParameterTypeRuleUpdate) GetParameterTypeOk() (*string, bool) { if o == nil || IsNil(o.ParameterType) { return nil, false } @@ -131,7 +98,7 @@ func (o *PatchedParameterTypeRule) GetParameterTypeOk() (*string, bool) { } // HasParameterType returns a boolean if a field has been set. -func (o *PatchedParameterTypeRule) HasParameterType() bool { +func (o *PatchedParameterTypeRuleUpdate) HasParameterType() bool { if o != nil && !IsNil(o.ParameterType) { return true } @@ -140,12 +107,12 @@ func (o *PatchedParameterTypeRule) HasParameterType() bool { } // SetParameterType gets a reference to the given string and assigns it to the ParameterType field. -func (o *PatchedParameterTypeRule) SetParameterType(v string) { +func (o *PatchedParameterTypeRuleUpdate) SetParameterType(v string) { o.ParameterType = &v } // GetType returns the Type field value if set, zero value otherwise. -func (o *PatchedParameterTypeRule) GetType() ParameterRuleTypeEnum { +func (o *PatchedParameterTypeRuleUpdate) GetType() ParameterRuleTypeEnum { if o == nil || IsNil(o.Type) { var ret ParameterRuleTypeEnum return ret @@ -155,7 +122,7 @@ func (o *PatchedParameterTypeRule) GetType() ParameterRuleTypeEnum { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterTypeRule) GetTypeOk() (*ParameterRuleTypeEnum, bool) { +func (o *PatchedParameterTypeRuleUpdate) GetTypeOk() (*ParameterRuleTypeEnum, bool) { if o == nil || IsNil(o.Type) { return nil, false } @@ -163,7 +130,7 @@ func (o *PatchedParameterTypeRule) GetTypeOk() (*ParameterRuleTypeEnum, bool) { } // HasType returns a boolean if a field has been set. -func (o *PatchedParameterTypeRule) HasType() bool { +func (o *PatchedParameterTypeRuleUpdate) HasType() bool { if o != nil && !IsNil(o.Type) { return true } @@ -172,12 +139,12 @@ func (o *PatchedParameterTypeRule) HasType() bool { } // SetType gets a reference to the given ParameterRuleTypeEnum and assigns it to the Type field. -func (o *PatchedParameterTypeRule) SetType(v ParameterRuleTypeEnum) { +func (o *PatchedParameterTypeRuleUpdate) SetType(v ParameterRuleTypeEnum) { o.Type = &v } // GetConstraint returns the Constraint field value if set, zero value otherwise. -func (o *PatchedParameterTypeRule) GetConstraint() string { +func (o *PatchedParameterTypeRuleUpdate) GetConstraint() string { if o == nil || IsNil(o.Constraint) { var ret string return ret @@ -187,7 +154,7 @@ func (o *PatchedParameterTypeRule) GetConstraint() string { // GetConstraintOk returns a tuple with the Constraint field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterTypeRule) GetConstraintOk() (*string, bool) { +func (o *PatchedParameterTypeRuleUpdate) GetConstraintOk() (*string, bool) { if o == nil || IsNil(o.Constraint) { return nil, false } @@ -195,7 +162,7 @@ func (o *PatchedParameterTypeRule) GetConstraintOk() (*string, bool) { } // HasConstraint returns a boolean if a field has been set. -func (o *PatchedParameterTypeRule) HasConstraint() bool { +func (o *PatchedParameterTypeRuleUpdate) HasConstraint() bool { if o != nil && !IsNil(o.Constraint) { return true } @@ -204,12 +171,12 @@ func (o *PatchedParameterTypeRule) HasConstraint() bool { } // SetConstraint gets a reference to the given string and assigns it to the Constraint field. -func (o *PatchedParameterTypeRule) SetConstraint(v string) { +func (o *PatchedParameterTypeRuleUpdate) SetConstraint(v string) { o.Constraint = &v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *PatchedParameterTypeRule) GetCreatedAt() time.Time { +func (o *PatchedParameterTypeRuleUpdate) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { var ret time.Time return ret @@ -219,7 +186,7 @@ func (o *PatchedParameterTypeRule) GetCreatedAt() time.Time { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterTypeRule) GetCreatedAtOk() (*time.Time, bool) { +func (o *PatchedParameterTypeRuleUpdate) GetCreatedAtOk() (*time.Time, bool) { if o == nil || IsNil(o.CreatedAt) { return nil, false } @@ -227,7 +194,7 @@ func (o *PatchedParameterTypeRule) GetCreatedAtOk() (*time.Time, bool) { } // HasCreatedAt returns a boolean if a field has been set. -func (o *PatchedParameterTypeRule) HasCreatedAt() bool { +func (o *PatchedParameterTypeRuleUpdate) HasCreatedAt() bool { if o != nil && !IsNil(o.CreatedAt) { return true } @@ -236,43 +203,53 @@ func (o *PatchedParameterTypeRule) HasCreatedAt() bool { } // SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *PatchedParameterTypeRule) SetCreatedAt(v time.Time) { +func (o *PatchedParameterTypeRuleUpdate) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. -func (o *PatchedParameterTypeRule) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedParameterTypeRuleUpdate) GetModifiedAt() time.Time { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedParameterTypeRule) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedParameterTypeRuleUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. -func (o *PatchedParameterTypeRule) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { +func (o *PatchedParameterTypeRuleUpdate) HasModifiedAt() bool { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. -func (o *PatchedParameterTypeRule) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. +func (o *PatchedParameterTypeRuleUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedParameterTypeRuleUpdate) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) } -func (o PatchedParameterTypeRule) MarshalJSON() ([]byte, error) { +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedParameterTypeRuleUpdate) UnsetModifiedAt() { + o.ModifiedAt.Unset() +} + +func (o PatchedParameterTypeRuleUpdate) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err @@ -280,11 +257,8 @@ func (o PatchedParameterTypeRule) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o PatchedParameterTypeRule) ToMap() (map[string]interface{}, error) { +func (o PatchedParameterTypeRuleUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -300,44 +274,44 @@ func (o PatchedParameterTypeRule) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } return toSerialize, nil } -type NullablePatchedParameterTypeRule struct { - value *PatchedParameterTypeRule +type NullablePatchedParameterTypeRuleUpdate struct { + value *PatchedParameterTypeRuleUpdate isSet bool } -func (v NullablePatchedParameterTypeRule) Get() *PatchedParameterTypeRule { +func (v NullablePatchedParameterTypeRuleUpdate) Get() *PatchedParameterTypeRuleUpdate { return v.value } -func (v *NullablePatchedParameterTypeRule) Set(val *PatchedParameterTypeRule) { +func (v *NullablePatchedParameterTypeRuleUpdate) Set(val *PatchedParameterTypeRuleUpdate) { v.value = val v.isSet = true } -func (v NullablePatchedParameterTypeRule) IsSet() bool { +func (v NullablePatchedParameterTypeRuleUpdate) IsSet() bool { return v.isSet } -func (v *NullablePatchedParameterTypeRule) Unset() { +func (v *NullablePatchedParameterTypeRuleUpdate) Unset() { v.value = nil v.isSet = false } -func NewNullablePatchedParameterTypeRule(val *PatchedParameterTypeRule) *NullablePatchedParameterTypeRule { - return &NullablePatchedParameterTypeRule{value: val, isSet: true} +func NewNullablePatchedParameterTypeRuleUpdate(val *PatchedParameterTypeRuleUpdate) *NullablePatchedParameterTypeRuleUpdate { + return &NullablePatchedParameterTypeRuleUpdate{value: val, isSet: true} } -func (v NullablePatchedParameterTypeRule) MarshalJSON() ([]byte, error) { +func (v NullablePatchedParameterTypeRuleUpdate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePatchedParameterTypeRule) UnmarshalJSON(src []byte) error { +func (v *NullablePatchedParameterTypeRuleUpdate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/pkg/cloudtruthapi/model_patched_parameter_type_update.go b/pkg/cloudtruthapi/model_patched_parameter_type_update.go new file mode 100644 index 0000000..1fe939d --- /dev/null +++ b/pkg/cloudtruthapi/model_patched_parameter_type_update.go @@ -0,0 +1,358 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedParameterTypeUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedParameterTypeUpdate{} + +// PatchedParameterTypeUpdate struct for PatchedParameterTypeUpdate +type PatchedParameterTypeUpdate struct { + Id *string `json:"id,omitempty"` + // The parameter type name. + Name *string `json:"name,omitempty"` + // A description of the parameter type, provide documentation on how to use this type here. + Description *string `json:"description,omitempty"` + // The URL for this parameter type's parent + Parent *string `json:"parent,omitempty"` + // Rules applied to this parameter. + Rules []ParameterTypeRule `json:"rules,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` +} + +// NewPatchedParameterTypeUpdate instantiates a new PatchedParameterTypeUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedParameterTypeUpdate() *PatchedParameterTypeUpdate { + this := PatchedParameterTypeUpdate{} + return &this +} + +// NewPatchedParameterTypeUpdateWithDefaults instantiates a new PatchedParameterTypeUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedParameterTypeUpdateWithDefaults() *PatchedParameterTypeUpdate { + this := PatchedParameterTypeUpdate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PatchedParameterTypeUpdate) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterTypeUpdate) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PatchedParameterTypeUpdate) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PatchedParameterTypeUpdate) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedParameterTypeUpdate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterTypeUpdate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedParameterTypeUpdate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedParameterTypeUpdate) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedParameterTypeUpdate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterTypeUpdate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedParameterTypeUpdate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedParameterTypeUpdate) SetDescription(v string) { + o.Description = &v +} + +// GetParent returns the Parent field value if set, zero value otherwise. +func (o *PatchedParameterTypeUpdate) GetParent() string { + if o == nil || IsNil(o.Parent) { + var ret string + return ret + } + return *o.Parent +} + +// GetParentOk returns a tuple with the Parent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterTypeUpdate) GetParentOk() (*string, bool) { + if o == nil || IsNil(o.Parent) { + return nil, false + } + return o.Parent, true +} + +// HasParent returns a boolean if a field has been set. +func (o *PatchedParameterTypeUpdate) HasParent() bool { + if o != nil && !IsNil(o.Parent) { + return true + } + + return false +} + +// SetParent gets a reference to the given string and assigns it to the Parent field. +func (o *PatchedParameterTypeUpdate) SetParent(v string) { + o.Parent = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *PatchedParameterTypeUpdate) GetRules() []ParameterTypeRule { + if o == nil || IsNil(o.Rules) { + var ret []ParameterTypeRule + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterTypeUpdate) GetRulesOk() ([]ParameterTypeRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *PatchedParameterTypeUpdate) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []ParameterTypeRule and assigns it to the Rules field. +func (o *PatchedParameterTypeUpdate) SetRules(v []ParameterTypeRule) { + o.Rules = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PatchedParameterTypeUpdate) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterTypeUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PatchedParameterTypeUpdate) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PatchedParameterTypeUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedParameterTypeUpdate) GetModifiedAt() time.Time { + if o == nil || IsNil(o.ModifiedAt.Get()) { + var ret time.Time + return ret + } + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedParameterTypeUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// HasModifiedAt returns a boolean if a field has been set. +func (o *PatchedParameterTypeUpdate) HasModifiedAt() bool { + if o != nil && o.ModifiedAt.IsSet() { + return true + } + + return false +} + +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. +func (o *PatchedParameterTypeUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedParameterTypeUpdate) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedParameterTypeUpdate) UnsetModifiedAt() { + o.ModifiedAt.Unset() +} + +func (o PatchedParameterTypeUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedParameterTypeUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Parent) { + toSerialize["parent"] = o.Parent + } + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() + } + return toSerialize, nil +} + +type NullablePatchedParameterTypeUpdate struct { + value *PatchedParameterTypeUpdate + isSet bool +} + +func (v NullablePatchedParameterTypeUpdate) Get() *PatchedParameterTypeUpdate { + return v.value +} + +func (v *NullablePatchedParameterTypeUpdate) Set(val *PatchedParameterTypeUpdate) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedParameterTypeUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedParameterTypeUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedParameterTypeUpdate(val *PatchedParameterTypeUpdate) *NullablePatchedParameterTypeUpdate { + return &NullablePatchedParameterTypeUpdate{value: val, isSet: true} +} + +func (v NullablePatchedParameterTypeUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedParameterTypeUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_patched_parameter_update.go b/pkg/cloudtruthapi/model_patched_parameter_update.go new file mode 100644 index 0000000..eed7d4f --- /dev/null +++ b/pkg/cloudtruthapi/model_patched_parameter_update.go @@ -0,0 +1,395 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedParameterUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedParameterUpdate{} + +// PatchedParameterUpdate A single parameter inside of a project. +type PatchedParameterUpdate struct { + Id *string `json:"id,omitempty"` + // The parameter name. + Name *string `json:"name,omitempty"` + // A description of the parameter. You may find it helpful to document how this parameter is used to assist others when they need to maintain software that uses this content. + Description *string `json:"description,omitempty"` + // Indicates if this content is secret or not. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used. + Secret *bool `json:"secret,omitempty"` + // The type of this Parameter. If not provided, this will default to a string for Parameters that are not overrides or to the overridden Parameter's type for Parameters that are overrides. + Type *string `json:"type,omitempty"` + // The project url. + Project *string `json:"project,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` +} + +// NewPatchedParameterUpdate instantiates a new PatchedParameterUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedParameterUpdate() *PatchedParameterUpdate { + this := PatchedParameterUpdate{} + return &this +} + +// NewPatchedParameterUpdateWithDefaults instantiates a new PatchedParameterUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedParameterUpdateWithDefaults() *PatchedParameterUpdate { + this := PatchedParameterUpdate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PatchedParameterUpdate) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterUpdate) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PatchedParameterUpdate) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PatchedParameterUpdate) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedParameterUpdate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterUpdate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedParameterUpdate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedParameterUpdate) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedParameterUpdate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterUpdate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedParameterUpdate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedParameterUpdate) SetDescription(v string) { + o.Description = &v +} + +// GetSecret returns the Secret field value if set, zero value otherwise. +func (o *PatchedParameterUpdate) GetSecret() bool { + if o == nil || IsNil(o.Secret) { + var ret bool + return ret + } + return *o.Secret +} + +// GetSecretOk returns a tuple with the Secret field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterUpdate) GetSecretOk() (*bool, bool) { + if o == nil || IsNil(o.Secret) { + return nil, false + } + return o.Secret, true +} + +// HasSecret returns a boolean if a field has been set. +func (o *PatchedParameterUpdate) HasSecret() bool { + if o != nil && !IsNil(o.Secret) { + return true + } + + return false +} + +// SetSecret gets a reference to the given bool and assigns it to the Secret field. +func (o *PatchedParameterUpdate) SetSecret(v bool) { + o.Secret = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PatchedParameterUpdate) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterUpdate) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PatchedParameterUpdate) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PatchedParameterUpdate) SetType(v string) { + o.Type = &v +} + +// GetProject returns the Project field value if set, zero value otherwise. +func (o *PatchedParameterUpdate) GetProject() string { + if o == nil || IsNil(o.Project) { + var ret string + return ret + } + return *o.Project +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterUpdate) GetProjectOk() (*string, bool) { + if o == nil || IsNil(o.Project) { + return nil, false + } + return o.Project, true +} + +// HasProject returns a boolean if a field has been set. +func (o *PatchedParameterUpdate) HasProject() bool { + if o != nil && !IsNil(o.Project) { + return true + } + + return false +} + +// SetProject gets a reference to the given string and assigns it to the Project field. +func (o *PatchedParameterUpdate) SetProject(v string) { + o.Project = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PatchedParameterUpdate) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedParameterUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PatchedParameterUpdate) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PatchedParameterUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedParameterUpdate) GetModifiedAt() time.Time { + if o == nil || IsNil(o.ModifiedAt.Get()) { + var ret time.Time + return ret + } + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedParameterUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// HasModifiedAt returns a boolean if a field has been set. +func (o *PatchedParameterUpdate) HasModifiedAt() bool { + if o != nil && o.ModifiedAt.IsSet() { + return true + } + + return false +} + +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. +func (o *PatchedParameterUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedParameterUpdate) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedParameterUpdate) UnsetModifiedAt() { + o.ModifiedAt.Unset() +} + +func (o PatchedParameterUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedParameterUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Secret) { + toSerialize["secret"] = o.Secret + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Project) { + toSerialize["project"] = o.Project + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() + } + return toSerialize, nil +} + +type NullablePatchedParameterUpdate struct { + value *PatchedParameterUpdate + isSet bool +} + +func (v NullablePatchedParameterUpdate) Get() *PatchedParameterUpdate { + return v.value +} + +func (v *NullablePatchedParameterUpdate) Set(val *PatchedParameterUpdate) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedParameterUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedParameterUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedParameterUpdate(val *PatchedParameterUpdate) *NullablePatchedParameterUpdate { + return &NullablePatchedParameterUpdate{value: val, isSet: true} +} + +func (v NullablePatchedParameterUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedParameterUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_patched_project.go b/pkg/cloudtruthapi/model_patched_project_update.go similarity index 53% rename from pkg/cloudtruthapi/model_patched_project.go rename to pkg/cloudtruthapi/model_patched_project_update.go index eb9425b..f4e204d 100644 --- a/pkg/cloudtruthapi/model_patched_project.go +++ b/pkg/cloudtruthapi/model_patched_project_update.go @@ -16,84 +16,46 @@ import ( "time" ) -// checks if the PatchedProject type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchedProject{} +// checks if the PatchedProjectUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedProjectUpdate{} -// PatchedProject struct for PatchedProject -type PatchedProject struct { - Url *string `json:"url,omitempty"` - // A unique identifier for the project. +// PatchedProjectUpdate struct for PatchedProjectUpdate +type PatchedProjectUpdate struct { Id *string `json:"id,omitempty"` // The project name. Name *string `json:"name,omitempty"` // A description of the project. You may find it helpful to document how this project is used to assist others when they need to maintain software that uses this content. Description *string `json:"description,omitempty"` - // This is the opposite of `depends_on`, see that field for more details. - Dependents []string `json:"dependents,omitempty"` + // A regular expression parameter names must match + ParameterNamePattern *string `json:"parameter_name_pattern,omitempty"` // Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. DependsOn NullableString `json:"depends_on,omitempty"` // Indicates if access control is being enforced through grants. AccessControlled *bool `json:"access_controlled,omitempty"` Role NullableRoleEnum `json:"role,omitempty"` - // Deprecated. Only shows pushes for aws integrations in /api/v1/. - Pushes []AwsPush `json:"pushes,omitempty"` - // Push actions associated with the project. - PushUrls []string `json:"push_urls,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` } -// NewPatchedProject instantiates a new PatchedProject object +// NewPatchedProjectUpdate instantiates a new PatchedProjectUpdate object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPatchedProject() *PatchedProject { - this := PatchedProject{} +func NewPatchedProjectUpdate() *PatchedProjectUpdate { + this := PatchedProjectUpdate{} return &this } -// NewPatchedProjectWithDefaults instantiates a new PatchedProject object +// NewPatchedProjectUpdateWithDefaults instantiates a new PatchedProjectUpdate object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewPatchedProjectWithDefaults() *PatchedProject { - this := PatchedProject{} +func NewPatchedProjectUpdateWithDefaults() *PatchedProjectUpdate { + this := PatchedProjectUpdate{} return &this } -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *PatchedProject) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedProject) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *PatchedProject) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *PatchedProject) SetUrl(v string) { - o.Url = &v -} - // GetId returns the Id field value if set, zero value otherwise. -func (o *PatchedProject) GetId() string { +func (o *PatchedProjectUpdate) GetId() string { if o == nil || IsNil(o.Id) { var ret string return ret @@ -103,7 +65,7 @@ func (o *PatchedProject) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedProject) GetIdOk() (*string, bool) { +func (o *PatchedProjectUpdate) GetIdOk() (*string, bool) { if o == nil || IsNil(o.Id) { return nil, false } @@ -111,7 +73,7 @@ func (o *PatchedProject) GetIdOk() (*string, bool) { } // HasId returns a boolean if a field has been set. -func (o *PatchedProject) HasId() bool { +func (o *PatchedProjectUpdate) HasId() bool { if o != nil && !IsNil(o.Id) { return true } @@ -120,12 +82,12 @@ func (o *PatchedProject) HasId() bool { } // SetId gets a reference to the given string and assigns it to the Id field. -func (o *PatchedProject) SetId(v string) { +func (o *PatchedProjectUpdate) SetId(v string) { o.Id = &v } // GetName returns the Name field value if set, zero value otherwise. -func (o *PatchedProject) GetName() string { +func (o *PatchedProjectUpdate) GetName() string { if o == nil || IsNil(o.Name) { var ret string return ret @@ -135,7 +97,7 @@ func (o *PatchedProject) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedProject) GetNameOk() (*string, bool) { +func (o *PatchedProjectUpdate) GetNameOk() (*string, bool) { if o == nil || IsNil(o.Name) { return nil, false } @@ -143,7 +105,7 @@ func (o *PatchedProject) GetNameOk() (*string, bool) { } // HasName returns a boolean if a field has been set. -func (o *PatchedProject) HasName() bool { +func (o *PatchedProjectUpdate) HasName() bool { if o != nil && !IsNil(o.Name) { return true } @@ -152,12 +114,12 @@ func (o *PatchedProject) HasName() bool { } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *PatchedProject) SetName(v string) { +func (o *PatchedProjectUpdate) SetName(v string) { o.Name = &v } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *PatchedProject) GetDescription() string { +func (o *PatchedProjectUpdate) GetDescription() string { if o == nil || IsNil(o.Description) { var ret string return ret @@ -167,7 +129,7 @@ func (o *PatchedProject) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedProject) GetDescriptionOk() (*string, bool) { +func (o *PatchedProjectUpdate) GetDescriptionOk() (*string, bool) { if o == nil || IsNil(o.Description) { return nil, false } @@ -175,7 +137,7 @@ func (o *PatchedProject) GetDescriptionOk() (*string, bool) { } // HasDescription returns a boolean if a field has been set. -func (o *PatchedProject) HasDescription() bool { +func (o *PatchedProjectUpdate) HasDescription() bool { if o != nil && !IsNil(o.Description) { return true } @@ -184,44 +146,44 @@ func (o *PatchedProject) HasDescription() bool { } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PatchedProject) SetDescription(v string) { +func (o *PatchedProjectUpdate) SetDescription(v string) { o.Description = &v } -// GetDependents returns the Dependents field value if set, zero value otherwise. -func (o *PatchedProject) GetDependents() []string { - if o == nil || IsNil(o.Dependents) { - var ret []string +// GetParameterNamePattern returns the ParameterNamePattern field value if set, zero value otherwise. +func (o *PatchedProjectUpdate) GetParameterNamePattern() string { + if o == nil || IsNil(o.ParameterNamePattern) { + var ret string return ret } - return o.Dependents + return *o.ParameterNamePattern } -// GetDependentsOk returns a tuple with the Dependents field value if set, nil otherwise +// GetParameterNamePatternOk returns a tuple with the ParameterNamePattern field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedProject) GetDependentsOk() ([]string, bool) { - if o == nil || IsNil(o.Dependents) { +func (o *PatchedProjectUpdate) GetParameterNamePatternOk() (*string, bool) { + if o == nil || IsNil(o.ParameterNamePattern) { return nil, false } - return o.Dependents, true + return o.ParameterNamePattern, true } -// HasDependents returns a boolean if a field has been set. -func (o *PatchedProject) HasDependents() bool { - if o != nil && !IsNil(o.Dependents) { +// HasParameterNamePattern returns a boolean if a field has been set. +func (o *PatchedProjectUpdate) HasParameterNamePattern() bool { + if o != nil && !IsNil(o.ParameterNamePattern) { return true } return false } -// SetDependents gets a reference to the given []string and assigns it to the Dependents field. -func (o *PatchedProject) SetDependents(v []string) { - o.Dependents = v +// SetParameterNamePattern gets a reference to the given string and assigns it to the ParameterNamePattern field. +func (o *PatchedProjectUpdate) SetParameterNamePattern(v string) { + o.ParameterNamePattern = &v } // GetDependsOn returns the DependsOn field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedProject) GetDependsOn() string { +func (o *PatchedProjectUpdate) GetDependsOn() string { if o == nil || IsNil(o.DependsOn.Get()) { var ret string return ret @@ -232,7 +194,7 @@ func (o *PatchedProject) GetDependsOn() string { // GetDependsOnOk returns a tuple with the DependsOn field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedProject) GetDependsOnOk() (*string, bool) { +func (o *PatchedProjectUpdate) GetDependsOnOk() (*string, bool) { if o == nil { return nil, false } @@ -240,7 +202,7 @@ func (o *PatchedProject) GetDependsOnOk() (*string, bool) { } // HasDependsOn returns a boolean if a field has been set. -func (o *PatchedProject) HasDependsOn() bool { +func (o *PatchedProjectUpdate) HasDependsOn() bool { if o != nil && o.DependsOn.IsSet() { return true } @@ -249,21 +211,21 @@ func (o *PatchedProject) HasDependsOn() bool { } // SetDependsOn gets a reference to the given NullableString and assigns it to the DependsOn field. -func (o *PatchedProject) SetDependsOn(v string) { +func (o *PatchedProjectUpdate) SetDependsOn(v string) { o.DependsOn.Set(&v) } // SetDependsOnNil sets the value for DependsOn to be an explicit nil -func (o *PatchedProject) SetDependsOnNil() { +func (o *PatchedProjectUpdate) SetDependsOnNil() { o.DependsOn.Set(nil) } // UnsetDependsOn ensures that no value is present for DependsOn, not even an explicit nil -func (o *PatchedProject) UnsetDependsOn() { +func (o *PatchedProjectUpdate) UnsetDependsOn() { o.DependsOn.Unset() } // GetAccessControlled returns the AccessControlled field value if set, zero value otherwise. -func (o *PatchedProject) GetAccessControlled() bool { +func (o *PatchedProjectUpdate) GetAccessControlled() bool { if o == nil || IsNil(o.AccessControlled) { var ret bool return ret @@ -273,7 +235,7 @@ func (o *PatchedProject) GetAccessControlled() bool { // GetAccessControlledOk returns a tuple with the AccessControlled field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedProject) GetAccessControlledOk() (*bool, bool) { +func (o *PatchedProjectUpdate) GetAccessControlledOk() (*bool, bool) { if o == nil || IsNil(o.AccessControlled) { return nil, false } @@ -281,7 +243,7 @@ func (o *PatchedProject) GetAccessControlledOk() (*bool, bool) { } // HasAccessControlled returns a boolean if a field has been set. -func (o *PatchedProject) HasAccessControlled() bool { +func (o *PatchedProjectUpdate) HasAccessControlled() bool { if o != nil && !IsNil(o.AccessControlled) { return true } @@ -290,12 +252,12 @@ func (o *PatchedProject) HasAccessControlled() bool { } // SetAccessControlled gets a reference to the given bool and assigns it to the AccessControlled field. -func (o *PatchedProject) SetAccessControlled(v bool) { +func (o *PatchedProjectUpdate) SetAccessControlled(v bool) { o.AccessControlled = &v } // GetRole returns the Role field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedProject) GetRole() RoleEnum { +func (o *PatchedProjectUpdate) GetRole() RoleEnum { if o == nil || IsNil(o.Role.Get()) { var ret RoleEnum return ret @@ -306,7 +268,7 @@ func (o *PatchedProject) GetRole() RoleEnum { // GetRoleOk returns a tuple with the Role field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedProject) GetRoleOk() (*RoleEnum, bool) { +func (o *PatchedProjectUpdate) GetRoleOk() (*RoleEnum, bool) { if o == nil { return nil, false } @@ -314,7 +276,7 @@ func (o *PatchedProject) GetRoleOk() (*RoleEnum, bool) { } // HasRole returns a boolean if a field has been set. -func (o *PatchedProject) HasRole() bool { +func (o *PatchedProjectUpdate) HasRole() bool { if o != nil && o.Role.IsSet() { return true } @@ -323,85 +285,21 @@ func (o *PatchedProject) HasRole() bool { } // SetRole gets a reference to the given NullableRoleEnum and assigns it to the Role field. -func (o *PatchedProject) SetRole(v RoleEnum) { +func (o *PatchedProjectUpdate) SetRole(v RoleEnum) { o.Role.Set(&v) } // SetRoleNil sets the value for Role to be an explicit nil -func (o *PatchedProject) SetRoleNil() { +func (o *PatchedProjectUpdate) SetRoleNil() { o.Role.Set(nil) } // UnsetRole ensures that no value is present for Role, not even an explicit nil -func (o *PatchedProject) UnsetRole() { +func (o *PatchedProjectUpdate) UnsetRole() { o.Role.Unset() } -// GetPushes returns the Pushes field value if set, zero value otherwise. -func (o *PatchedProject) GetPushes() []AwsPush { - if o == nil || IsNil(o.Pushes) { - var ret []AwsPush - return ret - } - return o.Pushes -} - -// GetPushesOk returns a tuple with the Pushes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedProject) GetPushesOk() ([]AwsPush, bool) { - if o == nil || IsNil(o.Pushes) { - return nil, false - } - return o.Pushes, true -} - -// HasPushes returns a boolean if a field has been set. -func (o *PatchedProject) HasPushes() bool { - if o != nil && !IsNil(o.Pushes) { - return true - } - - return false -} - -// SetPushes gets a reference to the given []AwsPush and assigns it to the Pushes field. -func (o *PatchedProject) SetPushes(v []AwsPush) { - o.Pushes = v -} - -// GetPushUrls returns the PushUrls field value if set, zero value otherwise. -func (o *PatchedProject) GetPushUrls() []string { - if o == nil || IsNil(o.PushUrls) { - var ret []string - return ret - } - return o.PushUrls -} - -// GetPushUrlsOk returns a tuple with the PushUrls field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedProject) GetPushUrlsOk() ([]string, bool) { - if o == nil || IsNil(o.PushUrls) { - return nil, false - } - return o.PushUrls, true -} - -// HasPushUrls returns a boolean if a field has been set. -func (o *PatchedProject) HasPushUrls() bool { - if o != nil && !IsNil(o.PushUrls) { - return true - } - - return false -} - -// SetPushUrls gets a reference to the given []string and assigns it to the PushUrls field. -func (o *PatchedProject) SetPushUrls(v []string) { - o.PushUrls = v -} - // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *PatchedProject) GetCreatedAt() time.Time { +func (o *PatchedProjectUpdate) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { var ret time.Time return ret @@ -411,7 +309,7 @@ func (o *PatchedProject) GetCreatedAt() time.Time { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedProject) GetCreatedAtOk() (*time.Time, bool) { +func (o *PatchedProjectUpdate) GetCreatedAtOk() (*time.Time, bool) { if o == nil || IsNil(o.CreatedAt) { return nil, false } @@ -419,7 +317,7 @@ func (o *PatchedProject) GetCreatedAtOk() (*time.Time, bool) { } // HasCreatedAt returns a boolean if a field has been set. -func (o *PatchedProject) HasCreatedAt() bool { +func (o *PatchedProjectUpdate) HasCreatedAt() bool { if o != nil && !IsNil(o.CreatedAt) { return true } @@ -428,43 +326,53 @@ func (o *PatchedProject) HasCreatedAt() bool { } // SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *PatchedProject) SetCreatedAt(v time.Time) { +func (o *PatchedProjectUpdate) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. -func (o *PatchedProject) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedProjectUpdate) GetModifiedAt() time.Time { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchedProject) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedProjectUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. -func (o *PatchedProject) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { +func (o *PatchedProjectUpdate) HasModifiedAt() bool { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. -func (o *PatchedProject) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. +func (o *PatchedProjectUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedProjectUpdate) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedProjectUpdate) UnsetModifiedAt() { + o.ModifiedAt.Unset() } -func (o PatchedProject) MarshalJSON() ([]byte, error) { +func (o PatchedProjectUpdate) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err @@ -472,11 +380,8 @@ func (o PatchedProject) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o PatchedProject) ToMap() (map[string]interface{}, error) { +func (o PatchedProjectUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -486,8 +391,8 @@ func (o PatchedProject) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.Dependents) { - toSerialize["dependents"] = o.Dependents + if !IsNil(o.ParameterNamePattern) { + toSerialize["parameter_name_pattern"] = o.ParameterNamePattern } if o.DependsOn.IsSet() { toSerialize["depends_on"] = o.DependsOn.Get() @@ -498,53 +403,47 @@ func (o PatchedProject) ToMap() (map[string]interface{}, error) { if o.Role.IsSet() { toSerialize["role"] = o.Role.Get() } - if !IsNil(o.Pushes) { - toSerialize["pushes"] = o.Pushes - } - if !IsNil(o.PushUrls) { - toSerialize["push_urls"] = o.PushUrls - } if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } return toSerialize, nil } -type NullablePatchedProject struct { - value *PatchedProject +type NullablePatchedProjectUpdate struct { + value *PatchedProjectUpdate isSet bool } -func (v NullablePatchedProject) Get() *PatchedProject { +func (v NullablePatchedProjectUpdate) Get() *PatchedProjectUpdate { return v.value } -func (v *NullablePatchedProject) Set(val *PatchedProject) { +func (v *NullablePatchedProjectUpdate) Set(val *PatchedProjectUpdate) { v.value = val v.isSet = true } -func (v NullablePatchedProject) IsSet() bool { +func (v NullablePatchedProjectUpdate) IsSet() bool { return v.isSet } -func (v *NullablePatchedProject) Unset() { +func (v *NullablePatchedProjectUpdate) Unset() { v.value = nil v.isSet = false } -func NewNullablePatchedProject(val *PatchedProject) *NullablePatchedProject { - return &NullablePatchedProject{value: val, isSet: true} +func NewNullablePatchedProjectUpdate(val *PatchedProjectUpdate) *NullablePatchedProjectUpdate { + return &NullablePatchedProjectUpdate{value: val, isSet: true} } -func (v NullablePatchedProject) MarshalJSON() ([]byte, error) { +func (v NullablePatchedProjectUpdate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePatchedProject) UnmarshalJSON(src []byte) error { +func (v *NullablePatchedProjectUpdate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/pkg/cloudtruthapi/model_patched_service_account.go b/pkg/cloudtruthapi/model_patched_service_account.go index 4e02c9d..024b398 100644 --- a/pkg/cloudtruthapi/model_patched_service_account.go +++ b/pkg/cloudtruthapi/model_patched_service_account.go @@ -23,11 +23,12 @@ var _ MappedNullable = &PatchedServiceAccount{} type PatchedServiceAccount struct { Url *string `json:"url,omitempty"` Id *string `json:"id,omitempty"` + Owner NullableString `json:"owner,omitempty"` User *User `json:"user,omitempty"` // An optional description of the process or system using the service account. Description *string `json:"description,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` // The most recent date and time the service account was used. It will be null if the service account has not been used. LastUsedAt NullableTime `json:"last_used_at,omitempty"` } @@ -113,6 +114,48 @@ func (o *PatchedServiceAccount) SetId(v string) { o.Id = &v } +// GetOwner returns the Owner field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedServiceAccount) GetOwner() string { + if o == nil || IsNil(o.Owner.Get()) { + var ret string + return ret + } + return *o.Owner.Get() +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedServiceAccount) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Owner.Get(), o.Owner.IsSet() +} + +// HasOwner returns a boolean if a field has been set. +func (o *PatchedServiceAccount) HasOwner() bool { + if o != nil && o.Owner.IsSet() { + return true + } + + return false +} + +// SetOwner gets a reference to the given NullableString and assigns it to the Owner field. +func (o *PatchedServiceAccount) SetOwner(v string) { + o.Owner.Set(&v) +} +// SetOwnerNil sets the value for Owner to be an explicit nil +func (o *PatchedServiceAccount) SetOwnerNil() { + o.Owner.Set(nil) +} + +// UnsetOwner ensures that no value is present for Owner, not even an explicit nil +func (o *PatchedServiceAccount) UnsetOwner() { + o.Owner.Unset() +} + // GetUser returns the User field value if set, zero value otherwise. func (o *PatchedServiceAccount) GetUser() User { if o == nil || IsNil(o.User) { @@ -209,36 +252,46 @@ func (o *PatchedServiceAccount) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedServiceAccount) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil || IsNil(o.ModifiedAt.Get()) { var ret time.Time return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedServiceAccount) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *PatchedServiceAccount) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { + if o != nil && o.ModifiedAt.IsSet() { return true } return false } -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. func (o *PatchedServiceAccount) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedServiceAccount) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedServiceAccount) UnsetModifiedAt() { + o.ModifiedAt.Unset() } // GetLastUsedAt returns the LastUsedAt field value if set, zero value otherwise (both if not set or set to explicit null). @@ -299,6 +352,9 @@ func (o PatchedServiceAccount) ToMap() (map[string]interface{}, error) { if !IsNil(o.Id) { toSerialize["id"] = o.Id } + if o.Owner.IsSet() { + toSerialize["owner"] = o.Owner.Get() + } if !IsNil(o.User) { toSerialize["user"] = o.User } @@ -308,8 +364,8 @@ func (o PatchedServiceAccount) ToMap() (map[string]interface{}, error) { if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } if o.LastUsedAt.IsSet() { toSerialize["last_used_at"] = o.LastUsedAt.Get() diff --git a/pkg/cloudtruthapi/model_patched_service_account_user.go b/pkg/cloudtruthapi/model_patched_service_account_user.go deleted file mode 100644 index 85ae9fc..0000000 --- a/pkg/cloudtruthapi/model_patched_service_account_user.go +++ /dev/null @@ -1,422 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" - "time" -) - -// PatchedServiceAccountUser struct for PatchedServiceAccountUser -type PatchedServiceAccountUser struct { - Url string `json:"url"` - // The unique identifier of a user. - Id string `json:"id"` - // The type of user record. - Type *string `json:"type,omitempty"` - Name NullableString `json:"name"` - // The user's organization name. - OrganizationName NullableString `json:"organization_name"` - // Membership identifier for user. - MembershipId NullableString `json:"membership_id"` - // The user's role in the current organization (defined by the request authorization header). - Role NullableString `json:"role"` - Email NullableString `json:"email"` - PictureUrl NullableString `json:"picture_url"` - CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` -} - -// NewPatchedServiceAccountUser instantiates a new PatchedServiceAccountUser object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPatchedServiceAccountUser(url string, id string, name NullableString, organizationName NullableString, membershipId NullableString, role NullableString, email NullableString, pictureUrl NullableString, createdAt time.Time, modifiedAt time.Time) *PatchedServiceAccountUser { - this := PatchedServiceAccountUser{} - this.Url = url - this.Id = id - this.Name = name - this.OrganizationName = organizationName - this.MembershipId = membershipId - this.Role = role - this.Email = email - this.PictureUrl = pictureUrl - this.CreatedAt = createdAt - this.ModifiedAt = modifiedAt - return &this -} - -// NewPatchedServiceAccountUserWithDefaults instantiates a new PatchedServiceAccountUser object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPatchedServiceAccountUserWithDefaults() *PatchedServiceAccountUser { - this := PatchedServiceAccountUser{} - return &this -} - -// GetUrl returns the Url field value -func (o *PatchedServiceAccountUser) GetUrl() string { - if o == nil { - var ret string - return ret - } - - return o.Url -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *PatchedServiceAccountUser) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Url, true -} - -// SetUrl sets field value -func (o *PatchedServiceAccountUser) SetUrl(v string) { - o.Url = v -} - -// GetId returns the Id field value -func (o *PatchedServiceAccountUser) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *PatchedServiceAccountUser) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *PatchedServiceAccountUser) SetId(v string) { - o.Id = v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *PatchedServiceAccountUser) GetType() string { - if o == nil || o.Type == nil { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedServiceAccountUser) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *PatchedServiceAccountUser) HasType() bool { - if o != nil && o.Type != nil { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *PatchedServiceAccountUser) SetType(v string) { - o.Type = &v -} - -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PatchedServiceAccountUser) GetName() string { - if o == nil || o.Name.Get() == nil { - var ret string - return ret - } - - return *o.Name.Get() -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedServiceAccountUser) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name.Get(), o.Name.IsSet() -} - -// SetName sets field value -func (o *PatchedServiceAccountUser) SetName(v string) { - o.Name.Set(&v) -} - -// GetOrganizationName returns the OrganizationName field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PatchedServiceAccountUser) GetOrganizationName() string { - if o == nil || o.OrganizationName.Get() == nil { - var ret string - return ret - } - - return *o.OrganizationName.Get() -} - -// GetOrganizationNameOk returns a tuple with the OrganizationName field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedServiceAccountUser) GetOrganizationNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.OrganizationName.Get(), o.OrganizationName.IsSet() -} - -// SetOrganizationName sets field value -func (o *PatchedServiceAccountUser) SetOrganizationName(v string) { - o.OrganizationName.Set(&v) -} - -// GetMembershipId returns the MembershipId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PatchedServiceAccountUser) GetMembershipId() string { - if o == nil || o.MembershipId.Get() == nil { - var ret string - return ret - } - - return *o.MembershipId.Get() -} - -// GetMembershipIdOk returns a tuple with the MembershipId field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedServiceAccountUser) GetMembershipIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.MembershipId.Get(), o.MembershipId.IsSet() -} - -// SetMembershipId sets field value -func (o *PatchedServiceAccountUser) SetMembershipId(v string) { - o.MembershipId.Set(&v) -} - -// GetRole returns the Role field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PatchedServiceAccountUser) GetRole() string { - if o == nil || o.Role.Get() == nil { - var ret string - return ret - } - - return *o.Role.Get() -} - -// GetRoleOk returns a tuple with the Role field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedServiceAccountUser) GetRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Role.Get(), o.Role.IsSet() -} - -// SetRole sets field value -func (o *PatchedServiceAccountUser) SetRole(v string) { - o.Role.Set(&v) -} - -// GetEmail returns the Email field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PatchedServiceAccountUser) GetEmail() string { - if o == nil || o.Email.Get() == nil { - var ret string - return ret - } - - return *o.Email.Get() -} - -// GetEmailOk returns a tuple with the Email field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedServiceAccountUser) GetEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Email.Get(), o.Email.IsSet() -} - -// SetEmail sets field value -func (o *PatchedServiceAccountUser) SetEmail(v string) { - o.Email.Set(&v) -} - -// GetPictureUrl returns the PictureUrl field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PatchedServiceAccountUser) GetPictureUrl() string { - if o == nil || o.PictureUrl.Get() == nil { - var ret string - return ret - } - - return *o.PictureUrl.Get() -} - -// GetPictureUrlOk returns a tuple with the PictureUrl field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedServiceAccountUser) GetPictureUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PictureUrl.Get(), o.PictureUrl.IsSet() -} - -// SetPictureUrl sets field value -func (o *PatchedServiceAccountUser) SetPictureUrl(v string) { - o.PictureUrl.Set(&v) -} - -// GetCreatedAt returns the CreatedAt field value -func (o *PatchedServiceAccountUser) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *PatchedServiceAccountUser) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *PatchedServiceAccountUser) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetModifiedAt returns the ModifiedAt field value -func (o *PatchedServiceAccountUser) GetModifiedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ModifiedAt -} - -// GetModifiedAtOk returns a tuple with the ModifiedAt field value -// and a boolean to check if the value has been set. -func (o *PatchedServiceAccountUser) GetModifiedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ModifiedAt, true -} - -// SetModifiedAt sets field value -func (o *PatchedServiceAccountUser) SetModifiedAt(v time.Time) { - o.ModifiedAt = v -} - -func (o PatchedServiceAccountUser) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["url"] = o.Url - } - if true { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } - if true { - toSerialize["name"] = o.Name.Get() - } - if true { - toSerialize["organization_name"] = o.OrganizationName.Get() - } - if true { - toSerialize["membership_id"] = o.MembershipId.Get() - } - if true { - toSerialize["role"] = o.Role.Get() - } - if true { - toSerialize["email"] = o.Email.Get() - } - if true { - toSerialize["picture_url"] = o.PictureUrl.Get() - } - if true { - toSerialize["created_at"] = o.CreatedAt - } - if true { - toSerialize["modified_at"] = o.ModifiedAt - } - return json.Marshal(toSerialize) -} - -type NullablePatchedServiceAccountUser struct { - value *PatchedServiceAccountUser - isSet bool -} - -func (v NullablePatchedServiceAccountUser) Get() *PatchedServiceAccountUser { - return v.value -} - -func (v *NullablePatchedServiceAccountUser) Set(val *PatchedServiceAccountUser) { - v.value = val - v.isSet = true -} - -func (v NullablePatchedServiceAccountUser) IsSet() bool { - return v.isSet -} - -func (v *NullablePatchedServiceAccountUser) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePatchedServiceAccountUser(val *PatchedServiceAccountUser) *NullablePatchedServiceAccountUser { - return &NullablePatchedServiceAccountUser{value: val, isSet: true} -} - -func (v NullablePatchedServiceAccountUser) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePatchedServiceAccountUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/cloudtruthapi/model_patched_tag_update.go b/pkg/cloudtruthapi/model_patched_tag_update.go index 1606844..8450df6 100644 --- a/pkg/cloudtruthapi/model_patched_tag_update.go +++ b/pkg/cloudtruthapi/model_patched_tag_update.go @@ -29,6 +29,8 @@ type PatchedTagUpdate struct { Description *string `json:"description,omitempty"` // The point in time this tag represents. If explicitly set to `null` then the current time will be used. Timestamp NullableTime `json:"timestamp,omitempty"` + // If True, this tag cannot be modified once it is created. + Immutable *bool `json:"immutable,omitempty"` } // NewPatchedTagUpdate instantiates a new PatchedTagUpdate object @@ -186,6 +188,38 @@ func (o *PatchedTagUpdate) UnsetTimestamp() { o.Timestamp.Unset() } +// GetImmutable returns the Immutable field value if set, zero value otherwise. +func (o *PatchedTagUpdate) GetImmutable() bool { + if o == nil || IsNil(o.Immutable) { + var ret bool + return ret + } + return *o.Immutable +} + +// GetImmutableOk returns a tuple with the Immutable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTagUpdate) GetImmutableOk() (*bool, bool) { + if o == nil || IsNil(o.Immutable) { + return nil, false + } + return o.Immutable, true +} + +// HasImmutable returns a boolean if a field has been set. +func (o *PatchedTagUpdate) HasImmutable() bool { + if o != nil && !IsNil(o.Immutable) { + return true + } + + return false +} + +// SetImmutable gets a reference to the given bool and assigns it to the Immutable field. +func (o *PatchedTagUpdate) SetImmutable(v bool) { + o.Immutable = &v +} + func (o PatchedTagUpdate) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -208,6 +242,9 @@ func (o PatchedTagUpdate) ToMap() (map[string]interface{}, error) { if o.Timestamp.IsSet() { toSerialize["timestamp"] = o.Timestamp.Get() } + if !IsNil(o.Immutable) { + toSerialize["immutable"] = o.Immutable + } return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_patched_template.go b/pkg/cloudtruthapi/model_patched_template.go deleted file mode 100644 index 544ac2e..0000000 --- a/pkg/cloudtruthapi/model_patched_template.go +++ /dev/null @@ -1,571 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" - "time" -) - -// checks if the PatchedTemplate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchedTemplate{} - -// PatchedTemplate A parameter template in a given project, optionally instantiated against an environment. -type PatchedTemplate struct { - // The templates this value references, if interpolated. - Url *string `json:"url,omitempty"` - // A unique identifier for the template. - Id *string `json:"id,omitempty"` - // The template name. - Name *string `json:"name,omitempty"` - // ('A description of the template. You may find it helpful to document how this template is used to assist others when they need to maintain software that uses this content.',) - Description *string `json:"description,omitempty"` - // If true, the `body` field has undergone evaluation. - Evaluated *bool `json:"evaluated,omitempty"` - // The content of the template. Use mustache-style templating delimiters of `{{` and `}}` to reference parameter values by name for substitution into the template result. - Body *string `json:"body,omitempty"` - // Parameters that this template references. - ReferencedParameters []string `json:"referenced_parameters,omitempty"` - // Other templates that this template references. - ReferencedTemplates []string `json:"referenced_templates,omitempty"` - // Other templates that reference this template. - ReferencingTemplates []string `json:"referencing_templates,omitempty"` - // The dynamic values that reference this template. - ReferencingValues []string `json:"referencing_values,omitempty"` - // If True, this template contains secrets. - HasSecret *bool `json:"has_secret,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` -} - -// NewPatchedTemplate instantiates a new PatchedTemplate object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPatchedTemplate() *PatchedTemplate { - this := PatchedTemplate{} - return &this -} - -// NewPatchedTemplateWithDefaults instantiates a new PatchedTemplate object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPatchedTemplateWithDefaults() *PatchedTemplate { - this := PatchedTemplate{} - return &this -} - -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *PatchedTemplate) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *PatchedTemplate) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *PatchedTemplate) SetUrl(v string) { - o.Url = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *PatchedTemplate) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *PatchedTemplate) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *PatchedTemplate) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *PatchedTemplate) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *PatchedTemplate) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *PatchedTemplate) SetName(v string) { - o.Name = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *PatchedTemplate) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *PatchedTemplate) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PatchedTemplate) SetDescription(v string) { - o.Description = &v -} - -// GetEvaluated returns the Evaluated field value if set, zero value otherwise. -func (o *PatchedTemplate) GetEvaluated() bool { - if o == nil || IsNil(o.Evaluated) { - var ret bool - return ret - } - return *o.Evaluated -} - -// GetEvaluatedOk returns a tuple with the Evaluated field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetEvaluatedOk() (*bool, bool) { - if o == nil || IsNil(o.Evaluated) { - return nil, false - } - return o.Evaluated, true -} - -// HasEvaluated returns a boolean if a field has been set. -func (o *PatchedTemplate) HasEvaluated() bool { - if o != nil && !IsNil(o.Evaluated) { - return true - } - - return false -} - -// SetEvaluated gets a reference to the given bool and assigns it to the Evaluated field. -func (o *PatchedTemplate) SetEvaluated(v bool) { - o.Evaluated = &v -} - -// GetBody returns the Body field value if set, zero value otherwise. -func (o *PatchedTemplate) GetBody() string { - if o == nil || IsNil(o.Body) { - var ret string - return ret - } - return *o.Body -} - -// GetBodyOk returns a tuple with the Body field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetBodyOk() (*string, bool) { - if o == nil || IsNil(o.Body) { - return nil, false - } - return o.Body, true -} - -// HasBody returns a boolean if a field has been set. -func (o *PatchedTemplate) HasBody() bool { - if o != nil && !IsNil(o.Body) { - return true - } - - return false -} - -// SetBody gets a reference to the given string and assigns it to the Body field. -func (o *PatchedTemplate) SetBody(v string) { - o.Body = &v -} - -// GetReferencedParameters returns the ReferencedParameters field value if set, zero value otherwise. -func (o *PatchedTemplate) GetReferencedParameters() []string { - if o == nil || IsNil(o.ReferencedParameters) { - var ret []string - return ret - } - return o.ReferencedParameters -} - -// GetReferencedParametersOk returns a tuple with the ReferencedParameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetReferencedParametersOk() ([]string, bool) { - if o == nil || IsNil(o.ReferencedParameters) { - return nil, false - } - return o.ReferencedParameters, true -} - -// HasReferencedParameters returns a boolean if a field has been set. -func (o *PatchedTemplate) HasReferencedParameters() bool { - if o != nil && !IsNil(o.ReferencedParameters) { - return true - } - - return false -} - -// SetReferencedParameters gets a reference to the given []string and assigns it to the ReferencedParameters field. -func (o *PatchedTemplate) SetReferencedParameters(v []string) { - o.ReferencedParameters = v -} - -// GetReferencedTemplates returns the ReferencedTemplates field value if set, zero value otherwise. -func (o *PatchedTemplate) GetReferencedTemplates() []string { - if o == nil || IsNil(o.ReferencedTemplates) { - var ret []string - return ret - } - return o.ReferencedTemplates -} - -// GetReferencedTemplatesOk returns a tuple with the ReferencedTemplates field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetReferencedTemplatesOk() ([]string, bool) { - if o == nil || IsNil(o.ReferencedTemplates) { - return nil, false - } - return o.ReferencedTemplates, true -} - -// HasReferencedTemplates returns a boolean if a field has been set. -func (o *PatchedTemplate) HasReferencedTemplates() bool { - if o != nil && !IsNil(o.ReferencedTemplates) { - return true - } - - return false -} - -// SetReferencedTemplates gets a reference to the given []string and assigns it to the ReferencedTemplates field. -func (o *PatchedTemplate) SetReferencedTemplates(v []string) { - o.ReferencedTemplates = v -} - -// GetReferencingTemplates returns the ReferencingTemplates field value if set, zero value otherwise. -func (o *PatchedTemplate) GetReferencingTemplates() []string { - if o == nil || IsNil(o.ReferencingTemplates) { - var ret []string - return ret - } - return o.ReferencingTemplates -} - -// GetReferencingTemplatesOk returns a tuple with the ReferencingTemplates field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetReferencingTemplatesOk() ([]string, bool) { - if o == nil || IsNil(o.ReferencingTemplates) { - return nil, false - } - return o.ReferencingTemplates, true -} - -// HasReferencingTemplates returns a boolean if a field has been set. -func (o *PatchedTemplate) HasReferencingTemplates() bool { - if o != nil && !IsNil(o.ReferencingTemplates) { - return true - } - - return false -} - -// SetReferencingTemplates gets a reference to the given []string and assigns it to the ReferencingTemplates field. -func (o *PatchedTemplate) SetReferencingTemplates(v []string) { - o.ReferencingTemplates = v -} - -// GetReferencingValues returns the ReferencingValues field value if set, zero value otherwise. -func (o *PatchedTemplate) GetReferencingValues() []string { - if o == nil || IsNil(o.ReferencingValues) { - var ret []string - return ret - } - return o.ReferencingValues -} - -// GetReferencingValuesOk returns a tuple with the ReferencingValues field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetReferencingValuesOk() ([]string, bool) { - if o == nil || IsNil(o.ReferencingValues) { - return nil, false - } - return o.ReferencingValues, true -} - -// HasReferencingValues returns a boolean if a field has been set. -func (o *PatchedTemplate) HasReferencingValues() bool { - if o != nil && !IsNil(o.ReferencingValues) { - return true - } - - return false -} - -// SetReferencingValues gets a reference to the given []string and assigns it to the ReferencingValues field. -func (o *PatchedTemplate) SetReferencingValues(v []string) { - o.ReferencingValues = v -} - -// GetHasSecret returns the HasSecret field value if set, zero value otherwise. -func (o *PatchedTemplate) GetHasSecret() bool { - if o == nil || IsNil(o.HasSecret) { - var ret bool - return ret - } - return *o.HasSecret -} - -// GetHasSecretOk returns a tuple with the HasSecret field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetHasSecretOk() (*bool, bool) { - if o == nil || IsNil(o.HasSecret) { - return nil, false - } - return o.HasSecret, true -} - -// HasHasSecret returns a boolean if a field has been set. -func (o *PatchedTemplate) HasHasSecret() bool { - if o != nil && !IsNil(o.HasSecret) { - return true - } - - return false -} - -// SetHasSecret gets a reference to the given bool and assigns it to the HasSecret field. -func (o *PatchedTemplate) SetHasSecret(v bool) { - o.HasSecret = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *PatchedTemplate) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *PatchedTemplate) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *PatchedTemplate) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. -func (o *PatchedTemplate) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { - var ret time.Time - return ret - } - return *o.ModifiedAt -} - -// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedTemplate) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { - return nil, false - } - return o.ModifiedAt, true -} - -// HasModifiedAt returns a boolean if a field has been set. -func (o *PatchedTemplate) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { - return true - } - - return false -} - -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. -func (o *PatchedTemplate) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v -} - -func (o PatchedTemplate) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PatchedTemplate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Evaluated) { - toSerialize["evaluated"] = o.Evaluated - } - if !IsNil(o.Body) { - toSerialize["body"] = o.Body - } - if !IsNil(o.ReferencedParameters) { - toSerialize["referenced_parameters"] = o.ReferencedParameters - } - if !IsNil(o.ReferencedTemplates) { - toSerialize["referenced_templates"] = o.ReferencedTemplates - } - if !IsNil(o.ReferencingTemplates) { - toSerialize["referencing_templates"] = o.ReferencingTemplates - } - if !IsNil(o.ReferencingValues) { - toSerialize["referencing_values"] = o.ReferencingValues - } - if !IsNil(o.HasSecret) { - toSerialize["has_secret"] = o.HasSecret - } - if !IsNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt - } - return toSerialize, nil -} - -type NullablePatchedTemplate struct { - value *PatchedTemplate - isSet bool -} - -func (v NullablePatchedTemplate) Get() *PatchedTemplate { - return v.value -} - -func (v *NullablePatchedTemplate) Set(val *PatchedTemplate) { - v.value = val - v.isSet = true -} - -func (v NullablePatchedTemplate) IsSet() bool { - return v.isSet -} - -func (v *NullablePatchedTemplate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePatchedTemplate(val *PatchedTemplate) *NullablePatchedTemplate { - return &NullablePatchedTemplate{value: val, isSet: true} -} - -func (v NullablePatchedTemplate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePatchedTemplate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pkg/cloudtruthapi/model_patched_template_update.go b/pkg/cloudtruthapi/model_patched_template_update.go new file mode 100644 index 0000000..2ec41d5 --- /dev/null +++ b/pkg/cloudtruthapi/model_patched_template_update.go @@ -0,0 +1,358 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedTemplateUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedTemplateUpdate{} + +// PatchedTemplateUpdate A parameter template in a given project, optionally instantiated against an environment. +type PatchedTemplateUpdate struct { + Id *string `json:"id,omitempty"` + // The template name. + Name *string `json:"name,omitempty"` + // ('A description of the template. You may find it helpful to document how this template is used to assist others when they need to maintain software that uses this content.',) + Description *string `json:"description,omitempty"` + // If true, the `body` field has undergone evaluation. + Evaluated *bool `json:"evaluated,omitempty"` + // The content of the template. Use mustache-style templating delimiters of `{{` and `}}` to reference parameter values by name for substitution into the template result. + Body *string `json:"body,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` +} + +// NewPatchedTemplateUpdate instantiates a new PatchedTemplateUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedTemplateUpdate() *PatchedTemplateUpdate { + this := PatchedTemplateUpdate{} + return &this +} + +// NewPatchedTemplateUpdateWithDefaults instantiates a new PatchedTemplateUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedTemplateUpdateWithDefaults() *PatchedTemplateUpdate { + this := PatchedTemplateUpdate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PatchedTemplateUpdate) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTemplateUpdate) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PatchedTemplateUpdate) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PatchedTemplateUpdate) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedTemplateUpdate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTemplateUpdate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedTemplateUpdate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedTemplateUpdate) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedTemplateUpdate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTemplateUpdate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedTemplateUpdate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedTemplateUpdate) SetDescription(v string) { + o.Description = &v +} + +// GetEvaluated returns the Evaluated field value if set, zero value otherwise. +func (o *PatchedTemplateUpdate) GetEvaluated() bool { + if o == nil || IsNil(o.Evaluated) { + var ret bool + return ret + } + return *o.Evaluated +} + +// GetEvaluatedOk returns a tuple with the Evaluated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTemplateUpdate) GetEvaluatedOk() (*bool, bool) { + if o == nil || IsNil(o.Evaluated) { + return nil, false + } + return o.Evaluated, true +} + +// HasEvaluated returns a boolean if a field has been set. +func (o *PatchedTemplateUpdate) HasEvaluated() bool { + if o != nil && !IsNil(o.Evaluated) { + return true + } + + return false +} + +// SetEvaluated gets a reference to the given bool and assigns it to the Evaluated field. +func (o *PatchedTemplateUpdate) SetEvaluated(v bool) { + o.Evaluated = &v +} + +// GetBody returns the Body field value if set, zero value otherwise. +func (o *PatchedTemplateUpdate) GetBody() string { + if o == nil || IsNil(o.Body) { + var ret string + return ret + } + return *o.Body +} + +// GetBodyOk returns a tuple with the Body field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTemplateUpdate) GetBodyOk() (*string, bool) { + if o == nil || IsNil(o.Body) { + return nil, false + } + return o.Body, true +} + +// HasBody returns a boolean if a field has been set. +func (o *PatchedTemplateUpdate) HasBody() bool { + if o != nil && !IsNil(o.Body) { + return true + } + + return false +} + +// SetBody gets a reference to the given string and assigns it to the Body field. +func (o *PatchedTemplateUpdate) SetBody(v string) { + o.Body = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PatchedTemplateUpdate) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTemplateUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PatchedTemplateUpdate) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PatchedTemplateUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedTemplateUpdate) GetModifiedAt() time.Time { + if o == nil || IsNil(o.ModifiedAt.Get()) { + var ret time.Time + return ret + } + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedTemplateUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// HasModifiedAt returns a boolean if a field has been set. +func (o *PatchedTemplateUpdate) HasModifiedAt() bool { + if o != nil && o.ModifiedAt.IsSet() { + return true + } + + return false +} + +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. +func (o *PatchedTemplateUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedTemplateUpdate) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedTemplateUpdate) UnsetModifiedAt() { + o.ModifiedAt.Unset() +} + +func (o PatchedTemplateUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedTemplateUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Evaluated) { + toSerialize["evaluated"] = o.Evaluated + } + if !IsNil(o.Body) { + toSerialize["body"] = o.Body + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() + } + return toSerialize, nil +} + +type NullablePatchedTemplateUpdate struct { + value *PatchedTemplateUpdate + isSet bool +} + +func (v NullablePatchedTemplateUpdate) Get() *PatchedTemplateUpdate { + return v.value +} + +func (v *NullablePatchedTemplateUpdate) Set(val *PatchedTemplateUpdate) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedTemplateUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedTemplateUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedTemplateUpdate(val *PatchedTemplateUpdate) *NullablePatchedTemplateUpdate { + return &NullablePatchedTemplateUpdate{value: val, isSet: true} +} + +func (v NullablePatchedTemplateUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedTemplateUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_patched_value.go b/pkg/cloudtruthapi/model_patched_value.go deleted file mode 100644 index d5d24ca..0000000 --- a/pkg/cloudtruthapi/model_patched_value.go +++ /dev/null @@ -1,888 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" - "time" -) - -// checks if the PatchedValue type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchedValue{} - -// PatchedValue A value for a parameter in a given environment. -type PatchedValue struct { - Url *string `json:"url,omitempty"` - // A unique identifier for the value. - Id *string `json:"id,omitempty"` - // The environment this value is set in. - Environment *string `json:"environment,omitempty"` - // The environment name for this value. This is a convenience to avoid another query against the server to resolve the environment url into a name. - EnvironmentName *string `json:"environment_name,omitempty"` - // The earliest tag name this value appears in (within the value's environment). - EarliestTag NullableString `json:"earliest_tag,omitempty"` - // The parameter this value is for. - Parameter *string `json:"parameter,omitempty"` - // An external parameter leverages a CloudTruth integration to retrieve content on-demand from an external source. When this is `false` the value is stored by CloudTruth and considered to be _internal_. When this is `true`, the `external_fqn` field must be set. - External *bool `json:"external,omitempty"` - // The FQN, or Fully-Qualified Name, is the path through the integration to get to the desired content. This must be present and reference a valid integration when the value is `external`. - ExternalFqn *string `json:"external_fqn,omitempty"` - // If the value is `external`, the content returned by the integration can be reduced by applying a JMESpath expression. This is valid as long as the content is structured and of a supported format. JMESpath expressions are supported on `json`, `yaml`, and `dotenv` content. - ExternalFilter *string `json:"external_filter,omitempty"` - // This field is deprecated and unused. - ExternalError NullableString `json:"external_error,omitempty"` - ExternalStatus NullablePatchedValueExternalStatus `json:"external_status,omitempty"` - // This is the content to use when resolving the Value for an internal non-secret, or when storing a secret. When storing a secret, this content is stored in your organization's dedicated vault and this field is cleared. This field is required if the value is being created or updated and is `internal`. This field cannot be specified when creating or updating an `external` value. - InternalValue NullableString `json:"internal_value,omitempty"` - // If `true`, apply template substitution rules to this value. If `false`, this value is a literal value. Note: secrets cannot be interpolated. - Interpolated *bool `json:"interpolated,omitempty"` - // This is the actual content of the Value for the given parameter in the given environment. If you request secret masking, no secret content will be included in the result and instead a series of asterisks will be used instead for the value. If you request wrapping, the secret content will be wrapped in an envelope that is bound to your JWT token. For more information about secret wrapping, see the docs. Clients applying this value to a shell environment should set `=` even if `value` is the empty string. If `value` is `null`, the client should unset that shell environment variable. - Value NullableString `json:"value,omitempty"` - // If true, the `value` field has undergone template evaluation. - Evaluated *bool `json:"evaluated,omitempty"` - // Indicates the value content is a secret. Normally this is `true` when the parameter is a secret. It is possible for a parameter to be a secret with a external value that is not a secret. It is not possible to convert a parameter from a secret to a non-secret if any of the values are external and a secret. Clients can check this condition by leveraging this field. It is also possible for a parameter to not be a secret but for this value to be dynamic and reference a Parameter that is a secret. In this case, we indicate the value is a secret. - Secret NullableBool `json:"secret,omitempty"` - // The parameters this value references, if interpolated. - ReferencedParameters []string `json:"referenced_parameters,omitempty"` - // The templates this value references, if interpolated. - ReferencedTemplates []string `json:"referenced_templates,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` -} - -// NewPatchedValue instantiates a new PatchedValue object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPatchedValue() *PatchedValue { - this := PatchedValue{} - return &this -} - -// NewPatchedValueWithDefaults instantiates a new PatchedValue object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPatchedValueWithDefaults() *PatchedValue { - this := PatchedValue{} - return &this -} - -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *PatchedValue) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *PatchedValue) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *PatchedValue) SetUrl(v string) { - o.Url = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *PatchedValue) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *PatchedValue) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *PatchedValue) SetId(v string) { - o.Id = &v -} - -// GetEnvironment returns the Environment field value if set, zero value otherwise. -func (o *PatchedValue) GetEnvironment() string { - if o == nil || IsNil(o.Environment) { - var ret string - return ret - } - return *o.Environment -} - -// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetEnvironmentOk() (*string, bool) { - if o == nil || IsNil(o.Environment) { - return nil, false - } - return o.Environment, true -} - -// HasEnvironment returns a boolean if a field has been set. -func (o *PatchedValue) HasEnvironment() bool { - if o != nil && !IsNil(o.Environment) { - return true - } - - return false -} - -// SetEnvironment gets a reference to the given string and assigns it to the Environment field. -func (o *PatchedValue) SetEnvironment(v string) { - o.Environment = &v -} - -// GetEnvironmentName returns the EnvironmentName field value if set, zero value otherwise. -func (o *PatchedValue) GetEnvironmentName() string { - if o == nil || IsNil(o.EnvironmentName) { - var ret string - return ret - } - return *o.EnvironmentName -} - -// GetEnvironmentNameOk returns a tuple with the EnvironmentName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetEnvironmentNameOk() (*string, bool) { - if o == nil || IsNil(o.EnvironmentName) { - return nil, false - } - return o.EnvironmentName, true -} - -// HasEnvironmentName returns a boolean if a field has been set. -func (o *PatchedValue) HasEnvironmentName() bool { - if o != nil && !IsNil(o.EnvironmentName) { - return true - } - - return false -} - -// SetEnvironmentName gets a reference to the given string and assigns it to the EnvironmentName field. -func (o *PatchedValue) SetEnvironmentName(v string) { - o.EnvironmentName = &v -} - -// GetEarliestTag returns the EarliestTag field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValue) GetEarliestTag() string { - if o == nil || IsNil(o.EarliestTag.Get()) { - var ret string - return ret - } - return *o.EarliestTag.Get() -} - -// GetEarliestTagOk returns a tuple with the EarliestTag field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValue) GetEarliestTagOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.EarliestTag.Get(), o.EarliestTag.IsSet() -} - -// HasEarliestTag returns a boolean if a field has been set. -func (o *PatchedValue) HasEarliestTag() bool { - if o != nil && o.EarliestTag.IsSet() { - return true - } - - return false -} - -// SetEarliestTag gets a reference to the given NullableString and assigns it to the EarliestTag field. -func (o *PatchedValue) SetEarliestTag(v string) { - o.EarliestTag.Set(&v) -} -// SetEarliestTagNil sets the value for EarliestTag to be an explicit nil -func (o *PatchedValue) SetEarliestTagNil() { - o.EarliestTag.Set(nil) -} - -// UnsetEarliestTag ensures that no value is present for EarliestTag, not even an explicit nil -func (o *PatchedValue) UnsetEarliestTag() { - o.EarliestTag.Unset() -} - -// GetParameter returns the Parameter field value if set, zero value otherwise. -func (o *PatchedValue) GetParameter() string { - if o == nil || IsNil(o.Parameter) { - var ret string - return ret - } - return *o.Parameter -} - -// GetParameterOk returns a tuple with the Parameter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetParameterOk() (*string, bool) { - if o == nil || IsNil(o.Parameter) { - return nil, false - } - return o.Parameter, true -} - -// HasParameter returns a boolean if a field has been set. -func (o *PatchedValue) HasParameter() bool { - if o != nil && !IsNil(o.Parameter) { - return true - } - - return false -} - -// SetParameter gets a reference to the given string and assigns it to the Parameter field. -func (o *PatchedValue) SetParameter(v string) { - o.Parameter = &v -} - -// GetExternal returns the External field value if set, zero value otherwise. -func (o *PatchedValue) GetExternal() bool { - if o == nil || IsNil(o.External) { - var ret bool - return ret - } - return *o.External -} - -// GetExternalOk returns a tuple with the External field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetExternalOk() (*bool, bool) { - if o == nil || IsNil(o.External) { - return nil, false - } - return o.External, true -} - -// HasExternal returns a boolean if a field has been set. -func (o *PatchedValue) HasExternal() bool { - if o != nil && !IsNil(o.External) { - return true - } - - return false -} - -// SetExternal gets a reference to the given bool and assigns it to the External field. -func (o *PatchedValue) SetExternal(v bool) { - o.External = &v -} - -// GetExternalFqn returns the ExternalFqn field value if set, zero value otherwise. -func (o *PatchedValue) GetExternalFqn() string { - if o == nil || IsNil(o.ExternalFqn) { - var ret string - return ret - } - return *o.ExternalFqn -} - -// GetExternalFqnOk returns a tuple with the ExternalFqn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetExternalFqnOk() (*string, bool) { - if o == nil || IsNil(o.ExternalFqn) { - return nil, false - } - return o.ExternalFqn, true -} - -// HasExternalFqn returns a boolean if a field has been set. -func (o *PatchedValue) HasExternalFqn() bool { - if o != nil && !IsNil(o.ExternalFqn) { - return true - } - - return false -} - -// SetExternalFqn gets a reference to the given string and assigns it to the ExternalFqn field. -func (o *PatchedValue) SetExternalFqn(v string) { - o.ExternalFqn = &v -} - -// GetExternalFilter returns the ExternalFilter field value if set, zero value otherwise. -func (o *PatchedValue) GetExternalFilter() string { - if o == nil || IsNil(o.ExternalFilter) { - var ret string - return ret - } - return *o.ExternalFilter -} - -// GetExternalFilterOk returns a tuple with the ExternalFilter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetExternalFilterOk() (*string, bool) { - if o == nil || IsNil(o.ExternalFilter) { - return nil, false - } - return o.ExternalFilter, true -} - -// HasExternalFilter returns a boolean if a field has been set. -func (o *PatchedValue) HasExternalFilter() bool { - if o != nil && !IsNil(o.ExternalFilter) { - return true - } - - return false -} - -// SetExternalFilter gets a reference to the given string and assigns it to the ExternalFilter field. -func (o *PatchedValue) SetExternalFilter(v string) { - o.ExternalFilter = &v -} - -// GetExternalError returns the ExternalError field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValue) GetExternalError() string { - if o == nil || IsNil(o.ExternalError.Get()) { - var ret string - return ret - } - return *o.ExternalError.Get() -} - -// GetExternalErrorOk returns a tuple with the ExternalError field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValue) GetExternalErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ExternalError.Get(), o.ExternalError.IsSet() -} - -// HasExternalError returns a boolean if a field has been set. -func (o *PatchedValue) HasExternalError() bool { - if o != nil && o.ExternalError.IsSet() { - return true - } - - return false -} - -// SetExternalError gets a reference to the given NullableString and assigns it to the ExternalError field. -func (o *PatchedValue) SetExternalError(v string) { - o.ExternalError.Set(&v) -} -// SetExternalErrorNil sets the value for ExternalError to be an explicit nil -func (o *PatchedValue) SetExternalErrorNil() { - o.ExternalError.Set(nil) -} - -// UnsetExternalError ensures that no value is present for ExternalError, not even an explicit nil -func (o *PatchedValue) UnsetExternalError() { - o.ExternalError.Unset() -} - -// GetExternalStatus returns the ExternalStatus field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValue) GetExternalStatus() PatchedValueExternalStatus { - if o == nil || IsNil(o.ExternalStatus.Get()) { - var ret PatchedValueExternalStatus - return ret - } - return *o.ExternalStatus.Get() -} - -// GetExternalStatusOk returns a tuple with the ExternalStatus field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValue) GetExternalStatusOk() (*PatchedValueExternalStatus, bool) { - if o == nil { - return nil, false - } - return o.ExternalStatus.Get(), o.ExternalStatus.IsSet() -} - -// HasExternalStatus returns a boolean if a field has been set. -func (o *PatchedValue) HasExternalStatus() bool { - if o != nil && o.ExternalStatus.IsSet() { - return true - } - - return false -} - -// SetExternalStatus gets a reference to the given NullablePatchedValueExternalStatus and assigns it to the ExternalStatus field. -func (o *PatchedValue) SetExternalStatus(v PatchedValueExternalStatus) { - o.ExternalStatus.Set(&v) -} -// SetExternalStatusNil sets the value for ExternalStatus to be an explicit nil -func (o *PatchedValue) SetExternalStatusNil() { - o.ExternalStatus.Set(nil) -} - -// UnsetExternalStatus ensures that no value is present for ExternalStatus, not even an explicit nil -func (o *PatchedValue) UnsetExternalStatus() { - o.ExternalStatus.Unset() -} - -// GetInternalValue returns the InternalValue field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValue) GetInternalValue() string { - if o == nil || IsNil(o.InternalValue.Get()) { - var ret string - return ret - } - return *o.InternalValue.Get() -} - -// GetInternalValueOk returns a tuple with the InternalValue field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValue) GetInternalValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.InternalValue.Get(), o.InternalValue.IsSet() -} - -// HasInternalValue returns a boolean if a field has been set. -func (o *PatchedValue) HasInternalValue() bool { - if o != nil && o.InternalValue.IsSet() { - return true - } - - return false -} - -// SetInternalValue gets a reference to the given NullableString and assigns it to the InternalValue field. -func (o *PatchedValue) SetInternalValue(v string) { - o.InternalValue.Set(&v) -} -// SetInternalValueNil sets the value for InternalValue to be an explicit nil -func (o *PatchedValue) SetInternalValueNil() { - o.InternalValue.Set(nil) -} - -// UnsetInternalValue ensures that no value is present for InternalValue, not even an explicit nil -func (o *PatchedValue) UnsetInternalValue() { - o.InternalValue.Unset() -} - -// GetInterpolated returns the Interpolated field value if set, zero value otherwise. -func (o *PatchedValue) GetInterpolated() bool { - if o == nil || IsNil(o.Interpolated) { - var ret bool - return ret - } - return *o.Interpolated -} - -// GetInterpolatedOk returns a tuple with the Interpolated field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetInterpolatedOk() (*bool, bool) { - if o == nil || IsNil(o.Interpolated) { - return nil, false - } - return o.Interpolated, true -} - -// HasInterpolated returns a boolean if a field has been set. -func (o *PatchedValue) HasInterpolated() bool { - if o != nil && !IsNil(o.Interpolated) { - return true - } - - return false -} - -// SetInterpolated gets a reference to the given bool and assigns it to the Interpolated field. -func (o *PatchedValue) SetInterpolated(v bool) { - o.Interpolated = &v -} - -// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValue) GetValue() string { - if o == nil || IsNil(o.Value.Get()) { - var ret string - return ret - } - return *o.Value.Get() -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValue) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Value.Get(), o.Value.IsSet() -} - -// HasValue returns a boolean if a field has been set. -func (o *PatchedValue) HasValue() bool { - if o != nil && o.Value.IsSet() { - return true - } - - return false -} - -// SetValue gets a reference to the given NullableString and assigns it to the Value field. -func (o *PatchedValue) SetValue(v string) { - o.Value.Set(&v) -} -// SetValueNil sets the value for Value to be an explicit nil -func (o *PatchedValue) SetValueNil() { - o.Value.Set(nil) -} - -// UnsetValue ensures that no value is present for Value, not even an explicit nil -func (o *PatchedValue) UnsetValue() { - o.Value.Unset() -} - -// GetEvaluated returns the Evaluated field value if set, zero value otherwise. -func (o *PatchedValue) GetEvaluated() bool { - if o == nil || IsNil(o.Evaluated) { - var ret bool - return ret - } - return *o.Evaluated -} - -// GetEvaluatedOk returns a tuple with the Evaluated field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetEvaluatedOk() (*bool, bool) { - if o == nil || IsNil(o.Evaluated) { - return nil, false - } - return o.Evaluated, true -} - -// HasEvaluated returns a boolean if a field has been set. -func (o *PatchedValue) HasEvaluated() bool { - if o != nil && !IsNil(o.Evaluated) { - return true - } - - return false -} - -// SetEvaluated gets a reference to the given bool and assigns it to the Evaluated field. -func (o *PatchedValue) SetEvaluated(v bool) { - o.Evaluated = &v -} - -// GetSecret returns the Secret field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValue) GetSecret() bool { - if o == nil || IsNil(o.Secret.Get()) { - var ret bool - return ret - } - return *o.Secret.Get() -} - -// GetSecretOk returns a tuple with the Secret field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValue) GetSecretOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Secret.Get(), o.Secret.IsSet() -} - -// HasSecret returns a boolean if a field has been set. -func (o *PatchedValue) HasSecret() bool { - if o != nil && o.Secret.IsSet() { - return true - } - - return false -} - -// SetSecret gets a reference to the given NullableBool and assigns it to the Secret field. -func (o *PatchedValue) SetSecret(v bool) { - o.Secret.Set(&v) -} -// SetSecretNil sets the value for Secret to be an explicit nil -func (o *PatchedValue) SetSecretNil() { - o.Secret.Set(nil) -} - -// UnsetSecret ensures that no value is present for Secret, not even an explicit nil -func (o *PatchedValue) UnsetSecret() { - o.Secret.Unset() -} - -// GetReferencedParameters returns the ReferencedParameters field value if set, zero value otherwise. -func (o *PatchedValue) GetReferencedParameters() []string { - if o == nil || IsNil(o.ReferencedParameters) { - var ret []string - return ret - } - return o.ReferencedParameters -} - -// GetReferencedParametersOk returns a tuple with the ReferencedParameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetReferencedParametersOk() ([]string, bool) { - if o == nil || IsNil(o.ReferencedParameters) { - return nil, false - } - return o.ReferencedParameters, true -} - -// HasReferencedParameters returns a boolean if a field has been set. -func (o *PatchedValue) HasReferencedParameters() bool { - if o != nil && !IsNil(o.ReferencedParameters) { - return true - } - - return false -} - -// SetReferencedParameters gets a reference to the given []string and assigns it to the ReferencedParameters field. -func (o *PatchedValue) SetReferencedParameters(v []string) { - o.ReferencedParameters = v -} - -// GetReferencedTemplates returns the ReferencedTemplates field value if set, zero value otherwise. -func (o *PatchedValue) GetReferencedTemplates() []string { - if o == nil || IsNil(o.ReferencedTemplates) { - var ret []string - return ret - } - return o.ReferencedTemplates -} - -// GetReferencedTemplatesOk returns a tuple with the ReferencedTemplates field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetReferencedTemplatesOk() ([]string, bool) { - if o == nil || IsNil(o.ReferencedTemplates) { - return nil, false - } - return o.ReferencedTemplates, true -} - -// HasReferencedTemplates returns a boolean if a field has been set. -func (o *PatchedValue) HasReferencedTemplates() bool { - if o != nil && !IsNil(o.ReferencedTemplates) { - return true - } - - return false -} - -// SetReferencedTemplates gets a reference to the given []string and assigns it to the ReferencedTemplates field. -func (o *PatchedValue) SetReferencedTemplates(v []string) { - o.ReferencedTemplates = v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *PatchedValue) GetCreatedAt() time.Time { - if o == nil || IsNil(o.CreatedAt) { - var ret time.Time - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetCreatedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *PatchedValue) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *PatchedValue) SetCreatedAt(v time.Time) { - o.CreatedAt = &v -} - -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. -func (o *PatchedValue) GetModifiedAt() time.Time { - if o == nil || IsNil(o.ModifiedAt) { - var ret time.Time - return ret - } - return *o.ModifiedAt -} - -// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchedValue) GetModifiedAtOk() (*time.Time, bool) { - if o == nil || IsNil(o.ModifiedAt) { - return nil, false - } - return o.ModifiedAt, true -} - -// HasModifiedAt returns a boolean if a field has been set. -func (o *PatchedValue) HasModifiedAt() bool { - if o != nil && !IsNil(o.ModifiedAt) { - return true - } - - return false -} - -// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. -func (o *PatchedValue) SetModifiedAt(v time.Time) { - o.ModifiedAt = &v -} - -func (o PatchedValue) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PatchedValue) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Environment) { - toSerialize["environment"] = o.Environment - } - if !IsNil(o.EnvironmentName) { - toSerialize["environment_name"] = o.EnvironmentName - } - if o.EarliestTag.IsSet() { - toSerialize["earliest_tag"] = o.EarliestTag.Get() - } - if !IsNil(o.Parameter) { - toSerialize["parameter"] = o.Parameter - } - if !IsNil(o.External) { - toSerialize["external"] = o.External - } - if !IsNil(o.ExternalFqn) { - toSerialize["external_fqn"] = o.ExternalFqn - } - if !IsNil(o.ExternalFilter) { - toSerialize["external_filter"] = o.ExternalFilter - } - if o.ExternalError.IsSet() { - toSerialize["external_error"] = o.ExternalError.Get() - } - if o.ExternalStatus.IsSet() { - toSerialize["external_status"] = o.ExternalStatus.Get() - } - if o.InternalValue.IsSet() { - toSerialize["internal_value"] = o.InternalValue.Get() - } - if !IsNil(o.Interpolated) { - toSerialize["interpolated"] = o.Interpolated - } - if o.Value.IsSet() { - toSerialize["value"] = o.Value.Get() - } - if !IsNil(o.Evaluated) { - toSerialize["evaluated"] = o.Evaluated - } - if o.Secret.IsSet() { - toSerialize["secret"] = o.Secret.Get() - } - if !IsNil(o.ReferencedParameters) { - toSerialize["referenced_parameters"] = o.ReferencedParameters - } - if !IsNil(o.ReferencedTemplates) { - toSerialize["referenced_templates"] = o.ReferencedTemplates - } - if !IsNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !IsNil(o.ModifiedAt) { - toSerialize["modified_at"] = o.ModifiedAt - } - return toSerialize, nil -} - -type NullablePatchedValue struct { - value *PatchedValue - isSet bool -} - -func (v NullablePatchedValue) Get() *PatchedValue { - return v.value -} - -func (v *NullablePatchedValue) Set(val *PatchedValue) { - v.value = val - v.isSet = true -} - -func (v NullablePatchedValue) IsSet() bool { - return v.isSet -} - -func (v *NullablePatchedValue) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePatchedValue(val *PatchedValue) *NullablePatchedValue { - return &NullablePatchedValue{value: val, isSet: true} -} - -func (v NullablePatchedValue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePatchedValue) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pkg/cloudtruthapi/model_patched_value_update.go b/pkg/cloudtruthapi/model_patched_value_update.go new file mode 100644 index 0000000..64a0385 --- /dev/null +++ b/pkg/cloudtruthapi/model_patched_value_update.go @@ -0,0 +1,499 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedValueUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedValueUpdate{} + +// PatchedValueUpdate Unlike other UpdateSerializers, we do not inherit from the CreateSerializer here because `environment` is not a required field for updates. +type PatchedValueUpdate struct { + Id *string `json:"id,omitempty"` + // An external parameter leverages a CloudTruth integration to retrieve content on-demand from an external source. When this is `false` the value is stored by CloudTruth and considered to be _internal_. When this is `true`, the `external_fqn` field must be set. + External *bool `json:"external,omitempty"` + // The FQN, or Fully-Qualified Name, is the path through the integration to get to the desired content. This must be present and reference a valid integration when the value is `external`. + ExternalFqn *string `json:"external_fqn,omitempty"` + // If the value is `external`, the content returned by the integration can be reduced by applying a JMESpath expression. This is valid as long as the content is structured and of a supported format. JMESpath expressions are supported on `json`, `yaml`, and `dotenv` content. + ExternalFilter *string `json:"external_filter,omitempty"` + // This is the content to use when resolving the Value for an internal non-secret, or when storing a secret. This field cannot be specified when creating or updating an `external` value. + InternalValue NullableString `json:"internal_value,omitempty"` + // If `true`, apply template substitution rules to this value. If `false`, this value is a literal value. Note: secrets cannot be interpolated. + Interpolated *bool `json:"interpolated,omitempty"` + // Indicates the value content is a secret. Normally this is `true` when the parameter is a secret. It is possible for a parameter to be a secret with a external value that is not a secret. It is not possible to convert a parameter from a secret to a non-secret if any of the values are external and a secret. Clients can check this condition by leveraging this field. It is also possible for a parameter to not be a secret but for this value to be dynamic and reference a Parameter that is a secret. In this case, we indicate the value is a secret. + Secret NullableBool `json:"secret,omitempty"` + // This is the actual content of the Value for the given parameter in the given environment. If you request secret masking, no secret content will be included in the result and instead a series of asterisks will be used instead for the value. Clients applying this value to a shell environment should set `=` even if `value` is the empty string. If `value` is `null`, the client should unset that shell environment variable. + Value NullableString `json:"value,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + ModifiedAt NullableTime `json:"modified_at,omitempty"` +} + +// NewPatchedValueUpdate instantiates a new PatchedValueUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedValueUpdate() *PatchedValueUpdate { + this := PatchedValueUpdate{} + return &this +} + +// NewPatchedValueUpdateWithDefaults instantiates a new PatchedValueUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedValueUpdateWithDefaults() *PatchedValueUpdate { + this := PatchedValueUpdate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PatchedValueUpdate) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedValueUpdate) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PatchedValueUpdate) SetId(v string) { + o.Id = &v +} + +// GetExternal returns the External field value if set, zero value otherwise. +func (o *PatchedValueUpdate) GetExternal() bool { + if o == nil || IsNil(o.External) { + var ret bool + return ret + } + return *o.External +} + +// GetExternalOk returns a tuple with the External field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedValueUpdate) GetExternalOk() (*bool, bool) { + if o == nil || IsNil(o.External) { + return nil, false + } + return o.External, true +} + +// HasExternal returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasExternal() bool { + if o != nil && !IsNil(o.External) { + return true + } + + return false +} + +// SetExternal gets a reference to the given bool and assigns it to the External field. +func (o *PatchedValueUpdate) SetExternal(v bool) { + o.External = &v +} + +// GetExternalFqn returns the ExternalFqn field value if set, zero value otherwise. +func (o *PatchedValueUpdate) GetExternalFqn() string { + if o == nil || IsNil(o.ExternalFqn) { + var ret string + return ret + } + return *o.ExternalFqn +} + +// GetExternalFqnOk returns a tuple with the ExternalFqn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedValueUpdate) GetExternalFqnOk() (*string, bool) { + if o == nil || IsNil(o.ExternalFqn) { + return nil, false + } + return o.ExternalFqn, true +} + +// HasExternalFqn returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasExternalFqn() bool { + if o != nil && !IsNil(o.ExternalFqn) { + return true + } + + return false +} + +// SetExternalFqn gets a reference to the given string and assigns it to the ExternalFqn field. +func (o *PatchedValueUpdate) SetExternalFqn(v string) { + o.ExternalFqn = &v +} + +// GetExternalFilter returns the ExternalFilter field value if set, zero value otherwise. +func (o *PatchedValueUpdate) GetExternalFilter() string { + if o == nil || IsNil(o.ExternalFilter) { + var ret string + return ret + } + return *o.ExternalFilter +} + +// GetExternalFilterOk returns a tuple with the ExternalFilter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedValueUpdate) GetExternalFilterOk() (*string, bool) { + if o == nil || IsNil(o.ExternalFilter) { + return nil, false + } + return o.ExternalFilter, true +} + +// HasExternalFilter returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasExternalFilter() bool { + if o != nil && !IsNil(o.ExternalFilter) { + return true + } + + return false +} + +// SetExternalFilter gets a reference to the given string and assigns it to the ExternalFilter field. +func (o *PatchedValueUpdate) SetExternalFilter(v string) { + o.ExternalFilter = &v +} + +// GetInternalValue returns the InternalValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedValueUpdate) GetInternalValue() string { + if o == nil || IsNil(o.InternalValue.Get()) { + var ret string + return ret + } + return *o.InternalValue.Get() +} + +// GetInternalValueOk returns a tuple with the InternalValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedValueUpdate) GetInternalValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.InternalValue.Get(), o.InternalValue.IsSet() +} + +// HasInternalValue returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasInternalValue() bool { + if o != nil && o.InternalValue.IsSet() { + return true + } + + return false +} + +// SetInternalValue gets a reference to the given NullableString and assigns it to the InternalValue field. +func (o *PatchedValueUpdate) SetInternalValue(v string) { + o.InternalValue.Set(&v) +} +// SetInternalValueNil sets the value for InternalValue to be an explicit nil +func (o *PatchedValueUpdate) SetInternalValueNil() { + o.InternalValue.Set(nil) +} + +// UnsetInternalValue ensures that no value is present for InternalValue, not even an explicit nil +func (o *PatchedValueUpdate) UnsetInternalValue() { + o.InternalValue.Unset() +} + +// GetInterpolated returns the Interpolated field value if set, zero value otherwise. +func (o *PatchedValueUpdate) GetInterpolated() bool { + if o == nil || IsNil(o.Interpolated) { + var ret bool + return ret + } + return *o.Interpolated +} + +// GetInterpolatedOk returns a tuple with the Interpolated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedValueUpdate) GetInterpolatedOk() (*bool, bool) { + if o == nil || IsNil(o.Interpolated) { + return nil, false + } + return o.Interpolated, true +} + +// HasInterpolated returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasInterpolated() bool { + if o != nil && !IsNil(o.Interpolated) { + return true + } + + return false +} + +// SetInterpolated gets a reference to the given bool and assigns it to the Interpolated field. +func (o *PatchedValueUpdate) SetInterpolated(v bool) { + o.Interpolated = &v +} + +// GetSecret returns the Secret field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedValueUpdate) GetSecret() bool { + if o == nil || IsNil(o.Secret.Get()) { + var ret bool + return ret + } + return *o.Secret.Get() +} + +// GetSecretOk returns a tuple with the Secret field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedValueUpdate) GetSecretOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Secret.Get(), o.Secret.IsSet() +} + +// HasSecret returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasSecret() bool { + if o != nil && o.Secret.IsSet() { + return true + } + + return false +} + +// SetSecret gets a reference to the given NullableBool and assigns it to the Secret field. +func (o *PatchedValueUpdate) SetSecret(v bool) { + o.Secret.Set(&v) +} +// SetSecretNil sets the value for Secret to be an explicit nil +func (o *PatchedValueUpdate) SetSecretNil() { + o.Secret.Set(nil) +} + +// UnsetSecret ensures that no value is present for Secret, not even an explicit nil +func (o *PatchedValueUpdate) UnsetSecret() { + o.Secret.Unset() +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedValueUpdate) GetValue() string { + if o == nil || IsNil(o.Value.Get()) { + var ret string + return ret + } + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedValueUpdate) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// HasValue returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasValue() bool { + if o != nil && o.Value.IsSet() { + return true + } + + return false +} + +// SetValue gets a reference to the given NullableString and assigns it to the Value field. +func (o *PatchedValueUpdate) SetValue(v string) { + o.Value.Set(&v) +} +// SetValueNil sets the value for Value to be an explicit nil +func (o *PatchedValueUpdate) SetValueNil() { + o.Value.Set(nil) +} + +// UnsetValue ensures that no value is present for Value, not even an explicit nil +func (o *PatchedValueUpdate) UnsetValue() { + o.Value.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PatchedValueUpdate) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedValueUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PatchedValueUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedValueUpdate) GetModifiedAt() time.Time { + if o == nil || IsNil(o.ModifiedAt.Get()) { + var ret time.Time + return ret + } + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedValueUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// HasModifiedAt returns a boolean if a field has been set. +func (o *PatchedValueUpdate) HasModifiedAt() bool { + if o != nil && o.ModifiedAt.IsSet() { + return true + } + + return false +} + +// SetModifiedAt gets a reference to the given NullableTime and assigns it to the ModifiedAt field. +func (o *PatchedValueUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil +func (o *PatchedValueUpdate) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil +func (o *PatchedValueUpdate) UnsetModifiedAt() { + o.ModifiedAt.Unset() +} + +func (o PatchedValueUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedValueUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.External) { + toSerialize["external"] = o.External + } + if !IsNil(o.ExternalFqn) { + toSerialize["external_fqn"] = o.ExternalFqn + } + if !IsNil(o.ExternalFilter) { + toSerialize["external_filter"] = o.ExternalFilter + } + if o.InternalValue.IsSet() { + toSerialize["internal_value"] = o.InternalValue.Get() + } + if !IsNil(o.Interpolated) { + toSerialize["interpolated"] = o.Interpolated + } + if o.Secret.IsSet() { + toSerialize["secret"] = o.Secret.Get() + } + if o.Value.IsSet() { + toSerialize["value"] = o.Value.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() + } + return toSerialize, nil +} + +type NullablePatchedValueUpdate struct { + value *PatchedValueUpdate + isSet bool +} + +func (v NullablePatchedValueUpdate) Get() *PatchedValueUpdate { + return v.value +} + +func (v *NullablePatchedValueUpdate) Set(val *PatchedValueUpdate) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedValueUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedValueUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedValueUpdate(val *PatchedValueUpdate) *NullablePatchedValueUpdate { + return &NullablePatchedValueUpdate{value: val, isSet: true} +} + +func (v NullablePatchedValueUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedValueUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_project.go b/pkg/cloudtruthapi/model_project.go index 1ac4bc1..a715dd7 100644 --- a/pkg/cloudtruthapi/model_project.go +++ b/pkg/cloudtruthapi/model_project.go @@ -21,38 +21,43 @@ var _ MappedNullable = &Project{} // Project struct for Project type Project struct { + // The URL for the project. Url string `json:"url"` - // A unique identifier for the project. Id string `json:"id"` + LedgerId string `json:"ledger_id"` // The project name. Name string `json:"name"` + // A regular expression parameter names must match + ParameterNamePattern *string `json:"parameter_name_pattern,omitempty"` // A description of the project. You may find it helpful to document how this project is used to assist others when they need to maintain software that uses this content. Description *string `json:"description,omitempty"` // This is the opposite of `depends_on`, see that field for more details. Dependents []string `json:"dependents"` // Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. - DependsOn NullableString `json:"depends_on,omitempty"` + DependsOn NullableString `json:"depends_on"` // Indicates if access control is being enforced through grants. AccessControlled *bool `json:"access_controlled,omitempty"` Role NullableRoleEnum `json:"role"` - // Deprecated. Only shows pushes for aws integrations in /api/v1/. - Pushes []AwsPush `json:"pushes"` - // Push actions associated with the project. + // Deprecated. Blank. + Pushes []string `json:"pushes"` + // Deprecated. Blank. PushUrls []string `json:"push_urls"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewProject instantiates a new Project object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewProject(url string, id string, name string, dependents []string, role NullableRoleEnum, pushes []AwsPush, pushUrls []string, createdAt time.Time, modifiedAt time.Time) *Project { +func NewProject(url string, id string, ledgerId string, name string, dependents []string, dependsOn NullableString, role NullableRoleEnum, pushes []string, pushUrls []string, createdAt time.Time, modifiedAt NullableTime) *Project { this := Project{} this.Url = url this.Id = id + this.LedgerId = ledgerId this.Name = name this.Dependents = dependents + this.DependsOn = dependsOn this.Role = role this.Pushes = pushes this.PushUrls = pushUrls @@ -117,6 +122,30 @@ func (o *Project) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *Project) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *Project) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *Project) SetLedgerId(v string) { + o.LedgerId = v +} + // GetName returns the Name field value func (o *Project) GetName() string { if o == nil { @@ -141,6 +170,38 @@ func (o *Project) SetName(v string) { o.Name = v } +// GetParameterNamePattern returns the ParameterNamePattern field value if set, zero value otherwise. +func (o *Project) GetParameterNamePattern() string { + if o == nil || IsNil(o.ParameterNamePattern) { + var ret string + return ret + } + return *o.ParameterNamePattern +} + +// GetParameterNamePatternOk returns a tuple with the ParameterNamePattern field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetParameterNamePatternOk() (*string, bool) { + if o == nil || IsNil(o.ParameterNamePattern) { + return nil, false + } + return o.ParameterNamePattern, true +} + +// HasParameterNamePattern returns a boolean if a field has been set. +func (o *Project) HasParameterNamePattern() bool { + if o != nil && !IsNil(o.ParameterNamePattern) { + return true + } + + return false +} + +// SetParameterNamePattern gets a reference to the given string and assigns it to the ParameterNamePattern field. +func (o *Project) SetParameterNamePattern(v string) { + o.ParameterNamePattern = &v +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *Project) GetDescription() string { if o == nil || IsNil(o.Description) { @@ -197,16 +258,18 @@ func (o *Project) SetDependents(v []string) { o.Dependents = v } -// GetDependsOn returns the DependsOn field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDependsOn returns the DependsOn field value +// If the value is explicit nil, the zero value for string will be returned func (o *Project) GetDependsOn() string { - if o == nil || IsNil(o.DependsOn.Get()) { + if o == nil || o.DependsOn.Get() == nil { var ret string return ret } + return *o.DependsOn.Get() } -// GetDependsOnOk returns a tuple with the DependsOn field value if set, nil otherwise +// GetDependsOnOk returns a tuple with the DependsOn field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Project) GetDependsOnOk() (*string, bool) { @@ -216,28 +279,10 @@ func (o *Project) GetDependsOnOk() (*string, bool) { return o.DependsOn.Get(), o.DependsOn.IsSet() } -// HasDependsOn returns a boolean if a field has been set. -func (o *Project) HasDependsOn() bool { - if o != nil && o.DependsOn.IsSet() { - return true - } - - return false -} - -// SetDependsOn gets a reference to the given NullableString and assigns it to the DependsOn field. +// SetDependsOn sets field value func (o *Project) SetDependsOn(v string) { o.DependsOn.Set(&v) } -// SetDependsOnNil sets the value for DependsOn to be an explicit nil -func (o *Project) SetDependsOnNil() { - o.DependsOn.Set(nil) -} - -// UnsetDependsOn ensures that no value is present for DependsOn, not even an explicit nil -func (o *Project) UnsetDependsOn() { - o.DependsOn.Unset() -} // GetAccessControlled returns the AccessControlled field value if set, zero value otherwise. func (o *Project) GetAccessControlled() bool { @@ -298,9 +343,9 @@ func (o *Project) SetRole(v RoleEnum) { } // GetPushes returns the Pushes field value -func (o *Project) GetPushes() []AwsPush { +func (o *Project) GetPushes() []string { if o == nil { - var ret []AwsPush + var ret []string return ret } @@ -309,7 +354,7 @@ func (o *Project) GetPushes() []AwsPush { // GetPushesOk returns a tuple with the Pushes field value // and a boolean to check if the value has been set. -func (o *Project) GetPushesOk() ([]AwsPush, bool) { +func (o *Project) GetPushesOk() ([]string, bool) { if o == nil { return nil, false } @@ -317,7 +362,7 @@ func (o *Project) GetPushesOk() ([]AwsPush, bool) { } // SetPushes sets field value -func (o *Project) SetPushes(v []AwsPush) { +func (o *Project) SetPushes(v []string) { o.Pushes = v } @@ -370,27 +415,29 @@ func (o *Project) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *Project) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Project) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *Project) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o Project) MarshalJSON() ([]byte, error) { @@ -405,14 +452,16 @@ func (o Project) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId toSerialize["name"] = o.Name + if !IsNil(o.ParameterNamePattern) { + toSerialize["parameter_name_pattern"] = o.ParameterNamePattern + } if !IsNil(o.Description) { toSerialize["description"] = o.Description } toSerialize["dependents"] = o.Dependents - if o.DependsOn.IsSet() { - toSerialize["depends_on"] = o.DependsOn.Get() - } + toSerialize["depends_on"] = o.DependsOn.Get() if !IsNil(o.AccessControlled) { toSerialize["access_controlled"] = o.AccessControlled } @@ -420,7 +469,7 @@ func (o Project) ToMap() (map[string]interface{}, error) { toSerialize["pushes"] = o.Pushes toSerialize["push_urls"] = o.PushUrls toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_project_copy.go b/pkg/cloudtruthapi/model_project_copy.go new file mode 100644 index 0000000..f22fd7b --- /dev/null +++ b/pkg/cloudtruthapi/model_project_copy.go @@ -0,0 +1,278 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" +) + +// checks if the ProjectCopy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectCopy{} + +// ProjectCopy struct for ProjectCopy +type ProjectCopy struct { + // The project name. + Name string `json:"name"` + // A description of the project. You may find it helpful to document how this project is used to assist others when they need to maintain software that uses this content. + Description *string `json:"description,omitempty"` + // When copying child Project, this indicates what name to use for each Project. If no name is provided for a given child Project, a \"-1\" will be appended to its name. Note that this name mapping can be used for Projects of any level of depth in the parent-child hierarchy. + ChildProjectNames map[string]string `json:"child_project_names,omitempty"` + // If true, copy child projects recursively. If false, only copy the specified project. + Recursive *bool `json:"recursive,omitempty"` + // Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. + DependsOn NullableString `json:"depends_on,omitempty"` +} + +// NewProjectCopy instantiates a new ProjectCopy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectCopy(name string) *ProjectCopy { + this := ProjectCopy{} + this.Name = name + return &this +} + +// NewProjectCopyWithDefaults instantiates a new ProjectCopy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectCopyWithDefaults() *ProjectCopy { + this := ProjectCopy{} + return &this +} + +// GetName returns the Name field value +func (o *ProjectCopy) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ProjectCopy) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ProjectCopy) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ProjectCopy) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectCopy) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ProjectCopy) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ProjectCopy) SetDescription(v string) { + o.Description = &v +} + +// GetChildProjectNames returns the ChildProjectNames field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectCopy) GetChildProjectNames() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + return o.ChildProjectNames +} + +// GetChildProjectNamesOk returns a tuple with the ChildProjectNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectCopy) GetChildProjectNamesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.ChildProjectNames) { + return nil, false + } + return &o.ChildProjectNames, true +} + +// HasChildProjectNames returns a boolean if a field has been set. +func (o *ProjectCopy) HasChildProjectNames() bool { + if o != nil && IsNil(o.ChildProjectNames) { + return true + } + + return false +} + +// SetChildProjectNames gets a reference to the given map[string]string and assigns it to the ChildProjectNames field. +func (o *ProjectCopy) SetChildProjectNames(v map[string]string) { + o.ChildProjectNames = v +} + +// GetRecursive returns the Recursive field value if set, zero value otherwise. +func (o *ProjectCopy) GetRecursive() bool { + if o == nil || IsNil(o.Recursive) { + var ret bool + return ret + } + return *o.Recursive +} + +// GetRecursiveOk returns a tuple with the Recursive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectCopy) GetRecursiveOk() (*bool, bool) { + if o == nil || IsNil(o.Recursive) { + return nil, false + } + return o.Recursive, true +} + +// HasRecursive returns a boolean if a field has been set. +func (o *ProjectCopy) HasRecursive() bool { + if o != nil && !IsNil(o.Recursive) { + return true + } + + return false +} + +// SetRecursive gets a reference to the given bool and assigns it to the Recursive field. +func (o *ProjectCopy) SetRecursive(v bool) { + o.Recursive = &v +} + +// GetDependsOn returns the DependsOn field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectCopy) GetDependsOn() string { + if o == nil || IsNil(o.DependsOn.Get()) { + var ret string + return ret + } + return *o.DependsOn.Get() +} + +// GetDependsOnOk returns a tuple with the DependsOn field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectCopy) GetDependsOnOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DependsOn.Get(), o.DependsOn.IsSet() +} + +// HasDependsOn returns a boolean if a field has been set. +func (o *ProjectCopy) HasDependsOn() bool { + if o != nil && o.DependsOn.IsSet() { + return true + } + + return false +} + +// SetDependsOn gets a reference to the given NullableString and assigns it to the DependsOn field. +func (o *ProjectCopy) SetDependsOn(v string) { + o.DependsOn.Set(&v) +} +// SetDependsOnNil sets the value for DependsOn to be an explicit nil +func (o *ProjectCopy) SetDependsOnNil() { + o.DependsOn.Set(nil) +} + +// UnsetDependsOn ensures that no value is present for DependsOn, not even an explicit nil +func (o *ProjectCopy) UnsetDependsOn() { + o.DependsOn.Unset() +} + +func (o ProjectCopy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectCopy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if o.ChildProjectNames != nil { + toSerialize["child_project_names"] = o.ChildProjectNames + } + if !IsNil(o.Recursive) { + toSerialize["recursive"] = o.Recursive + } + if o.DependsOn.IsSet() { + toSerialize["depends_on"] = o.DependsOn.Get() + } + return toSerialize, nil +} + +type NullableProjectCopy struct { + value *ProjectCopy + isSet bool +} + +func (v NullableProjectCopy) Get() *ProjectCopy { + return v.value +} + +func (v *NullableProjectCopy) Set(val *ProjectCopy) { + v.value = val + v.isSet = true +} + +func (v NullableProjectCopy) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectCopy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectCopy(val *ProjectCopy) *NullableProjectCopy { + return &NullableProjectCopy{value: val, isSet: true} +} + +func (v NullableProjectCopy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectCopy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_project_create.go b/pkg/cloudtruthapi/model_project_create.go index a2ff0bc..8311495 100644 --- a/pkg/cloudtruthapi/model_project_create.go +++ b/pkg/cloudtruthapi/model_project_create.go @@ -24,6 +24,8 @@ type ProjectCreate struct { Name string `json:"name"` // A description of the project. You may find it helpful to document how this project is used to assist others when they need to maintain software that uses this content. Description *string `json:"description,omitempty"` + // A regular expression parameter names must match + ParameterNamePattern *string `json:"parameter_name_pattern,omitempty"` // Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. DependsOn NullableString `json:"depends_on,omitempty"` } @@ -102,6 +104,38 @@ func (o *ProjectCreate) SetDescription(v string) { o.Description = &v } +// GetParameterNamePattern returns the ParameterNamePattern field value if set, zero value otherwise. +func (o *ProjectCreate) GetParameterNamePattern() string { + if o == nil || IsNil(o.ParameterNamePattern) { + var ret string + return ret + } + return *o.ParameterNamePattern +} + +// GetParameterNamePatternOk returns a tuple with the ParameterNamePattern field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectCreate) GetParameterNamePatternOk() (*string, bool) { + if o == nil || IsNil(o.ParameterNamePattern) { + return nil, false + } + return o.ParameterNamePattern, true +} + +// HasParameterNamePattern returns a boolean if a field has been set. +func (o *ProjectCreate) HasParameterNamePattern() bool { + if o != nil && !IsNil(o.ParameterNamePattern) { + return true + } + + return false +} + +// SetParameterNamePattern gets a reference to the given string and assigns it to the ParameterNamePattern field. +func (o *ProjectCreate) SetParameterNamePattern(v string) { + o.ParameterNamePattern = &v +} + // GetDependsOn returns the DependsOn field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ProjectCreate) GetDependsOn() string { if o == nil || IsNil(o.DependsOn.Get()) { @@ -158,6 +192,9 @@ func (o ProjectCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.ParameterNamePattern) { + toSerialize["parameter_name_pattern"] = o.ParameterNamePattern + } if o.DependsOn.IsSet() { toSerialize["depends_on"] = o.DependsOn.Get() } diff --git a/pkg/cloudtruthapi/model_project_update.go b/pkg/cloudtruthapi/model_project_update.go new file mode 100644 index 0000000..8767a32 --- /dev/null +++ b/pkg/cloudtruthapi/model_project_update.go @@ -0,0 +1,390 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the ProjectUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectUpdate{} + +// ProjectUpdate struct for ProjectUpdate +type ProjectUpdate struct { + Id string `json:"id"` + // The project name. + Name string `json:"name"` + // A description of the project. You may find it helpful to document how this project is used to assist others when they need to maintain software that uses this content. + Description *string `json:"description,omitempty"` + // A regular expression parameter names must match + ParameterNamePattern *string `json:"parameter_name_pattern,omitempty"` + // Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. + DependsOn NullableString `json:"depends_on,omitempty"` + // Indicates if access control is being enforced through grants. + AccessControlled *bool `json:"access_controlled,omitempty"` + Role NullableRoleEnum `json:"role"` + CreatedAt time.Time `json:"created_at"` + ModifiedAt NullableTime `json:"modified_at"` +} + +// NewProjectUpdate instantiates a new ProjectUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProjectUpdate(id string, name string, role NullableRoleEnum, createdAt time.Time, modifiedAt NullableTime) *ProjectUpdate { + this := ProjectUpdate{} + this.Id = id + this.Name = name + this.Role = role + this.CreatedAt = createdAt + this.ModifiedAt = modifiedAt + return &this +} + +// NewProjectUpdateWithDefaults instantiates a new ProjectUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectUpdateWithDefaults() *ProjectUpdate { + this := ProjectUpdate{} + return &this +} + +// GetId returns the Id field value +func (o *ProjectUpdate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ProjectUpdate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ProjectUpdate) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ProjectUpdate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ProjectUpdate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ProjectUpdate) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ProjectUpdate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectUpdate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ProjectUpdate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ProjectUpdate) SetDescription(v string) { + o.Description = &v +} + +// GetParameterNamePattern returns the ParameterNamePattern field value if set, zero value otherwise. +func (o *ProjectUpdate) GetParameterNamePattern() string { + if o == nil || IsNil(o.ParameterNamePattern) { + var ret string + return ret + } + return *o.ParameterNamePattern +} + +// GetParameterNamePatternOk returns a tuple with the ParameterNamePattern field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectUpdate) GetParameterNamePatternOk() (*string, bool) { + if o == nil || IsNil(o.ParameterNamePattern) { + return nil, false + } + return o.ParameterNamePattern, true +} + +// HasParameterNamePattern returns a boolean if a field has been set. +func (o *ProjectUpdate) HasParameterNamePattern() bool { + if o != nil && !IsNil(o.ParameterNamePattern) { + return true + } + + return false +} + +// SetParameterNamePattern gets a reference to the given string and assigns it to the ParameterNamePattern field. +func (o *ProjectUpdate) SetParameterNamePattern(v string) { + o.ParameterNamePattern = &v +} + +// GetDependsOn returns the DependsOn field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectUpdate) GetDependsOn() string { + if o == nil || IsNil(o.DependsOn.Get()) { + var ret string + return ret + } + return *o.DependsOn.Get() +} + +// GetDependsOnOk returns a tuple with the DependsOn field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectUpdate) GetDependsOnOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DependsOn.Get(), o.DependsOn.IsSet() +} + +// HasDependsOn returns a boolean if a field has been set. +func (o *ProjectUpdate) HasDependsOn() bool { + if o != nil && o.DependsOn.IsSet() { + return true + } + + return false +} + +// SetDependsOn gets a reference to the given NullableString and assigns it to the DependsOn field. +func (o *ProjectUpdate) SetDependsOn(v string) { + o.DependsOn.Set(&v) +} +// SetDependsOnNil sets the value for DependsOn to be an explicit nil +func (o *ProjectUpdate) SetDependsOnNil() { + o.DependsOn.Set(nil) +} + +// UnsetDependsOn ensures that no value is present for DependsOn, not even an explicit nil +func (o *ProjectUpdate) UnsetDependsOn() { + o.DependsOn.Unset() +} + +// GetAccessControlled returns the AccessControlled field value if set, zero value otherwise. +func (o *ProjectUpdate) GetAccessControlled() bool { + if o == nil || IsNil(o.AccessControlled) { + var ret bool + return ret + } + return *o.AccessControlled +} + +// GetAccessControlledOk returns a tuple with the AccessControlled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectUpdate) GetAccessControlledOk() (*bool, bool) { + if o == nil || IsNil(o.AccessControlled) { + return nil, false + } + return o.AccessControlled, true +} + +// HasAccessControlled returns a boolean if a field has been set. +func (o *ProjectUpdate) HasAccessControlled() bool { + if o != nil && !IsNil(o.AccessControlled) { + return true + } + + return false +} + +// SetAccessControlled gets a reference to the given bool and assigns it to the AccessControlled field. +func (o *ProjectUpdate) SetAccessControlled(v bool) { + o.AccessControlled = &v +} + +// GetRole returns the Role field value +// If the value is explicit nil, the zero value for RoleEnum will be returned +func (o *ProjectUpdate) GetRole() RoleEnum { + if o == nil || o.Role.Get() == nil { + var ret RoleEnum + return ret + } + + return *o.Role.Get() +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectUpdate) GetRoleOk() (*RoleEnum, bool) { + if o == nil { + return nil, false + } + return o.Role.Get(), o.Role.IsSet() +} + +// SetRole sets field value +func (o *ProjectUpdate) SetRole(v RoleEnum) { + o.Role.Set(&v) +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ProjectUpdate) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ProjectUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ProjectUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ProjectUpdate) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// SetModifiedAt sets field value +func (o *ProjectUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} + +func (o ProjectUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProjectUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ParameterNamePattern) { + toSerialize["parameter_name_pattern"] = o.ParameterNamePattern + } + if o.DependsOn.IsSet() { + toSerialize["depends_on"] = o.DependsOn.Get() + } + if !IsNil(o.AccessControlled) { + toSerialize["access_controlled"] = o.AccessControlled + } + toSerialize["role"] = o.Role.Get() + toSerialize["created_at"] = o.CreatedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() + return toSerialize, nil +} + +type NullableProjectUpdate struct { + value *ProjectUpdate + isSet bool +} + +func (v NullableProjectUpdate) Get() *ProjectUpdate { + return v.value +} + +func (v *NullableProjectUpdate) Set(val *ProjectUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableProjectUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectUpdate(val *ProjectUpdate) *NullableProjectUpdate { + return &NullableProjectUpdate{value: val, isSet: true} +} + +func (v NullableProjectUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_service_account.go b/pkg/cloudtruthapi/model_service_account.go index 54d5368..fd963af 100644 --- a/pkg/cloudtruthapi/model_service_account.go +++ b/pkg/cloudtruthapi/model_service_account.go @@ -23,11 +23,12 @@ var _ MappedNullable = &ServiceAccount{} type ServiceAccount struct { Url string `json:"url"` Id string `json:"id"` + Owner NullableString `json:"owner,omitempty"` User User `json:"user"` // An optional description of the process or system using the service account. Description *string `json:"description,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` // The most recent date and time the service account was used. It will be null if the service account has not been used. LastUsedAt NullableTime `json:"last_used_at"` } @@ -36,7 +37,7 @@ type ServiceAccount struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewServiceAccount(url string, id string, user User, createdAt time.Time, modifiedAt time.Time, lastUsedAt NullableTime) *ServiceAccount { +func NewServiceAccount(url string, id string, user User, createdAt time.Time, modifiedAt NullableTime, lastUsedAt NullableTime) *ServiceAccount { this := ServiceAccount{} this.Url = url this.Id = id @@ -103,6 +104,48 @@ func (o *ServiceAccount) SetId(v string) { o.Id = v } +// GetOwner returns the Owner field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ServiceAccount) GetOwner() string { + if o == nil || IsNil(o.Owner.Get()) { + var ret string + return ret + } + return *o.Owner.Get() +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ServiceAccount) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Owner.Get(), o.Owner.IsSet() +} + +// HasOwner returns a boolean if a field has been set. +func (o *ServiceAccount) HasOwner() bool { + if o != nil && o.Owner.IsSet() { + return true + } + + return false +} + +// SetOwner gets a reference to the given NullableString and assigns it to the Owner field. +func (o *ServiceAccount) SetOwner(v string) { + o.Owner.Set(&v) +} +// SetOwnerNil sets the value for Owner to be an explicit nil +func (o *ServiceAccount) SetOwnerNil() { + o.Owner.Set(nil) +} + +// UnsetOwner ensures that no value is present for Owner, not even an explicit nil +func (o *ServiceAccount) UnsetOwner() { + o.Owner.Unset() +} + // GetUser returns the User field value func (o *ServiceAccount) GetUser() User { if o == nil { @@ -184,27 +227,29 @@ func (o *ServiceAccount) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *ServiceAccount) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServiceAccount) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *ServiceAccount) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetLastUsedAt returns the LastUsedAt field value @@ -245,12 +290,15 @@ func (o ServiceAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + if o.Owner.IsSet() { + toSerialize["owner"] = o.Owner.Get() + } toSerialize["user"] = o.User if !IsNil(o.Description) { toSerialize["description"] = o.Description } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() toSerialize["last_used_at"] = o.LastUsedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_service_account_create_request.go b/pkg/cloudtruthapi/model_service_account_create_request.go index da5e9f2..d6d28fd 100644 --- a/pkg/cloudtruthapi/model_service_account_create_request.go +++ b/pkg/cloudtruthapi/model_service_account_create_request.go @@ -24,6 +24,10 @@ type ServiceAccountCreateRequest struct { Name string `json:"name"` // An optional description of the process or system using the service account. Description *string `json:"description,omitempty"` + // The role for the service acount + Role *string `json:"role,omitempty"` + // The owner of the service account. + Owner *string `json:"owner,omitempty"` } // NewServiceAccountCreateRequest instantiates a new ServiceAccountCreateRequest object @@ -100,6 +104,70 @@ func (o *ServiceAccountCreateRequest) SetDescription(v string) { o.Description = &v } +// GetRole returns the Role field value if set, zero value otherwise. +func (o *ServiceAccountCreateRequest) GetRole() string { + if o == nil || IsNil(o.Role) { + var ret string + return ret + } + return *o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceAccountCreateRequest) GetRoleOk() (*string, bool) { + if o == nil || IsNil(o.Role) { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *ServiceAccountCreateRequest) HasRole() bool { + if o != nil && !IsNil(o.Role) { + return true + } + + return false +} + +// SetRole gets a reference to the given string and assigns it to the Role field. +func (o *ServiceAccountCreateRequest) SetRole(v string) { + o.Role = &v +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *ServiceAccountCreateRequest) GetOwner() string { + if o == nil || IsNil(o.Owner) { + var ret string + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceAccountCreateRequest) GetOwnerOk() (*string, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *ServiceAccountCreateRequest) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given string and assigns it to the Owner field. +func (o *ServiceAccountCreateRequest) SetOwner(v string) { + o.Owner = &v +} + func (o ServiceAccountCreateRequest) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -114,6 +182,12 @@ func (o ServiceAccountCreateRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } + if !IsNil(o.Role) { + toSerialize["role"] = o.Role + } + if !IsNil(o.Owner) { + toSerialize["owner"] = o.Owner + } return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_service_account_create_response.go b/pkg/cloudtruthapi/model_service_account_create_response.go index 247c08e..752567a 100644 --- a/pkg/cloudtruthapi/model_service_account_create_response.go +++ b/pkg/cloudtruthapi/model_service_account_create_response.go @@ -23,11 +23,12 @@ var _ MappedNullable = &ServiceAccountCreateResponse{} type ServiceAccountCreateResponse struct { Url string `json:"url"` Id string `json:"id"` + Owner NullableString `json:"owner,omitempty"` User User `json:"user"` // An optional description of the process or system using the service account. Description *string `json:"description,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` // The most recent date and time the service account was used. It will be null if the service account has not been used. LastUsedAt NullableTime `json:"last_used_at"` // The API Key to use as a Bearer token for the service account. @@ -38,7 +39,7 @@ type ServiceAccountCreateResponse struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewServiceAccountCreateResponse(url string, id string, user User, createdAt time.Time, modifiedAt time.Time, lastUsedAt NullableTime, apikey string) *ServiceAccountCreateResponse { +func NewServiceAccountCreateResponse(url string, id string, user User, createdAt time.Time, modifiedAt NullableTime, lastUsedAt NullableTime, apikey string) *ServiceAccountCreateResponse { this := ServiceAccountCreateResponse{} this.Url = url this.Id = id @@ -106,6 +107,48 @@ func (o *ServiceAccountCreateResponse) SetId(v string) { o.Id = v } +// GetOwner returns the Owner field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ServiceAccountCreateResponse) GetOwner() string { + if o == nil || IsNil(o.Owner.Get()) { + var ret string + return ret + } + return *o.Owner.Get() +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ServiceAccountCreateResponse) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Owner.Get(), o.Owner.IsSet() +} + +// HasOwner returns a boolean if a field has been set. +func (o *ServiceAccountCreateResponse) HasOwner() bool { + if o != nil && o.Owner.IsSet() { + return true + } + + return false +} + +// SetOwner gets a reference to the given NullableString and assigns it to the Owner field. +func (o *ServiceAccountCreateResponse) SetOwner(v string) { + o.Owner.Set(&v) +} +// SetOwnerNil sets the value for Owner to be an explicit nil +func (o *ServiceAccountCreateResponse) SetOwnerNil() { + o.Owner.Set(nil) +} + +// UnsetOwner ensures that no value is present for Owner, not even an explicit nil +func (o *ServiceAccountCreateResponse) UnsetOwner() { + o.Owner.Unset() +} + // GetUser returns the User field value func (o *ServiceAccountCreateResponse) GetUser() User { if o == nil { @@ -187,27 +230,29 @@ func (o *ServiceAccountCreateResponse) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *ServiceAccountCreateResponse) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServiceAccountCreateResponse) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *ServiceAccountCreateResponse) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } // GetLastUsedAt returns the LastUsedAt field value @@ -272,12 +317,15 @@ func (o ServiceAccountCreateResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + if o.Owner.IsSet() { + toSerialize["owner"] = o.Owner.Get() + } toSerialize["user"] = o.User if !IsNil(o.Description) { toSerialize["description"] = o.Description } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() toSerialize["last_used_at"] = o.LastUsedAt.Get() toSerialize["apikey"] = o.Apikey return toSerialize, nil diff --git a/pkg/cloudtruthapi/model_service_account_update_request.go b/pkg/cloudtruthapi/model_service_account_update_request.go new file mode 100644 index 0000000..5d52a2b --- /dev/null +++ b/pkg/cloudtruthapi/model_service_account_update_request.go @@ -0,0 +1,193 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" +) + +// checks if the ServiceAccountUpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceAccountUpdateRequest{} + +// ServiceAccountUpdateRequest struct for ServiceAccountUpdateRequest +type ServiceAccountUpdateRequest struct { + // An optional description of the process or system using the service account. + Description *string `json:"description,omitempty"` + // The role for the service acount + Role string `json:"role"` + // The owner of the service account. + Owner *string `json:"owner,omitempty"` +} + +// NewServiceAccountUpdateRequest instantiates a new ServiceAccountUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceAccountUpdateRequest(role string) *ServiceAccountUpdateRequest { + this := ServiceAccountUpdateRequest{} + this.Role = role + return &this +} + +// NewServiceAccountUpdateRequestWithDefaults instantiates a new ServiceAccountUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceAccountUpdateRequestWithDefaults() *ServiceAccountUpdateRequest { + this := ServiceAccountUpdateRequest{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServiceAccountUpdateRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceAccountUpdateRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ServiceAccountUpdateRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServiceAccountUpdateRequest) SetDescription(v string) { + o.Description = &v +} + +// GetRole returns the Role field value +func (o *ServiceAccountUpdateRequest) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *ServiceAccountUpdateRequest) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *ServiceAccountUpdateRequest) SetRole(v string) { + o.Role = v +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *ServiceAccountUpdateRequest) GetOwner() string { + if o == nil || IsNil(o.Owner) { + var ret string + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceAccountUpdateRequest) GetOwnerOk() (*string, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *ServiceAccountUpdateRequest) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given string and assigns it to the Owner field. +func (o *ServiceAccountUpdateRequest) SetOwner(v string) { + o.Owner = &v +} + +func (o ServiceAccountUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceAccountUpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["role"] = o.Role + if !IsNil(o.Owner) { + toSerialize["owner"] = o.Owner + } + return toSerialize, nil +} + +type NullableServiceAccountUpdateRequest struct { + value *ServiceAccountUpdateRequest + isSet bool +} + +func (v NullableServiceAccountUpdateRequest) Get() *ServiceAccountUpdateRequest { + return v.value +} + +func (v *NullableServiceAccountUpdateRequest) Set(val *ServiceAccountUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableServiceAccountUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceAccountUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceAccountUpdateRequest(val *ServiceAccountUpdateRequest) *NullableServiceAccountUpdateRequest { + return &NullableServiceAccountUpdateRequest{value: val, isSet: true} +} + +func (v NullableServiceAccountUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceAccountUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_tag.go b/pkg/cloudtruthapi/model_tag.go index b7b4fd8..5c17e83 100644 --- a/pkg/cloudtruthapi/model_tag.go +++ b/pkg/cloudtruthapi/model_tag.go @@ -21,6 +21,7 @@ var _ MappedNullable = &Tag{} // Tag The details of a tag. type Tag struct { + // The URL for the tag. Url string `json:"url"` // A unique identifier for the tag. Id string `json:"id"` @@ -30,7 +31,9 @@ type Tag struct { Description *string `json:"description,omitempty"` // The point in time this tag represents. Timestamp time.Time `json:"timestamp"` - // Deprecated. Only shows pushes for aws integrations in /api/v1/. + // If True, this tag cannot be modified once it is created. + Immutable *bool `json:"immutable,omitempty"` + // Deprecated. Use `push_urls` instead. Pushes []AwsPush `json:"pushes"` // Push actions associated with the tag. PushUrls []string `json:"push_urls"` @@ -189,6 +192,38 @@ func (o *Tag) SetTimestamp(v time.Time) { o.Timestamp = v } +// GetImmutable returns the Immutable field value if set, zero value otherwise. +func (o *Tag) GetImmutable() bool { + if o == nil || IsNil(o.Immutable) { + var ret bool + return ret + } + return *o.Immutable +} + +// GetImmutableOk returns a tuple with the Immutable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetImmutableOk() (*bool, bool) { + if o == nil || IsNil(o.Immutable) { + return nil, false + } + return o.Immutable, true +} + +// HasImmutable returns a boolean if a field has been set. +func (o *Tag) HasImmutable() bool { + if o != nil && !IsNil(o.Immutable) { + return true + } + + return false +} + +// SetImmutable gets a reference to the given bool and assigns it to the Immutable field. +func (o *Tag) SetImmutable(v bool) { + o.Immutable = &v +} + // GetPushes returns the Pushes field value func (o *Tag) GetPushes() []AwsPush { if o == nil { @@ -278,6 +313,9 @@ func (o Tag) ToMap() (map[string]interface{}, error) { toSerialize["description"] = o.Description } toSerialize["timestamp"] = o.Timestamp + if !IsNil(o.Immutable) { + toSerialize["immutable"] = o.Immutable + } toSerialize["pushes"] = o.Pushes toSerialize["push_urls"] = o.PushUrls toSerialize["usage"] = o.Usage diff --git a/pkg/cloudtruthapi/model_tag_create.go b/pkg/cloudtruthapi/model_tag_create.go index bee6df7..067f1e5 100644 --- a/pkg/cloudtruthapi/model_tag_create.go +++ b/pkg/cloudtruthapi/model_tag_create.go @@ -27,6 +27,8 @@ type TagCreate struct { Description *string `json:"description,omitempty"` // The point in time this tag represents. If not specified then the current time will be used. Timestamp NullableTime `json:"timestamp,omitempty"` + // If True, this tag cannot be modified once it is created. + Immutable *bool `json:"immutable,omitempty"` } // NewTagCreate instantiates a new TagCreate object @@ -145,6 +147,38 @@ func (o *TagCreate) UnsetTimestamp() { o.Timestamp.Unset() } +// GetImmutable returns the Immutable field value if set, zero value otherwise. +func (o *TagCreate) GetImmutable() bool { + if o == nil || IsNil(o.Immutable) { + var ret bool + return ret + } + return *o.Immutable +} + +// GetImmutableOk returns a tuple with the Immutable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TagCreate) GetImmutableOk() (*bool, bool) { + if o == nil || IsNil(o.Immutable) { + return nil, false + } + return o.Immutable, true +} + +// HasImmutable returns a boolean if a field has been set. +func (o *TagCreate) HasImmutable() bool { + if o != nil && !IsNil(o.Immutable) { + return true + } + + return false +} + +// SetImmutable gets a reference to the given bool and assigns it to the Immutable field. +func (o *TagCreate) SetImmutable(v bool) { + o.Immutable = &v +} + func (o TagCreate) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -162,6 +196,9 @@ func (o TagCreate) ToMap() (map[string]interface{}, error) { if o.Timestamp.IsSet() { toSerialize["timestamp"] = o.Timestamp.Get() } + if !IsNil(o.Immutable) { + toSerialize["immutable"] = o.Immutable + } return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_tag_update.go b/pkg/cloudtruthapi/model_tag_update.go index 1a20e39..6f6e19c 100644 --- a/pkg/cloudtruthapi/model_tag_update.go +++ b/pkg/cloudtruthapi/model_tag_update.go @@ -29,6 +29,8 @@ type TagUpdate struct { Description *string `json:"description,omitempty"` // The point in time this tag represents. If explicitly set to `null` then the current time will be used. Timestamp NullableTime `json:"timestamp,omitempty"` + // If True, this tag cannot be modified once it is created. + Immutable *bool `json:"immutable,omitempty"` } // NewTagUpdate instantiates a new TagUpdate object @@ -172,6 +174,38 @@ func (o *TagUpdate) UnsetTimestamp() { o.Timestamp.Unset() } +// GetImmutable returns the Immutable field value if set, zero value otherwise. +func (o *TagUpdate) GetImmutable() bool { + if o == nil || IsNil(o.Immutable) { + var ret bool + return ret + } + return *o.Immutable +} + +// GetImmutableOk returns a tuple with the Immutable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TagUpdate) GetImmutableOk() (*bool, bool) { + if o == nil || IsNil(o.Immutable) { + return nil, false + } + return o.Immutable, true +} + +// HasImmutable returns a boolean if a field has been set. +func (o *TagUpdate) HasImmutable() bool { + if o != nil && !IsNil(o.Immutable) { + return true + } + + return false +} + +// SetImmutable gets a reference to the given bool and assigns it to the Immutable field. +func (o *TagUpdate) SetImmutable(v bool) { + o.Immutable = &v +} + func (o TagUpdate) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -190,6 +224,9 @@ func (o TagUpdate) ToMap() (map[string]interface{}, error) { if o.Timestamp.IsSet() { toSerialize["timestamp"] = o.Timestamp.Get() } + if !IsNil(o.Immutable) { + toSerialize["immutable"] = o.Immutable + } return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_tag_usage.go b/pkg/cloudtruthapi/model_tag_usage.go deleted file mode 100644 index e8cbb72..0000000 --- a/pkg/cloudtruthapi/model_tag_usage.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -CloudTruth Management API - -CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. - -API version: v1 -Contact: support@cloudtruth.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cloudtruthapi - -import ( - "encoding/json" - "time" -) - -// TagUsage struct for TagUsage -type TagUsage struct { - // The last time a configuration was retrieved with this tag. - LastRead NullableTime `json:"last_read"` - // The last user (id) to use this tag to read configuration. - LastReadBy *string `json:"last_read_by,omitempty"` - // The number of times the tag has been used to read configuration. - TotalReads int32 `json:"total_reads"` -} - -// NewTagUsage instantiates a new TagUsage object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTagUsage(lastRead NullableTime, totalReads int32) *TagUsage { - this := TagUsage{} - this.LastRead = lastRead - this.TotalReads = totalReads - return &this -} - -// NewTagUsageWithDefaults instantiates a new TagUsage object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTagUsageWithDefaults() *TagUsage { - this := TagUsage{} - return &this -} - -// GetLastRead returns the LastRead field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *TagUsage) GetLastRead() time.Time { - if o == nil || o.LastRead.Get() == nil { - var ret time.Time - return ret - } - - return *o.LastRead.Get() -} - -// GetLastReadOk returns a tuple with the LastRead field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TagUsage) GetLastReadOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.LastRead.Get(), o.LastRead.IsSet() -} - -// SetLastRead sets field value -func (o *TagUsage) SetLastRead(v time.Time) { - o.LastRead.Set(&v) -} - -// GetLastReadBy returns the LastReadBy field value if set, zero value otherwise. -func (o *TagUsage) GetLastReadBy() string { - if o == nil || o.LastReadBy == nil { - var ret string - return ret - } - return *o.LastReadBy -} - -// GetLastReadByOk returns a tuple with the LastReadBy field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TagUsage) GetLastReadByOk() (*string, bool) { - if o == nil || o.LastReadBy == nil { - return nil, false - } - return o.LastReadBy, true -} - -// HasLastReadBy returns a boolean if a field has been set. -func (o *TagUsage) HasLastReadBy() bool { - if o != nil && o.LastReadBy != nil { - return true - } - - return false -} - -// SetLastReadBy gets a reference to the given string and assigns it to the LastReadBy field. -func (o *TagUsage) SetLastReadBy(v string) { - o.LastReadBy = &v -} - -// GetTotalReads returns the TotalReads field value -func (o *TagUsage) GetTotalReads() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.TotalReads -} - -// GetTotalReadsOk returns a tuple with the TotalReads field value -// and a boolean to check if the value has been set. -func (o *TagUsage) GetTotalReadsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.TotalReads, true -} - -// SetTotalReads sets field value -func (o *TagUsage) SetTotalReads(v int32) { - o.TotalReads = v -} - -func (o TagUsage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["last_read"] = o.LastRead.Get() - } - if o.LastReadBy != nil { - toSerialize["last_read_by"] = o.LastReadBy - } - if true { - toSerialize["total_reads"] = o.TotalReads - } - return json.Marshal(toSerialize) -} - -type NullableTagUsage struct { - value *TagUsage - isSet bool -} - -func (v NullableTagUsage) Get() *TagUsage { - return v.value -} - -func (v *NullableTagUsage) Set(val *TagUsage) { - v.value = val - v.isSet = true -} - -func (v NullableTagUsage) IsSet() bool { - return v.isSet -} - -func (v *NullableTagUsage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTagUsage(val *TagUsage) *NullableTagUsage { - return &NullableTagUsage{value: val, isSet: true} -} - -func (v NullableTagUsage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTagUsage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/cloudtruthapi/model_task_step.go b/pkg/cloudtruthapi/model_task_step.go index 57fdb2e..ace6e37 100644 --- a/pkg/cloudtruthapi/model_task_step.go +++ b/pkg/cloudtruthapi/model_task_step.go @@ -60,14 +60,14 @@ type TaskStep struct { // Details on the error that occurred during processing. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewTaskStep instantiates a new TaskStep object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt time.Time) *TaskStep { +func NewTaskStep(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt NullableTime) *TaskStep { this := TaskStep{} this.Url = url this.Id = id @@ -851,27 +851,29 @@ func (o *TaskStep) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *TaskStep) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TaskStep) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *TaskStep) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o TaskStep) MarshalJSON() ([]byte, error) { @@ -933,7 +935,7 @@ func (o TaskStep) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_template.go b/pkg/cloudtruthapi/model_template.go index c88b3c6..02e54da 100644 --- a/pkg/cloudtruthapi/model_template.go +++ b/pkg/cloudtruthapi/model_template.go @@ -23,8 +23,8 @@ var _ MappedNullable = &Template{} type Template struct { // The templates this value references, if interpolated. Url string `json:"url"` - // A unique identifier for the template. Id string `json:"id"` + LedgerId string `json:"ledger_id"` // The template name. Name string `json:"name"` // ('A description of the template. You may find it helpful to document how this template is used to assist others when they need to maintain software that uses this content.',) @@ -33,30 +33,34 @@ type Template struct { Evaluated bool `json:"evaluated"` // The content of the template. Use mustache-style templating delimiters of `{{` and `}}` to reference parameter values by name for substitution into the template result. Body *string `json:"body,omitempty"` - // Parameters that this template references. + // Projects (other than this template's project) that this template references. This field is not valid for history requests. + ReferencedProjects []string `json:"referenced_projects"` + // Parameters that this template references. This field is not valid for history requests. ReferencedParameters []string `json:"referenced_parameters"` - // Other templates that this template references. + // Other templates that this template references. This field is not valid for history requests. ReferencedTemplates []string `json:"referenced_templates"` - // Other templates that reference this template. + // Other templates that reference this template. This field is not valid for history requests. ReferencingTemplates []string `json:"referencing_templates"` - // The dynamic values that reference this template. + // The dynamic values that reference this template. This field is not valid for history requests. ReferencingValues []string `json:"referencing_values"` // If True, this template contains secrets. HasSecret bool `json:"has_secret"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewTemplate instantiates a new Template object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTemplate(url string, id string, name string, evaluated bool, referencedParameters []string, referencedTemplates []string, referencingTemplates []string, referencingValues []string, hasSecret bool, createdAt time.Time, modifiedAt time.Time) *Template { +func NewTemplate(url string, id string, ledgerId string, name string, evaluated bool, referencedProjects []string, referencedParameters []string, referencedTemplates []string, referencingTemplates []string, referencingValues []string, hasSecret bool, createdAt time.Time, modifiedAt NullableTime) *Template { this := Template{} this.Url = url this.Id = id + this.LedgerId = ledgerId this.Name = name this.Evaluated = evaluated + this.ReferencedProjects = referencedProjects this.ReferencedParameters = referencedParameters this.ReferencedTemplates = referencedTemplates this.ReferencingTemplates = referencingTemplates @@ -123,6 +127,30 @@ func (o *Template) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *Template) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *Template) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *Template) SetLedgerId(v string) { + o.LedgerId = v +} + // GetName returns the Name field value func (o *Template) GetName() string { if o == nil { @@ -235,6 +263,30 @@ func (o *Template) SetBody(v string) { o.Body = &v } +// GetReferencedProjects returns the ReferencedProjects field value +func (o *Template) GetReferencedProjects() []string { + if o == nil { + var ret []string + return ret + } + + return o.ReferencedProjects +} + +// GetReferencedProjectsOk returns a tuple with the ReferencedProjects field value +// and a boolean to check if the value has been set. +func (o *Template) GetReferencedProjectsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ReferencedProjects, true +} + +// SetReferencedProjects sets field value +func (o *Template) SetReferencedProjects(v []string) { + o.ReferencedProjects = v +} + // GetReferencedParameters returns the ReferencedParameters field value func (o *Template) GetReferencedParameters() []string { if o == nil { @@ -380,27 +432,29 @@ func (o *Template) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *Template) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Template) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *Template) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o Template) MarshalJSON() ([]byte, error) { @@ -415,6 +469,7 @@ func (o Template) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId toSerialize["name"] = o.Name if !IsNil(o.Description) { toSerialize["description"] = o.Description @@ -423,13 +478,14 @@ func (o Template) ToMap() (map[string]interface{}, error) { if !IsNil(o.Body) { toSerialize["body"] = o.Body } + toSerialize["referenced_projects"] = o.ReferencedProjects toSerialize["referenced_parameters"] = o.ReferencedParameters toSerialize["referenced_templates"] = o.ReferencedTemplates toSerialize["referencing_templates"] = o.ReferencingTemplates toSerialize["referencing_values"] = o.ReferencingValues toSerialize["has_secret"] = o.HasSecret toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_template_timeline_entry.go b/pkg/cloudtruthapi/model_template_timeline_entry.go index 319e8e1..f5577af 100644 --- a/pkg/cloudtruthapi/model_template_timeline_entry.go +++ b/pkg/cloudtruthapi/model_template_timeline_entry.go @@ -21,10 +21,9 @@ var _ MappedNullable = &TemplateTimelineEntry{} // TemplateTimelineEntry Details about a single change. type TemplateTimelineEntry struct { - HistoryDate time.Time `json:"history_date"` HistoryType HistoryTypeEnum `json:"history_type"` - // The unique identifier of a user. - HistoryUser NullableString `json:"history_user,omitempty"` + ModifiedAt NullableTime `json:"modified_at"` + ModifiedBy *string `json:"modified_by,omitempty"` HistoryTemplate TemplateTimelineEntryHistoryTemplate `json:"history_template"` } @@ -32,10 +31,10 @@ type TemplateTimelineEntry struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTemplateTimelineEntry(historyDate time.Time, historyType HistoryTypeEnum, historyTemplate TemplateTimelineEntryHistoryTemplate) *TemplateTimelineEntry { +func NewTemplateTimelineEntry(historyType HistoryTypeEnum, modifiedAt NullableTime, historyTemplate TemplateTimelineEntryHistoryTemplate) *TemplateTimelineEntry { this := TemplateTimelineEntry{} - this.HistoryDate = historyDate this.HistoryType = historyType + this.ModifiedAt = modifiedAt this.HistoryTemplate = historyTemplate return &this } @@ -48,94 +47,86 @@ func NewTemplateTimelineEntryWithDefaults() *TemplateTimelineEntry { return &this } -// GetHistoryDate returns the HistoryDate field value -func (o *TemplateTimelineEntry) GetHistoryDate() time.Time { +// GetHistoryType returns the HistoryType field value +func (o *TemplateTimelineEntry) GetHistoryType() HistoryTypeEnum { if o == nil { - var ret time.Time + var ret HistoryTypeEnum return ret } - return o.HistoryDate + return o.HistoryType } -// GetHistoryDateOk returns a tuple with the HistoryDate field value +// GetHistoryTypeOk returns a tuple with the HistoryType field value // and a boolean to check if the value has been set. -func (o *TemplateTimelineEntry) GetHistoryDateOk() (*time.Time, bool) { +func (o *TemplateTimelineEntry) GetHistoryTypeOk() (*HistoryTypeEnum, bool) { if o == nil { return nil, false } - return &o.HistoryDate, true + return &o.HistoryType, true } -// SetHistoryDate sets field value -func (o *TemplateTimelineEntry) SetHistoryDate(v time.Time) { - o.HistoryDate = v +// SetHistoryType sets field value +func (o *TemplateTimelineEntry) SetHistoryType(v HistoryTypeEnum) { + o.HistoryType = v } -// GetHistoryType returns the HistoryType field value -func (o *TemplateTimelineEntry) GetHistoryType() HistoryTypeEnum { - if o == nil { - var ret HistoryTypeEnum +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *TemplateTimelineEntry) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time return ret } - return o.HistoryType + return *o.ModifiedAt.Get() } -// GetHistoryTypeOk returns a tuple with the HistoryType field value +// GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. -func (o *TemplateTimelineEntry) GetHistoryTypeOk() (*HistoryTypeEnum, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateTimelineEntry) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.HistoryType, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } -// SetHistoryType sets field value -func (o *TemplateTimelineEntry) SetHistoryType(v HistoryTypeEnum) { - o.HistoryType = v +// SetModifiedAt sets field value +func (o *TemplateTimelineEntry) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) } -// GetHistoryUser returns the HistoryUser field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TemplateTimelineEntry) GetHistoryUser() string { - if o == nil || IsNil(o.HistoryUser.Get()) { +// GetModifiedBy returns the ModifiedBy field value if set, zero value otherwise. +func (o *TemplateTimelineEntry) GetModifiedBy() string { + if o == nil || IsNil(o.ModifiedBy) { var ret string return ret } - return *o.HistoryUser.Get() + return *o.ModifiedBy } -// GetHistoryUserOk returns a tuple with the HistoryUser field value if set, nil otherwise +// GetModifiedByOk returns a tuple with the ModifiedBy field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TemplateTimelineEntry) GetHistoryUserOk() (*string, bool) { - if o == nil { +func (o *TemplateTimelineEntry) GetModifiedByOk() (*string, bool) { + if o == nil || IsNil(o.ModifiedBy) { return nil, false } - return o.HistoryUser.Get(), o.HistoryUser.IsSet() + return o.ModifiedBy, true } -// HasHistoryUser returns a boolean if a field has been set. -func (o *TemplateTimelineEntry) HasHistoryUser() bool { - if o != nil && o.HistoryUser.IsSet() { +// HasModifiedBy returns a boolean if a field has been set. +func (o *TemplateTimelineEntry) HasModifiedBy() bool { + if o != nil && !IsNil(o.ModifiedBy) { return true } return false } -// SetHistoryUser gets a reference to the given NullableString and assigns it to the HistoryUser field. -func (o *TemplateTimelineEntry) SetHistoryUser(v string) { - o.HistoryUser.Set(&v) -} -// SetHistoryUserNil sets the value for HistoryUser to be an explicit nil -func (o *TemplateTimelineEntry) SetHistoryUserNil() { - o.HistoryUser.Set(nil) -} - -// UnsetHistoryUser ensures that no value is present for HistoryUser, not even an explicit nil -func (o *TemplateTimelineEntry) UnsetHistoryUser() { - o.HistoryUser.Unset() +// SetModifiedBy gets a reference to the given string and assigns it to the ModifiedBy field. +func (o *TemplateTimelineEntry) SetModifiedBy(v string) { + o.ModifiedBy = &v } // GetHistoryTemplate returns the HistoryTemplate field value @@ -172,10 +163,10 @@ func (o TemplateTimelineEntry) MarshalJSON() ([]byte, error) { func (o TemplateTimelineEntry) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["history_date"] = o.HistoryDate toSerialize["history_type"] = o.HistoryType - if o.HistoryUser.IsSet() { - toSerialize["history_user"] = o.HistoryUser.Get() + toSerialize["modified_at"] = o.ModifiedAt.Get() + if !IsNil(o.ModifiedBy) { + toSerialize["modified_by"] = o.ModifiedBy } toSerialize["history_template"] = o.HistoryTemplate return toSerialize, nil diff --git a/pkg/cloudtruthapi/model_template_timeline_entry_history_template.go b/pkg/cloudtruthapi/model_template_timeline_entry_history_template.go index 5253034..606d541 100644 --- a/pkg/cloudtruthapi/model_template_timeline_entry_history_template.go +++ b/pkg/cloudtruthapi/model_template_timeline_entry_history_template.go @@ -20,11 +20,10 @@ var _ MappedNullable = &TemplateTimelineEntryHistoryTemplate{} // TemplateTimelineEntryHistoryTemplate The template record as it was when archived for history. type TemplateTimelineEntryHistoryTemplate struct { - // A unique identifier for the parameter. Id string `json:"id"` + LedgerId string `json:"ledger_id"` // The parameter name. Name string `json:"name"` - // A description of the parameter. You may find it helpful to document how this parameter is used to assist others when they need to maintain software that uses this content. Description *string `json:"description,omitempty"` // The content of the template. Use mustache-style templating delimiters of `{{` and `}}` to reference parameter values by name for substitution into the template result. Body *string `json:"body,omitempty"` @@ -34,9 +33,10 @@ type TemplateTimelineEntryHistoryTemplate struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTemplateTimelineEntryHistoryTemplate(id string, name string) *TemplateTimelineEntryHistoryTemplate { +func NewTemplateTimelineEntryHistoryTemplate(id string, ledgerId string, name string) *TemplateTimelineEntryHistoryTemplate { this := TemplateTimelineEntryHistoryTemplate{} this.Id = id + this.LedgerId = ledgerId this.Name = name return &this } @@ -73,6 +73,30 @@ func (o *TemplateTimelineEntryHistoryTemplate) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *TemplateTimelineEntryHistoryTemplate) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *TemplateTimelineEntryHistoryTemplate) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *TemplateTimelineEntryHistoryTemplate) SetLedgerId(v string) { + o.LedgerId = v +} + // GetName returns the Name field value func (o *TemplateTimelineEntryHistoryTemplate) GetName() string { if o == nil { @@ -172,6 +196,7 @@ func (o TemplateTimelineEntryHistoryTemplate) MarshalJSON() ([]byte, error) { func (o TemplateTimelineEntryHistoryTemplate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId toSerialize["name"] = o.Name if !IsNil(o.Description) { toSerialize["description"] = o.Description diff --git a/pkg/cloudtruthapi/model_template_timeline_entry_template.go b/pkg/cloudtruthapi/model_template_timeline_entry_template.go index cdbd0c9..d113fe2 100644 --- a/pkg/cloudtruthapi/model_template_timeline_entry_template.go +++ b/pkg/cloudtruthapi/model_template_timeline_entry_template.go @@ -20,11 +20,10 @@ var _ MappedNullable = &TemplateTimelineEntryTemplate{} // TemplateTimelineEntryTemplate Helper methods for all views or serializers that expose template concepts. type TemplateTimelineEntryTemplate struct { - // A unique identifier for the parameter. Id string `json:"id"` + LedgerId string `json:"ledger_id"` // The parameter name. Name string `json:"name"` - // A description of the parameter. You may find it helpful to document how this parameter is used to assist others when they need to maintain software that uses this content. Description *string `json:"description,omitempty"` // The content of the template. Use mustache-style templating delimiters of `{{` and `}}` to reference parameter values by name for substitution into the template result. Body *string `json:"body,omitempty"` @@ -34,9 +33,10 @@ type TemplateTimelineEntryTemplate struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTemplateTimelineEntryTemplate(id string, name string) *TemplateTimelineEntryTemplate { +func NewTemplateTimelineEntryTemplate(id string, ledgerId string, name string) *TemplateTimelineEntryTemplate { this := TemplateTimelineEntryTemplate{} this.Id = id + this.LedgerId = ledgerId this.Name = name return &this } @@ -73,6 +73,30 @@ func (o *TemplateTimelineEntryTemplate) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *TemplateTimelineEntryTemplate) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *TemplateTimelineEntryTemplate) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *TemplateTimelineEntryTemplate) SetLedgerId(v string) { + o.LedgerId = v +} + // GetName returns the Name field value func (o *TemplateTimelineEntryTemplate) GetName() string { if o == nil { @@ -172,6 +196,7 @@ func (o TemplateTimelineEntryTemplate) MarshalJSON() ([]byte, error) { func (o TemplateTimelineEntryTemplate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId toSerialize["name"] = o.Name if !IsNil(o.Description) { toSerialize["description"] = o.Description diff --git a/pkg/cloudtruthapi/model_template_update.go b/pkg/cloudtruthapi/model_template_update.go new file mode 100644 index 0000000..02d0d48 --- /dev/null +++ b/pkg/cloudtruthapi/model_template_update.go @@ -0,0 +1,305 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the TemplateUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TemplateUpdate{} + +// TemplateUpdate A parameter template in a given project, optionally instantiated against an environment. +type TemplateUpdate struct { + Id string `json:"id"` + // The template name. + Name string `json:"name"` + // ('A description of the template. You may find it helpful to document how this template is used to assist others when they need to maintain software that uses this content.',) + Description *string `json:"description,omitempty"` + // If true, the `body` field has undergone evaluation. + Evaluated bool `json:"evaluated"` + // The content of the template. Use mustache-style templating delimiters of `{{` and `}}` to reference parameter values by name for substitution into the template result. + Body *string `json:"body,omitempty"` + CreatedAt time.Time `json:"created_at"` + ModifiedAt NullableTime `json:"modified_at"` +} + +// NewTemplateUpdate instantiates a new TemplateUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateUpdate(id string, name string, evaluated bool, createdAt time.Time, modifiedAt NullableTime) *TemplateUpdate { + this := TemplateUpdate{} + this.Id = id + this.Name = name + this.Evaluated = evaluated + this.CreatedAt = createdAt + this.ModifiedAt = modifiedAt + return &this +} + +// NewTemplateUpdateWithDefaults instantiates a new TemplateUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateUpdateWithDefaults() *TemplateUpdate { + this := TemplateUpdate{} + return &this +} + +// GetId returns the Id field value +func (o *TemplateUpdate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateUpdate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateUpdate) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateUpdate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateUpdate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateUpdate) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateUpdate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateUpdate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateUpdate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateUpdate) SetDescription(v string) { + o.Description = &v +} + +// GetEvaluated returns the Evaluated field value +func (o *TemplateUpdate) GetEvaluated() bool { + if o == nil { + var ret bool + return ret + } + + return o.Evaluated +} + +// GetEvaluatedOk returns a tuple with the Evaluated field value +// and a boolean to check if the value has been set. +func (o *TemplateUpdate) GetEvaluatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Evaluated, true +} + +// SetEvaluated sets field value +func (o *TemplateUpdate) SetEvaluated(v bool) { + o.Evaluated = v +} + +// GetBody returns the Body field value if set, zero value otherwise. +func (o *TemplateUpdate) GetBody() string { + if o == nil || IsNil(o.Body) { + var ret string + return ret + } + return *o.Body +} + +// GetBodyOk returns a tuple with the Body field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateUpdate) GetBodyOk() (*string, bool) { + if o == nil || IsNil(o.Body) { + return nil, false + } + return o.Body, true +} + +// HasBody returns a boolean if a field has been set. +func (o *TemplateUpdate) HasBody() bool { + if o != nil && !IsNil(o.Body) { + return true + } + + return false +} + +// SetBody gets a reference to the given string and assigns it to the Body field. +func (o *TemplateUpdate) SetBody(v string) { + o.Body = &v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *TemplateUpdate) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *TemplateUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *TemplateUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *TemplateUpdate) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// SetModifiedAt sets field value +func (o *TemplateUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} + +func (o TemplateUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TemplateUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["evaluated"] = o.Evaluated + if !IsNil(o.Body) { + toSerialize["body"] = o.Body + } + toSerialize["created_at"] = o.CreatedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() + return toSerialize, nil +} + +type NullableTemplateUpdate struct { + value *TemplateUpdate + isSet bool +} + +func (v NullableTemplateUpdate) Get() *TemplateUpdate { + return v.value +} + +func (v *NullableTemplateUpdate) Set(val *TemplateUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateUpdate(val *TemplateUpdate) *NullableTemplateUpdate { + return &NullableTemplateUpdate{value: val, isSet: true} +} + +func (v NullableTemplateUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_user.go b/pkg/cloudtruthapi/model_user.go index a074e7b..6985b74 100644 --- a/pkg/cloudtruthapi/model_user.go +++ b/pkg/cloudtruthapi/model_user.go @@ -36,14 +36,14 @@ type User struct { Email NullableString `json:"email"` PictureUrl NullableString `json:"picture_url"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewUser instantiates a new User object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUser(url string, id string, name NullableString, organizationName NullableString, membershipId NullableString, role NullableString, email NullableString, pictureUrl NullableString, createdAt time.Time, modifiedAt time.Time) *User { +func NewUser(url string, id string, name NullableString, organizationName NullableString, membershipId NullableString, role NullableString, email NullableString, pictureUrl NullableString, createdAt time.Time, modifiedAt NullableTime) *User { this := User{} this.Url = url this.Id = id @@ -327,27 +327,29 @@ func (o *User) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *User) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *User) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *User) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o User) MarshalJSON() ([]byte, error) { @@ -372,7 +374,7 @@ func (o User) ToMap() (map[string]interface{}, error) { toSerialize["email"] = o.Email.Get() toSerialize["picture_url"] = o.PictureUrl.Get() toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_value.go b/pkg/cloudtruthapi/model_value.go index ee481ac..9bbbd2b 100644 --- a/pkg/cloudtruthapi/model_value.go +++ b/pkg/cloudtruthapi/model_value.go @@ -21,61 +21,73 @@ var _ MappedNullable = &Value{} // Value A value for a parameter in a given environment. type Value struct { + // The value url. Url string `json:"url"` - // A unique identifier for the value. Id string `json:"id"` + LedgerId string `json:"ledger_id"` + // The active environment this Value is viewed under + ActiveEnvironment string `json:"active_environment"` + // The active environment id this Value is viewed under + ActiveEnvironmentId string `json:"active_environment_id"` + // The name of the environment that this environment is viewed under + ActiveEnvironmentName string `json:"active_environment_name"` // The environment this value is set in. Environment string `json:"environment"` + // The environment id for this value. + EnvironmentId string `json:"environment_id"` // The environment name for this value. This is a convenience to avoid another query against the server to resolve the environment url into a name. EnvironmentName string `json:"environment_name"` - // The earliest tag name this value appears in (within the value's environment). - EarliestTag NullableString `json:"earliest_tag"` // The parameter this value is for. Parameter string `json:"parameter"` - // An external parameter leverages a CloudTruth integration to retrieve content on-demand from an external source. When this is `false` the value is stored by CloudTruth and considered to be _internal_. When this is `true`, the `external_fqn` field must be set. + // The parameter id for this value. + ParameterId string `json:"parameter_id"` External *bool `json:"external,omitempty"` - // The FQN, or Fully-Qualified Name, is the path through the integration to get to the desired content. This must be present and reference a valid integration when the value is `external`. ExternalFqn *string `json:"external_fqn,omitempty"` - // If the value is `external`, the content returned by the integration can be reduced by applying a JMESpath expression. This is valid as long as the content is structured and of a supported format. JMESpath expressions are supported on `json`, `yaml`, and `dotenv` content. - ExternalFilter *string `json:"external_filter,omitempty"` + ExternalFilter NullableString `json:"external_filter,omitempty"` // This field is deprecated and unused. ExternalError NullableString `json:"external_error"` - ExternalStatus NullablePatchedValueExternalStatus `json:"external_status"` - // This is the content to use when resolving the Value for an internal non-secret, or when storing a secret. When storing a secret, this content is stored in your organization's dedicated vault and this field is cleared. This field is required if the value is being created or updated and is `internal`. This field cannot be specified when creating or updating an `external` value. + ExternalStatus NullableValueExternalStatus `json:"external_status"` InternalValue NullableString `json:"internal_value,omitempty"` - // If `true`, apply template substitution rules to this value. If `false`, this value is a literal value. Note: secrets cannot be interpolated. Interpolated *bool `json:"interpolated,omitempty"` - // This is the actual content of the Value for the given parameter in the given environment. If you request secret masking, no secret content will be included in the result and instead a series of asterisks will be used instead for the value. If you request wrapping, the secret content will be wrapped in an envelope that is bound to your JWT token. For more information about secret wrapping, see the docs. Clients applying this value to a shell environment should set `=` even if `value` is the empty string. If `value` is `null`, the client should unset that shell environment variable. + // This is the actual content of the Value for the given parameter in the given environment. If you request secret masking, no secret content will be included in the result and instead a series of asterisks will be used instead for the value. Clients applying this value to a shell environment should set `=` even if `value` is the empty string. If `value` is `null`, the client should unset that shell environment variable. Value NullableString `json:"value"` // If true, the `value` field has undergone template evaluation. Evaluated bool `json:"evaluated"` // Indicates the value content is a secret. Normally this is `true` when the parameter is a secret. It is possible for a parameter to be a secret with a external value that is not a secret. It is not possible to convert a parameter from a secret to a non-secret if any of the values are external and a secret. Clients can check this condition by leveraging this field. It is also possible for a parameter to not be a secret but for this value to be dynamic and reference a Parameter that is a secret. In this case, we indicate the value is a secret. Secret NullableBool `json:"secret"` - // The parameters this value references, if interpolated. + // The projects this value references, if dynamic. This field is not valid for history requests. + ReferencedProjects []string `json:"referenced_projects"` + // The parameters this value references, if dynamic. this field is not valid for history requests. ReferencedParameters []string `json:"referenced_parameters"` - // The templates this value references, if interpolated. + // The templates this value references, if dynamic. This field is not valid for history requests. ReferencedTemplates []string `json:"referenced_templates"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } // NewValue instantiates a new Value object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewValue(url string, id string, environment string, environmentName string, earliestTag NullableString, parameter string, externalError NullableString, externalStatus NullablePatchedValueExternalStatus, value NullableString, evaluated bool, secret NullableBool, referencedParameters []string, referencedTemplates []string, createdAt time.Time, modifiedAt time.Time) *Value { +func NewValue(url string, id string, ledgerId string, activeEnvironment string, activeEnvironmentId string, activeEnvironmentName string, environment string, environmentId string, environmentName string, parameter string, parameterId string, externalError NullableString, externalStatus NullableValueExternalStatus, value NullableString, evaluated bool, secret NullableBool, referencedProjects []string, referencedParameters []string, referencedTemplates []string, createdAt time.Time, modifiedAt NullableTime) *Value { this := Value{} this.Url = url this.Id = id + this.LedgerId = ledgerId + this.ActiveEnvironment = activeEnvironment + this.ActiveEnvironmentId = activeEnvironmentId + this.ActiveEnvironmentName = activeEnvironmentName this.Environment = environment + this.EnvironmentId = environmentId this.EnvironmentName = environmentName - this.EarliestTag = earliestTag this.Parameter = parameter + this.ParameterId = parameterId this.ExternalError = externalError this.ExternalStatus = externalStatus this.Value = value this.Evaluated = evaluated this.Secret = secret + this.ReferencedProjects = referencedProjects this.ReferencedParameters = referencedParameters this.ReferencedTemplates = referencedTemplates this.CreatedAt = createdAt @@ -139,6 +151,102 @@ func (o *Value) SetId(v string) { o.Id = v } +// GetLedgerId returns the LedgerId field value +func (o *Value) GetLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.LedgerId +} + +// GetLedgerIdOk returns a tuple with the LedgerId field value +// and a boolean to check if the value has been set. +func (o *Value) GetLedgerIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LedgerId, true +} + +// SetLedgerId sets field value +func (o *Value) SetLedgerId(v string) { + o.LedgerId = v +} + +// GetActiveEnvironment returns the ActiveEnvironment field value +func (o *Value) GetActiveEnvironment() string { + if o == nil { + var ret string + return ret + } + + return o.ActiveEnvironment +} + +// GetActiveEnvironmentOk returns a tuple with the ActiveEnvironment field value +// and a boolean to check if the value has been set. +func (o *Value) GetActiveEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ActiveEnvironment, true +} + +// SetActiveEnvironment sets field value +func (o *Value) SetActiveEnvironment(v string) { + o.ActiveEnvironment = v +} + +// GetActiveEnvironmentId returns the ActiveEnvironmentId field value +func (o *Value) GetActiveEnvironmentId() string { + if o == nil { + var ret string + return ret + } + + return o.ActiveEnvironmentId +} + +// GetActiveEnvironmentIdOk returns a tuple with the ActiveEnvironmentId field value +// and a boolean to check if the value has been set. +func (o *Value) GetActiveEnvironmentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ActiveEnvironmentId, true +} + +// SetActiveEnvironmentId sets field value +func (o *Value) SetActiveEnvironmentId(v string) { + o.ActiveEnvironmentId = v +} + +// GetActiveEnvironmentName returns the ActiveEnvironmentName field value +func (o *Value) GetActiveEnvironmentName() string { + if o == nil { + var ret string + return ret + } + + return o.ActiveEnvironmentName +} + +// GetActiveEnvironmentNameOk returns a tuple with the ActiveEnvironmentName field value +// and a boolean to check if the value has been set. +func (o *Value) GetActiveEnvironmentNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ActiveEnvironmentName, true +} + +// SetActiveEnvironmentName sets field value +func (o *Value) SetActiveEnvironmentName(v string) { + o.ActiveEnvironmentName = v +} + // GetEnvironment returns the Environment field value func (o *Value) GetEnvironment() string { if o == nil { @@ -163,54 +271,52 @@ func (o *Value) SetEnvironment(v string) { o.Environment = v } -// GetEnvironmentName returns the EnvironmentName field value -func (o *Value) GetEnvironmentName() string { +// GetEnvironmentId returns the EnvironmentId field value +func (o *Value) GetEnvironmentId() string { if o == nil { var ret string return ret } - return o.EnvironmentName + return o.EnvironmentId } -// GetEnvironmentNameOk returns a tuple with the EnvironmentName field value +// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value // and a boolean to check if the value has been set. -func (o *Value) GetEnvironmentNameOk() (*string, bool) { +func (o *Value) GetEnvironmentIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.EnvironmentName, true + return &o.EnvironmentId, true } -// SetEnvironmentName sets field value -func (o *Value) SetEnvironmentName(v string) { - o.EnvironmentName = v +// SetEnvironmentId sets field value +func (o *Value) SetEnvironmentId(v string) { + o.EnvironmentId = v } -// GetEarliestTag returns the EarliestTag field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Value) GetEarliestTag() string { - if o == nil || o.EarliestTag.Get() == nil { +// GetEnvironmentName returns the EnvironmentName field value +func (o *Value) GetEnvironmentName() string { + if o == nil { var ret string return ret } - return *o.EarliestTag.Get() + return o.EnvironmentName } -// GetEarliestTagOk returns a tuple with the EarliestTag field value +// GetEnvironmentNameOk returns a tuple with the EnvironmentName field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Value) GetEarliestTagOk() (*string, bool) { +func (o *Value) GetEnvironmentNameOk() (*string, bool) { if o == nil { return nil, false } - return o.EarliestTag.Get(), o.EarliestTag.IsSet() + return &o.EnvironmentName, true } -// SetEarliestTag sets field value -func (o *Value) SetEarliestTag(v string) { - o.EarliestTag.Set(&v) +// SetEnvironmentName sets field value +func (o *Value) SetEnvironmentName(v string) { + o.EnvironmentName = v } // GetParameter returns the Parameter field value @@ -237,6 +343,30 @@ func (o *Value) SetParameter(v string) { o.Parameter = v } +// GetParameterId returns the ParameterId field value +func (o *Value) GetParameterId() string { + if o == nil { + var ret string + return ret + } + + return o.ParameterId +} + +// GetParameterIdOk returns a tuple with the ParameterId field value +// and a boolean to check if the value has been set. +func (o *Value) GetParameterIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ParameterId, true +} + +// SetParameterId sets field value +func (o *Value) SetParameterId(v string) { + o.ParameterId = v +} + // GetExternal returns the External field value if set, zero value otherwise. func (o *Value) GetExternal() bool { if o == nil || IsNil(o.External) { @@ -301,36 +431,46 @@ func (o *Value) SetExternalFqn(v string) { o.ExternalFqn = &v } -// GetExternalFilter returns the ExternalFilter field value if set, zero value otherwise. +// GetExternalFilter returns the ExternalFilter field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Value) GetExternalFilter() string { - if o == nil || IsNil(o.ExternalFilter) { + if o == nil || IsNil(o.ExternalFilter.Get()) { var ret string return ret } - return *o.ExternalFilter + return *o.ExternalFilter.Get() } // GetExternalFilterOk returns a tuple with the ExternalFilter field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Value) GetExternalFilterOk() (*string, bool) { - if o == nil || IsNil(o.ExternalFilter) { + if o == nil { return nil, false } - return o.ExternalFilter, true + return o.ExternalFilter.Get(), o.ExternalFilter.IsSet() } // HasExternalFilter returns a boolean if a field has been set. func (o *Value) HasExternalFilter() bool { - if o != nil && !IsNil(o.ExternalFilter) { + if o != nil && o.ExternalFilter.IsSet() { return true } return false } -// SetExternalFilter gets a reference to the given string and assigns it to the ExternalFilter field. +// SetExternalFilter gets a reference to the given NullableString and assigns it to the ExternalFilter field. func (o *Value) SetExternalFilter(v string) { - o.ExternalFilter = &v + o.ExternalFilter.Set(&v) +} +// SetExternalFilterNil sets the value for ExternalFilter to be an explicit nil +func (o *Value) SetExternalFilterNil() { + o.ExternalFilter.Set(nil) +} + +// UnsetExternalFilter ensures that no value is present for ExternalFilter, not even an explicit nil +func (o *Value) UnsetExternalFilter() { + o.ExternalFilter.Unset() } // GetExternalError returns the ExternalError field value @@ -360,10 +500,10 @@ func (o *Value) SetExternalError(v string) { } // GetExternalStatus returns the ExternalStatus field value -// If the value is explicit nil, the zero value for PatchedValueExternalStatus will be returned -func (o *Value) GetExternalStatus() PatchedValueExternalStatus { +// If the value is explicit nil, the zero value for ValueExternalStatus will be returned +func (o *Value) GetExternalStatus() ValueExternalStatus { if o == nil || o.ExternalStatus.Get() == nil { - var ret PatchedValueExternalStatus + var ret ValueExternalStatus return ret } @@ -373,7 +513,7 @@ func (o *Value) GetExternalStatus() PatchedValueExternalStatus { // GetExternalStatusOk returns a tuple with the ExternalStatus field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Value) GetExternalStatusOk() (*PatchedValueExternalStatus, bool) { +func (o *Value) GetExternalStatusOk() (*ValueExternalStatus, bool) { if o == nil { return nil, false } @@ -381,7 +521,7 @@ func (o *Value) GetExternalStatusOk() (*PatchedValueExternalStatus, bool) { } // SetExternalStatus sets field value -func (o *Value) SetExternalStatus(v PatchedValueExternalStatus) { +func (o *Value) SetExternalStatus(v ValueExternalStatus) { o.ExternalStatus.Set(&v) } @@ -535,6 +675,30 @@ func (o *Value) SetSecret(v bool) { o.Secret.Set(&v) } +// GetReferencedProjects returns the ReferencedProjects field value +func (o *Value) GetReferencedProjects() []string { + if o == nil { + var ret []string + return ret + } + + return o.ReferencedProjects +} + +// GetReferencedProjectsOk returns a tuple with the ReferencedProjects field value +// and a boolean to check if the value has been set. +func (o *Value) GetReferencedProjectsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ReferencedProjects, true +} + +// SetReferencedProjects sets field value +func (o *Value) SetReferencedProjects(v []string) { + o.ReferencedProjects = v +} + // GetReferencedParameters returns the ReferencedParameters field value func (o *Value) GetReferencedParameters() []string { if o == nil { @@ -608,27 +772,29 @@ func (o *Value) SetCreatedAt(v time.Time) { } // GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *Value) GetModifiedAt() time.Time { - if o == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Value) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value func (o *Value) SetModifiedAt(v time.Time) { - o.ModifiedAt = v + o.ModifiedAt.Set(&v) } func (o Value) MarshalJSON() ([]byte, error) { @@ -643,18 +809,23 @@ func (o Value) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id + toSerialize["ledger_id"] = o.LedgerId + toSerialize["active_environment"] = o.ActiveEnvironment + toSerialize["active_environment_id"] = o.ActiveEnvironmentId + toSerialize["active_environment_name"] = o.ActiveEnvironmentName toSerialize["environment"] = o.Environment + toSerialize["environment_id"] = o.EnvironmentId toSerialize["environment_name"] = o.EnvironmentName - toSerialize["earliest_tag"] = o.EarliestTag.Get() toSerialize["parameter"] = o.Parameter + toSerialize["parameter_id"] = o.ParameterId if !IsNil(o.External) { toSerialize["external"] = o.External } if !IsNil(o.ExternalFqn) { toSerialize["external_fqn"] = o.ExternalFqn } - if !IsNil(o.ExternalFilter) { - toSerialize["external_filter"] = o.ExternalFilter + if o.ExternalFilter.IsSet() { + toSerialize["external_filter"] = o.ExternalFilter.Get() } toSerialize["external_error"] = o.ExternalError.Get() toSerialize["external_status"] = o.ExternalStatus.Get() @@ -667,10 +838,11 @@ func (o Value) ToMap() (map[string]interface{}, error) { toSerialize["value"] = o.Value.Get() toSerialize["evaluated"] = o.Evaluated toSerialize["secret"] = o.Secret.Get() + toSerialize["referenced_projects"] = o.ReferencedProjects toSerialize["referenced_parameters"] = o.ReferencedParameters toSerialize["referenced_templates"] = o.ReferencedTemplates toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } diff --git a/pkg/cloudtruthapi/model_value_create.go b/pkg/cloudtruthapi/model_value_create.go index cb3727c..4ecbc78 100644 --- a/pkg/cloudtruthapi/model_value_create.go +++ b/pkg/cloudtruthapi/model_value_create.go @@ -28,7 +28,7 @@ type ValueCreate struct { ExternalFqn *string `json:"external_fqn,omitempty"` // If the value is `external`, the content returned by the integration can be reduced by applying a JMESpath expression. This is valid as long as the content is structured and of a supported format. JMESpath expressions are supported on `json`, `yaml`, and `dotenv` content. ExternalFilter *string `json:"external_filter,omitempty"` - // This is the content to use when resolving the Value for an internal non-secret, or when storing a secret. When storing a secret, this content is stored in your organization's dedicated vault and this field is cleared. This field is required if the value is being created or updated and is `internal`. This field cannot be specified when creating or updating an `external` value. + // This is the content to use when resolving the Value for an internal non-secret, or when storing a secret. This field cannot be specified when creating or updating an `external` value. InternalValue NullableString `json:"internal_value,omitempty"` // If `true`, apply template substitution rules to this value. If `false`, this value is a literal value. Note: secrets cannot be interpolated. Interpolated *bool `json:"interpolated,omitempty"` diff --git a/pkg/cloudtruthapi/model_patched_value_external_status.go b/pkg/cloudtruthapi/model_value_external_status.go similarity index 72% rename from pkg/cloudtruthapi/model_patched_value_external_status.go rename to pkg/cloudtruthapi/model_value_external_status.go index 3319f6b..23be629 100644 --- a/pkg/cloudtruthapi/model_patched_value_external_status.go +++ b/pkg/cloudtruthapi/model_value_external_status.go @@ -16,11 +16,11 @@ import ( "time" ) -// checks if the PatchedValueExternalStatus type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchedValueExternalStatus{} +// checks if the ValueExternalStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValueExternalStatus{} -// PatchedValueExternalStatus The most recent mapped pull status for an external value. -type PatchedValueExternalStatus struct { +// ValueExternalStatus The most recent mapped pull status for an external value. +type ValueExternalStatus struct { Url string `json:"url"` // Unique identifier for a task step. Id string `json:"id"` @@ -60,15 +60,15 @@ type PatchedValueExternalStatus struct { // Details on the error that occurred during processing. ErrorDetail NullableString `json:"error_detail,omitempty"` CreatedAt time.Time `json:"created_at"` - ModifiedAt time.Time `json:"modified_at"` + ModifiedAt NullableTime `json:"modified_at"` } -// NewPatchedValueExternalStatus instantiates a new PatchedValueExternalStatus object +// NewValueExternalStatus instantiates a new ValueExternalStatus object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPatchedValueExternalStatus(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt time.Time) *PatchedValueExternalStatus { - this := PatchedValueExternalStatus{} +func NewValueExternalStatus(url string, id string, success bool, environment NullableString, project NullableString, parameter NullableString, createdAt time.Time, modifiedAt NullableTime) *ValueExternalStatus { + this := ValueExternalStatus{} this.Url = url this.Id = id this.Success = success @@ -80,16 +80,16 @@ func NewPatchedValueExternalStatus(url string, id string, success bool, environm return &this } -// NewPatchedValueExternalStatusWithDefaults instantiates a new PatchedValueExternalStatus object +// NewValueExternalStatusWithDefaults instantiates a new ValueExternalStatus object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewPatchedValueExternalStatusWithDefaults() *PatchedValueExternalStatus { - this := PatchedValueExternalStatus{} +func NewValueExternalStatusWithDefaults() *ValueExternalStatus { + this := ValueExternalStatus{} return &this } // GetUrl returns the Url field value -func (o *PatchedValueExternalStatus) GetUrl() string { +func (o *ValueExternalStatus) GetUrl() string { if o == nil { var ret string return ret @@ -100,7 +100,7 @@ func (o *PatchedValueExternalStatus) GetUrl() string { // GetUrlOk returns a tuple with the Url field value // and a boolean to check if the value has been set. -func (o *PatchedValueExternalStatus) GetUrlOk() (*string, bool) { +func (o *ValueExternalStatus) GetUrlOk() (*string, bool) { if o == nil { return nil, false } @@ -108,12 +108,12 @@ func (o *PatchedValueExternalStatus) GetUrlOk() (*string, bool) { } // SetUrl sets field value -func (o *PatchedValueExternalStatus) SetUrl(v string) { +func (o *ValueExternalStatus) SetUrl(v string) { o.Url = v } // GetId returns the Id field value -func (o *PatchedValueExternalStatus) GetId() string { +func (o *ValueExternalStatus) GetId() string { if o == nil { var ret string return ret @@ -124,7 +124,7 @@ func (o *PatchedValueExternalStatus) GetId() string { // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. -func (o *PatchedValueExternalStatus) GetIdOk() (*string, bool) { +func (o *ValueExternalStatus) GetIdOk() (*string, bool) { if o == nil { return nil, false } @@ -132,12 +132,12 @@ func (o *PatchedValueExternalStatus) GetIdOk() (*string, bool) { } // SetId sets field value -func (o *PatchedValueExternalStatus) SetId(v string) { +func (o *ValueExternalStatus) SetId(v string) { o.Id = v } // GetOperation returns the Operation field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetOperation() OperationEnum { +func (o *ValueExternalStatus) GetOperation() OperationEnum { if o == nil || IsNil(o.Operation.Get()) { var ret OperationEnum return ret @@ -148,7 +148,7 @@ func (o *PatchedValueExternalStatus) GetOperation() OperationEnum { // GetOperationOk returns a tuple with the Operation field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetOperationOk() (*OperationEnum, bool) { +func (o *ValueExternalStatus) GetOperationOk() (*OperationEnum, bool) { if o == nil { return nil, false } @@ -156,7 +156,7 @@ func (o *PatchedValueExternalStatus) GetOperationOk() (*OperationEnum, bool) { } // HasOperation returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasOperation() bool { +func (o *ValueExternalStatus) HasOperation() bool { if o != nil && o.Operation.IsSet() { return true } @@ -165,21 +165,21 @@ func (o *PatchedValueExternalStatus) HasOperation() bool { } // SetOperation gets a reference to the given NullableOperationEnum and assigns it to the Operation field. -func (o *PatchedValueExternalStatus) SetOperation(v OperationEnum) { +func (o *ValueExternalStatus) SetOperation(v OperationEnum) { o.Operation.Set(&v) } // SetOperationNil sets the value for Operation to be an explicit nil -func (o *PatchedValueExternalStatus) SetOperationNil() { +func (o *ValueExternalStatus) SetOperationNil() { o.Operation.Set(nil) } // UnsetOperation ensures that no value is present for Operation, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetOperation() { +func (o *ValueExternalStatus) UnsetOperation() { o.Operation.Unset() } // GetSuccess returns the Success field value -func (o *PatchedValueExternalStatus) GetSuccess() bool { +func (o *ValueExternalStatus) GetSuccess() bool { if o == nil { var ret bool return ret @@ -190,7 +190,7 @@ func (o *PatchedValueExternalStatus) GetSuccess() bool { // GetSuccessOk returns a tuple with the Success field value // and a boolean to check if the value has been set. -func (o *PatchedValueExternalStatus) GetSuccessOk() (*bool, bool) { +func (o *ValueExternalStatus) GetSuccessOk() (*bool, bool) { if o == nil { return nil, false } @@ -198,12 +198,12 @@ func (o *PatchedValueExternalStatus) GetSuccessOk() (*bool, bool) { } // SetSuccess sets field value -func (o *PatchedValueExternalStatus) SetSuccess(v bool) { +func (o *ValueExternalStatus) SetSuccess(v bool) { o.Success = v } // GetSuccessDetail returns the SuccessDetail field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetSuccessDetail() string { +func (o *ValueExternalStatus) GetSuccessDetail() string { if o == nil || IsNil(o.SuccessDetail.Get()) { var ret string return ret @@ -214,7 +214,7 @@ func (o *PatchedValueExternalStatus) GetSuccessDetail() string { // GetSuccessDetailOk returns a tuple with the SuccessDetail field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetSuccessDetailOk() (*string, bool) { +func (o *ValueExternalStatus) GetSuccessDetailOk() (*string, bool) { if o == nil { return nil, false } @@ -222,7 +222,7 @@ func (o *PatchedValueExternalStatus) GetSuccessDetailOk() (*string, bool) { } // HasSuccessDetail returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasSuccessDetail() bool { +func (o *ValueExternalStatus) HasSuccessDetail() bool { if o != nil && o.SuccessDetail.IsSet() { return true } @@ -231,21 +231,21 @@ func (o *PatchedValueExternalStatus) HasSuccessDetail() bool { } // SetSuccessDetail gets a reference to the given NullableString and assigns it to the SuccessDetail field. -func (o *PatchedValueExternalStatus) SetSuccessDetail(v string) { +func (o *ValueExternalStatus) SetSuccessDetail(v string) { o.SuccessDetail.Set(&v) } // SetSuccessDetailNil sets the value for SuccessDetail to be an explicit nil -func (o *PatchedValueExternalStatus) SetSuccessDetailNil() { +func (o *ValueExternalStatus) SetSuccessDetailNil() { o.SuccessDetail.Set(nil) } // UnsetSuccessDetail ensures that no value is present for SuccessDetail, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetSuccessDetail() { +func (o *ValueExternalStatus) UnsetSuccessDetail() { o.SuccessDetail.Unset() } // GetFqn returns the Fqn field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetFqn() string { +func (o *ValueExternalStatus) GetFqn() string { if o == nil || IsNil(o.Fqn.Get()) { var ret string return ret @@ -256,7 +256,7 @@ func (o *PatchedValueExternalStatus) GetFqn() string { // GetFqnOk returns a tuple with the Fqn field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetFqnOk() (*string, bool) { +func (o *ValueExternalStatus) GetFqnOk() (*string, bool) { if o == nil { return nil, false } @@ -264,7 +264,7 @@ func (o *PatchedValueExternalStatus) GetFqnOk() (*string, bool) { } // HasFqn returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasFqn() bool { +func (o *ValueExternalStatus) HasFqn() bool { if o != nil && o.Fqn.IsSet() { return true } @@ -273,22 +273,22 @@ func (o *PatchedValueExternalStatus) HasFqn() bool { } // SetFqn gets a reference to the given NullableString and assigns it to the Fqn field. -func (o *PatchedValueExternalStatus) SetFqn(v string) { +func (o *ValueExternalStatus) SetFqn(v string) { o.Fqn.Set(&v) } // SetFqnNil sets the value for Fqn to be an explicit nil -func (o *PatchedValueExternalStatus) SetFqnNil() { +func (o *ValueExternalStatus) SetFqnNil() { o.Fqn.Set(nil) } // UnsetFqn ensures that no value is present for Fqn, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetFqn() { +func (o *ValueExternalStatus) UnsetFqn() { o.Fqn.Unset() } // GetEnvironment returns the Environment field value // If the value is explicit nil, the zero value for string will be returned -func (o *PatchedValueExternalStatus) GetEnvironment() string { +func (o *ValueExternalStatus) GetEnvironment() string { if o == nil || o.Environment.Get() == nil { var ret string return ret @@ -300,7 +300,7 @@ func (o *PatchedValueExternalStatus) GetEnvironment() string { // GetEnvironmentOk returns a tuple with the Environment field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetEnvironmentOk() (*string, bool) { +func (o *ValueExternalStatus) GetEnvironmentOk() (*string, bool) { if o == nil { return nil, false } @@ -308,12 +308,12 @@ func (o *PatchedValueExternalStatus) GetEnvironmentOk() (*string, bool) { } // SetEnvironment sets field value -func (o *PatchedValueExternalStatus) SetEnvironment(v string) { +func (o *ValueExternalStatus) SetEnvironment(v string) { o.Environment.Set(&v) } // GetEnvironmentId returns the EnvironmentId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetEnvironmentId() string { +func (o *ValueExternalStatus) GetEnvironmentId() string { if o == nil || IsNil(o.EnvironmentId.Get()) { var ret string return ret @@ -324,7 +324,7 @@ func (o *PatchedValueExternalStatus) GetEnvironmentId() string { // GetEnvironmentIdOk returns a tuple with the EnvironmentId field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetEnvironmentIdOk() (*string, bool) { +func (o *ValueExternalStatus) GetEnvironmentIdOk() (*string, bool) { if o == nil { return nil, false } @@ -332,7 +332,7 @@ func (o *PatchedValueExternalStatus) GetEnvironmentIdOk() (*string, bool) { } // HasEnvironmentId returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasEnvironmentId() bool { +func (o *ValueExternalStatus) HasEnvironmentId() bool { if o != nil && o.EnvironmentId.IsSet() { return true } @@ -341,21 +341,21 @@ func (o *PatchedValueExternalStatus) HasEnvironmentId() bool { } // SetEnvironmentId gets a reference to the given NullableString and assigns it to the EnvironmentId field. -func (o *PatchedValueExternalStatus) SetEnvironmentId(v string) { +func (o *ValueExternalStatus) SetEnvironmentId(v string) { o.EnvironmentId.Set(&v) } // SetEnvironmentIdNil sets the value for EnvironmentId to be an explicit nil -func (o *PatchedValueExternalStatus) SetEnvironmentIdNil() { +func (o *ValueExternalStatus) SetEnvironmentIdNil() { o.EnvironmentId.Set(nil) } // UnsetEnvironmentId ensures that no value is present for EnvironmentId, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetEnvironmentId() { +func (o *ValueExternalStatus) UnsetEnvironmentId() { o.EnvironmentId.Unset() } // GetEnvironmentName returns the EnvironmentName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetEnvironmentName() string { +func (o *ValueExternalStatus) GetEnvironmentName() string { if o == nil || IsNil(o.EnvironmentName.Get()) { var ret string return ret @@ -366,7 +366,7 @@ func (o *PatchedValueExternalStatus) GetEnvironmentName() string { // GetEnvironmentNameOk returns a tuple with the EnvironmentName field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetEnvironmentNameOk() (*string, bool) { +func (o *ValueExternalStatus) GetEnvironmentNameOk() (*string, bool) { if o == nil { return nil, false } @@ -374,7 +374,7 @@ func (o *PatchedValueExternalStatus) GetEnvironmentNameOk() (*string, bool) { } // HasEnvironmentName returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasEnvironmentName() bool { +func (o *ValueExternalStatus) HasEnvironmentName() bool { if o != nil && o.EnvironmentName.IsSet() { return true } @@ -383,22 +383,22 @@ func (o *PatchedValueExternalStatus) HasEnvironmentName() bool { } // SetEnvironmentName gets a reference to the given NullableString and assigns it to the EnvironmentName field. -func (o *PatchedValueExternalStatus) SetEnvironmentName(v string) { +func (o *ValueExternalStatus) SetEnvironmentName(v string) { o.EnvironmentName.Set(&v) } // SetEnvironmentNameNil sets the value for EnvironmentName to be an explicit nil -func (o *PatchedValueExternalStatus) SetEnvironmentNameNil() { +func (o *ValueExternalStatus) SetEnvironmentNameNil() { o.EnvironmentName.Set(nil) } // UnsetEnvironmentName ensures that no value is present for EnvironmentName, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetEnvironmentName() { +func (o *ValueExternalStatus) UnsetEnvironmentName() { o.EnvironmentName.Unset() } // GetProject returns the Project field value // If the value is explicit nil, the zero value for string will be returned -func (o *PatchedValueExternalStatus) GetProject() string { +func (o *ValueExternalStatus) GetProject() string { if o == nil || o.Project.Get() == nil { var ret string return ret @@ -410,7 +410,7 @@ func (o *PatchedValueExternalStatus) GetProject() string { // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetProjectOk() (*string, bool) { +func (o *ValueExternalStatus) GetProjectOk() (*string, bool) { if o == nil { return nil, false } @@ -418,12 +418,12 @@ func (o *PatchedValueExternalStatus) GetProjectOk() (*string, bool) { } // SetProject sets field value -func (o *PatchedValueExternalStatus) SetProject(v string) { +func (o *ValueExternalStatus) SetProject(v string) { o.Project.Set(&v) } // GetProjectId returns the ProjectId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetProjectId() string { +func (o *ValueExternalStatus) GetProjectId() string { if o == nil || IsNil(o.ProjectId.Get()) { var ret string return ret @@ -434,7 +434,7 @@ func (o *PatchedValueExternalStatus) GetProjectId() string { // GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetProjectIdOk() (*string, bool) { +func (o *ValueExternalStatus) GetProjectIdOk() (*string, bool) { if o == nil { return nil, false } @@ -442,7 +442,7 @@ func (o *PatchedValueExternalStatus) GetProjectIdOk() (*string, bool) { } // HasProjectId returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasProjectId() bool { +func (o *ValueExternalStatus) HasProjectId() bool { if o != nil && o.ProjectId.IsSet() { return true } @@ -451,21 +451,21 @@ func (o *PatchedValueExternalStatus) HasProjectId() bool { } // SetProjectId gets a reference to the given NullableString and assigns it to the ProjectId field. -func (o *PatchedValueExternalStatus) SetProjectId(v string) { +func (o *ValueExternalStatus) SetProjectId(v string) { o.ProjectId.Set(&v) } // SetProjectIdNil sets the value for ProjectId to be an explicit nil -func (o *PatchedValueExternalStatus) SetProjectIdNil() { +func (o *ValueExternalStatus) SetProjectIdNil() { o.ProjectId.Set(nil) } // UnsetProjectId ensures that no value is present for ProjectId, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetProjectId() { +func (o *ValueExternalStatus) UnsetProjectId() { o.ProjectId.Unset() } // GetProjectName returns the ProjectName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetProjectName() string { +func (o *ValueExternalStatus) GetProjectName() string { if o == nil || IsNil(o.ProjectName.Get()) { var ret string return ret @@ -476,7 +476,7 @@ func (o *PatchedValueExternalStatus) GetProjectName() string { // GetProjectNameOk returns a tuple with the ProjectName field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetProjectNameOk() (*string, bool) { +func (o *ValueExternalStatus) GetProjectNameOk() (*string, bool) { if o == nil { return nil, false } @@ -484,7 +484,7 @@ func (o *PatchedValueExternalStatus) GetProjectNameOk() (*string, bool) { } // HasProjectName returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasProjectName() bool { +func (o *ValueExternalStatus) HasProjectName() bool { if o != nil && o.ProjectName.IsSet() { return true } @@ -493,22 +493,22 @@ func (o *PatchedValueExternalStatus) HasProjectName() bool { } // SetProjectName gets a reference to the given NullableString and assigns it to the ProjectName field. -func (o *PatchedValueExternalStatus) SetProjectName(v string) { +func (o *ValueExternalStatus) SetProjectName(v string) { o.ProjectName.Set(&v) } // SetProjectNameNil sets the value for ProjectName to be an explicit nil -func (o *PatchedValueExternalStatus) SetProjectNameNil() { +func (o *ValueExternalStatus) SetProjectNameNil() { o.ProjectName.Set(nil) } // UnsetProjectName ensures that no value is present for ProjectName, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetProjectName() { +func (o *ValueExternalStatus) UnsetProjectName() { o.ProjectName.Unset() } // GetParameter returns the Parameter field value // If the value is explicit nil, the zero value for string will be returned -func (o *PatchedValueExternalStatus) GetParameter() string { +func (o *ValueExternalStatus) GetParameter() string { if o == nil || o.Parameter.Get() == nil { var ret string return ret @@ -520,7 +520,7 @@ func (o *PatchedValueExternalStatus) GetParameter() string { // GetParameterOk returns a tuple with the Parameter field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetParameterOk() (*string, bool) { +func (o *ValueExternalStatus) GetParameterOk() (*string, bool) { if o == nil { return nil, false } @@ -528,12 +528,12 @@ func (o *PatchedValueExternalStatus) GetParameterOk() (*string, bool) { } // SetParameter sets field value -func (o *PatchedValueExternalStatus) SetParameter(v string) { +func (o *ValueExternalStatus) SetParameter(v string) { o.Parameter.Set(&v) } // GetParameterId returns the ParameterId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetParameterId() string { +func (o *ValueExternalStatus) GetParameterId() string { if o == nil || IsNil(o.ParameterId.Get()) { var ret string return ret @@ -544,7 +544,7 @@ func (o *PatchedValueExternalStatus) GetParameterId() string { // GetParameterIdOk returns a tuple with the ParameterId field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetParameterIdOk() (*string, bool) { +func (o *ValueExternalStatus) GetParameterIdOk() (*string, bool) { if o == nil { return nil, false } @@ -552,7 +552,7 @@ func (o *PatchedValueExternalStatus) GetParameterIdOk() (*string, bool) { } // HasParameterId returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasParameterId() bool { +func (o *ValueExternalStatus) HasParameterId() bool { if o != nil && o.ParameterId.IsSet() { return true } @@ -561,21 +561,21 @@ func (o *PatchedValueExternalStatus) HasParameterId() bool { } // SetParameterId gets a reference to the given NullableString and assigns it to the ParameterId field. -func (o *PatchedValueExternalStatus) SetParameterId(v string) { +func (o *ValueExternalStatus) SetParameterId(v string) { o.ParameterId.Set(&v) } // SetParameterIdNil sets the value for ParameterId to be an explicit nil -func (o *PatchedValueExternalStatus) SetParameterIdNil() { +func (o *ValueExternalStatus) SetParameterIdNil() { o.ParameterId.Set(nil) } // UnsetParameterId ensures that no value is present for ParameterId, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetParameterId() { +func (o *ValueExternalStatus) UnsetParameterId() { o.ParameterId.Unset() } // GetParameterName returns the ParameterName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetParameterName() string { +func (o *ValueExternalStatus) GetParameterName() string { if o == nil || IsNil(o.ParameterName.Get()) { var ret string return ret @@ -586,7 +586,7 @@ func (o *PatchedValueExternalStatus) GetParameterName() string { // GetParameterNameOk returns a tuple with the ParameterName field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetParameterNameOk() (*string, bool) { +func (o *ValueExternalStatus) GetParameterNameOk() (*string, bool) { if o == nil { return nil, false } @@ -594,7 +594,7 @@ func (o *PatchedValueExternalStatus) GetParameterNameOk() (*string, bool) { } // HasParameterName returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasParameterName() bool { +func (o *ValueExternalStatus) HasParameterName() bool { if o != nil && o.ParameterName.IsSet() { return true } @@ -603,21 +603,21 @@ func (o *PatchedValueExternalStatus) HasParameterName() bool { } // SetParameterName gets a reference to the given NullableString and assigns it to the ParameterName field. -func (o *PatchedValueExternalStatus) SetParameterName(v string) { +func (o *ValueExternalStatus) SetParameterName(v string) { o.ParameterName.Set(&v) } // SetParameterNameNil sets the value for ParameterName to be an explicit nil -func (o *PatchedValueExternalStatus) SetParameterNameNil() { +func (o *ValueExternalStatus) SetParameterNameNil() { o.ParameterName.Set(nil) } // UnsetParameterName ensures that no value is present for ParameterName, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetParameterName() { +func (o *ValueExternalStatus) UnsetParameterName() { o.ParameterName.Unset() } // GetVenueId returns the VenueId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetVenueId() string { +func (o *ValueExternalStatus) GetVenueId() string { if o == nil || IsNil(o.VenueId.Get()) { var ret string return ret @@ -628,7 +628,7 @@ func (o *PatchedValueExternalStatus) GetVenueId() string { // GetVenueIdOk returns a tuple with the VenueId field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetVenueIdOk() (*string, bool) { +func (o *ValueExternalStatus) GetVenueIdOk() (*string, bool) { if o == nil { return nil, false } @@ -636,7 +636,7 @@ func (o *PatchedValueExternalStatus) GetVenueIdOk() (*string, bool) { } // HasVenueId returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasVenueId() bool { +func (o *ValueExternalStatus) HasVenueId() bool { if o != nil && o.VenueId.IsSet() { return true } @@ -645,21 +645,21 @@ func (o *PatchedValueExternalStatus) HasVenueId() bool { } // SetVenueId gets a reference to the given NullableString and assigns it to the VenueId field. -func (o *PatchedValueExternalStatus) SetVenueId(v string) { +func (o *ValueExternalStatus) SetVenueId(v string) { o.VenueId.Set(&v) } // SetVenueIdNil sets the value for VenueId to be an explicit nil -func (o *PatchedValueExternalStatus) SetVenueIdNil() { +func (o *ValueExternalStatus) SetVenueIdNil() { o.VenueId.Set(nil) } // UnsetVenueId ensures that no value is present for VenueId, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetVenueId() { +func (o *ValueExternalStatus) UnsetVenueId() { o.VenueId.Unset() } // GetVenueName returns the VenueName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetVenueName() string { +func (o *ValueExternalStatus) GetVenueName() string { if o == nil || IsNil(o.VenueName.Get()) { var ret string return ret @@ -670,7 +670,7 @@ func (o *PatchedValueExternalStatus) GetVenueName() string { // GetVenueNameOk returns a tuple with the VenueName field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetVenueNameOk() (*string, bool) { +func (o *ValueExternalStatus) GetVenueNameOk() (*string, bool) { if o == nil { return nil, false } @@ -678,7 +678,7 @@ func (o *PatchedValueExternalStatus) GetVenueNameOk() (*string, bool) { } // HasVenueName returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasVenueName() bool { +func (o *ValueExternalStatus) HasVenueName() bool { if o != nil && o.VenueName.IsSet() { return true } @@ -687,21 +687,21 @@ func (o *PatchedValueExternalStatus) HasVenueName() bool { } // SetVenueName gets a reference to the given NullableString and assigns it to the VenueName field. -func (o *PatchedValueExternalStatus) SetVenueName(v string) { +func (o *ValueExternalStatus) SetVenueName(v string) { o.VenueName.Set(&v) } // SetVenueNameNil sets the value for VenueName to be an explicit nil -func (o *PatchedValueExternalStatus) SetVenueNameNil() { +func (o *ValueExternalStatus) SetVenueNameNil() { o.VenueName.Set(nil) } // UnsetVenueName ensures that no value is present for VenueName, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetVenueName() { +func (o *ValueExternalStatus) UnsetVenueName() { o.VenueName.Unset() } // GetSummary returns the Summary field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetSummary() string { +func (o *ValueExternalStatus) GetSummary() string { if o == nil || IsNil(o.Summary.Get()) { var ret string return ret @@ -712,7 +712,7 @@ func (o *PatchedValueExternalStatus) GetSummary() string { // GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetSummaryOk() (*string, bool) { +func (o *ValueExternalStatus) GetSummaryOk() (*string, bool) { if o == nil { return nil, false } @@ -720,7 +720,7 @@ func (o *PatchedValueExternalStatus) GetSummaryOk() (*string, bool) { } // HasSummary returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasSummary() bool { +func (o *ValueExternalStatus) HasSummary() bool { if o != nil && o.Summary.IsSet() { return true } @@ -729,21 +729,21 @@ func (o *PatchedValueExternalStatus) HasSummary() bool { } // SetSummary gets a reference to the given NullableString and assigns it to the Summary field. -func (o *PatchedValueExternalStatus) SetSummary(v string) { +func (o *ValueExternalStatus) SetSummary(v string) { o.Summary.Set(&v) } // SetSummaryNil sets the value for Summary to be an explicit nil -func (o *PatchedValueExternalStatus) SetSummaryNil() { +func (o *ValueExternalStatus) SetSummaryNil() { o.Summary.Set(nil) } // UnsetSummary ensures that no value is present for Summary, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetSummary() { +func (o *ValueExternalStatus) UnsetSummary() { o.Summary.Unset() } // GetErrorCode returns the ErrorCode field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetErrorCode() string { +func (o *ValueExternalStatus) GetErrorCode() string { if o == nil || IsNil(o.ErrorCode.Get()) { var ret string return ret @@ -754,7 +754,7 @@ func (o *PatchedValueExternalStatus) GetErrorCode() string { // GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetErrorCodeOk() (*string, bool) { +func (o *ValueExternalStatus) GetErrorCodeOk() (*string, bool) { if o == nil { return nil, false } @@ -762,7 +762,7 @@ func (o *PatchedValueExternalStatus) GetErrorCodeOk() (*string, bool) { } // HasErrorCode returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasErrorCode() bool { +func (o *ValueExternalStatus) HasErrorCode() bool { if o != nil && o.ErrorCode.IsSet() { return true } @@ -771,21 +771,21 @@ func (o *PatchedValueExternalStatus) HasErrorCode() bool { } // SetErrorCode gets a reference to the given NullableString and assigns it to the ErrorCode field. -func (o *PatchedValueExternalStatus) SetErrorCode(v string) { +func (o *ValueExternalStatus) SetErrorCode(v string) { o.ErrorCode.Set(&v) } // SetErrorCodeNil sets the value for ErrorCode to be an explicit nil -func (o *PatchedValueExternalStatus) SetErrorCodeNil() { +func (o *ValueExternalStatus) SetErrorCodeNil() { o.ErrorCode.Set(nil) } // UnsetErrorCode ensures that no value is present for ErrorCode, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetErrorCode() { +func (o *ValueExternalStatus) UnsetErrorCode() { o.ErrorCode.Unset() } // GetErrorDetail returns the ErrorDetail field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchedValueExternalStatus) GetErrorDetail() string { +func (o *ValueExternalStatus) GetErrorDetail() string { if o == nil || IsNil(o.ErrorDetail.Get()) { var ret string return ret @@ -796,7 +796,7 @@ func (o *PatchedValueExternalStatus) GetErrorDetail() string { // GetErrorDetailOk returns a tuple with the ErrorDetail field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchedValueExternalStatus) GetErrorDetailOk() (*string, bool) { +func (o *ValueExternalStatus) GetErrorDetailOk() (*string, bool) { if o == nil { return nil, false } @@ -804,7 +804,7 @@ func (o *PatchedValueExternalStatus) GetErrorDetailOk() (*string, bool) { } // HasErrorDetail returns a boolean if a field has been set. -func (o *PatchedValueExternalStatus) HasErrorDetail() bool { +func (o *ValueExternalStatus) HasErrorDetail() bool { if o != nil && o.ErrorDetail.IsSet() { return true } @@ -813,21 +813,21 @@ func (o *PatchedValueExternalStatus) HasErrorDetail() bool { } // SetErrorDetail gets a reference to the given NullableString and assigns it to the ErrorDetail field. -func (o *PatchedValueExternalStatus) SetErrorDetail(v string) { +func (o *ValueExternalStatus) SetErrorDetail(v string) { o.ErrorDetail.Set(&v) } // SetErrorDetailNil sets the value for ErrorDetail to be an explicit nil -func (o *PatchedValueExternalStatus) SetErrorDetailNil() { +func (o *ValueExternalStatus) SetErrorDetailNil() { o.ErrorDetail.Set(nil) } // UnsetErrorDetail ensures that no value is present for ErrorDetail, not even an explicit nil -func (o *PatchedValueExternalStatus) UnsetErrorDetail() { +func (o *ValueExternalStatus) UnsetErrorDetail() { o.ErrorDetail.Unset() } // GetCreatedAt returns the CreatedAt field value -func (o *PatchedValueExternalStatus) GetCreatedAt() time.Time { +func (o *ValueExternalStatus) GetCreatedAt() time.Time { if o == nil { var ret time.Time return ret @@ -838,7 +838,7 @@ func (o *PatchedValueExternalStatus) GetCreatedAt() time.Time { // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. -func (o *PatchedValueExternalStatus) GetCreatedAtOk() (*time.Time, bool) { +func (o *ValueExternalStatus) GetCreatedAtOk() (*time.Time, bool) { if o == nil { return nil, false } @@ -846,35 +846,37 @@ func (o *PatchedValueExternalStatus) GetCreatedAtOk() (*time.Time, bool) { } // SetCreatedAt sets field value -func (o *PatchedValueExternalStatus) SetCreatedAt(v time.Time) { +func (o *ValueExternalStatus) SetCreatedAt(v time.Time) { o.CreatedAt = v } // GetModifiedAt returns the ModifiedAt field value -func (o *PatchedValueExternalStatus) GetModifiedAt() time.Time { - if o == nil { +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ValueExternalStatus) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { var ret time.Time return ret } - return o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value // and a boolean to check if the value has been set. -func (o *PatchedValueExternalStatus) GetModifiedAtOk() (*time.Time, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ValueExternalStatus) GetModifiedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // SetModifiedAt sets field value -func (o *PatchedValueExternalStatus) SetModifiedAt(v time.Time) { - o.ModifiedAt = v +func (o *ValueExternalStatus) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) } -func (o PatchedValueExternalStatus) MarshalJSON() ([]byte, error) { +func (o ValueExternalStatus) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err @@ -882,7 +884,7 @@ func (o PatchedValueExternalStatus) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o PatchedValueExternalStatus) ToMap() (map[string]interface{}, error) { +func (o ValueExternalStatus) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["url"] = o.Url toSerialize["id"] = o.Id @@ -933,42 +935,42 @@ func (o PatchedValueExternalStatus) ToMap() (map[string]interface{}, error) { toSerialize["error_detail"] = o.ErrorDetail.Get() } toSerialize["created_at"] = o.CreatedAt - toSerialize["modified_at"] = o.ModifiedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() return toSerialize, nil } -type NullablePatchedValueExternalStatus struct { - value *PatchedValueExternalStatus +type NullableValueExternalStatus struct { + value *ValueExternalStatus isSet bool } -func (v NullablePatchedValueExternalStatus) Get() *PatchedValueExternalStatus { +func (v NullableValueExternalStatus) Get() *ValueExternalStatus { return v.value } -func (v *NullablePatchedValueExternalStatus) Set(val *PatchedValueExternalStatus) { +func (v *NullableValueExternalStatus) Set(val *ValueExternalStatus) { v.value = val v.isSet = true } -func (v NullablePatchedValueExternalStatus) IsSet() bool { +func (v NullableValueExternalStatus) IsSet() bool { return v.isSet } -func (v *NullablePatchedValueExternalStatus) Unset() { +func (v *NullableValueExternalStatus) Unset() { v.value = nil v.isSet = false } -func NewNullablePatchedValueExternalStatus(val *PatchedValueExternalStatus) *NullablePatchedValueExternalStatus { - return &NullablePatchedValueExternalStatus{value: val, isSet: true} +func NewNullableValueExternalStatus(val *ValueExternalStatus) *NullableValueExternalStatus { + return &NullableValueExternalStatus{value: val, isSet: true} } -func (v NullablePatchedValueExternalStatus) MarshalJSON() ([]byte, error) { +func (v NullableValueExternalStatus) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePatchedValueExternalStatus) UnmarshalJSON(src []byte) error { +func (v *NullableValueExternalStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/pkg/cloudtruthapi/model_value_update.go b/pkg/cloudtruthapi/model_value_update.go new file mode 100644 index 0000000..b5382fa --- /dev/null +++ b/pkg/cloudtruthapi/model_value_update.go @@ -0,0 +1,430 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "time" +) + +// checks if the ValueUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValueUpdate{} + +// ValueUpdate Unlike other UpdateSerializers, we do not inherit from the CreateSerializer here because `environment` is not a required field for updates. +type ValueUpdate struct { + Id string `json:"id"` + // An external parameter leverages a CloudTruth integration to retrieve content on-demand from an external source. When this is `false` the value is stored by CloudTruth and considered to be _internal_. When this is `true`, the `external_fqn` field must be set. + External *bool `json:"external,omitempty"` + // The FQN, or Fully-Qualified Name, is the path through the integration to get to the desired content. This must be present and reference a valid integration when the value is `external`. + ExternalFqn *string `json:"external_fqn,omitempty"` + // If the value is `external`, the content returned by the integration can be reduced by applying a JMESpath expression. This is valid as long as the content is structured and of a supported format. JMESpath expressions are supported on `json`, `yaml`, and `dotenv` content. + ExternalFilter *string `json:"external_filter,omitempty"` + // This is the content to use when resolving the Value for an internal non-secret, or when storing a secret. This field cannot be specified when creating or updating an `external` value. + InternalValue NullableString `json:"internal_value,omitempty"` + // If `true`, apply template substitution rules to this value. If `false`, this value is a literal value. Note: secrets cannot be interpolated. + Interpolated *bool `json:"interpolated,omitempty"` + // Indicates the value content is a secret. Normally this is `true` when the parameter is a secret. It is possible for a parameter to be a secret with a external value that is not a secret. It is not possible to convert a parameter from a secret to a non-secret if any of the values are external and a secret. Clients can check this condition by leveraging this field. It is also possible for a parameter to not be a secret but for this value to be dynamic and reference a Parameter that is a secret. In this case, we indicate the value is a secret. + Secret NullableBool `json:"secret"` + // This is the actual content of the Value for the given parameter in the given environment. If you request secret masking, no secret content will be included in the result and instead a series of asterisks will be used instead for the value. Clients applying this value to a shell environment should set `=` even if `value` is the empty string. If `value` is `null`, the client should unset that shell environment variable. + Value NullableString `json:"value"` + CreatedAt time.Time `json:"created_at"` + ModifiedAt NullableTime `json:"modified_at"` +} + +// NewValueUpdate instantiates a new ValueUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValueUpdate(id string, secret NullableBool, value NullableString, createdAt time.Time, modifiedAt NullableTime) *ValueUpdate { + this := ValueUpdate{} + this.Id = id + this.Secret = secret + this.Value = value + this.CreatedAt = createdAt + this.ModifiedAt = modifiedAt + return &this +} + +// NewValueUpdateWithDefaults instantiates a new ValueUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValueUpdateWithDefaults() *ValueUpdate { + this := ValueUpdate{} + return &this +} + +// GetId returns the Id field value +func (o *ValueUpdate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ValueUpdate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ValueUpdate) SetId(v string) { + o.Id = v +} + +// GetExternal returns the External field value if set, zero value otherwise. +func (o *ValueUpdate) GetExternal() bool { + if o == nil || IsNil(o.External) { + var ret bool + return ret + } + return *o.External +} + +// GetExternalOk returns a tuple with the External field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValueUpdate) GetExternalOk() (*bool, bool) { + if o == nil || IsNil(o.External) { + return nil, false + } + return o.External, true +} + +// HasExternal returns a boolean if a field has been set. +func (o *ValueUpdate) HasExternal() bool { + if o != nil && !IsNil(o.External) { + return true + } + + return false +} + +// SetExternal gets a reference to the given bool and assigns it to the External field. +func (o *ValueUpdate) SetExternal(v bool) { + o.External = &v +} + +// GetExternalFqn returns the ExternalFqn field value if set, zero value otherwise. +func (o *ValueUpdate) GetExternalFqn() string { + if o == nil || IsNil(o.ExternalFqn) { + var ret string + return ret + } + return *o.ExternalFqn +} + +// GetExternalFqnOk returns a tuple with the ExternalFqn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValueUpdate) GetExternalFqnOk() (*string, bool) { + if o == nil || IsNil(o.ExternalFqn) { + return nil, false + } + return o.ExternalFqn, true +} + +// HasExternalFqn returns a boolean if a field has been set. +func (o *ValueUpdate) HasExternalFqn() bool { + if o != nil && !IsNil(o.ExternalFqn) { + return true + } + + return false +} + +// SetExternalFqn gets a reference to the given string and assigns it to the ExternalFqn field. +func (o *ValueUpdate) SetExternalFqn(v string) { + o.ExternalFqn = &v +} + +// GetExternalFilter returns the ExternalFilter field value if set, zero value otherwise. +func (o *ValueUpdate) GetExternalFilter() string { + if o == nil || IsNil(o.ExternalFilter) { + var ret string + return ret + } + return *o.ExternalFilter +} + +// GetExternalFilterOk returns a tuple with the ExternalFilter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValueUpdate) GetExternalFilterOk() (*string, bool) { + if o == nil || IsNil(o.ExternalFilter) { + return nil, false + } + return o.ExternalFilter, true +} + +// HasExternalFilter returns a boolean if a field has been set. +func (o *ValueUpdate) HasExternalFilter() bool { + if o != nil && !IsNil(o.ExternalFilter) { + return true + } + + return false +} + +// SetExternalFilter gets a reference to the given string and assigns it to the ExternalFilter field. +func (o *ValueUpdate) SetExternalFilter(v string) { + o.ExternalFilter = &v +} + +// GetInternalValue returns the InternalValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ValueUpdate) GetInternalValue() string { + if o == nil || IsNil(o.InternalValue.Get()) { + var ret string + return ret + } + return *o.InternalValue.Get() +} + +// GetInternalValueOk returns a tuple with the InternalValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ValueUpdate) GetInternalValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.InternalValue.Get(), o.InternalValue.IsSet() +} + +// HasInternalValue returns a boolean if a field has been set. +func (o *ValueUpdate) HasInternalValue() bool { + if o != nil && o.InternalValue.IsSet() { + return true + } + + return false +} + +// SetInternalValue gets a reference to the given NullableString and assigns it to the InternalValue field. +func (o *ValueUpdate) SetInternalValue(v string) { + o.InternalValue.Set(&v) +} +// SetInternalValueNil sets the value for InternalValue to be an explicit nil +func (o *ValueUpdate) SetInternalValueNil() { + o.InternalValue.Set(nil) +} + +// UnsetInternalValue ensures that no value is present for InternalValue, not even an explicit nil +func (o *ValueUpdate) UnsetInternalValue() { + o.InternalValue.Unset() +} + +// GetInterpolated returns the Interpolated field value if set, zero value otherwise. +func (o *ValueUpdate) GetInterpolated() bool { + if o == nil || IsNil(o.Interpolated) { + var ret bool + return ret + } + return *o.Interpolated +} + +// GetInterpolatedOk returns a tuple with the Interpolated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValueUpdate) GetInterpolatedOk() (*bool, bool) { + if o == nil || IsNil(o.Interpolated) { + return nil, false + } + return o.Interpolated, true +} + +// HasInterpolated returns a boolean if a field has been set. +func (o *ValueUpdate) HasInterpolated() bool { + if o != nil && !IsNil(o.Interpolated) { + return true + } + + return false +} + +// SetInterpolated gets a reference to the given bool and assigns it to the Interpolated field. +func (o *ValueUpdate) SetInterpolated(v bool) { + o.Interpolated = &v +} + +// GetSecret returns the Secret field value +// If the value is explicit nil, the zero value for bool will be returned +func (o *ValueUpdate) GetSecret() bool { + if o == nil || o.Secret.Get() == nil { + var ret bool + return ret + } + + return *o.Secret.Get() +} + +// GetSecretOk returns a tuple with the Secret field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ValueUpdate) GetSecretOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Secret.Get(), o.Secret.IsSet() +} + +// SetSecret sets field value +func (o *ValueUpdate) SetSecret(v bool) { + o.Secret.Set(&v) +} + +// GetValue returns the Value field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ValueUpdate) GetValue() string { + if o == nil || o.Value.Get() == nil { + var ret string + return ret + } + + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ValueUpdate) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// SetValue sets field value +func (o *ValueUpdate) SetValue(v string) { + o.Value.Set(&v) +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ValueUpdate) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ValueUpdate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ValueUpdate) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetModifiedAt returns the ModifiedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ValueUpdate) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.ModifiedAt.Get() +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ValueUpdate) GetModifiedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() +} + +// SetModifiedAt sets field value +func (o *ValueUpdate) SetModifiedAt(v time.Time) { + o.ModifiedAt.Set(&v) +} + +func (o ValueUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValueUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.External) { + toSerialize["external"] = o.External + } + if !IsNil(o.ExternalFqn) { + toSerialize["external_fqn"] = o.ExternalFqn + } + if !IsNil(o.ExternalFilter) { + toSerialize["external_filter"] = o.ExternalFilter + } + if o.InternalValue.IsSet() { + toSerialize["internal_value"] = o.InternalValue.Get() + } + if !IsNil(o.Interpolated) { + toSerialize["interpolated"] = o.Interpolated + } + toSerialize["secret"] = o.Secret.Get() + toSerialize["value"] = o.Value.Get() + toSerialize["created_at"] = o.CreatedAt + toSerialize["modified_at"] = o.ModifiedAt.Get() + return toSerialize, nil +} + +type NullableValueUpdate struct { + value *ValueUpdate + isSet bool +} + +func (v NullableValueUpdate) Get() *ValueUpdate { + return v.value +} + +func (v *NullableValueUpdate) Set(val *ValueUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableValueUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableValueUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValueUpdate(val *ValueUpdate) *NullableValueUpdate { + return &NullableValueUpdate{value: val, isSet: true} +} + +func (v NullableValueUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValueUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/cloudtruthapi/model_version_enum.go b/pkg/cloudtruthapi/model_version_enum.go new file mode 100644 index 0000000..a6f8abe --- /dev/null +++ b/pkg/cloudtruthapi/model_version_enum.go @@ -0,0 +1,116 @@ +/* +CloudTruth Management API + +CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team. + +API version: v1 +Contact: support@cloudtruth.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cloudtruthapi + +import ( + "encoding/json" + "fmt" +) + +// VersionEnum the model 'VersionEnum' +type VersionEnum int32 + +// List of VersionEnum +const ( + VERSIONENUM__1 VersionEnum = 1 + VERSIONENUM__2 VersionEnum = 2 + VERSIONENUM__3 VersionEnum = 3 + VERSIONENUM__4 VersionEnum = 4 +) + +// All allowed values of VersionEnum enum +var AllowedVersionEnumEnumValues = []VersionEnum{ + 1, + 2, + 3, + 4, +} + +func (v *VersionEnum) UnmarshalJSON(src []byte) error { + var value int32 + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := VersionEnum(value) + for _, existing := range AllowedVersionEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid VersionEnum", value) +} + +// NewVersionEnumFromValue returns a pointer to a valid VersionEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewVersionEnumFromValue(v int32) (*VersionEnum, error) { + ev := VersionEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for VersionEnum: valid values are %v", v, AllowedVersionEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v VersionEnum) IsValid() bool { + for _, existing := range AllowedVersionEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to VersionEnum value +func (v VersionEnum) Ptr() *VersionEnum { + return &v +} + +type NullableVersionEnum struct { + value *VersionEnum + isSet bool +} + +func (v NullableVersionEnum) Get() *VersionEnum { + return v.value +} + +func (v *NullableVersionEnum) Set(val *VersionEnum) { + v.value = val + v.isSet = true +} + +func (v NullableVersionEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableVersionEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVersionEnum(val *VersionEnum) *NullableVersionEnum { + return &NullableVersionEnum{value: val, isSet: true} +} + +func (v NullableVersionEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVersionEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/openapi.yml b/pkg/openapi.yml new file mode 100644 index 0000000..31b83a8 --- /dev/null +++ b/pkg/openapi.yml @@ -0,0 +1,15357 @@ +openapi: 3.0.3 +info: + title: CloudTruth Management API + version: v1 + description: CloudTruth centralizes your configuration parameters and secrets making + them easier to manage and use as a team. + contact: + name: CloudTruth Support + email: support@cloudtruth.com +paths: + /api/schema/: + get: + operationId: api_schema_retrieve + description: |- + OpenApi3 schema for this API. Format can be selected via content negotiation. + + - YAML: application/vnd.oai.openapi + - JSON: application/vnd.oai.openapi+json + parameters: + - in: query + name: format + schema: + type: string + enum: + - json + - yaml + - in: query + name: lang + schema: + type: string + enum: + - af + - ar + - ar-dz + - ast + - az + - be + - bg + - bn + - br + - bs + - ca + - cs + - cy + - da + - de + - dsb + - el + - en + - en-au + - en-gb + - eo + - es + - es-ar + - es-co + - es-mx + - es-ni + - es-ve + - et + - eu + - fa + - fi + - fr + - fy + - ga + - gd + - gl + - he + - hi + - hr + - hsb + - hu + - hy + - ia + - id + - ig + - io + - is + - it + - ja + - ka + - kab + - kk + - km + - kn + - ko + - ky + - lb + - lt + - lv + - mk + - ml + - mn + - mr + - ms + - my + - nb + - ne + - nl + - nn + - os + - pa + - pl + - pt + - pt-br + - ro + - ru + - sk + - sl + - sq + - sr + - sr-latn + - sv + - sw + - ta + - te + - tg + - th + - tk + - tr + - tt + - udm + - uk + - ur + - uz + - vi + - zh-hans + - zh-hant + tags: + - api + security: + - {} + responses: + '200': + content: + application/vnd.oai.openapi: + schema: + type: object + additionalProperties: {} + application/yaml: + schema: + type: object + additionalProperties: {} + application/vnd.oai.openapi+json: + schema: + type: object + additionalProperties: {} + application/json: + schema: + type: object + additionalProperties: {} + description: '' + /api/v1/audit/: + get: + operationId: audit_list + description: A searchable log of all the actions taken by users and service + accounts within the organization. + parameters: + - in: query + name: action + schema: + type: string + enum: + - create + - delete + - pull + - push + - update + description: The action that was taken. + - in: query + name: earliest + schema: + type: string + format: date-time + - in: query + name: environment_id + schema: + type: string + format: uuid + description: Returns records for the environment, associated tags, and values. + - in: query + name: latest + schema: + type: string + format: date-time + - in: query + name: object_id + schema: + type: string + - in: query + name: object_type + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: parameter_id + schema: + type: string + format: uuid + description: Returns records for the parameter and associated values. + - in: query + name: project_id + schema: + type: string + format: uuid + description: Returns records for the project, it's parameters, and associated + values. + - in: query + name: user_id + schema: + type: string + tags: + - audit + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAuditTrailList' + description: '' + /api/v1/audit/{id}/: + get: + operationId: audit_retrieve + description: Retrieve one record from the audit log. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the audit record. + required: true + tags: + - audit + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuditTrail' + description: '' + /api/v1/audit/summary/: + get: + operationId: audit_summary_retrieve + description: Summary information about the organization's audit trail. + tags: + - audit + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuditTrailSummary' + description: '' + /api/v1/backup/snapshot/: + post: + operationId: backup_snapshot_create + summary: Get a snapshot of all Projects with parameters + tags: + - backup + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BackupDataSnapshot' + description: '' + /api/v1/environments/: + get: + operationId: environments_list + parameters: + - in: query + name: description__icontains + schema: + type: string + - in: query + name: name + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - environments + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEnvironmentList' + description: '' + post: + operationId: environments_create + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EnvironmentCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/EnvironmentCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Environment' + description: '' + /api/v1/environments/{environment_pk}/pushes/: + get: + operationId: environments_pushes_list + description: The push operations that this environment was involved in. + summary: List push operations. + parameters: + - in: path + name: environment_pk + schema: + type: string + format: uuid + required: true + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - environments + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTaskStepList' + description: '' + /api/v1/environments/{environment_pk}/tags/: + get: + operationId: environments_tags_list + description: |- + Tags allow you to name stable points in time for your configuration. + + Any query API that accepts an `as_of` option will also accept a `tag` + option however they are mutually exclusive. + parameters: + - in: query + name: description__icontains + schema: + type: string + - in: path + name: environment_pk + schema: + type: string + format: uuid + required: true + - in: query + name: name + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: timestamp + schema: + type: string + format: date-time + - in: query + name: timestamp__gte + schema: + type: string + format: date-time + - in: query + name: timestamp__lte + schema: + type: string + format: date-time + tags: + - environments + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTagList' + description: '' + post: + operationId: environments_tags_create + description: |- + Tags allow you to name stable points in time for your configuration. + + Any query API that accepts an `as_of` option will also accept a `tag` + option however they are mutually exclusive. + parameters: + - in: path + name: environment_pk + schema: + type: string + format: uuid + required: true + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TagCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TagCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/TagCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: '' + /api/v1/environments/{environment_pk}/tags/{id}/: + get: + operationId: environments_tags_retrieve + description: |- + Tags allow you to name stable points in time for your configuration. + + Any query API that accepts an `as_of` option will also accept a `tag` + option however they are mutually exclusive. + parameters: + - in: path + name: environment_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the tag. + required: true + tags: + - environments + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: '' + put: + operationId: environments_tags_update + description: |- + Tags allow you to name stable points in time for your configuration. + + Any query API that accepts an `as_of` option will also accept a `tag` + option however they are mutually exclusive. + parameters: + - in: path + name: environment_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the tag. + required: true + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TagUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TagUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/TagUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TagUpdate' + description: '' + patch: + operationId: environments_tags_partial_update + description: |- + Tags allow you to name stable points in time for your configuration. + + Any query API that accepts an `as_of` option will also accept a `tag` + option however they are mutually exclusive. + parameters: + - in: path + name: environment_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the tag. + required: true + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedTagUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedTagUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedTagUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TagUpdate' + description: '' + delete: + operationId: environments_tags_destroy + description: |- + Tags allow you to name stable points in time for your configuration. + + Any query API that accepts an `as_of` option will also accept a `tag` + option however they are mutually exclusive. + parameters: + - in: path + name: environment_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the tag. + required: true + tags: + - environments + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/environments/{id}/: + get: + operationId: environments_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this environment ledger. + required: true + tags: + - environments + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Environment' + description: '' + put: + operationId: environments_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the environment. + required: true + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EnvironmentUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/EnvironmentUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentUpdate' + description: '' + patch: + operationId: environments_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the environment. + required: true + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedEnvironmentUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedEnvironmentUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedEnvironmentUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentUpdate' + description: '' + delete: + operationId: environments_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the environment. + required: true + tags: + - environments + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: Environment destroyed. + '409': + description: The environment has children and cannot be removed. + /api/v1/environments/{id}/copy/: + post: + operationId: environments_copy_create + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the environment. + required: true + tags: + - environments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentCopy' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EnvironmentCopy' + multipart/form-data: + schema: + $ref: '#/components/schemas/EnvironmentCopy' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Environment' + description: Environment copied + '400': + description: The Environment copy failed. + '403': + description: Permission denied. + /api/v1/features/: + get: + operationId: features_retrieve + description: Returns a dictionary of features and whether or not they are enabled + tags: + - features + security: + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FeaturesResponse' + description: '' + /api/v1/grants/: + get: + operationId: grants_list + description: |- + Grants allow you to enable access control on Environments and Projects. + + Grants are part of the role-based access control feature set, so + if your subscription does not have support for it, these paths + will return a 403 Forbidden error. + parameters: + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: principal + schema: + type: string + format: uri + description: Filter by principal (User, Group). Returns direct grant assignments, + not indirect (user via group). + - in: query + name: role + schema: + type: string + enum: + - ADMIN + - CONTRIB + - OWNER + - VIEWER + description: Filter by role. + - in: query + name: scope + schema: + type: string + format: uri + description: Filter by grant scope (Environment, Project). + tags: + - grants + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGrantList' + description: '' + '403': + description: 'Forbidden: see response for further details.' + post: + operationId: grants_create + description: |- + Grants allow you to enable access control on Environments and Projects. + + Grants are part of the role-based access control feature set, so + if your subscription does not have support for it, these paths + will return a 403 Forbidden error. + tags: + - grants + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Grant' + multipart/form-data: + schema: + $ref: '#/components/schemas/Grant' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + description: '' + '403': + description: 'Forbidden: see response for further details.' + /api/v1/grants/{id}/: + get: + operationId: grants_retrieve + description: |- + Grants allow you to enable access control on Environments and Projects. + + Grants are part of the role-based access control feature set, so + if your subscription does not have support for it, these paths + will return a 403 Forbidden error. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the grant. + required: true + tags: + - grants + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + description: '' + '403': + description: 'Forbidden: see response for further details.' + put: + operationId: grants_update + description: |- + Grants allow you to enable access control on Environments and Projects. + + Grants are part of the role-based access control feature set, so + if your subscription does not have support for it, these paths + will return a 403 Forbidden error. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the grant. + required: true + tags: + - grants + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Grant' + multipart/form-data: + schema: + $ref: '#/components/schemas/Grant' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + description: '' + '403': + description: 'Forbidden: see response for further details.' + patch: + operationId: grants_partial_update + description: |- + Grants allow you to enable access control on Environments and Projects. + + Grants are part of the role-based access control feature set, so + if your subscription does not have support for it, these paths + will return a 403 Forbidden error. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the grant. + required: true + tags: + - grants + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedGrant' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedGrant' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedGrant' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + description: '' + '403': + description: 'Forbidden: see response for further details.' + delete: + operationId: grants_destroy + description: |- + Grants allow you to enable access control on Environments and Projects. + + Grants are part of the role-based access control feature set, so + if your subscription does not have support for it, these paths + will return a 403 Forbidden error. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the grant. + required: true + tags: + - grants + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: Deleted. + '403': + description: 'Forbidden: see response for further details.' + /api/v1/grants/multi/: + delete: + operationId: grants_multi_destroy + description: |- + Removes grants matching the query parameters atomically. + + Use this technique to disable access control on a scope, + or remove all grants for a user. + tags: + - grants + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Grant' + description: '' + '403': + description: 'Forbidden: see response for further details.' + /api/v1/groups/: + get: + operationId: groups_list + description: |- + Groups allow you to aggregate users for purposes of assigning + grants more easily. + parameters: + - in: query + name: name + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: user + schema: + type: string + format: uri + description: Filter by user. + tags: + - groups + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGroupList' + description: '' + post: + operationId: groups_create + description: |- + Groups allow you to aggregate users for purposes of assigning + grants more easily. + tags: + - groups + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Group' + multipart/form-data: + schema: + $ref: '#/components/schemas/Group' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + description: '' + /api/v1/groups/{id}/: + get: + operationId: groups_retrieve + description: |- + Groups allow you to aggregate users for purposes of assigning + grants more easily. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of a group. + required: true + tags: + - groups + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + description: '' + put: + operationId: groups_update + description: |- + Groups allow you to aggregate users for purposes of assigning + grants more easily. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of a group. + required: true + tags: + - groups + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Group' + multipart/form-data: + schema: + $ref: '#/components/schemas/Group' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + description: '' + patch: + operationId: groups_partial_update + description: |- + Groups allow you to aggregate users for purposes of assigning + grants more easily. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of a group. + required: true + tags: + - groups + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedGroup' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedGroup' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedGroup' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + description: '' + delete: + operationId: groups_destroy + description: |- + Groups allow you to aggregate users for purposes of assigning + grants more easily. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of a group. + required: true + tags: + - groups + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/groups/{id}/add/: + post: + operationId: groups_add_create + description: Add a user to the group. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of a group. + required: true + - in: query + name: user + schema: + type: string + format: uri + minLength: 1 + required: true + tags: + - groups + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Group' + multipart/form-data: + schema: + $ref: '#/components/schemas/Group' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + description: '' + /api/v1/groups/{id}/remove/: + post: + operationId: groups_remove_create + description: Remove a user from the group. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of a group. + required: true + - in: query + name: user + schema: + type: string + format: uri + minLength: 1 + required: true + tags: + - groups + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Group' + multipart/form-data: + schema: + $ref: '#/components/schemas/Group' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + description: '' + /api/v1/import/: + post: + operationId: import_create + description: Import parameters from the provided data. + parameters: + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: Mask secrets in the response + - in: query + name: preview + schema: + type: boolean + default: false + description: Do not create any objects + tags: + - import + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportCreateRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ImportCreateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ImportCreateRequest' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ImportCreateResponse' + description: '' + /api/v1/integrations/aws/: + get: + operationId: integrations_aws_list + parameters: + - in: query + name: aws_account_id + schema: + type: string + - in: query + name: aws_role_name + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAwsIntegrationList' + description: '' + post: + operationId: integrations_aws_create + description: |- + ### Description ### + + Establishes an AWS Integration for your CloudTruth organization. + + ### Pre-Conditions ### + + - An AWS Integration for the account and role cannot already exist. + ### Post-Conditions ### + + - You must establish an IAM role and trust relationship based on the Role Name and the External ID. + summary: Establishes an AWS Integration. + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsIntegrationCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AwsIntegrationCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/AwsIntegrationCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsIntegration' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pulls/: + get: + operationId: integrations_aws_pulls_list + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: query + name: description__icontains + schema: + type: string + - in: query + name: name + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAwsPullList' + description: '' + post: + operationId: integrations_aws_pulls_create + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPull' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AwsPull' + multipart/form-data: + schema: + $ref: '#/components/schemas/AwsPull' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPull' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pulls/{awspull_pk}/tasks/: + get: + operationId: integrations_aws_pulls_tasks_list + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspull_pk + schema: + type: string + format: uuid + required: true + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: state + schema: + type: string + enum: + - failure + - queued + - running + - skipped + - success + description: The current state of this task. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAwsPullTaskList' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pulls/{awspull_pk}/tasks/{awspulltask_pk}/steps/: + get: + operationId: integrations_aws_pulls_tasks_steps_list + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspull_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspulltask_pk + schema: + type: string + format: uuid + required: true + - in: query + name: fqn + schema: + type: string + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - in: query + name: operation + schema: + type: string + nullable: true + enum: + - create + - delete + - read + - update + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: success + schema: + type: boolean + - in: query + name: venue_id + schema: + type: string + - in: query + name: venue_id__icontains + schema: + type: string + - in: query + name: venue_name + schema: + type: string + - in: query + name: venue_name__icontains + schema: + type: string + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAwsPullTaskStepList' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pulls/{awspull_pk}/tasks/{awspulltask_pk}/steps/{id}/: + get: + operationId: integrations_aws_pulls_tasks_steps_retrieve + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspull_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspulltask_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for a task step. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPullTaskStep' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pulls/{awspull_pk}/tasks/{id}/: + get: + operationId: integrations_aws_pulls_tasks_retrieve + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspull_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the task. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPullTask' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pulls/{id}/: + get: + operationId: integrations_aws_pulls_retrieve + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPull' + description: '' + put: + operationId: integrations_aws_pulls_update + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPull' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AwsPull' + multipart/form-data: + schema: + $ref: '#/components/schemas/AwsPull' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPull' + description: '' + patch: + operationId: integrations_aws_pulls_partial_update + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAwsPull' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAwsPull' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAwsPull' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPull' + description: '' + delete: + operationId: integrations_aws_pulls_destroy + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '403': + description: Cannot destroy innate mapped pull of a data integration. + /api/v1/integrations/aws/{awsintegration_pk}/pulls/{id}/sync/: + post: + operationId: integrations_aws_pulls_sync_create + description: Enqueue a pull synchronization task for mapped external values + accessible with this integration. + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPullSyncActionRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AwsPullSyncActionRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AwsPullSyncActionRequest' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '202': + description: Synchronization task enqueued. + /api/v1/integrations/aws/{awsintegration_pk}/pushes/: + get: + operationId: integrations_aws_pushes_list + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: query + name: description__icontains + schema: + type: string + - in: query + name: environment + schema: + type: string + format: uri + description: Filter results to pushes that operate on a tag in the given environment. + - in: query + name: name + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: project + schema: + type: string + format: uri + description: Filter results to pushes that operate on the given project. + - in: query + name: tag + schema: + type: string + format: uri + description: Filter results to pushes that operate on the given tag. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAwsPushList' + description: '' + post: + operationId: integrations_aws_pushes_create + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPush' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AwsPush' + multipart/form-data: + schema: + $ref: '#/components/schemas/AwsPush' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPush' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pushes/{awspush_pk}/tasks/: + get: + operationId: integrations_aws_pushes_tasks_list + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspush_pk + schema: + type: string + format: uuid + required: true + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: state + schema: + type: string + enum: + - failure + - queued + - running + - skipped + - success + description: The current state of this task. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAwsPushTaskList' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pushes/{awspush_pk}/tasks/{awspushtask_pk}/steps/: + get: + operationId: integrations_aws_pushes_tasks_steps_list + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspush_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspushtask_pk + schema: + type: string + format: uuid + required: true + - in: query + name: fqn + schema: + type: string + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - in: query + name: operation + schema: + type: string + nullable: true + enum: + - create + - delete + - read + - update + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: success + schema: + type: boolean + - in: query + name: venue_id + schema: + type: string + - in: query + name: venue_id__icontains + schema: + type: string + - in: query + name: venue_name + schema: + type: string + - in: query + name: venue_name__icontains + schema: + type: string + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAwsPushTaskStepList' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pushes/{awspush_pk}/tasks/{awspushtask_pk}/steps/{id}/: + get: + operationId: integrations_aws_pushes_tasks_steps_retrieve + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspush_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspushtask_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for a task step. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPushTaskStep' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pushes/{awspush_pk}/tasks/{id}/: + get: + operationId: integrations_aws_pushes_tasks_retrieve + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: awspush_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the task. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPushTask' + description: '' + /api/v1/integrations/aws/{awsintegration_pk}/pushes/{id}/: + get: + operationId: integrations_aws_pushes_retrieve + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPush' + description: '' + put: + operationId: integrations_aws_pushes_update + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPushUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AwsPushUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/AwsPushUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPushUpdate' + description: '' + patch: + operationId: integrations_aws_pushes_partial_update + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAwsPushUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAwsPushUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAwsPushUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPushUpdate' + description: '' + delete: + operationId: integrations_aws_pushes_destroy + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/integrations/aws/{awsintegration_pk}/pushes/{id}/sync/: + post: + operationId: integrations_aws_pushes_sync_create + description: Enqueue a push synchronization task. + parameters: + - in: path + name: awsintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsPush' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AwsPush' + multipart/form-data: + schema: + $ref: '#/components/schemas/AwsPush' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '202': + description: Synchronization task enqueued. + /api/v1/integrations/aws/{id}/: + get: + operationId: integrations_aws_retrieve + summary: Get details of an AWS Integration. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + - in: query + name: refresh_status + schema: + type: boolean + description: Trigger a refresh of the integration status before returning + the details. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsIntegration' + description: '' + put: + operationId: integrations_aws_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsIntegration' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AwsIntegration' + multipart/form-data: + schema: + $ref: '#/components/schemas/AwsIntegration' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsIntegration' + description: '' + patch: + operationId: integrations_aws_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAwsIntegration' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAwsIntegration' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAwsIntegration' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsIntegration' + description: '' + delete: + operationId: integrations_aws_destroy + summary: Delete an AWS integration. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + - in: query + name: in_use + schema: + type: string + enum: + - fail + - leave + - remove + description: |- + (Optional) Desired behavior if the integration has in-use values. + + - `fail` will return HTTP error 409 if there are any values using the integration. + - `leave` (default) will leave values in place and future queries may fail; you can control future value query behavior with the `lookup_error` query parameter on those requests. + - `remove` will remove the all values using the integration when the integration is removed. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: Integration removed. + '409': + description: The integration is used by one (or more) Value(s) and cannot + be removed. + /api/v1/integrations/aws/{id}/scan/: + post: + operationId: integrations_aws_scan_create + description: Probe a region and service using a pattern matching string that + can be used in pull actions. This allows the pattern match to be checked + for correctness and preview what will match during creation of the string. + summary: Evaluate a potential pull pattern and understand what it will match. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsIntegrationScan' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AwsIntegrationScan' + multipart/form-data: + schema: + $ref: '#/components/schemas/AwsIntegrationScan' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DiscoveryResult' + description: '' + /api/v1/integrations/azure/key_vault/: + get: + operationId: integrations_azure_key_vault_list + parameters: + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: tenant_id + schema: + type: string + format: uuid + - in: query + name: vault_name + schema: + type: string + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAzureKeyVaultIntegrationList' + description: '' + post: + operationId: integrations_azure_key_vault_create + description: |- + ### Description ### + + Establishes an Azure Key Vault Integration for your CloudTruth organization. + + ### Pre-Conditions ### + + - An OAuth2 request to install the CloudTruth application in your Azure Tenant must acquire your consent. The resulting JWT access key will contain a `tid` claim that is your Tenant ID. Use this Tenant ID to set up your integration. + + ### Post-Conditions ### + + - You must then grant the CloudTruth service principal rights to access the key vault as a Secrets Manager role (read and write access - purge is not required). + summary: Establishes an Azure Key Vault Integration. + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegrationCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegrationCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegrationCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegration' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pulls/: + get: + operationId: integrations_azure_key_vault_pulls_list + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: query + name: description__icontains + schema: + type: string + - in: query + name: name + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAzureKeyVaultPullList' + description: '' + post: + operationId: integrations_azure_key_vault_pulls_create + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pulls/{akvpull_pk}/tasks/: + get: + operationId: integrations_azure_key_vault_pulls_tasks_list + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpull_pk + schema: + type: string + format: uuid + required: true + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: state + schema: + type: string + enum: + - failure + - queued + - running + - skipped + - success + description: The current state of this task. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAzureKeyVaultPullTaskList' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pulls/{akvpull_pk}/tasks/{akvpulltask_pk}/steps/: + get: + operationId: integrations_azure_key_vault_pulls_tasks_steps_list + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpull_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpulltask_pk + schema: + type: string + format: uuid + required: true + - in: query + name: fqn + schema: + type: string + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - in: query + name: operation + schema: + type: string + nullable: true + enum: + - create + - delete + - read + - update + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: success + schema: + type: boolean + - in: query + name: venue_id + schema: + type: string + - in: query + name: venue_id__icontains + schema: + type: string + - in: query + name: venue_name + schema: + type: string + - in: query + name: venue_name__icontains + schema: + type: string + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAzureKeyVaultPullTaskStepList' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pulls/{akvpull_pk}/tasks/{akvpulltask_pk}/steps/{id}/: + get: + operationId: integrations_azure_key_vault_pulls_tasks_steps_retrieve + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpull_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpulltask_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for a task step. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPullTaskStep' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pulls/{akvpull_pk}/tasks/{id}/: + get: + operationId: integrations_azure_key_vault_pulls_tasks_retrieve + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpull_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the task. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPullTask' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pulls/{id}/: + get: + operationId: integrations_azure_key_vault_pulls_retrieve + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + description: '' + put: + operationId: integrations_azure_key_vault_pulls_update + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + description: '' + patch: + operationId: integrations_azure_key_vault_pulls_partial_update + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAzureKeyVaultPull' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAzureKeyVaultPull' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAzureKeyVaultPull' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPull' + description: '' + delete: + operationId: integrations_azure_key_vault_pulls_destroy + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '403': + description: Cannot destroy innate mapped pull of a data integration. + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pulls/{id}/sync/: + post: + operationId: integrations_azure_key_vault_pulls_sync_create + description: Enqueue a pull synchronization task for mapped external values + accessible with this integration. + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPullSyncActionRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureKeyVaultPullSyncActionRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureKeyVaultPullSyncActionRequest' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '202': + description: Synchronization task enqueued. + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pushes/: + get: + operationId: integrations_azure_key_vault_pushes_list + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: query + name: description__icontains + schema: + type: string + - in: query + name: environment + schema: + type: string + format: uri + description: Filter results to pushes that operate on a tag in the given environment. + - in: query + name: name + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: project + schema: + type: string + format: uri + description: Filter results to pushes that operate on the given project. + - in: query + name: tag + schema: + type: string + format: uri + description: Filter results to pushes that operate on the given tag. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAzureKeyVaultPushList' + description: '' + post: + operationId: integrations_azure_key_vault_pushes_create + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPush' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureKeyVaultPush' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureKeyVaultPush' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPush' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pushes/{akvpush_pk}/tasks/: + get: + operationId: integrations_azure_key_vault_pushes_tasks_list + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpush_pk + schema: + type: string + format: uuid + required: true + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: state + schema: + type: string + enum: + - failure + - queued + - running + - skipped + - success + description: The current state of this task. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAzureKeyVaultPushTaskList' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pushes/{akvpush_pk}/tasks/{akvpushtask_pk}/steps/: + get: + operationId: integrations_azure_key_vault_pushes_tasks_steps_list + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpush_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpushtask_pk + schema: + type: string + format: uuid + required: true + - in: query + name: fqn + schema: + type: string + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - in: query + name: operation + schema: + type: string + nullable: true + enum: + - create + - delete + - read + - update + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: success + schema: + type: boolean + - in: query + name: venue_id + schema: + type: string + - in: query + name: venue_id__icontains + schema: + type: string + - in: query + name: venue_name + schema: + type: string + - in: query + name: venue_name__icontains + schema: + type: string + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAzureKeyVaultPushTaskStepList' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pushes/{akvpush_pk}/tasks/{akvpushtask_pk}/steps/{id}/: + get: + operationId: integrations_azure_key_vault_pushes_tasks_steps_retrieve + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpush_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpushtask_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for a task step. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPushTaskStep' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pushes/{akvpush_pk}/tasks/{id}/: + get: + operationId: integrations_azure_key_vault_pushes_tasks_retrieve + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: akvpush_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the task. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPushTask' + description: '' + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pushes/{id}/: + get: + operationId: integrations_azure_key_vault_pushes_retrieve + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPush' + description: '' + put: + operationId: integrations_azure_key_vault_pushes_update + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPushUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureKeyVaultPushUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureKeyVaultPushUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPushUpdate' + description: '' + patch: + operationId: integrations_azure_key_vault_pushes_partial_update + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAzureKeyVaultPushUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAzureKeyVaultPushUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAzureKeyVaultPushUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPushUpdate' + description: '' + delete: + operationId: integrations_azure_key_vault_pushes_destroy + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/integrations/azure/key_vault/{akvintegration_pk}/pushes/{id}/sync/: + post: + operationId: integrations_azure_key_vault_pushes_sync_create + description: Enqueue a push synchronization task. + parameters: + - in: path + name: akvintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultPush' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureKeyVaultPush' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureKeyVaultPush' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '202': + description: Synchronization task enqueued. + /api/v1/integrations/azure/key_vault/{id}/: + get: + operationId: integrations_azure_key_vault_retrieve + summary: Get details of an Azure Key Vault Integration. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + - in: query + name: refresh_status + schema: + type: boolean + description: Trigger a refresh of the integration status before returning + the details. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegration' + description: '' + put: + operationId: integrations_azure_key_vault_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegration' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegration' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegration' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegration' + description: '' + patch: + operationId: integrations_azure_key_vault_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAzureKeyVaultIntegration' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAzureKeyVaultIntegration' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAzureKeyVaultIntegration' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegration' + description: '' + delete: + operationId: integrations_azure_key_vault_destroy + summary: Delete an Azure Key Vault integration. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + - in: query + name: in_use + schema: + type: string + enum: + - fail + - leave + - remove + description: |- + (Optional) Desired behavior if the integration has in-use values. + + - `fail` will return HTTP error 409 if there are any values using the integration. + - `leave` (default) will leave values in place and future queries may fail; you can control future value query behavior with the `lookup_error` query parameter on those requests. + - `remove` will remove the all values using the integration when the integration is removed. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: Integration removed. + '409': + description: The integration is used by one (or more) Value(s) and cannot + be removed. + /api/v1/integrations/azure/key_vault/{id}/scan/: + post: + operationId: integrations_azure_key_vault_scan_create + description: Probe a region and service using a pattern matching string that + can be used in pull actions. This allows the pattern match to be checked + for correctness and preview what will match during creation of the string. + summary: Evaluate a potential pull pattern and understand what it will match. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegrationScan' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegrationScan' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureKeyVaultIntegrationScan' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DiscoveryResult' + description: '' + /api/v1/integrations/explore/: + get: + operationId: integrations_explore_list + description: | + ### Description ### + + Queries a third-party integration to retrieve the data specified by the FQN. + + You can start exploring by not specifying an 'fqn', which will return a list of FQNs for the existing third-party integrations. Third-party integrations can be configured via the Integrations section of the web application. + summary: Retrieve third-party integration data for the specified FQN. + parameters: + - in: query + name: fqn + schema: + type: string + format: uri + description: FQN (URL-like) for third-party integration. + - in: query + name: jmes + schema: + type: string + description: JMES-path qualifier (key within file) + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: page_token + schema: + type: string + description: When paginating, this is the value that came back in the last + page's next + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedIntegrationNodeList' + description: The content at the FQN. + '400': + description: Invalid FQN requested. + '403': + description: Unable to contact the third-party integration. + '415': + description: Unsupported content type (usually this means it is binary). + '507': + description: Content exceeds internal size limit of 1MB. + /api/v1/integrations/github/: + get: + operationId: integrations_github_list + parameters: + - in: query + name: gh_organization_slug + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGitHubIntegrationList' + description: '' + post: + operationId: integrations_github_create + description: "### Description ###\n\nEstablishes a GitHub Integration in your\ + \ CloudTruth organization.\n\n### Pre-Conditions ###\n\n- The user must be\ + \ an Administrator or Owner of your organization.\n- A GitHub Integration\ + \ with the `installation_id` cannot \nalready exist in this organization.\n\ + - The user must first install the CloudTruth GitHub Application in \ntheir\ + \ GitHub organization and obtain the `installation_id` of the \napplication\ + \ in order to create the integration.\n\n### Initiating the GitHub Application\ + \ Installation ###\n\n- Go to `https://github.com/apps/GITHUB_APP_NAME/installations/new?state=`\n\ + - On successful installation the browser will return to \n`https://APP_URL/app_setup/github`\ + \ (configured in ctops/bin/github*) \nand provide the `installation_id` in\ + \ the URI.\n- POST to this api to verify and establish the integration." + summary: Establishes a GitHub Integration. + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubIntegrationCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GitHubIntegrationCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/GitHubIntegrationCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubIntegration' + description: '' + /api/v1/integrations/github/{githubintegration_pk}/pulls/: + get: + operationId: integrations_github_pulls_list + parameters: + - in: query + name: description__icontains + schema: + type: string + - in: path + name: githubintegration_pk + schema: + type: string + format: uuid + required: true + - in: query + name: name + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGitHubPullList' + description: '' + /api/v1/integrations/github/{githubintegration_pk}/pulls/{githubpull_pk}/tasks/: + get: + operationId: integrations_github_pulls_tasks_list + parameters: + - in: path + name: githubintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: githubpull_pk + schema: + type: string + format: uuid + required: true + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: state + schema: + type: string + enum: + - failure + - queued + - running + - skipped + - success + description: The current state of this task. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGitHubPullTaskList' + description: '' + /api/v1/integrations/github/{githubintegration_pk}/pulls/{githubpull_pk}/tasks/{githubpulltask_pk}/steps/: + get: + operationId: integrations_github_pulls_tasks_steps_list + parameters: + - in: query + name: fqn + schema: + type: string + - in: path + name: githubintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: githubpull_pk + schema: + type: string + format: uuid + required: true + - in: path + name: githubpulltask_pk + schema: + type: string + format: uuid + required: true + - in: query + name: modified_at + schema: + type: string + format: date-time + - in: query + name: modified_at__gte + schema: + type: string + format: date-time + - in: query + name: modified_at__lte + schema: + type: string + format: date-time + - in: query + name: operation + schema: + type: string + nullable: true + enum: + - create + - delete + - read + - update + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: success + schema: + type: boolean + - in: query + name: venue_id + schema: + type: string + - in: query + name: venue_id__icontains + schema: + type: string + - in: query + name: venue_name + schema: + type: string + - in: query + name: venue_name__icontains + schema: + type: string + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGitHubPullTaskStepList' + description: '' + /api/v1/integrations/github/{githubintegration_pk}/pulls/{githubpull_pk}/tasks/{githubpulltask_pk}/steps/{id}/: + get: + operationId: integrations_github_pulls_tasks_steps_retrieve + parameters: + - in: path + name: githubintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: githubpull_pk + schema: + type: string + format: uuid + required: true + - in: path + name: githubpulltask_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for a task step. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubPullTaskStep' + description: '' + /api/v1/integrations/github/{githubintegration_pk}/pulls/{githubpull_pk}/tasks/{id}/: + get: + operationId: integrations_github_pulls_tasks_retrieve + parameters: + - in: path + name: githubintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: githubpull_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the task. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubPullTask' + description: '' + /api/v1/integrations/github/{githubintegration_pk}/pulls/{id}/: + get: + operationId: integrations_github_pulls_retrieve + parameters: + - in: path + name: githubintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubPull' + description: '' + put: + operationId: integrations_github_pulls_update + parameters: + - in: path + name: githubintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubPull' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GitHubPull' + multipart/form-data: + schema: + $ref: '#/components/schemas/GitHubPull' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubPull' + description: '' + patch: + operationId: integrations_github_pulls_partial_update + parameters: + - in: path + name: githubintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedGitHubPull' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedGitHubPull' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedGitHubPull' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubPull' + description: '' + /api/v1/integrations/github/{githubintegration_pk}/pulls/{id}/sync/: + post: + operationId: integrations_github_pulls_sync_create + description: Enqueue a pull synchronization task for mapped external values + accessible with this integration. + parameters: + - in: path + name: githubintegration_pk + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + description: Unique identifier for the action. + required: true + tags: + - integrations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubPull' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GitHubPull' + multipart/form-data: + schema: + $ref: '#/components/schemas/GitHubPull' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '202': + description: Synchronization task enqueued. + /api/v1/integrations/github/{id}/: + get: + operationId: integrations_github_retrieve + summary: Get details of a GitHub Integration. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + - in: query + name: refresh_status + schema: + type: boolean + description: Refresh the integration status before returning the details. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GitHubIntegration' + description: '' + delete: + operationId: integrations_github_destroy + summary: Delete a GitHub integration. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier for the integration. + required: true + - in: query + name: in_use + schema: + type: string + enum: + - fail + - leave + - remove + description: |- + (Optional) Desired behavior if the integration has in-use values. + + - `fail` will return HTTP error 409 if there are any values using the integration. + - `leave` (default) will leave values in place and future queries may fail; you can control future value query behavior with the `lookup_error` query parameter on those requests. + - `remove` will remove the all values using the integration when the integration is removed. + tags: + - integrations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: Integration removed. + '409': + description: The integration is used by one (or more) Value(s) and cannot + be removed. + /api/v1/invitations/: + get: + operationId: invitations_list + parameters: + - in: query + name: email + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: role + schema: + type: string + enum: + - ADMIN + - CONTRIB + - OWNER + - VIEWER + description: The role that the user will have in the organization, should + the user accept. + - in: query + name: state + schema: + type: string + enum: + - accepted + - bounced + - pending + - sent + description: The current state of the invitation. + tags: + - invitations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedInvitationList' + description: '' + post: + operationId: invitations_create + description: Extend an invitation for someone else to join your organization. + summary: Create an invitation. + tags: + - invitations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InvitationCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/InvitationCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/InvitationCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation' + description: '' + '403': + description: Permission denied. Is the invitation role more permissive + than your own? + '404': + description: Bad Request. Is there already an invitation for that email? + /api/v1/invitations/{id}/: + get: + operationId: invitations_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of an invitation. + required: true + tags: + - invitations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation' + description: '' + put: + operationId: invitations_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of an invitation. + required: true + tags: + - invitations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Invitation' + multipart/form-data: + schema: + $ref: '#/components/schemas/Invitation' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation' + description: '' + patch: + operationId: invitations_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of an invitation. + required: true + tags: + - invitations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedInvitation' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedInvitation' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedInvitation' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation' + description: '' + delete: + operationId: invitations_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The unique identifier of an invitation. + required: true + tags: + - invitations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/invitations/{id}/accept/: + post: + operationId: invitations_accept_create + description: |- + Accept an invitation to join an organization. + + The email address used to log in and accept the invitation must match + the email address specified by the inviting user when creating the invitation. + + On success the client receives the invitation record as it was updated. + The client should then regenerate the JWT with the organization scope and + proceed to the default landing page. + summary: Accept an invitation. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The invitation ID. + required: true + tags: + - invitations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation' + description: The invitation was accepted. The client should obtain an organization + scope token and proceed to the landing page. + '403': + description: Permission denied. The accepting user's email may not match + the invitation? + '404': + description: Bad Request. The invitation does not exist or has already + been accepted? + /api/v1/invitations/{id}/resend/: + post: + operationId: invitations_resend_create + description: Re-send an invitation to the recipient. + summary: Resend an invitation. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: The invitation ID. + required: true + tags: + - invitations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Invitation' + description: The invitation state was reset to `pending`, which causes it + to get sent again. The most recent state is returned. Clients should + check the state. + '404': + description: Bad Request. Was the invitation already accepted? + /api/v1/memberships/: + get: + operationId: memberships_list + parameters: + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: role + schema: + type: string + enum: + - ADMIN + - CONTRIB + - OWNER + - VIEWER + description: The role that the user has in the organization. + - in: query + name: user + schema: + type: string + description: The unique identifier of a user. + tags: + - memberships + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedMembershipList' + description: '' + post: + operationId: memberships_create + tags: + - memberships + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MembershipCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/MembershipCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/MembershipCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Membership' + description: '' + /api/v1/memberships/{id}/: + get: + operationId: memberships_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the membership. + required: true + tags: + - memberships + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Membership' + description: '' + put: + operationId: memberships_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the membership. + required: true + tags: + - memberships + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Membership' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Membership' + multipart/form-data: + schema: + $ref: '#/components/schemas/Membership' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Membership' + description: '' + patch: + operationId: memberships_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the membership. + required: true + tags: + - memberships + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedMembership' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedMembership' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedMembership' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Membership' + description: '' + delete: + operationId: memberships_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the membership. + required: true + tags: + - memberships + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/organizations/: + get: + operationId: organizations_list + parameters: + - in: query + name: name + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - organizations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedOrganizationList' + description: '' + post: + operationId: organizations_create + tags: + - organizations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/OrganizationCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/OrganizationCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: '' + /api/v1/organizations/{id}/: + get: + operationId: organizations_retrieve + parameters: + - in: path + name: id + schema: + type: string + description: A unique identifier for the organization. + required: true + tags: + - organizations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: '' + put: + operationId: organizations_update + parameters: + - in: path + name: id + schema: + type: string + description: A unique identifier for the organization. + required: true + tags: + - organizations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Organization' + multipart/form-data: + schema: + $ref: '#/components/schemas/Organization' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: '' + patch: + operationId: organizations_partial_update + parameters: + - in: path + name: id + schema: + type: string + description: A unique identifier for the organization. + required: true + tags: + - organizations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedOrganization' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedOrganization' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedOrganization' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: '' + delete: + operationId: organizations_destroy + parameters: + - in: path + name: id + schema: + type: string + description: A unique identifier for the organization. + required: true + tags: + - organizations + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/projects/: + get: + operationId: projects_list + parameters: + - in: query + name: description__icontains + schema: + type: string + - in: query + name: name + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedProjectList' + description: '' + post: + operationId: projects_create + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProjectCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ProjectCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + description: '' + /api/v1/projects/{id}/: + get: + operationId: projects_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this project ledger. + required: true + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + description: '' + put: + operationId: projects_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the project. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProjectUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ProjectUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectUpdate' + description: '' + patch: + operationId: projects_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the project. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedProjectUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedProjectUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedProjectUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectUpdate' + description: '' + delete: + operationId: projects_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the project. + required: true + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: Project destroyed. + '409': + description: The project has dependents and cannot be removed. + '403': + description: Permission denied. + /api/v1/projects/{id}/copy/: + post: + operationId: projects_copy_create + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the project. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectCopy' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProjectCopy' + multipart/form-data: + schema: + $ref: '#/components/schemas/ProjectCopy' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + description: Project copied + '400': + description: The Project copy failed. + /api/v1/projects/{project_pk}/parameter-export/: + get: + operationId: projects_parameter_export_list + description: |- + Exports all parameters in this project in the requested format. + + Parameter names and values will be coerced to the proper format (e.g. for a + dotenv export, my_parameter will be capitalized to MY_PARAMETER and its value + will be in a quoted string). Note that capitalization is the only name coercion + that will be performed on parameter names, names that are invalid for a given + format will be omitted. + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: contains + schema: + type: string + description: Only include parameters with names that contain the provided + string. + - in: query + name: endswith + schema: + type: string + description: Only include parameters with names that end with the provided + string. + - in: query + name: environment + schema: + type: string + description: Name or id of the environment to use to retrieve parameter values. + - in: query + name: explicit_export + schema: + type: boolean + default: false + description: Explicitly marks parameters with export, e.g. `export FOO=bar`. + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: Masks all secrets in the template with `*****`. + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - in: query + name: output + schema: + type: string + description: 'Format to output: One of ''docker'', ''dotenv'', ''shell''.' + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: startswith + schema: + type: string + description: Only include parameters with names that start with the provided + string. + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterExport' + description: '' + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateLookupError' + description: '' + /api/v1/projects/{project_pk}/parameters/: + get: + operationId: projects_parameters_list + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: description__icontains + schema: + type: string + - in: query + name: difference + schema: + type: string + description: Specify a list of comma-separated environment names or ids (uuid) + to compare values. Only returns a parameter if there is a difference. Cannot + be used with `environment` or `values`. If used with `mask_secrets` then + no secret parameters will be included in the result. + - in: query + name: environment + schema: + type: string + description: Name or id (uuid) of the environment(s) to get parameter values + for. Cannot be used with `values`. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: |- + If `true`, runs template evaluation on this parameter's values. If `false`, returns the value's template. + Has no effect on values that are not interpolated. + - in: query + name: immediate_parameters + schema: + type: boolean + default: false + description: If true, filter by current project parameters only. Otherwise, + include both of the inherited and current project parameters. + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: If true, replaces all secrets with `*****`. + - in: query + name: name + schema: + type: string + - in: query + name: name__contains + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - in: query + name: name__iexact + schema: + type: string + - in: query + name: name__istartswith + schema: + type: string + - in: query + name: name__startswith + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: secret + schema: + type: boolean + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + - in: query + name: values + schema: + type: boolean + default: true + description: 'If false, values are not returned: the `values` array will have + no entries. This speeds up retrieval if value content is not needed. Cannot + be used with `environment`.' + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedParameterList' + description: '' + post: + operationId: projects_parameters_create + parameters: + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ParameterCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ParameterCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Parameter' + description: '' + /api/v1/projects/{project_pk}/parameters/{parameter_pk}/pushes/: + get: + operationId: projects_parameters_pushes_list + description: The push operations that this parameter was involved in. + summary: List push operations. + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: path + name: parameter_pk + schema: + type: string + format: uuid + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTaskStepList' + description: '' + /api/v1/projects/{project_pk}/parameters/{parameter_pk}/rules/: + get: + operationId: projects_parameters_rules_list + parameters: + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + - in: query + name: type + schema: + type: string + enum: + - max + - max_len + - min + - min_len + - regex + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedParameterRuleList' + description: '' + post: + operationId: projects_parameters_rules_create + parameters: + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterRuleCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ParameterRuleCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ParameterRuleCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterRule' + description: '' + /api/v1/projects/{project_pk}/parameters/{parameter_pk}/rules/{id}/: + get: + operationId: projects_parameters_rules_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter rule ledger. + required: true + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterRule' + description: '' + put: + operationId: projects_parameters_rules_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter rule. + required: true + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterRuleUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ParameterRuleUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ParameterRuleUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterRuleUpdate' + description: '' + patch: + operationId: projects_parameters_rules_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter rule. + required: true + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedParameterRuleUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedParameterRuleUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedParameterRuleUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterRuleUpdate' + description: '' + delete: + operationId: projects_parameters_rules_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter rule. + required: true + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/projects/{project_pk}/parameters/{parameter_pk}/values/: + get: + operationId: projects_parameters_values_list + description: "\n Retrieve previously set values of a parameter in one\ + \ or all environments.\n To see all the _effective_ values for a parameter\ + \ across every environment,\n use the Parameters API (see the `values`\ + \ field).\n " + summary: Retrieve values. + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: environment + schema: + type: string + description: |- + When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. + No effect on values that are not dynamic. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: |- + If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. + No effect on values that are not interpolated. + - in: query + name: exclude + schema: + type: string + description: A comma-separated list of field names to exclude from the response. + - in: query + name: include + schema: + type: string + description: A comma-separated list of field names to include in the response. + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: Mask secret values in responses with `*****`. + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedValueList' + description: '' + post: + operationId: projects_parameters_values_create + description: Set the value of a parameter in an environment. + summary: Set a value. + parameters: + - in: query + name: environment + schema: + type: string + description: |- + When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. + No effect on values that are not dynamic. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: |- + If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. + No effect on values that are not interpolated. + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ValueCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ValueCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ValueCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Value' + description: '' + /api/v1/projects/{project_pk}/parameters/{parameter_pk}/values/{id}/: + get: + operationId: projects_parameters_values_retrieve + description: Retrieve the value of a parameter in an environment. + summary: Retrieve a value. + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: environment + schema: + type: string + description: |- + When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. + No effect on values that are not dynamic. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: |- + If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. + No effect on values that are not interpolated. + - in: query + name: exclude + schema: + type: string + description: A comma-separated list of field names to exclude from the response. + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this value ledger. + required: true + - in: query + name: include + schema: + type: string + description: A comma-separated list of field names to include in the response. + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: Mask secret values in responses with `*****`. + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Value' + description: '' + put: + operationId: projects_parameters_values_update + description: Update the value of a parameter in an environment. + summary: Update a value. + parameters: + - in: query + name: environment + schema: + type: string + description: |- + When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. + No effect on values that are not dynamic. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: |- + If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. + No effect on values that are not interpolated. + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the value. + required: true + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ValueUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ValueUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ValueUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ValueUpdate' + description: '' + patch: + operationId: projects_parameters_values_partial_update + description: Update the value of a parameter in an environment. + summary: Update a value. + parameters: + - in: query + name: environment + schema: + type: string + description: |- + When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. + No effect on values that are not dynamic. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: |- + If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. + No effect on values that are not interpolated. + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the value. + required: true + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedValueUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedValueUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedValueUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ValueUpdate' + description: '' + delete: + operationId: projects_parameters_values_destroy + description: Destroy the value of a parameter in an environment. + summary: Destroy a value. + parameters: + - in: query + name: environment + schema: + type: string + description: |- + When fetching a single value, if that value is dynamic and evaluate is true, uses this environment for template evaluation. If none is specified, uses the value's environment. Note that the value must be active in the specified environment. + No effect on values that are not dynamic. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: |- + If `true`, runs template evaluation on this parameter. If `false`, returns the value's template. + No effect on values that are not interpolated. + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the value. + required: true + - in: path + name: parameter_pk + schema: + type: string + format: uuid + description: The parameter id. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project id. + required: true + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/projects/{project_pk}/parameters/{id}/: + get: + operationId: projects_parameters_retrieve + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: environment + schema: + type: string + description: Name or id (uuid) of the environment(s) to get parameter values + for. Cannot be used with `values`. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: |- + If `true`, runs template evaluation on this parameter's values. If `false`, returns the value's template. + Has no effect on values that are not interpolated. + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter ledger. + required: true + - in: query + name: immediate_parameters + schema: + type: boolean + default: false + description: If true, filter by current project parameters only. Otherwise, + include both of the inherited and current project parameters. + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: If true, replaces all secrets with `*****`. + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + - in: query + name: values + schema: + type: boolean + default: true + description: 'If false, values are not returned: the `values` array will have + no entries. This speeds up retrieval if value content is not needed. Cannot + be used with `environment`.' + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Parameter' + description: '' + put: + operationId: projects_parameters_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ParameterUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ParameterUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Parameter' + description: '' + '400': + description: While checking pre-conditions, an external value was encountered + that could not be resolved. + '404': + description: The given project id could not be found, or while checking + pre-conditions, an external value was encountered that could not be resolved. + '415': + description: While checking pre-conditions, an external value was encountered + that has an invalid content type. + '422': + description: 'A pre-condition to modifying the `secret` setting of the parameter + failed, for example setting `secret: false` and having an external value + that resolves to a value that is a secret. In this case it would be unsafe + to allow the `secret` setting to change.' + '507': + description: While checking pre-conditions, an external value was encountered + that was too large to process. + patch: + operationId: projects_parameters_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedParameterUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedParameterUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedParameterUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Parameter' + description: '' + '400': + description: While checking pre-conditions, an external value was encountered + that could not be resolved. + '404': + description: The given project id could not be found, or while checking + pre-conditions, an external value was encountered that could not be resolved. + '415': + description: While checking pre-conditions, an external value was encountered + that has an invalid content type. + '422': + description: 'A pre-condition to modifying the `secret` setting of the parameter + failed, for example setting `secret: false` and having an external value + that resolves to a value that is a secret. In this case it would be unsafe + to allow the `secret` setting to change.' + '507': + description: While checking pre-conditions, an external value was encountered + that was too large to process. + delete: + operationId: projects_parameters_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/projects/{project_pk}/parameters/{id}/copy/: + post: + operationId: projects_parameters_copy_create + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + description: The project that the parameter is within. + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterCopy' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ParameterCopy' + multipart/form-data: + schema: + $ref: '#/components/schemas/ParameterCopy' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Parameter' + description: Parameter copied + '400': + description: The parameter copy failed. + /api/v1/projects/{project_pk}/parameters/{id}/timeline/: + get: + operationId: projects_parameters_timeline_retrieve + description: |- + Summary information about how a parameter has changed over time. + + The time range of historical information available depends on your subscription. + Any changes to the parameter itself, including rules and values, is included. + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter ledger. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTimeline' + description: '' + /api/v1/projects/{project_pk}/parameters/duality/: + get: + operationId: projects_parameters_duality_list + description: |- + Retrieve parameters at dual timepoints for comparison. + + Results are aligned by parameter name. This means if a parameter is + created, then deleted, then created again with the same name the two + records with different parameter IDs will show up in the same result + entry. + + If t1 is not specified then it will point to a time in the past where + nothing existed. If t2 is not specified then it is assumed to be "now". + parameters: + - in: query + name: difference + schema: + type: boolean + description: Compare the values at `t1` and `t2` and if they are the same, + omit the parameter from the result. + - in: query + name: environment + schema: + type: string + description: Name or id (uuid) of the environment(s) to get parameter values + for. Cannot be used with `values`. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: |- + If `true`, runs template evaluation on this parameter's values. If `false`, returns the value's template. + Has no effect on values that are not interpolated. + - in: query + name: immediate_parameters + schema: + type: boolean + default: false + description: If true, filter by current project parameters only. Otherwise, + include both of the inherited and current project parameters. + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: If true, replaces all secrets with `*****`. + - in: query + name: name + schema: + type: string + - in: query + name: name__contains + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - in: query + name: name__iexact + schema: + type: string + - in: query + name: name__istartswith + schema: + type: string + - in: query + name: name__startswith + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: secret + schema: + type: boolean + - in: query + name: t1_as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `t1_tag`. + - in: query + name: t1_tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `t1_as_of`. Requires `environment`. + - in: query + name: t2_as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `t2_tag`. + - in: query + name: t2_tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `t2_as_of`. Requires `environment`. + - in: query + name: values + schema: + type: boolean + default: true + description: 'If false, values are not returned: the `values` array will have + no entries. This speeds up retrieval if value content is not needed. Cannot + be used with `environment`.' + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedParameterDualityList' + description: '' + /api/v1/projects/{project_pk}/parameters/timelines/: + get: + operationId: projects_parameters_timelines_retrieve + description: |- + Information about how the parameters of a project have changed over time. + + The time range of historical information available depends on your subscription. + Any changes to the project's parameters, including rules and values, is included. + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTimeline' + description: '' + /api/v1/projects/{project_pk}/template-preview/: + post: + operationId: projects_template_preview_create + description: Endpoint for previewing a template. Post the template content + in the request body. + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: environment + schema: + type: string + description: Name or id of the environment to use to instantiate this template. + If not specified then the default environment is used. + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: Masks all secrets in the template with `*****`. + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + - in: query + name: template + schema: + type: string + description: ID of the template parameter being previewed. If not specified, + this is assumed to be a not-yet-created parameter. + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TemplatePreviewCreateRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TemplatePreviewCreateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplatePreviewCreateRequest' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplatePreview' + description: '' + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateLookupError' + description: '' + /api/v1/projects/{project_pk}/templates/: + get: + operationId: projects_templates_list + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: environment + schema: + type: string + description: Name or id of the environment to use to evaluate this template. + If not specified then the original content is returned in the body. + - in: query + name: evaluate + schema: + type: boolean + default: false + description: | + If `true`, evaluates the template's body. If `false`, returns the unevaluated template body. + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: Masks all secrets in the template with `*****`. + - in: query + name: name + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTemplateList' + description: '' + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateLookupError' + description: '' + post: + operationId: projects_templates_create + parameters: + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TemplateCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Template' + description: '' + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateLookupError' + description: '' + /api/v1/projects/{project_pk}/templates/{id}/: + get: + operationId: projects_templates_retrieve + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: environment + schema: + type: string + description: Name or id of the environment to use to evaluate this template. + If not specified then the original content is returned in the body. + - in: query + name: evaluate + schema: + type: boolean + default: true + description: | + If `true`, evaluates the template's body. If `false`, returns the unevaluated template body. + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter ledger. + required: true + - in: query + name: mask_secrets + schema: + type: boolean + default: false + description: Masks all secrets in the template with `*****`. + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Template' + description: '' + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateLookupError' + description: '' + put: + operationId: projects_templates_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TemplateUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Template' + description: '' + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateLookupError' + description: '' + patch: + operationId: projects_templates_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + tags: + - projects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedTemplateUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedTemplateUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedTemplateUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Template' + description: '' + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateLookupError' + description: '' + delete: + operationId: projects_templates_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: Template destroyed. + '409': + description: The template is referenced by another template or value and + cannot be removed. + /api/v1/projects/{project_pk}/templates/{id}/timeline/: + get: + operationId: projects_templates_timeline_retrieve + description: |- + Information about how a template has changed over time. + + The time range of historical information available depends on your subscription. + Any changes to the template itself is included. + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: environment + schema: + type: string + description: Name or id of the environment to use to evaluate this template. + If not specified then the original content is returned in the body. + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter ledger. + required: true + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateTimeline' + description: '' + /api/v1/projects/{project_pk}/templates/timelines/: + get: + operationId: projects_templates_timelines_retrieve + description: |- + Information about how the templates of a project have changed over time. + + The time range of historical information available depends on your subscription. + Any changes to the project's templates is included. + parameters: + - in: query + name: as_of + schema: + type: string + format: date-time + description: Specify a point in time to retrieve configuration from. Cannot + be specified with `tag`. + - in: query + name: environment + schema: + type: string + description: Name or id of the environment to use to evaluate this template. + If not specified then the original content is returned in the body. + - in: path + name: project_pk + schema: + type: string + format: uuid + required: true + - in: query + name: tag + schema: + type: string + description: Specify a tag to retrieve configuration from. Cannot be specified + with `as_of`. Requires `environment`. + tags: + - projects + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateTimeline' + description: '' + /api/v1/serviceaccounts/: + get: + operationId: serviceaccounts_list + parameters: + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - serviceaccounts + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedServiceAccountList' + description: '' + post: + operationId: serviceaccounts_create + description: "\n Creates a new ServiceAccount. A ServiceAccount\ + \ is a user record intended\n for machine use (such as a build\ + \ system). It does not have a username/password\n but is instead\ + \ accessed using an API key.\n\n On creation, the API key will\ + \ be returned. This key will only be shown once,\n is not stored\ + \ on any CloudTruth system, and should be treated as a secret. Should\n \ + \ the key be lost, you will need to delete and recreate the ServiceAccount\ + \ in order\n to generate a new API key.\n " + summary: Create a ServiceAccount user. + tags: + - serviceaccounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAccountCreateRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ServiceAccountCreateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ServiceAccountCreateRequest' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAccountCreateResponse' + description: '' + /api/v1/serviceaccounts/{id}/: + get: + operationId: serviceaccounts_retrieve + parameters: + - in: path + name: id + schema: + type: string + description: A unique value identifying this service account. + required: true + tags: + - serviceaccounts + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAccount' + description: '' + put: + operationId: serviceaccounts_update + parameters: + - in: path + name: id + schema: + type: string + description: A unique value identifying this service account. + required: true + tags: + - serviceaccounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAccountUpdateRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ServiceAccountUpdateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ServiceAccountUpdateRequest' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAccountUpdateRequest' + description: '' + patch: + operationId: serviceaccounts_partial_update + parameters: + - in: path + name: id + schema: + type: string + description: A unique value identifying this service account. + required: true + tags: + - serviceaccounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedServiceAccount' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedServiceAccount' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedServiceAccount' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAccount' + description: '' + delete: + operationId: serviceaccounts_destroy + parameters: + - in: path + name: id + schema: + type: string + description: A unique value identifying this service account. + required: true + tags: + - serviceaccounts + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/types/: + get: + operationId: types_list + parameters: + - in: query + name: description__icontains + schema: + type: string + - in: query + name: name__icontains + schema: + type: string + - in: query + name: name__iexact + schema: + type: string + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - types + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedParameterTypeList' + description: '' + post: + operationId: types_create + tags: + - types + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ParameterTypeCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ParameterTypeCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterType' + description: '' + /api/v1/types/{parametertype_pk}/rules/: + get: + operationId: types_rules_list + parameters: + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: path + name: parametertype_pk + schema: + type: string + format: uuid + description: The parameter type id. + required: true + - in: query + name: type + schema: + type: string + enum: + - max + - max_len + - min + - min_len + - regex + tags: + - types + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedParameterTypeRuleList' + description: '' + post: + operationId: types_rules_create + parameters: + - in: path + name: parametertype_pk + schema: + type: string + format: uuid + description: The parameter type id. + required: true + tags: + - types + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeRuleCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ParameterTypeRuleCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ParameterTypeRuleCreate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeRule' + description: '' + /api/v1/types/{parametertype_pk}/rules/{id}/: + get: + operationId: types_rules_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter type rule ledger. + required: true + - in: path + name: parametertype_pk + schema: + type: string + format: uuid + description: The parameter type id. + required: true + tags: + - types + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeRule' + description: '' + put: + operationId: types_rules_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter type rule. + required: true + - in: path + name: parametertype_pk + schema: + type: string + format: uuid + description: The parameter type id. + required: true + tags: + - types + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeRuleUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ParameterTypeRuleUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ParameterTypeRuleUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeRuleUpdate' + description: '' + patch: + operationId: types_rules_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter type rule. + required: true + - in: path + name: parametertype_pk + schema: + type: string + format: uuid + description: The parameter type id. + required: true + tags: + - types + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedParameterTypeRuleUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedParameterTypeRuleUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedParameterTypeRuleUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeRuleUpdate' + description: '' + delete: + operationId: types_rules_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter type rule. + required: true + - in: path + name: parametertype_pk + schema: + type: string + format: uuid + description: The parameter type id. + required: true + tags: + - types + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/types/{id}/: + get: + operationId: types_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this parameter type ledger. + required: true + tags: + - types + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterType' + description: '' + put: + operationId: types_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter type. + required: true + tags: + - types + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ParameterTypeUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ParameterTypeUpdate' + required: true + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeUpdate' + description: '' + patch: + operationId: types_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter type. + required: true + tags: + - types + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedParameterTypeUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedParameterTypeUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedParameterTypeUpdate' + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterTypeUpdate' + description: '' + delete: + operationId: types_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A unique identifier for the parameter type. + required: true + tags: + - types + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: No response body + /api/v1/users/: + get: + operationId: users_list + parameters: + - name: ordering + required: false + in: query + description: Which field to use when ordering the results. + schema: + type: string + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: type + schema: + type: string + tags: + - users + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserList' + description: '' + /api/v1/users/{id}/: + get: + operationId: users_retrieve + parameters: + - in: path + name: id + schema: + type: string + description: The unique identifier of a user. + required: true + tags: + - users + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: '' + delete: + operationId: users_destroy + description: | + ### Description ### + + Delete the specified user. This removes all access the User may have to any Organization. + + ### Pre-Conditions ### + + - The user cannot be the only owner of any Organization. + - The bearer token must belong to the user being deleted. + - All of the memberships related to the User will be deleted, so all the membership deletion pre-conditions must also be met. + summary: Delete the specified user. + parameters: + - in: path + name: id + schema: + type: string + description: The unique identifier of a user. + required: true + tags: + - users + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '204': + description: User deleted. The client should behave as if the user logged + out. + '400': + description: |- + Bad Request + + - Is the user the only owner of any organization? + - Were all required fields provided? + '403': + description: |- + Forbidden + + - Did the Bearer token belong to the User being deleted? + /api/v1/users/current/: + get: + operationId: users_current_retrieve + description: Get user information about the current user. + summary: Current user information + tags: + - users + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: User information + /api/v1/utils/generate_password/: + post: + operationId: utils_generate_password_create + description: Endpoint for accessing utility functions + summary: Get a randomly generated password using AWS Secrets Manager, with fallback + to /dev/urandom. + parameters: + - in: query + name: length + schema: + type: integer + description: The length of the password to generate. Minimum of 8, maximum + of 4095. + required: true + - in: query + name: require_hardware_generation + schema: + type: boolean + default: false + description: 'Default behavior is to fallback to /dev/urandom if we fail to + get a random password from AWS Secrets Manager. If set to ''True'', we + will not fallback to local password generation using /dev/urandom. Default: + False' + - in: query + name: require_lowercase + schema: + type: boolean + default: true + description: 'The password must include lowercase letters [a-z]. Default: + True.' + - in: query + name: require_numbers + schema: + type: boolean + default: true + description: 'The password must include numbers [0-9]. Default: True.' + - in: query + name: require_spaces + schema: + type: boolean + default: false + description: 'The password must include spaces [ ]. Default: False.' + - in: query + name: require_symbols + schema: + type: boolean + default: false + description: 'The password must include symbols [!"#$%&''()*+,-./:;<=>?@[\]^_`{|}~]. Default: + False.' + - in: query + name: require_uppercase + schema: + type: boolean + default: true + description: 'The password must include uppercase letters [A-Z]. Default: + True.' + tags: + - utils + security: + - JWTAuth: [] + - ApiKeyAuth: [] + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/GeneratedPasswordResponse' + examples: + GenerateAPassword: + value: + value: S*f4wg8lR$7gfwefhuL>UIuyg4efb + summary: Generate a password + description: Successfully generated random password. + description: '' +components: + schemas: + AuditTrail: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: A unique identifier for the audit record. + action: + type: string + readOnly: true + description: The action that was taken. + object_id: + type: string + readOnly: true + description: The id of the object associated with the action. + object_name: + type: string + readOnly: true + description: The name of the object associated with the action, if applicable. + object_type: + allOf: + - $ref: '#/components/schemas/ObjectTypeEnum' + readOnly: true + description: The type of object associated with the action. + timestamp: + type: string + format: date-time + readOnly: true + description: The timestamp of the activity that was audited. + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + description: Details of the user associated with this change. + required: + - action + - id + - object_id + - object_name + - object_type + - timestamp + - url + - user + AuditTrailSummary: + type: object + properties: + earliest: + type: string + format: date-time + nullable: true + readOnly: true + description: The earliest audit record timestamp available. + max_days: + type: integer + readOnly: true + description: The maximum number of days the system will save auditing records, + based on your subscription. + max_records: + type: integer + readOnly: true + description: The maximum number of auditing records the system will save + based on your subscription. + total: + type: integer + readOnly: true + description: The total number of audit records available. + required: + - earliest + - max_days + - max_records + - total + AwsIntegration: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the integration. + name: + type: string + readOnly: true + description: + type: string + description: An optional description for the integration. + status: + allOf: + - $ref: '#/components/schemas/StatusEnum' + readOnly: true + description: The status of the integration connection with the third-party + provider as of the `status_last_checked_at` field. The status is updated + automatically by the server when the integration is modified. + status_detail: + type: string + readOnly: true + description: If an error occurs, more details will be available in this + field. + status_last_checked_at: + type: string + format: date-time + readOnly: true + nullable: true + description: The last time the status was evaluated. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + fqn: + type: string + readOnly: true + type: + type: string + readOnly: true + description: The type of integration. + writable: + type: boolean + description: Allow actions to write to the integration. + aws_account_id: + type: string + description: The AWS Account ID. + pattern: ^[0-9]+$ + maxLength: 12 + minLength: 12 + aws_enabled_regions: + type: array + items: + $ref: '#/components/schemas/AwsRegionEnum' + description: The AWS regions to integrate with. + aws_enabled_services: + type: array + items: + $ref: '#/components/schemas/AwsServiceEnum' + description: The AWS services to integrate with. + aws_external_id: + type: string + readOnly: true + description: This is a shared secret between the AWS Administrator who set + up your IAM trust relationship and your CloudTruth AWS Integration. CloudTruth + will generate a random value for you to give to your AWS Administrator + in order to create the necessary IAM role for proper access. + aws_kms_key_id: + type: string + nullable: true + description: 'If present, this is the KMS Key Id that is used to push values. This + key must be accessible in the AWS account (it cannot be an ARN to a key + in another AWS account). ' + pattern: ^[a-zA-Z0-9:/_\-]+$ + maxLength: 256 + aws_role_name: + type: string + description: The role that CloudTruth will assume when interacting with + your AWS Account through this integration. The role is configured by + your AWS Account Administrator. If your AWS Administrator provided you + with a value use it, otherwise make your own role name and give it to + your AWS Administrator. + pattern: ^[\w+=,.@\-]+$ + maxLength: 64 + minLength: 2 + required: + - aws_account_id + - aws_enabled_regions + - aws_enabled_services + - aws_external_id + - aws_role_name + - created_at + - fqn + - id + - modified_at + - name + - status + - status_detail + - status_last_checked_at + - type + - url + AwsIntegrationCreate: + type: object + properties: + description: + type: string + description: An optional description for the integration. + writable: + type: boolean + description: Allow actions to write to the integration. + aws_account_id: + type: string + description: The AWS Account ID. + pattern: ^[0-9]+$ + maxLength: 12 + minLength: 12 + aws_enabled_regions: + type: array + items: + $ref: '#/components/schemas/AwsRegionEnum' + description: The AWS regions to integrate with. + aws_enabled_services: + type: array + items: + $ref: '#/components/schemas/AwsServiceEnum' + description: The AWS services to integrate with. + aws_external_id: + type: string + description: This is a shared secret between the AWS Administrator who set + up your IAM trust relationship and your CloudTruth AWS Integration. CloudTruth + will generate a random value for you to give to your AWS Administrator + in order to create the necessary IAM role for proper access. + minLength: 2 + pattern: ^[\w+=,.@:/\-]*$ + maxLength: 1224 + aws_kms_key_id: + type: string + nullable: true + description: 'If present, this is the KMS Key Id that is used to push values. This + key must be accessible in the AWS account (it cannot be an ARN to a key + in another AWS account). ' + pattern: ^[a-zA-Z0-9:/_\-]+$ + maxLength: 256 + aws_role_name: + type: string + description: The role that CloudTruth will assume when interacting with + your AWS Account through this integration. The role is configured by + your AWS Account Administrator. If your AWS Administrator provided you + with a value use it, otherwise make your own role name and give it to + your AWS Administrator. + pattern: ^[\w+=,.@\-]+$ + maxLength: 64 + minLength: 2 + required: + - aws_account_id + - aws_enabled_regions + - aws_enabled_services + - aws_role_name + AwsIntegrationScan: + type: object + properties: + region: + allOf: + - $ref: '#/components/schemas/AwsRegionEnum' + description: The AWS region to use. This region must be enabled in the + integration. + service: + allOf: + - $ref: '#/components/schemas/AwsServiceEnum' + description: The AWS service to use. This service must be enabled in the + integration. + resource: + type: string + nullable: true + description: |- + Defines a pattern matching string that contains either mustache or regular expression syntax (with named capture groups) that locate the environment, project, and parameter name of the content you are looking for. + + If you are using mustache pattern matching, use: + + - ``{{ environment }}`` to identify the environment name + - ``{{ parameter }}`` to identify the parameter name + - ``{{ project }}`` to identify the project name + + If you are using a regular expression, use Python syntax with named capture groups that locate the `environment`, `project`, and `parameter`. + maxLength: 1024 + required: + - region + - resource + - service + AwsPull: + type: object + description: |- + Pull actions can be configured to get configuration and secrets from + integrations on demand. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for the action. + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + latest_task: + allOf: + - $ref: '#/components/schemas/AwsPullTask' + readOnly: true + nullable: true + description: The most recent task run for this action. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + create_environments: + type: boolean + description: Allow the pull to create environments. Any automatically created + environments will be children of the `default` environment. If an environment + needs to be created but the action does not allow it, a task step will + be added with a null operation, and success_detail will indicate the action + did not allow it. + create_projects: + type: boolean + description: Allow the pull to create projects. If a project needs to be + created but the action does not allow it, a task step will be added with + a null operation, and success_detail will indicate the action did not + allow it. + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + mapped_values: + type: array + items: + $ref: '#/components/schemas/ValueCreate' + readOnly: true + description: Values being managed by a mapped pull. + mode: + allOf: + - $ref: '#/components/schemas/ModeEnum' + readOnly: true + description: |- + The pull mode used. + + A pattern pull uses a pattern-matching resource string with mustache-style markers to identify the project, parameter, and environment names, or with a Python regular expression that uses named capture groups that define the same three concepts. + + A mapped pull uses a specific resource and JMESpath expression to deliver a value to a specific project, parameter, and environment. This leverages external value linkages made in the value editor, and there is one mapped pull per integration provided by the system so that you can trigger external value pull synchronizations. + region: + allOf: + - $ref: '#/components/schemas/AwsRegionEnum' + description: The AWS region to use. This region must be enabled in the + integration. + service: + allOf: + - $ref: '#/components/schemas/AwsServiceEnum' + description: The AWS service to use. This service must be enabled in the + integration. + resource: + type: string + nullable: true + description: |- + Defines a pattern matching string that contains either mustache or regular expression syntax (with named capture groups) that locate the environment, project, and parameter name of the content you are looking for. + + If you are using mustache pattern matching, use: + + - ``{{ environment }}`` to identify the environment name + - ``{{ parameter }}`` to identify the parameter name + - ``{{ project }}`` to identify the project name + + If you are using a regular expression, use Python syntax with named capture groups that locate the `environment`, `project`, and `parameter`. + maxLength: 1024 + required: + - created_at + - id + - latest_task + - mapped_values + - mode + - modified_at + - name + - region + - resource + - service + - url + AwsPullSyncActionRequest: + type: object + properties: + dry_run: + type: boolean + writeOnly: true + description: Allows you to set the dry_run flag on the pull action before + triggering a sync. + AwsPullTask: + type: object + description: Pull task for an AWS integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the task. + reason: + type: string + nullable: true + description: The reason why this task was triggered. + maxLength: 256 + dry_run: + type: boolean + description: Indicates task steps were only simulated, not actually performed. + state: + allOf: + - $ref: '#/components/schemas/StateEnum' + description: The current state of this task. + error_code: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this code may be helpful in determining the problem. + maxLength: 256 + error_detail: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this detail may be helpful in determining the problem. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - url + AwsPullTaskStep: + type: object + description: Pull task step for an AWS integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for a task step. + operation: + allOf: + - $ref: '#/components/schemas/OperationEnum' + nullable: true + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + success: + type: boolean + description: Indicates if the operation was successful. + success_detail: + type: string + nullable: true + description: Additional details about the successful operation, if any. + fqn: + type: string + nullable: true + description: The fully-qualified name (FQN) this of the value that was changed. + maxLength: 1024 + environment: + type: string + format: uri + readOnly: true + nullable: true + description: The environment affected by this step. + environment_id: + type: string + format: uuid + nullable: true + description: The environment id involved in the operation. + environment_name: + type: string + nullable: true + description: The environment name involved in the operation. + maxLength: 256 + project: + type: string + format: uri + readOnly: true + nullable: true + description: The project affected by this step. + project_id: + type: string + format: uuid + nullable: true + description: The project id involved in the operation. + project_name: + type: string + nullable: true + description: The project name involved in the operation. + maxLength: 256 + parameter: + type: string + format: uri + readOnly: true + nullable: true + description: The parameter affected by this step. + parameter_id: + type: string + format: uuid + nullable: true + description: The parameter id involved in the operation. + parameter_name: + type: string + nullable: true + description: The parameter name involved in the operation. + maxLength: 256 + venue_id: + type: string + nullable: true + description: The integration-native id for the resource. + maxLength: 2048 + venue_name: + type: string + nullable: true + description: The name of the item or resource as known by the integration. + maxLength: 1024 + summary: + type: string + nullable: true + description: The summary of this step (what it was trying to do). + error_code: + type: string + nullable: true + description: An error code, if not successful. + maxLength: 256 + error_detail: + type: string + nullable: true + description: Details on the error that occurred during processing. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - environment + - id + - modified_at + - parameter + - project + - success + - url + AwsPush: + type: object + description: |- + Push actions can be configured to send configuration and secrets to + integrations when tags are updated. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for the action. + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + latest_task: + allOf: + - $ref: '#/components/schemas/AwsPushTask' + readOnly: true + nullable: true + description: The most recent task run for this action. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + coerce_parameters: + type: boolean + description: This setting allows parameters (non-secrets) to be pushed to + a destination that only supports storing secrets. This may increase your + overall cost from the cloud provider as some cloud providers charge a + premium for secrets-only storage. + include_parameters: + type: boolean + description: Include parameters (non-secrets) in the values being pushed. This + setting requires the destination to support parameters or for the `coerce_parameters` + flag to be enabled, otherwise the push will fail. + include_secrets: + type: boolean + description: Include secrets in the values being pushed. This setting requires + the destination to support secrets, otherwise the push will fail. + include_templates: + type: boolean + description: Include templates in the values being pushed. + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + force: + type: boolean + description: Normally, push will check to see if it originated the values + in the destination before making changes to them. Forcing a push disables + the ownership check. + local: + type: boolean + description: Normally, push will process all parameters including those + that flow in from project dependencies. Declaring a push as `local` will + cause it to only process the parameters defined in the selected projects. + projects: + type: array + items: + type: string + format: uri + description: Projects that are included in the push. + tags: + type: array + items: + type: string + format: uri + description: Tags are used to select parameters by environment from the + projects included in the push. You cannot have two tags from the same + environment in the same push. + region: + allOf: + - $ref: '#/components/schemas/AwsRegionEnum' + description: The AWS region this push targets. This region must be enabled + in the integration. + service: + allOf: + - $ref: '#/components/schemas/AwsServiceEnum' + description: The AWS service this push targets. This service must be enabled + in the integration. + resource: + type: string + nullable: true + description: |- + Defines a path through the integration to the location where values will be pushed. + + The following mustache-style substitutions can be used in the string: + + - ``{{ environment }}`` to insert the environment name + - ``{{ parameter }}`` to insert the parameter name + - ``{{ project }}`` to insert the project name + - ``{{ push }}`` to insert the push name + - ``{{ tag }}`` to insert the tag name + + We recommend that you use project, environment, and parameter at a minimum to disambiguate your pushed resource identifiers. + + If you include multiple projects in the push, the `project` substitution is required. If you include multiple tags from different environments in the push, the `environment` substitution is required. If you include multiple tags from the same environment in the push, the `tag` substitution is required. In all cases, the `parameter` substitution is always required. + maxLength: 1024 + required: + - created_at + - id + - latest_task + - modified_at + - name + - projects + - region + - resource + - service + - tags + - url + AwsPushTask: + type: object + description: Push task for an AWS integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the task. + reason: + type: string + nullable: true + description: The reason why this task was triggered. + maxLength: 256 + dry_run: + type: boolean + description: Indicates task steps were only simulated, not actually performed. + state: + allOf: + - $ref: '#/components/schemas/StateEnum' + description: The current state of this task. + error_code: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this code may be helpful in determining the problem. + maxLength: 256 + error_detail: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this detail may be helpful in determining the problem. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - url + AwsPushTaskStep: + type: object + description: Push task step for an AWS integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for a task step. + operation: + allOf: + - $ref: '#/components/schemas/OperationEnum' + nullable: true + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + success: + type: boolean + description: Indicates if the operation was successful. + success_detail: + type: string + nullable: true + description: Additional details about the successful operation, if any. + fqn: + type: string + nullable: true + description: The fully-qualified name (FQN) this of the value that was changed. + maxLength: 1024 + environment: + type: string + format: uri + readOnly: true + nullable: true + description: The environment affected by this step. + environment_id: + type: string + format: uuid + nullable: true + description: The environment id involved in the operation. + environment_name: + type: string + nullable: true + description: The environment name involved in the operation. + maxLength: 256 + project: + type: string + format: uri + readOnly: true + nullable: true + description: The project affected by this step. + project_id: + type: string + format: uuid + nullable: true + description: The project id involved in the operation. + project_name: + type: string + nullable: true + description: The project name involved in the operation. + maxLength: 256 + parameter: + type: string + format: uri + readOnly: true + nullable: true + description: The parameter affected by this step. + parameter_id: + type: string + format: uuid + nullable: true + description: The parameter id involved in the operation. + parameter_name: + type: string + nullable: true + description: The parameter name involved in the operation. + maxLength: 256 + venue_id: + type: string + nullable: true + description: The integration-native id for the resource. + maxLength: 2048 + venue_name: + type: string + nullable: true + description: The name of the item or resource as known by the integration. + maxLength: 1024 + summary: + type: string + nullable: true + description: The summary of this step (what it was trying to do). + error_code: + type: string + nullable: true + description: An error code, if not successful. + maxLength: 256 + error_detail: + type: string + nullable: true + description: Details on the error that occurred during processing. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - environment + - id + - modified_at + - parameter + - project + - success + - url + AwsPushUpdate: + type: object + description: Update a push. The `region` and `service` cannot be changed on + an existing push. + properties: + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + projects: + type: array + items: + type: string + format: uri + description: Projects that are included in the push. + tags: + type: array + items: + type: string + format: uri + description: Tags are used to select parameters by environment from the + projects included in the push. You cannot have two tags from the same + environment in the same push. + resource: + type: string + nullable: true + description: |- + Defines a path through the integration to the location where values will be pushed. + + The following mustache-style substitutions can be used in the string: + + - ``{{ environment }}`` to insert the environment name + - ``{{ parameter }}`` to insert the parameter name + - ``{{ project }}`` to insert the project name + - ``{{ push }}`` to insert the push name + - ``{{ tag }}`` to insert the tag name + + We recommend that you use project, environment, and parameter at a minimum to disambiguate your pushed resource identifiers. + + If you include multiple projects in the push, the `project` substitution is required. If you include multiple tags from different environments in the push, the `environment` substitution is required. If you include multiple tags from the same environment in the push, the `tag` substitution is required. In all cases, the `parameter` substitution is always required. + maxLength: 1024 + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + force: + type: boolean + description: Normally, push will check to see if it originated the values + in the destination before making changes to them. Forcing a push disables + the ownership check. + local: + type: boolean + description: Normally, push will process all parameters including those + that flow in from project dependencies. Declaring a push as `local` will + cause it to only process the parameters defined in the selected projects. + coerce_parameters: + type: boolean + description: This setting allows parameters (non-secrets) to be pushed to + a destination that only supports storing secrets. This may increase your + overall cost from the cloud provider as some cloud providers charge a + premium for secrets-only storage. + include_parameters: + type: boolean + description: Include parameters (non-secrets) in the values being pushed. This + setting requires the destination to support parameters or for the `coerce_parameters` + flag to be enabled, otherwise the push will fail. + include_secrets: + type: boolean + description: Include secrets in the values being pushed. This setting requires + the destination to support secrets, otherwise the push will fail. + include_templates: + type: boolean + description: Include templates in the values being pushed. + required: + - name + - projects + - resource + - tags + AwsRegionEnum: + enum: + - af-south-1 + - ap-east-1 + - ap-northeast-1 + - ap-northeast-2 + - ap-northeast-3 + - ap-south-1 + - ap-southeast-1 + - ap-southeast-2 + - ca-central-1 + - cn-north-1 + - cn-northwest-1 + - eu-central-1 + - eu-north-1 + - eu-south-1 + - eu-west-1 + - eu-west-2 + - eu-west-3 + - me-south-1 + - sa-east-1 + - us-east-1 + - us-east-2 + - us-west-1 + - us-west-2 + type: string + AwsServiceEnum: + enum: + - s3 + - secretsmanager + - ssm + type: string + AzureKeyVaultIntegration: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the integration. + name: + type: string + readOnly: true + description: + type: string + description: An optional description for the integration. + status: + allOf: + - $ref: '#/components/schemas/StatusEnum' + readOnly: true + description: The status of the integration connection with the third-party + provider as of the `status_last_checked_at` field. The status is updated + automatically by the server when the integration is modified. + status_detail: + type: string + readOnly: true + description: If an error occurs, more details will be available in this + field. + status_last_checked_at: + type: string + format: date-time + readOnly: true + nullable: true + description: The last time the status was evaluated. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + fqn: + type: string + readOnly: true + type: + type: string + readOnly: true + description: The type of integration. + writable: + type: boolean + description: Allow actions to write to the integration. + vault_name: + type: string + readOnly: true + description: The Azure Key Vault name. + tenant_id: + type: string + format: uuid + readOnly: true + description: The Azure Tenant ID. + required: + - created_at + - fqn + - id + - modified_at + - name + - status + - status_detail + - status_last_checked_at + - tenant_id + - type + - url + - vault_name + AzureKeyVaultIntegrationCreate: + type: object + properties: + description: + type: string + description: An optional description for the integration. + writable: + type: boolean + description: Allow actions to write to the integration. + vault_name: + type: string + description: The Azure Key Vault name. + maxLength: 24 + tenant_id: + type: string + format: uuid + description: The Azure Tenant ID. + required: + - tenant_id + - vault_name + AzureKeyVaultIntegrationScan: + type: object + properties: + resource: + type: string + nullable: true + description: |- + Defines a pattern matching string that contains either mustache or regular expression syntax (with named capture groups) that locate the environment, project, and parameter name of the content you are looking for. + + If you are using mustache pattern matching, use: + + - ``{{ environment }}`` to identify the environment name + - ``{{ parameter }}`` to identify the parameter name + - ``{{ project }}`` to identify the project name + + If you are using a regular expression, use Python syntax with named capture groups that locate the `environment`, `project`, and `parameter`. + maxLength: 1024 + required: + - resource + AzureKeyVaultPull: + type: object + description: |- + Pull actions can be configured to get configuration and secrets from + integrations on demand. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for the action. + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + latest_task: + allOf: + - $ref: '#/components/schemas/AzureKeyVaultPullTask' + readOnly: true + nullable: true + description: The most recent task run for this action. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + create_environments: + type: boolean + description: Allow the pull to create environments. Any automatically created + environments will be children of the `default` environment. If an environment + needs to be created but the action does not allow it, a task step will + be added with a null operation, and success_detail will indicate the action + did not allow it. + create_projects: + type: boolean + description: Allow the pull to create projects. If a project needs to be + created but the action does not allow it, a task step will be added with + a null operation, and success_detail will indicate the action did not + allow it. + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + mapped_values: + type: array + items: + $ref: '#/components/schemas/ValueCreate' + readOnly: true + description: Values being managed by a mapped pull. + mode: + allOf: + - $ref: '#/components/schemas/ModeEnum' + readOnly: true + description: |- + The pull mode used. + + A pattern pull uses a pattern-matching resource string with mustache-style markers to identify the project, parameter, and environment names, or with a Python regular expression that uses named capture groups that define the same three concepts. + + A mapped pull uses a specific resource and JMESpath expression to deliver a value to a specific project, parameter, and environment. This leverages external value linkages made in the value editor, and there is one mapped pull per integration provided by the system so that you can trigger external value pull synchronizations. + resource: + type: string + nullable: true + description: |- + Defines a pattern matching string that contains either mustache or regular expression syntax (with named capture groups) that locate the environment, project, and parameter name of the content you are looking for. + + If you are using mustache pattern matching, use: + + - ``{{ environment }}`` to identify the environment name + - ``{{ parameter }}`` to identify the parameter name + - ``{{ project }}`` to identify the project name + + If you are using a regular expression, use Python syntax with named capture groups that locate the `environment`, `project`, and `parameter`. + maxLength: 1024 + required: + - created_at + - id + - latest_task + - mapped_values + - mode + - modified_at + - name + - resource + - url + AzureKeyVaultPullSyncActionRequest: + type: object + properties: + dry_run: + type: boolean + writeOnly: true + description: Allows you to set the dry_run flag on the pull action before + triggering a sync. + AzureKeyVaultPullTask: + type: object + description: Pull task for an Azure Key Vault integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the task. + reason: + type: string + nullable: true + description: The reason why this task was triggered. + maxLength: 256 + dry_run: + type: boolean + description: Indicates task steps were only simulated, not actually performed. + state: + allOf: + - $ref: '#/components/schemas/StateEnum' + description: The current state of this task. + error_code: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this code may be helpful in determining the problem. + maxLength: 256 + error_detail: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this detail may be helpful in determining the problem. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - url + AzureKeyVaultPullTaskStep: + type: object + description: Pull task step for an Azure Key Vault integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for a task step. + operation: + allOf: + - $ref: '#/components/schemas/OperationEnum' + nullable: true + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + success: + type: boolean + description: Indicates if the operation was successful. + success_detail: + type: string + nullable: true + description: Additional details about the successful operation, if any. + fqn: + type: string + nullable: true + description: The fully-qualified name (FQN) this of the value that was changed. + maxLength: 1024 + environment: + type: string + format: uri + readOnly: true + nullable: true + description: The environment affected by this step. + environment_id: + type: string + format: uuid + nullable: true + description: The environment id involved in the operation. + environment_name: + type: string + nullable: true + description: The environment name involved in the operation. + maxLength: 256 + project: + type: string + format: uri + readOnly: true + nullable: true + description: The project affected by this step. + project_id: + type: string + format: uuid + nullable: true + description: The project id involved in the operation. + project_name: + type: string + nullable: true + description: The project name involved in the operation. + maxLength: 256 + parameter: + type: string + format: uri + readOnly: true + nullable: true + description: The parameter affected by this step. + parameter_id: + type: string + format: uuid + nullable: true + description: The parameter id involved in the operation. + parameter_name: + type: string + nullable: true + description: The parameter name involved in the operation. + maxLength: 256 + venue_id: + type: string + nullable: true + description: The integration-native id for the resource. + maxLength: 2048 + venue_name: + type: string + nullable: true + description: The name of the item or resource as known by the integration. + maxLength: 1024 + summary: + type: string + nullable: true + description: The summary of this step (what it was trying to do). + error_code: + type: string + nullable: true + description: An error code, if not successful. + maxLength: 256 + error_detail: + type: string + nullable: true + description: Details on the error that occurred during processing. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - environment + - id + - modified_at + - parameter + - project + - success + - url + AzureKeyVaultPush: + type: object + description: |- + Push actions can be configured to send configuration and secrets to + integrations when tags are updated. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for the action. + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + latest_task: + allOf: + - $ref: '#/components/schemas/AzureKeyVaultPushTask' + readOnly: true + nullable: true + description: The most recent task run for this action. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + coerce_parameters: + type: boolean + description: This setting allows parameters (non-secrets) to be pushed to + a destination that only supports storing secrets. This may increase your + overall cost from the cloud provider as some cloud providers charge a + premium for secrets-only storage. + include_parameters: + type: boolean + description: Include parameters (non-secrets) in the values being pushed. This + setting requires the destination to support parameters or for the `coerce_parameters` + flag to be enabled, otherwise the push will fail. + include_secrets: + type: boolean + description: Include secrets in the values being pushed. This setting requires + the destination to support secrets, otherwise the push will fail. + include_templates: + type: boolean + description: Include templates in the values being pushed. + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + force: + type: boolean + description: Normally, push will check to see if it originated the values + in the destination before making changes to them. Forcing a push disables + the ownership check. + local: + type: boolean + description: Normally, push will process all parameters including those + that flow in from project dependencies. Declaring a push as `local` will + cause it to only process the parameters defined in the selected projects. + projects: + type: array + items: + type: string + format: uri + description: Projects that are included in the push. + tags: + type: array + items: + type: string + format: uri + description: Tags are used to select parameters by environment from the + projects included in the push. You cannot have two tags from the same + environment in the same push. + resource: + type: string + nullable: true + description: |- + Defines a path through the integration to the location where values will be pushed. + + The following mustache-style substitutions can be used in the string: + + - ``{{ environment }}`` to insert the environment name + - ``{{ parameter }}`` to insert the parameter name + - ``{{ project }}`` to insert the project name + - ``{{ push }}`` to insert the push name + - ``{{ tag }}`` to insert the tag name + + We recommend that you use project, environment, and parameter at a minimum to disambiguate your pushed resource identifiers. + + If you include multiple projects in the push, the `project` substitution is required. If you include multiple tags from different environments in the push, the `environment` substitution is required. If you include multiple tags from the same environment in the push, the `tag` substitution is required. In all cases, the `parameter` substitution is always required. + maxLength: 1024 + required: + - created_at + - id + - latest_task + - modified_at + - name + - projects + - resource + - tags + - url + AzureKeyVaultPushTask: + type: object + description: Push task for an Azure Key Vault integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the task. + reason: + type: string + nullable: true + description: The reason why this task was triggered. + maxLength: 256 + dry_run: + type: boolean + description: Indicates task steps were only simulated, not actually performed. + state: + allOf: + - $ref: '#/components/schemas/StateEnum' + description: The current state of this task. + error_code: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this code may be helpful in determining the problem. + maxLength: 256 + error_detail: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this detail may be helpful in determining the problem. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - url + AzureKeyVaultPushTaskStep: + type: object + description: Push task step for an Azure Key Vault integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for a task step. + operation: + allOf: + - $ref: '#/components/schemas/OperationEnum' + nullable: true + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + success: + type: boolean + description: Indicates if the operation was successful. + success_detail: + type: string + nullable: true + description: Additional details about the successful operation, if any. + fqn: + type: string + nullable: true + description: The fully-qualified name (FQN) this of the value that was changed. + maxLength: 1024 + environment: + type: string + format: uri + readOnly: true + nullable: true + description: The environment affected by this step. + environment_id: + type: string + format: uuid + nullable: true + description: The environment id involved in the operation. + environment_name: + type: string + nullable: true + description: The environment name involved in the operation. + maxLength: 256 + project: + type: string + format: uri + readOnly: true + nullable: true + description: The project affected by this step. + project_id: + type: string + format: uuid + nullable: true + description: The project id involved in the operation. + project_name: + type: string + nullable: true + description: The project name involved in the operation. + maxLength: 256 + parameter: + type: string + format: uri + readOnly: true + nullable: true + description: The parameter affected by this step. + parameter_id: + type: string + format: uuid + nullable: true + description: The parameter id involved in the operation. + parameter_name: + type: string + nullable: true + description: The parameter name involved in the operation. + maxLength: 256 + venue_id: + type: string + nullable: true + description: The integration-native id for the resource. + maxLength: 2048 + venue_name: + type: string + nullable: true + description: The name of the item or resource as known by the integration. + maxLength: 1024 + summary: + type: string + nullable: true + description: The summary of this step (what it was trying to do). + error_code: + type: string + nullable: true + description: An error code, if not successful. + maxLength: 256 + error_detail: + type: string + nullable: true + description: Details on the error that occurred during processing. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - environment + - id + - modified_at + - parameter + - project + - success + - url + AzureKeyVaultPushUpdate: + type: object + description: Update a push. + properties: + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + projects: + type: array + items: + type: string + format: uri + description: Projects that are included in the push. + tags: + type: array + items: + type: string + format: uri + description: Tags are used to select parameters by environment from the + projects included in the push. You cannot have two tags from the same + environment in the same push. + resource: + type: string + nullable: true + description: |- + Defines a path through the integration to the location where values will be pushed. + + The following mustache-style substitutions can be used in the string: + + - ``{{ environment }}`` to insert the environment name + - ``{{ parameter }}`` to insert the parameter name + - ``{{ project }}`` to insert the project name + - ``{{ push }}`` to insert the push name + - ``{{ tag }}`` to insert the tag name + + We recommend that you use project, environment, and parameter at a minimum to disambiguate your pushed resource identifiers. + + If you include multiple projects in the push, the `project` substitution is required. If you include multiple tags from different environments in the push, the `environment` substitution is required. If you include multiple tags from the same environment in the push, the `tag` substitution is required. In all cases, the `parameter` substitution is always required. + maxLength: 1024 + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + force: + type: boolean + description: Normally, push will check to see if it originated the values + in the destination before making changes to them. Forcing a push disables + the ownership check. + local: + type: boolean + description: Normally, push will process all parameters including those + that flow in from project dependencies. Declaring a push as `local` will + cause it to only process the parameters defined in the selected projects. + coerce_parameters: + type: boolean + description: This setting allows parameters (non-secrets) to be pushed to + a destination that only supports storing secrets. This may increase your + overall cost from the cloud provider as some cloud providers charge a + premium for secrets-only storage. + include_parameters: + type: boolean + description: Include parameters (non-secrets) in the values being pushed. This + setting requires the destination to support parameters or for the `coerce_parameters` + flag to be enabled, otherwise the push will fail. + include_secrets: + type: boolean + description: Include secrets in the values being pushed. This setting requires + the destination to support secrets, otherwise the push will fail. + required: + - name + - projects + - resource + - tags + BackupDataSnapshot: + type: object + description: Environment, parameter-type, and project (including parameters + and values) data at a point in time. + properties: + environments: + type: object + additionalProperties: + $ref: '#/components/schemas/BackupEnvironment' + types: + type: object + additionalProperties: + $ref: '#/components/schemas/BackupParameterType' + projects: + type: object + additionalProperties: + $ref: '#/components/schemas/BackupProject' + timestamp: + type: string + format: date-time + required: + - environments + - projects + - timestamp + - types + BackupEnvironment: + type: object + description: Basic environment data at a point in time. + properties: + name: + type: string + parent: + type: string + nullable: true + description: + type: string + nullable: true + required: + - name + BackupExternalReference: + type: object + description: External reference data at a point in time. + properties: + fqn: + type: string + jmes_path: + type: string + nullable: true + required: + - fqn + BackupParameter: + type: object + description: Parameter, rule, and value data at a point in time. + properties: + rules: + type: object + additionalProperties: + $ref: '#/components/schemas/BackupParameterRule' + values: + type: object + additionalProperties: + allOf: + - $ref: '#/components/schemas/BackupParameterValue' + nullable: true + name: + type: string + param_type: + type: string + project: + type: string + secret: + type: boolean + description: + type: string + nullable: true + required: + - name + - param_type + - project + - rules + - secret + - values + BackupParameterRule: + type: object + description: Rule that is applied to a parameter or parameter-type at a point + in time. + properties: + rule_type: + type: string + constraint: + type: string + required: + - constraint + - rule_type + BackupParameterType: + type: object + description: Parameter type (and rule) data at a point in time. + properties: + rules: + type: object + additionalProperties: + $ref: '#/components/schemas/BackupParameterRule' + name: + type: string + parent: + type: string + description: + type: string + nullable: true + required: + - name + - parent + - rules + BackupParameterValue: + type: object + description: Parameter value data at a point in time. + properties: + external: + allOf: + - $ref: '#/components/schemas/BackupExternalReference' + nullable: true + environment: + type: string + evaluated: + type: boolean + source: + type: string + nullable: true + project: + type: string + nullable: true + value: + type: string + nullable: true + raw: + type: string + nullable: true + required: + - environment + - evaluated + - external + BackupProject: + type: object + description: Environment, parameter-type, and project (including parameters + and values) data at a point in time. + properties: + parameters: + type: object + additionalProperties: + $ref: '#/components/schemas/BackupParameter' + templates: + type: object + additionalProperties: + $ref: '#/components/schemas/BackupTemplate' + name: + type: string + parent: + type: string + nullable: true + description: + type: string + nullable: true + required: + - name + - parameters + - templates + BackupTemplate: + type: object + description: Template data at a given point in time. + properties: + name: + type: string + text: + type: string + description: + type: string + nullable: true + required: + - description + - name + - text + DiscoveredContent: + type: object + properties: + venue_id: + type: string + venue_name: + type: string + environment_name: + type: string + project_name: + type: string + parameter_name: + type: string + required: + - environment_name + - parameter_name + - project_name + - venue_id + - venue_name + DiscoveryResult: + type: object + properties: + matched: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/DiscoveredContent' + skipped: + type: object + additionalProperties: + type: string + required: + - matched + - skipped + Environment: + type: object + properties: + url: + type: string + format: uri + readOnly: true + description: The URL for the environment. + id: + type: string + readOnly: true + ledger_id: + type: string + readOnly: true + name: + type: string + description: The environment name. + description: + type: string + description: A description of the environment. You may find it helpful + to document how this environment is used to assist others when they need + to maintain software that uses this content. + parent: + type: string + format: uri + readOnly: true + nullable: true + description: Environments can inherit from a single parent environment which + provides values for parameters when specific environments do not have + a value set. Every organization has one default environment that cannot + be removed. + children: + type: array + items: + type: string + format: uri + readOnly: true + description: This is the opposite of `parent`, see that field for more details. + access_controlled: + type: boolean + description: Indicates if access control is being enforced through grants. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + nullable: true + readOnly: true + description: Your role in the environment, if the environment is access-controlled. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - children + - created_at + - id + - ledger_id + - modified_at + - name + - parent + - role + - url + EnvironmentCopy: + type: object + properties: + name: + type: string + description: The environment name. + maxLength: 256 + description: + type: string + description: A description of the environment. You may find it helpful + to document how this environment is used to assist others when they need + to maintain software that uses this content. + child_environment_names: + type: object + additionalProperties: + type: string + description: The name to use for the copied child Environment. + nullable: true + description: When copying child Environments, this indicates what name to + use for each Environment. If no name is provided for a given child Environment, + a "-1" will be appended to its name. Note that this name mapping can + be used for Environments of any level of depth in the parent-child hierarchy. + recursive: + type: boolean + description: If true, copy child environments recursively. If false, only + copy the specified project. + required: + - name + EnvironmentCreate: + type: object + properties: + name: + type: string + description: The environment name. + maxLength: 256 + description: + type: string + description: A description of the environment. You may find it helpful + to document how this environment is used to assist others when they need + to maintain software that uses this content. + parent: + type: string + format: uri + nullable: true + description: Environments can inherit from a single parent environment which + provides values for parameters when specific environments do not have + a value set. Every organization has one default environment that cannot + be removed. + required: + - name + EnvironmentUpdate: + type: object + properties: + id: + type: string + readOnly: true + name: + type: string + description: The environment name. + maxLength: 256 + description: + type: string + description: A description of the environment. You may find it helpful + to document how this environment is used to assist others when they need + to maintain software that uses this content. + parent: + type: string + format: uri + nullable: true + description: Environments can inherit from a single parent environment which + provides values for parameters when specific environments do not have + a value set. Every organization has one default environment that cannot + be removed. + children: + type: array + items: + type: string + format: uri + readOnly: true + description: This is the opposite of `parent`, see that field for more details. + access_controlled: + type: boolean + description: Indicates if access control is being enforced through grants. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + nullable: true + readOnly: true + description: Your role in the environment, if the environment is access-controlled. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - children + - created_at + - id + - modified_at + - name + - role + FeaturesResponse: + type: object + properties: + self_hosted: + type: boolean + aws_integration: + type: boolean + azure_integration: + type: boolean + github_integration: + type: boolean + required: + - aws_integration + - azure_integration + - github_integration + - self_hosted + GeneratedPasswordResponse: + type: object + properties: + value: + type: string + description: The generated password value + required: + - value + GitHubIntegration: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the integration. + name: + type: string + readOnly: true + description: + type: string + description: An optional description for the integration. + status: + allOf: + - $ref: '#/components/schemas/StatusEnum' + readOnly: true + description: The status of the integration connection with the third-party + provider as of the `status_last_checked_at` field. The status is updated + automatically by the server when the integration is modified. + status_detail: + type: string + readOnly: true + description: If an error occurs, more details will be available in this + field. + status_last_checked_at: + type: string + format: date-time + readOnly: true + nullable: true + description: The last time the status was evaluated. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + fqn: + type: string + readOnly: true + type: + type: string + readOnly: true + description: The type of integration. + writable: + type: boolean + description: Allow actions to write to the integration. + gh_installation_id: + type: integer + maximum: 2147483647 + minimum: 0 + gh_organization_slug: + type: string + readOnly: true + required: + - created_at + - fqn + - gh_installation_id + - gh_organization_slug + - id + - modified_at + - name + - status + - status_detail + - status_last_checked_at + - type + - url + GitHubIntegrationCreate: + type: object + properties: + description: + type: string + description: An optional description for the integration. + writable: + type: boolean + description: Allow actions to write to the integration. + gh_installation_id: + type: integer + maximum: 2147483647 + minimum: 0 + required: + - gh_installation_id + GitHubPull: + type: object + description: |- + Pull actions can be configured to get configuration and secrets from + integrations on demand. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for the action. + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + latest_task: + allOf: + - $ref: '#/components/schemas/GitHubPullTask' + readOnly: true + nullable: true + description: The most recent task run for this action. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + create_environments: + type: boolean + description: Allow the pull to create environments. Any automatically created + environments will be children of the `default` environment. If an environment + needs to be created but the action does not allow it, a task step will + be added with a null operation, and success_detail will indicate the action + did not allow it. + create_projects: + type: boolean + description: Allow the pull to create projects. If a project needs to be + created but the action does not allow it, a task step will be added with + a null operation, and success_detail will indicate the action did not + allow it. + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + mapped_values: + type: array + items: + $ref: '#/components/schemas/ValueCreate' + readOnly: true + description: Values being managed by a mapped pull. + mode: + allOf: + - $ref: '#/components/schemas/ModeEnum' + readOnly: true + description: |- + The pull mode used. + + A pattern pull uses a pattern-matching resource string with mustache-style markers to identify the project, parameter, and environment names, or with a Python regular expression that uses named capture groups that define the same three concepts. + + A mapped pull uses a specific resource and JMESpath expression to deliver a value to a specific project, parameter, and environment. This leverages external value linkages made in the value editor, and there is one mapped pull per integration provided by the system so that you can trigger external value pull synchronizations. + required: + - created_at + - id + - latest_task + - mapped_values + - mode + - modified_at + - name + - url + GitHubPullTask: + type: object + description: Pull task for a GitHub integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the task. + reason: + type: string + nullable: true + description: The reason why this task was triggered. + maxLength: 256 + dry_run: + type: boolean + description: Indicates task steps were only simulated, not actually performed. + state: + allOf: + - $ref: '#/components/schemas/StateEnum' + description: The current state of this task. + error_code: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this code may be helpful in determining the problem. + maxLength: 256 + error_detail: + type: string + nullable: true + description: If an error occurs early during processing, before attempting + to process values, this detail may be helpful in determining the problem. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - url + GitHubPullTaskStep: + type: object + description: Pull task step for a GitHub integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for a task step. + operation: + allOf: + - $ref: '#/components/schemas/OperationEnum' + nullable: true + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + success: + type: boolean + description: Indicates if the operation was successful. + success_detail: + type: string + nullable: true + description: Additional details about the successful operation, if any. + fqn: + type: string + nullable: true + description: The fully-qualified name (FQN) this of the value that was changed. + maxLength: 1024 + environment: + type: string + format: uri + readOnly: true + nullable: true + description: The environment affected by this step. + environment_id: + type: string + format: uuid + nullable: true + description: The environment id involved in the operation. + environment_name: + type: string + nullable: true + description: The environment name involved in the operation. + maxLength: 256 + project: + type: string + format: uri + readOnly: true + nullable: true + description: The project affected by this step. + project_id: + type: string + format: uuid + nullable: true + description: The project id involved in the operation. + project_name: + type: string + nullable: true + description: The project name involved in the operation. + maxLength: 256 + parameter: + type: string + format: uri + readOnly: true + nullable: true + description: The parameter affected by this step. + parameter_id: + type: string + format: uuid + nullable: true + description: The parameter id involved in the operation. + parameter_name: + type: string + nullable: true + description: The parameter name involved in the operation. + maxLength: 256 + venue_id: + type: string + nullable: true + description: The integration-native id for the resource. + maxLength: 2048 + venue_name: + type: string + nullable: true + description: The name of the item or resource as known by the integration. + maxLength: 1024 + summary: + type: string + nullable: true + description: The summary of this step (what it was trying to do). + error_code: + type: string + nullable: true + description: An error code, if not successful. + maxLength: 256 + error_detail: + type: string + nullable: true + description: Details on the error that occurred during processing. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - environment + - id + - modified_at + - parameter + - project + - success + - url + Grant: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: A unique identifier for the grant. + principal: + type: string + format: uri + description: The URI of a principal for the grant; this must reference a + user or group. + scope: + type: string + format: uri + description: The URI of a scope for the grant; this must reference a project + or environment. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + description: The role that the principal has in the given scope. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - principal + - role + - scope + - url + Group: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier of a group. + name: + type: string + description: The group name. + maxLength: 150 + description: + type: string + description: A description of the group. You may find it helpful to document + how this group is used to assist others when they need to maintain this + organization. + users: + type: array + items: + type: string + format: uri + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - name + - url + - users + HistoryModelEnum: + enum: + - Parameter + - ParameterRule + - Value + type: string + HistoryTypeEnum: + enum: + - create + - update + - delete + - nothing + type: string + ImportCreateRequest: + type: object + properties: + project: + type: string + description: Project name or identifier + environment: + type: string + nullable: true + description: Environment name or identifier + body: + type: string + description: Text to turn into variables + secrets: + type: array + items: + type: string + description: Parameter names that should be secrets + ignore: + type: array + items: + type: string + description: Parameter names to be ignored + add_project: + type: boolean + default: true + description: Create the project (if it does not exist) + add_environment: + type: boolean + default: true + description: Create the environment (if it does not exist) + add_parameters: + type: boolean + default: true + description: Create the parameters (if they do not exist) + add_overrides: + type: boolean + default: true + description: Create the environment value override (if they do not exist) + inherit_on_same: + type: boolean + default: true + description: Skip adding a parameter override if it is the same + required: + - body + - ignore + - project + - secrets + ImportCreateResponse: + type: object + properties: + parameter: + type: array + items: + $ref: '#/components/schemas/ImportParameter' + description: Project parameter values after import + required: + - parameter + ImportParameter: + type: object + description: Describes an imported parameter. + properties: + project_name: + type: string + description: Project name + project_id: + type: string + nullable: true + description: Project identifier + environment_name: + type: string + description: Environment where parameter is defined + environment_id: + type: string + nullable: true + description: Environment identifier where value is set + parameter_name: + type: string + description: Parameter name + parameter_id: + type: string + nullable: true + description: Parameter identifier + secret: + type: boolean + default: false + description: Whether to treat the parameter as a secret + value: + type: string + description: Parameter value in the specified environment + value_id: + type: string + nullable: true + description: Parameter value identifier in the environment + created_at: + type: string + format: date-time + nullable: true + description: Date and time the parameter value was created + modified_at: + type: string + format: date-time + nullable: true + description: Date and time the parameter value was updated + action: + type: string + description: Action taken on environment value for parameter + required: + - action + - created_at + - environment_name + - modified_at + - parameter_name + - project_name + - value + IntegrationNode: + type: object + description: Describes the content available at a given location. + properties: + fqn: + type: string + node_type: + $ref: '#/components/schemas/NodeTypeEnum' + secret: + type: boolean + name: + type: string + jmespath: + type: string + nullable: true + content_type: + type: string + nullable: true + content_data: + type: string + nullable: true + content_size: + type: integer + nullable: true + content_keys: + type: array + items: + type: string + nullable: true + venue_id: + type: string + nullable: true + required: + - fqn + - node_type + Invitation: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier of an invitation. + email: + type: string + format: email + description: The email address of the user to be invited. + maxLength: 254 + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + description: The role that the user will have in the organization, should + the user accept. + inviter: + type: string + format: uri + readOnly: true + description: The user that created the invitation. + inviter_name: + type: string + readOnly: true + description: The name of the user that created the invitation. + state: + type: string + readOnly: true + description: The current state of the invitation. + state_detail: + type: string + readOnly: true + description: Additional details about the state of the invitation. + membership: + type: string + format: uri + readOnly: true + nullable: true + description: The resulting membership, should the user accept. + organization: + type: string + format: uri + readOnly: true + description: The organization that the user will become a member of, should + the user accept. + required: + - email + - id + - inviter + - inviter_name + - membership + - organization + - role + - state + - state_detail + - url + InvitationCreate: + type: object + properties: + email: + type: string + format: email + description: The email address of the user to be invited. + maxLength: 254 + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + description: The role that the user will have in the organization, should + the user accept. + required: + - email + - role + Membership: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: A unique identifier for the membership. + user: + type: string + format: uri + description: The user of the membership. + organization: + type: string + format: uri + description: The organization that the user is a member of. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + description: The role that the user has in the organization. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - organization + - role + - url + - user + MembershipCreate: + type: object + properties: + user: + type: string + format: uri + description: The user of the membership. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + description: The role that the user has in the organization. + required: + - role + - user + ModeEnum: + enum: + - mapped + - pattern + type: string + NodeTypeEnum: + enum: + - directory + - file + - value + type: string + ObjectTypeEnum: + enum: + - AwsIntegration + - Environment + - GitHubIntegration + - Grant + - Invitation + - Membership + - Organization + - Parameter + - ParameterRule + - ParameterType + - ParameterTypeRule + - Project + - Pull + - Push + - ServiceAccount + - Tag + - Task + - Template + - Value + type: string + OperationEnum: + enum: + - create + - read + - update + - delete + type: string + Organization: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + readOnly: true + description: A unique identifier for the organization. + name: + type: string + description: The organization name. + maxLength: 256 + project_name_pattern: + type: string + description: A regular expression project names must match + maxLength: 255 + maintenance: + type: boolean + readOnly: true + description: If set, we are performing maintenance on this organization + and have disabled making changes + mfa_enabled: + type: boolean + description: Multi-factor authentication for the organization + version: + allOf: + - $ref: '#/components/schemas/VersionEnum' + readOnly: true + description: The current version of this Organization + current: + type: boolean + readOnly: true + description: Indicates if this Organization is the one currently targeted + by the Bearer token used by the client to authorize. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + readOnly: true + description: Your role in the organization. + subscription_expires_at: + type: string + format: date-time + nullable: true + readOnly: true + subscription_features: + type: array + items: + type: string + readOnly: true + subscription_id: + type: string + nullable: true + readOnly: true + subscription_plan_id: + type: string + nullable: true + readOnly: true + subscription_plan_name: + type: string + nullable: true + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - current + - id + - maintenance + - modified_at + - name + - role + - subscription_expires_at + - subscription_features + - subscription_id + - subscription_plan_id + - subscription_plan_name + - url + - version + OrganizationCreate: + type: object + properties: + name: + type: string + description: The organization name. + maxLength: 256 + mfa_enabled: + type: boolean + description: Multi-factor authentication for the organization + required: + - name + PaginatedAuditTrailList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AuditTrail' + PaginatedAwsIntegrationList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AwsIntegration' + PaginatedAwsPullList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AwsPull' + PaginatedAwsPullTaskList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AwsPullTask' + PaginatedAwsPullTaskStepList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AwsPullTaskStep' + PaginatedAwsPushList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AwsPush' + PaginatedAwsPushTaskList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AwsPushTask' + PaginatedAwsPushTaskStepList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AwsPushTaskStep' + PaginatedAzureKeyVaultIntegrationList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AzureKeyVaultIntegration' + PaginatedAzureKeyVaultPullList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AzureKeyVaultPull' + PaginatedAzureKeyVaultPullTaskList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AzureKeyVaultPullTask' + PaginatedAzureKeyVaultPullTaskStepList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AzureKeyVaultPullTaskStep' + PaginatedAzureKeyVaultPushList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AzureKeyVaultPush' + PaginatedAzureKeyVaultPushTaskList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AzureKeyVaultPushTask' + PaginatedAzureKeyVaultPushTaskStepList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AzureKeyVaultPushTaskStep' + PaginatedEnvironmentList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Environment' + PaginatedGitHubIntegrationList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/GitHubIntegration' + PaginatedGitHubPullList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/GitHubPull' + PaginatedGitHubPullTaskList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/GitHubPullTask' + PaginatedGitHubPullTaskStepList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/GitHubPullTaskStep' + PaginatedGrantList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Grant' + PaginatedGroupList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Group' + PaginatedIntegrationNodeList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/IntegrationNode' + PaginatedInvitationList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Invitation' + PaginatedMembershipList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Membership' + PaginatedOrganizationList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Organization' + PaginatedParameterDualityList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ParameterDuality' + PaginatedParameterList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Parameter' + PaginatedParameterRuleList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ParameterRule' + PaginatedParameterTypeList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ParameterType' + PaginatedParameterTypeRuleList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ParameterTypeRule' + PaginatedProjectList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Project' + PaginatedServiceAccountList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ServiceAccount' + PaginatedTagList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Tag' + PaginatedTaskStepList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/TaskStep' + PaginatedTemplateList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Template' + PaginatedUserList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/User' + PaginatedValueList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Value' + Parameter: + type: object + description: A single parameter inside of a project. + properties: + url: + type: string + format: uri + readOnly: true + description: The parameter url. + id: + type: string + readOnly: true + ledger_id: + type: string + readOnly: true + name: + type: string + description: The parameter name. + description: + type: string + secret: + type: boolean + readOnly: true + type: + type: string + description: "\n The type of this Parameter. If not provided, this\ + \ will default to\n a string for Parameters that are not overrides\ + \ or to the overridden\n Parameter's type for Parameters that are\ + \ overrides.\n " + rules: + type: array + items: + $ref: '#/components/schemas/ParameterRule' + readOnly: true + description: Rules applied to this parameter. + project: + type: string + format: uri + readOnly: true + description: The project url. + project_name: + type: string + readOnly: true + description: The project name that the parameter is within. + referencing_templates: + type: array + items: + type: string + readOnly: true + description: Templates that reference this Parameter. This field is not + valid for history requests. + referencing_values: + type: array + items: + type: string + readOnly: true + description: Dynamic values that reference this Parameter. This field is + not valid for history requests. + values: + type: object + additionalProperties: + allOf: + - $ref: '#/components/schemas/Value' + nullable: true + readOnly: true + description: "\n This dictionary has keys that correspond to\ + \ environment urls, and values\n that correspond to the effective\ + \ value for this parameter in that environment.\n Each parameter\ + \ has an effective value in every environment based on\n project\ + \ dependencies and environment inheritance.\n\n The effective\ + \ value is found by looking (within the keyed environment) up\n \ + \ the project dependencies by parameter name. If a value is not\ + \ found, the\n parent environment is consulted with the same\ + \ logic to locate a value. It\n is possible for there to be\ + \ a `null` value record for an environment, which\n means there\ + \ is no value set; it is also possible for there to be a value record\n\ + \ with a `value` of `null`, which means the value was explicitly\ + \ set to `null`.\n\n If the value's parameter does not match\ + \ the enclosing parameter (holding the\n values array) then\ + \ that value is flowing in through project dependencies.\n \ + \ Clients must recognize this in case the user asks to modify the value;\ + \ in this\n case the client must POST a new Value to the current\ + \ parameter to override the\n value coming in from the project\ + \ dependency.\n\n If the Value.environment matches the key,\ + \ then it is an explicit value set for\n that environment.\ + \ If they differ, the value was obtained from a parent\n environment\ + \ (directly or indirectly). If the value is None then no value has\n\ + \ ever been set in any environment for this parameter within\ + \ all the project\n dependencies.\n " + values_flat: + type: array + items: + $ref: '#/components/schemas/Value' + readOnly: true + description: "\n Identical to values, except the dictionary is flattened\ + \ to a list.\n Note that in this case, the environment in the Value\ + \ is the environment\n asked for, not the environment where it\ + \ was obtained.\n " + overrides: + type: string + format: uri + readOnly: true + nullable: true + description: If this parameter's project depends on another project which + provides a parameter of the same name, this parameter overrides the one + provided by the dependee. You can use this field to determine if there + will be side-effects the user should know about when deleting a parameter. Deleting + a parameter that overrides another one due to an identical name will uncover + the one from the dependee project. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - ledger_id + - modified_at + - name + - overrides + - project + - project_name + - referencing_templates + - referencing_values + - rules + - secret + - url + - values + - values_flat + ParameterCopy: + type: object + description: A single parameter inside of a project. + properties: + name: + type: string + description: The parameter name. + maxLength: 256 + description: + type: string + description: A description of the parameter. You may find it helpful to + document how this parameter is used to assist others when they need to + maintain software that uses this content. + project: + type: string + format: uri + description: The project url. + required: + - name + - project + ParameterCreate: + type: object + description: A single parameter inside of a project. + properties: + name: + type: string + description: The parameter name. + maxLength: 256 + description: + type: string + description: A description of the parameter. You may find it helpful to + document how this parameter is used to assist others when they need to + maintain software that uses this content. + secret: + type: boolean + description: Indicates if this content is secret or not. External values + are inspected on-demand to ensure they align with the parameter's secret + setting and if they do not, those external values are not allowed to be + used. + type: + type: string + description: "\n The type of this Parameter. If not provided, this\ + \ will default to\n a string for Parameters that are not overrides\ + \ or to the overridden\n Parameter's type for Parameters that are\ + \ overrides.\n " + required: + - name + ParameterDuality: + type: object + description: |- + Details about a parameter at two timepoints. + + If t1 or t2 is null then the parameter did not exist at that + timepoint. + properties: + t1: + allOf: + - $ref: '#/components/schemas/Parameter' + nullable: true + t2: + allOf: + - $ref: '#/components/schemas/Parameter' + nullable: true + required: + - t1 + - t2 + ParameterExport: + type: object + properties: + body: + type: string + readOnly: true + description: The exported parameter body. + has_secret: + type: boolean + readOnly: true + description: If True, the exported parameters include one or more secrets. + required: + - body + - has_secret + ParameterRule: + type: object + description: |- + A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead + of primary key relationships. Specifically: + + * A 'url' field is included instead of the 'id' field. + * Relationships to other instances are hyperlinks, instead of primary keys. + + NOTE: this only works with DRF 3.1.0 and above. + properties: + url: + type: string + format: uri + readOnly: true + description: The URL for the parameter rule. + id: + type: string + readOnly: true + ledger_id: + type: string + readOnly: true + parameter: + type: string + format: uri + readOnly: true + description: The parameter this rule is for. + type: + $ref: '#/components/schemas/ParameterRuleTypeEnum' + constraint: + type: string + maxLength: 1024 + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - constraint + - created_at + - id + - ledger_id + - modified_at + - parameter + - type + - url + ParameterRuleCreate: + type: object + description: |- + A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead + of primary key relationships. Specifically: + + * A 'url' field is included instead of the 'id' field. + * Relationships to other instances are hyperlinks, instead of primary keys. + + NOTE: this only works with DRF 3.1.0 and above. + properties: + type: + $ref: '#/components/schemas/ParameterRuleTypeEnum' + constraint: + type: string + maxLength: 1024 + required: + - constraint + - type + ParameterRuleTypeEnum: + enum: + - min + - max + - min_len + - max_len + - regex + type: string + ParameterRuleUpdate: + type: object + description: |- + A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead + of primary key relationships. Specifically: + + * A 'url' field is included instead of the 'id' field. + * Relationships to other instances are hyperlinks, instead of primary keys. + + NOTE: this only works with DRF 3.1.0 and above. + properties: + id: + type: string + readOnly: true + parameter: + type: string + format: uri + readOnly: true + description: The parameter this rule is for. + type: + $ref: '#/components/schemas/ParameterRuleTypeEnum' + constraint: + type: string + maxLength: 1024 + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - constraint + - created_at + - id + - modified_at + - parameter + - type + ParameterTimeline: + type: object + properties: + count: + type: integer + description: The number of records in this response. + next_as_of: + type: string + format: date-time + description: If present, additional history can be retrieved using this + timestamp in the next call for the as_of query parameter value. + results: + type: array + items: + $ref: '#/components/schemas/ParameterTimelineEntry' + required: + - count + - results + ParameterTimelineEntry: + type: object + description: Details about a single change. + properties: + history_type: + allOf: + - $ref: '#/components/schemas/HistoryTypeEnum' + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + modified_by: + type: string + history_environments: + type: array + items: + $ref: '#/components/schemas/ParameterTimelineEntryEnvironment' + readOnly: true + description: The affected environment(s). + history_model: + allOf: + - $ref: '#/components/schemas/HistoryModelEnum' + readOnly: true + description: The component of the parameter that changed. + history_parameter: + allOf: + - $ref: '#/components/schemas/ParameterTimelineEntryParameter' + readOnly: true + description: The affected parameter. + required: + - history_environments + - history_model + - history_parameter + - history_type + - modified_at + ParameterTimelineEntryEnvironment: + type: object + properties: + environment_id: + type: string + format: uuid + description: A unique identifier for the environment. + readOnly: true + nullable: true + name: + type: string + description: The environment name. + override: + type: boolean + readOnly: true + description: Indicates if the value change was direct or if it flowed into + the environment. If `true` then the value was actually set directly into + this environment. If `false` then the environment has no value set directly + so it inherited the value from its parent. + required: + - environment_id + - name + - override + ParameterTimelineEntryParameter: + type: object + properties: + parameter_id: + type: string + format: uuid + description: A unique identifier for the parameter. + nullable: true + readOnly: true + name: + type: string + description: The parameter name. + required: + - name + - parameter_id + ParameterType: + type: object + properties: + url: + type: string + format: uri + readOnly: true + description: The URL for the parameter type. + id: + type: string + readOnly: true + ledger_id: + type: string + readOnly: true + name: + type: string + description: The parameter type name. + maxLength: 256 + description: + type: string + description: A description of the parameter type, provide documentation + on how to use this type here. + rules: + type: array + items: + $ref: '#/components/schemas/ParameterTypeRule' + readOnly: true + description: Rules applied to this parameter. + parent: + type: string + format: uri + readOnly: true + nullable: true + description: The URL for this parameter type's parent + parent_name: + type: string + readOnly: true + nullable: true + description: Name of the parent ParameterType (if any). + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - ledger_id + - modified_at + - name + - parent + - parent_name + - rules + - url + ParameterTypeCreate: + type: object + properties: + name: + type: string + description: The parameter type name. + maxLength: 256 + description: + type: string + description: A description of the parameter type, provide documentation + on how to use this type here. + parent: + type: string + format: uri + description: The URL for this parameter type's parent + required: + - name + - parent + ParameterTypeRule: + type: object + description: |- + A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead + of primary key relationships. Specifically: + + * A 'url' field is included instead of the 'id' field. + * Relationships to other instances are hyperlinks, instead of primary keys. + + NOTE: this only works with DRF 3.1.0 and above. + properties: + url: + type: string + format: uri + readOnly: true + description: The URL for the project. + id: + type: string + readOnly: true + ledger_id: + type: string + readOnly: true + parameter_type: + type: string + format: uri + readOnly: true + description: The type this rule is for. + type: + $ref: '#/components/schemas/ParameterRuleTypeEnum' + constraint: + type: string + maxLength: 1024 + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - constraint + - created_at + - id + - ledger_id + - modified_at + - parameter_type + - type + - url + ParameterTypeRuleCreate: + type: object + description: |- + A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead + of primary key relationships. Specifically: + + * A 'url' field is included instead of the 'id' field. + * Relationships to other instances are hyperlinks, instead of primary keys. + + NOTE: this only works with DRF 3.1.0 and above. + properties: + type: + $ref: '#/components/schemas/ParameterRuleTypeEnum' + constraint: + type: string + maxLength: 1024 + required: + - constraint + - type + ParameterTypeRuleUpdate: + type: object + description: |- + A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead + of primary key relationships. Specifically: + + * A 'url' field is included instead of the 'id' field. + * Relationships to other instances are hyperlinks, instead of primary keys. + + NOTE: this only works with DRF 3.1.0 and above. + properties: + id: + type: string + readOnly: true + parameter_type: + type: string + format: uri + readOnly: true + description: The type this rule is for. + type: + $ref: '#/components/schemas/ParameterRuleTypeEnum' + constraint: + type: string + maxLength: 1024 + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - constraint + - created_at + - id + - modified_at + - parameter_type + - type + ParameterTypeUpdate: + type: object + properties: + id: + type: string + readOnly: true + name: + type: string + description: The parameter type name. + maxLength: 256 + description: + type: string + description: A description of the parameter type, provide documentation + on how to use this type here. + parent: + type: string + format: uri + description: The URL for this parameter type's parent + rules: + type: array + items: + $ref: '#/components/schemas/ParameterTypeRule' + readOnly: true + description: Rules applied to this parameter. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - name + - parent + - rules + ParameterUpdate: + type: object + description: A single parameter inside of a project. + properties: + id: + type: string + readOnly: true + name: + type: string + description: The parameter name. + maxLength: 256 + description: + type: string + description: A description of the parameter. You may find it helpful to + document how this parameter is used to assist others when they need to + maintain software that uses this content. + secret: + type: boolean + readOnly: true + description: Indicates if this content is secret or not. External values + are inspected on-demand to ensure they align with the parameter's secret + setting and if they do not, those external values are not allowed to be + used. + type: + type: string + description: "\n The type of this Parameter. If not provided, this\ + \ will default to\n a string for Parameters that are not overrides\ + \ or to the overridden\n Parameter's type for Parameters that are\ + \ overrides.\n " + project: + type: string + format: uri + readOnly: true + description: The project url. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - name + - project + - secret + PatchedAwsIntegration: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the integration. + name: + type: string + readOnly: true + description: + type: string + description: An optional description for the integration. + status: + allOf: + - $ref: '#/components/schemas/StatusEnum' + readOnly: true + description: The status of the integration connection with the third-party + provider as of the `status_last_checked_at` field. The status is updated + automatically by the server when the integration is modified. + status_detail: + type: string + readOnly: true + description: If an error occurs, more details will be available in this + field. + status_last_checked_at: + type: string + format: date-time + readOnly: true + nullable: true + description: The last time the status was evaluated. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + fqn: + type: string + readOnly: true + type: + type: string + readOnly: true + description: The type of integration. + writable: + type: boolean + description: Allow actions to write to the integration. + aws_account_id: + type: string + description: The AWS Account ID. + pattern: ^[0-9]+$ + maxLength: 12 + minLength: 12 + aws_enabled_regions: + type: array + items: + $ref: '#/components/schemas/AwsRegionEnum' + description: The AWS regions to integrate with. + aws_enabled_services: + type: array + items: + $ref: '#/components/schemas/AwsServiceEnum' + description: The AWS services to integrate with. + aws_external_id: + type: string + readOnly: true + description: This is a shared secret between the AWS Administrator who set + up your IAM trust relationship and your CloudTruth AWS Integration. CloudTruth + will generate a random value for you to give to your AWS Administrator + in order to create the necessary IAM role for proper access. + aws_kms_key_id: + type: string + nullable: true + description: 'If present, this is the KMS Key Id that is used to push values. This + key must be accessible in the AWS account (it cannot be an ARN to a key + in another AWS account). ' + pattern: ^[a-zA-Z0-9:/_\-]+$ + maxLength: 256 + aws_role_name: + type: string + description: The role that CloudTruth will assume when interacting with + your AWS Account through this integration. The role is configured by + your AWS Account Administrator. If your AWS Administrator provided you + with a value use it, otherwise make your own role name and give it to + your AWS Administrator. + pattern: ^[\w+=,.@\-]+$ + maxLength: 64 + minLength: 2 + PatchedAwsPull: + type: object + description: |- + Pull actions can be configured to get configuration and secrets from + integrations on demand. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for the action. + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + latest_task: + allOf: + - $ref: '#/components/schemas/AwsPullTask' + readOnly: true + nullable: true + description: The most recent task run for this action. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + create_environments: + type: boolean + description: Allow the pull to create environments. Any automatically created + environments will be children of the `default` environment. If an environment + needs to be created but the action does not allow it, a task step will + be added with a null operation, and success_detail will indicate the action + did not allow it. + create_projects: + type: boolean + description: Allow the pull to create projects. If a project needs to be + created but the action does not allow it, a task step will be added with + a null operation, and success_detail will indicate the action did not + allow it. + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + mapped_values: + type: array + items: + $ref: '#/components/schemas/ValueCreate' + readOnly: true + description: Values being managed by a mapped pull. + mode: + allOf: + - $ref: '#/components/schemas/ModeEnum' + readOnly: true + description: |- + The pull mode used. + + A pattern pull uses a pattern-matching resource string with mustache-style markers to identify the project, parameter, and environment names, or with a Python regular expression that uses named capture groups that define the same three concepts. + + A mapped pull uses a specific resource and JMESpath expression to deliver a value to a specific project, parameter, and environment. This leverages external value linkages made in the value editor, and there is one mapped pull per integration provided by the system so that you can trigger external value pull synchronizations. + region: + allOf: + - $ref: '#/components/schemas/AwsRegionEnum' + description: The AWS region to use. This region must be enabled in the + integration. + service: + allOf: + - $ref: '#/components/schemas/AwsServiceEnum' + description: The AWS service to use. This service must be enabled in the + integration. + resource: + type: string + nullable: true + description: |- + Defines a pattern matching string that contains either mustache or regular expression syntax (with named capture groups) that locate the environment, project, and parameter name of the content you are looking for. + + If you are using mustache pattern matching, use: + + - ``{{ environment }}`` to identify the environment name + - ``{{ parameter }}`` to identify the parameter name + - ``{{ project }}`` to identify the project name + + If you are using a regular expression, use Python syntax with named capture groups that locate the `environment`, `project`, and `parameter`. + maxLength: 1024 + PatchedAwsPushUpdate: + type: object + description: Update a push. The `region` and `service` cannot be changed on + an existing push. + properties: + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + projects: + type: array + items: + type: string + format: uri + description: Projects that are included in the push. + tags: + type: array + items: + type: string + format: uri + description: Tags are used to select parameters by environment from the + projects included in the push. You cannot have two tags from the same + environment in the same push. + resource: + type: string + nullable: true + description: |- + Defines a path through the integration to the location where values will be pushed. + + The following mustache-style substitutions can be used in the string: + + - ``{{ environment }}`` to insert the environment name + - ``{{ parameter }}`` to insert the parameter name + - ``{{ project }}`` to insert the project name + - ``{{ push }}`` to insert the push name + - ``{{ tag }}`` to insert the tag name + + We recommend that you use project, environment, and parameter at a minimum to disambiguate your pushed resource identifiers. + + If you include multiple projects in the push, the `project` substitution is required. If you include multiple tags from different environments in the push, the `environment` substitution is required. If you include multiple tags from the same environment in the push, the `tag` substitution is required. In all cases, the `parameter` substitution is always required. + maxLength: 1024 + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + force: + type: boolean + description: Normally, push will check to see if it originated the values + in the destination before making changes to them. Forcing a push disables + the ownership check. + local: + type: boolean + description: Normally, push will process all parameters including those + that flow in from project dependencies. Declaring a push as `local` will + cause it to only process the parameters defined in the selected projects. + coerce_parameters: + type: boolean + description: This setting allows parameters (non-secrets) to be pushed to + a destination that only supports storing secrets. This may increase your + overall cost from the cloud provider as some cloud providers charge a + premium for secrets-only storage. + include_parameters: + type: boolean + description: Include parameters (non-secrets) in the values being pushed. This + setting requires the destination to support parameters or for the `coerce_parameters` + flag to be enabled, otherwise the push will fail. + include_secrets: + type: boolean + description: Include secrets in the values being pushed. This setting requires + the destination to support secrets, otherwise the push will fail. + include_templates: + type: boolean + description: Include templates in the values being pushed. + PatchedAzureKeyVaultIntegration: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier for the integration. + name: + type: string + readOnly: true + description: + type: string + description: An optional description for the integration. + status: + allOf: + - $ref: '#/components/schemas/StatusEnum' + readOnly: true + description: The status of the integration connection with the third-party + provider as of the `status_last_checked_at` field. The status is updated + automatically by the server when the integration is modified. + status_detail: + type: string + readOnly: true + description: If an error occurs, more details will be available in this + field. + status_last_checked_at: + type: string + format: date-time + readOnly: true + nullable: true + description: The last time the status was evaluated. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + fqn: + type: string + readOnly: true + type: + type: string + readOnly: true + description: The type of integration. + writable: + type: boolean + description: Allow actions to write to the integration. + vault_name: + type: string + readOnly: true + description: The Azure Key Vault name. + tenant_id: + type: string + format: uuid + readOnly: true + description: The Azure Tenant ID. + PatchedAzureKeyVaultPull: + type: object + description: |- + Pull actions can be configured to get configuration and secrets from + integrations on demand. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for the action. + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + latest_task: + allOf: + - $ref: '#/components/schemas/AzureKeyVaultPullTask' + readOnly: true + nullable: true + description: The most recent task run for this action. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + create_environments: + type: boolean + description: Allow the pull to create environments. Any automatically created + environments will be children of the `default` environment. If an environment + needs to be created but the action does not allow it, a task step will + be added with a null operation, and success_detail will indicate the action + did not allow it. + create_projects: + type: boolean + description: Allow the pull to create projects. If a project needs to be + created but the action does not allow it, a task step will be added with + a null operation, and success_detail will indicate the action did not + allow it. + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + mapped_values: + type: array + items: + $ref: '#/components/schemas/ValueCreate' + readOnly: true + description: Values being managed by a mapped pull. + mode: + allOf: + - $ref: '#/components/schemas/ModeEnum' + readOnly: true + description: |- + The pull mode used. + + A pattern pull uses a pattern-matching resource string with mustache-style markers to identify the project, parameter, and environment names, or with a Python regular expression that uses named capture groups that define the same three concepts. + + A mapped pull uses a specific resource and JMESpath expression to deliver a value to a specific project, parameter, and environment. This leverages external value linkages made in the value editor, and there is one mapped pull per integration provided by the system so that you can trigger external value pull synchronizations. + resource: + type: string + nullable: true + description: |- + Defines a pattern matching string that contains either mustache or regular expression syntax (with named capture groups) that locate the environment, project, and parameter name of the content you are looking for. + + If you are using mustache pattern matching, use: + + - ``{{ environment }}`` to identify the environment name + - ``{{ parameter }}`` to identify the parameter name + - ``{{ project }}`` to identify the project name + + If you are using a regular expression, use Python syntax with named capture groups that locate the `environment`, `project`, and `parameter`. + maxLength: 1024 + PatchedAzureKeyVaultPushUpdate: + type: object + description: Update a push. + properties: + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + projects: + type: array + items: + type: string + format: uri + description: Projects that are included in the push. + tags: + type: array + items: + type: string + format: uri + description: Tags are used to select parameters by environment from the + projects included in the push. You cannot have two tags from the same + environment in the same push. + resource: + type: string + nullable: true + description: |- + Defines a path through the integration to the location where values will be pushed. + + The following mustache-style substitutions can be used in the string: + + - ``{{ environment }}`` to insert the environment name + - ``{{ parameter }}`` to insert the parameter name + - ``{{ project }}`` to insert the project name + - ``{{ push }}`` to insert the push name + - ``{{ tag }}`` to insert the tag name + + We recommend that you use project, environment, and parameter at a minimum to disambiguate your pushed resource identifiers. + + If you include multiple projects in the push, the `project` substitution is required. If you include multiple tags from different environments in the push, the `environment` substitution is required. If you include multiple tags from the same environment in the push, the `tag` substitution is required. In all cases, the `parameter` substitution is always required. + maxLength: 1024 + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + force: + type: boolean + description: Normally, push will check to see if it originated the values + in the destination before making changes to them. Forcing a push disables + the ownership check. + local: + type: boolean + description: Normally, push will process all parameters including those + that flow in from project dependencies. Declaring a push as `local` will + cause it to only process the parameters defined in the selected projects. + coerce_parameters: + type: boolean + description: This setting allows parameters (non-secrets) to be pushed to + a destination that only supports storing secrets. This may increase your + overall cost from the cloud provider as some cloud providers charge a + premium for secrets-only storage. + include_parameters: + type: boolean + description: Include parameters (non-secrets) in the values being pushed. This + setting requires the destination to support parameters or for the `coerce_parameters` + flag to be enabled, otherwise the push will fail. + include_secrets: + type: boolean + description: Include secrets in the values being pushed. This setting requires + the destination to support secrets, otherwise the push will fail. + PatchedEnvironmentUpdate: + type: object + properties: + id: + type: string + readOnly: true + name: + type: string + description: The environment name. + maxLength: 256 + description: + type: string + description: A description of the environment. You may find it helpful + to document how this environment is used to assist others when they need + to maintain software that uses this content. + parent: + type: string + format: uri + nullable: true + description: Environments can inherit from a single parent environment which + provides values for parameters when specific environments do not have + a value set. Every organization has one default environment that cannot + be removed. + children: + type: array + items: + type: string + format: uri + readOnly: true + description: This is the opposite of `parent`, see that field for more details. + access_controlled: + type: boolean + description: Indicates if access control is being enforced through grants. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + nullable: true + readOnly: true + description: Your role in the environment, if the environment is access-controlled. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedGitHubPull: + type: object + description: |- + Pull actions can be configured to get configuration and secrets from + integrations on demand. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for the action. + name: + type: string + description: The action name. + maxLength: 256 + description: + type: string + description: The optional description for the action. + latest_task: + allOf: + - $ref: '#/components/schemas/GitHubPullTask' + readOnly: true + nullable: true + description: The most recent task run for this action. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + create_environments: + type: boolean + description: Allow the pull to create environments. Any automatically created + environments will be children of the `default` environment. If an environment + needs to be created but the action does not allow it, a task step will + be added with a null operation, and success_detail will indicate the action + did not allow it. + create_projects: + type: boolean + description: Allow the pull to create projects. If a project needs to be + created but the action does not allow it, a task step will be added with + a null operation, and success_detail will indicate the action did not + allow it. + dry_run: + type: boolean + description: When set to dry-run mode an action will report the changes + that it would have made in task steps, however those changes are not actually + performed. + mapped_values: + type: array + items: + $ref: '#/components/schemas/ValueCreate' + readOnly: true + description: Values being managed by a mapped pull. + mode: + allOf: + - $ref: '#/components/schemas/ModeEnum' + readOnly: true + description: |- + The pull mode used. + + A pattern pull uses a pattern-matching resource string with mustache-style markers to identify the project, parameter, and environment names, or with a Python regular expression that uses named capture groups that define the same three concepts. + + A mapped pull uses a specific resource and JMESpath expression to deliver a value to a specific project, parameter, and environment. This leverages external value linkages made in the value editor, and there is one mapped pull per integration provided by the system so that you can trigger external value pull synchronizations. + PatchedGrant: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: A unique identifier for the grant. + principal: + type: string + format: uri + description: The URI of a principal for the grant; this must reference a + user or group. + scope: + type: string + format: uri + description: The URI of a scope for the grant; this must reference a project + or environment. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + description: The role that the principal has in the given scope. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedGroup: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier of a group. + name: + type: string + description: The group name. + maxLength: 150 + description: + type: string + description: A description of the group. You may find it helpful to document + how this group is used to assist others when they need to maintain this + organization. + users: + type: array + items: + type: string + format: uri + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedInvitation: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: The unique identifier of an invitation. + email: + type: string + format: email + description: The email address of the user to be invited. + maxLength: 254 + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + description: The role that the user will have in the organization, should + the user accept. + inviter: + type: string + format: uri + readOnly: true + description: The user that created the invitation. + inviter_name: + type: string + readOnly: true + description: The name of the user that created the invitation. + state: + type: string + readOnly: true + description: The current state of the invitation. + state_detail: + type: string + readOnly: true + description: Additional details about the state of the invitation. + membership: + type: string + format: uri + readOnly: true + nullable: true + description: The resulting membership, should the user accept. + organization: + type: string + format: uri + readOnly: true + description: The organization that the user will become a member of, should + the user accept. + PatchedMembership: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: A unique identifier for the membership. + user: + type: string + format: uri + description: The user of the membership. + organization: + type: string + format: uri + description: The organization that the user is a member of. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + description: The role that the user has in the organization. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedOrganization: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + readOnly: true + description: A unique identifier for the organization. + name: + type: string + description: The organization name. + maxLength: 256 + project_name_pattern: + type: string + description: A regular expression project names must match + maxLength: 255 + maintenance: + type: boolean + readOnly: true + description: If set, we are performing maintenance on this organization + and have disabled making changes + mfa_enabled: + type: boolean + description: Multi-factor authentication for the organization + version: + allOf: + - $ref: '#/components/schemas/VersionEnum' + readOnly: true + description: The current version of this Organization + current: + type: boolean + readOnly: true + description: Indicates if this Organization is the one currently targeted + by the Bearer token used by the client to authorize. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + readOnly: true + description: Your role in the organization. + subscription_expires_at: + type: string + format: date-time + nullable: true + readOnly: true + subscription_features: + type: array + items: + type: string + readOnly: true + subscription_id: + type: string + nullable: true + readOnly: true + subscription_plan_id: + type: string + nullable: true + readOnly: true + subscription_plan_name: + type: string + nullable: true + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedParameterRuleUpdate: + type: object + description: |- + A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead + of primary key relationships. Specifically: + + * A 'url' field is included instead of the 'id' field. + * Relationships to other instances are hyperlinks, instead of primary keys. + + NOTE: this only works with DRF 3.1.0 and above. + properties: + id: + type: string + readOnly: true + parameter: + type: string + format: uri + readOnly: true + description: The parameter this rule is for. + type: + $ref: '#/components/schemas/ParameterRuleTypeEnum' + constraint: + type: string + maxLength: 1024 + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedParameterTypeRuleUpdate: + type: object + description: |- + A type of `ModelSerializer` that uses hyperlinked relationships with compound keys instead + of primary key relationships. Specifically: + + * A 'url' field is included instead of the 'id' field. + * Relationships to other instances are hyperlinks, instead of primary keys. + + NOTE: this only works with DRF 3.1.0 and above. + properties: + id: + type: string + readOnly: true + parameter_type: + type: string + format: uri + readOnly: true + description: The type this rule is for. + type: + $ref: '#/components/schemas/ParameterRuleTypeEnum' + constraint: + type: string + maxLength: 1024 + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedParameterTypeUpdate: + type: object + properties: + id: + type: string + readOnly: true + name: + type: string + description: The parameter type name. + maxLength: 256 + description: + type: string + description: A description of the parameter type, provide documentation + on how to use this type here. + parent: + type: string + format: uri + description: The URL for this parameter type's parent + rules: + type: array + items: + $ref: '#/components/schemas/ParameterTypeRule' + readOnly: true + description: Rules applied to this parameter. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedParameterUpdate: + type: object + description: A single parameter inside of a project. + properties: + id: + type: string + readOnly: true + name: + type: string + description: The parameter name. + maxLength: 256 + description: + type: string + description: A description of the parameter. You may find it helpful to + document how this parameter is used to assist others when they need to + maintain software that uses this content. + secret: + type: boolean + readOnly: true + description: Indicates if this content is secret or not. External values + are inspected on-demand to ensure they align with the parameter's secret + setting and if they do not, those external values are not allowed to be + used. + type: + type: string + description: "\n The type of this Parameter. If not provided, this\ + \ will default to\n a string for Parameters that are not overrides\ + \ or to the overridden\n Parameter's type for Parameters that are\ + \ overrides.\n " + project: + type: string + format: uri + readOnly: true + description: The project url. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedProjectUpdate: + type: object + properties: + id: + type: string + readOnly: true + name: + type: string + description: The project name. + maxLength: 256 + description: + type: string + description: A description of the project. You may find it helpful to document + how this project is used to assist others when they need to maintain software + that uses this content. + parameter_name_pattern: + type: string + description: A regular expression parameter names must match + maxLength: 256 + depends_on: + type: string + format: uri + nullable: true + description: |- + Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. + + Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. + access_controlled: + type: boolean + description: Indicates if access control is being enforced through grants. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + nullable: true + readOnly: true + description: Your role in the project, if the project is access-controlled. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedServiceAccount: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + readOnly: true + owner: + type: string + format: uri + nullable: true + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + description: + type: string + description: An optional description of the process or system using the + service account. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + last_used_at: + type: string + format: date-time + readOnly: true + nullable: true + description: The most recent date and time the service account was used. It + will be null if the service account has not been used. + PatchedTagUpdate: + type: object + description: Details for updating a tag. + properties: + id: + type: string + format: uuid + readOnly: true + description: A unique identifier for the tag. + name: + type: string + description: The tag name. Tag names may contain alphanumeric, hyphen, underscore, + or period characters. Tag names are case sensitive. The name cannot be + modified. + pattern: ^[\w.-]+$ + maxLength: 64 + description: + type: string + description: A description of the tag. You may find it helpful to document + how this tag is used to assist others when they need to maintain software + that uses this content. + timestamp: + type: string + format: date-time + nullable: true + description: The point in time this tag represents. If explicitly set to + `null` then the current time will be used. + immutable: + type: boolean + description: If True, this tag cannot be modified once it is created. + PatchedTemplateUpdate: + type: object + description: A parameter template in a given project, optionally instantiated + against an environment. + properties: + id: + type: string + readOnly: true + name: + type: string + description: The template name. + maxLength: 256 + description: + type: string + description: ('A description of the template. You may find it helpful to + document how this template is used to assist others when they need to + maintain software that uses this content.',) + evaluated: + type: boolean + readOnly: true + description: If true, the `body` field has undergone evaluation. + body: + type: string + description: The content of the template. Use mustache-style templating + delimiters of `{{` and `}}` to reference parameter values by name for + substitution into the template result. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + PatchedValueUpdate: + type: object + description: |- + Unlike other UpdateSerializers, we do not inherit from the CreateSerializer here + because `environment` is not a required field for updates. + properties: + id: + type: string + readOnly: true + external: + type: boolean + description: An external parameter leverages a CloudTruth integration to + retrieve content on-demand from an external source. When this is `false` + the value is stored by CloudTruth and considered to be _internal_. When + this is `true`, the `external_fqn` field must be set. + external_fqn: + type: string + description: The FQN, or Fully-Qualified Name, is the path through the integration + to get to the desired content. This must be present and reference a valid + integration when the value is `external`. + maxLength: 1024 + external_filter: + type: string + description: If the value is `external`, the content returned by the integration + can be reduced by applying a JMESpath expression. This is valid as long + as the content is structured and of a supported format. JMESpath expressions + are supported on `json`, `yaml`, and `dotenv` content. + maxLength: 1024 + internal_value: + type: string + nullable: true + description: This is the content to use when resolving the Value for an + internal non-secret, or when storing a secret. This field cannot be specified + when creating or updating an `external` value. + maxLength: 65536 + interpolated: + type: boolean + description: 'If `true`, apply template substitution rules to this value. If + `false`, this value is a literal value. Note: secrets cannot be interpolated.' + secret: + type: boolean + nullable: true + readOnly: true + description: Indicates the value content is a secret. Normally this is + `true` when the parameter is a secret. It is possible for a parameter + to be a secret with a external value that is not a secret. It is not + possible to convert a parameter from a secret to a non-secret if any of + the values are external and a secret. Clients can check this condition + by leveraging this field. It is also possible for a parameter to not + be a secret but for this value to be dynamic and reference a Parameter + that is a secret. In this case, we indicate the value is a secret. + value: + type: string + nullable: true + readOnly: true + description: |- + This is the actual content of the Value for the given parameter in the given environment. + + If you request secret masking, no secret content will be included in the result and instead a series of asterisks will be used instead for the value. + + Clients applying this value to a shell environment should set `=` even if `value` is the empty string. If `value` is `null`, the client should unset that shell environment variable. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + Project: + type: object + properties: + url: + type: string + format: uri + readOnly: true + description: The URL for the project. + id: + type: string + readOnly: true + ledger_id: + type: string + readOnly: true + name: + type: string + description: The project name. + parameter_name_pattern: + type: string + description: A regular expression parameter names must match + maxLength: 256 + description: + type: string + description: A description of the project. You may find it helpful to document + how this project is used to assist others when they need to maintain software + that uses this content. + dependents: + type: array + items: + type: string + format: uri + readOnly: true + description: This is the opposite of `depends_on`, see that field for more + details. + depends_on: + type: string + format: uri + readOnly: true + nullable: true + description: |- + Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. + + Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. + access_controlled: + type: boolean + description: Indicates if access control is being enforced through grants. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + nullable: true + readOnly: true + description: Your role in the project, if the project is access-controlled. + pushes: + type: array + items: + type: string + readOnly: true + description: Deprecated. Blank. + push_urls: + type: array + items: + type: string + readOnly: true + description: Deprecated. Blank. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - dependents + - depends_on + - id + - ledger_id + - modified_at + - name + - push_urls + - pushes + - role + - url + ProjectCopy: + type: object + properties: + name: + type: string + description: The project name. + maxLength: 256 + description: + type: string + description: A description of the project. You may find it helpful to document + how this project is used to assist others when they need to maintain software + that uses this content. + child_project_names: + type: object + additionalProperties: + type: string + description: The name to use for the copied child Project. + nullable: true + description: When copying child Project, this indicates what name to use + for each Project. If no name is provided for a given child Project, a + "-1" will be appended to its name. Note that this name mapping can be + used for Projects of any level of depth in the parent-child hierarchy. + recursive: + type: boolean + description: If true, copy child projects recursively. If false, only copy + the specified project. + depends_on: + type: string + format: uri + nullable: true + description: |- + Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. + + Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. + required: + - name + ProjectCreate: + type: object + properties: + name: + type: string + description: The project name. + maxLength: 256 + description: + type: string + description: A description of the project. You may find it helpful to document + how this project is used to assist others when they need to maintain software + that uses this content. + parameter_name_pattern: + type: string + description: A regular expression parameter names must match + maxLength: 256 + depends_on: + type: string + format: uri + nullable: true + description: |- + Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. + + Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. + required: + - name + ProjectUpdate: + type: object + properties: + id: + type: string + readOnly: true + name: + type: string + description: The project name. + maxLength: 256 + description: + type: string + description: A description of the project. You may find it helpful to document + how this project is used to assist others when they need to maintain software + that uses this content. + parameter_name_pattern: + type: string + description: A regular expression parameter names must match + maxLength: 256 + depends_on: + type: string + format: uri + nullable: true + description: |- + Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. + + Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project. + access_controlled: + type: boolean + description: Indicates if access control is being enforced through grants. + role: + allOf: + - $ref: '#/components/schemas/RoleEnum' + nullable: true + readOnly: true + description: Your role in the project, if the project is access-controlled. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - name + - role + RoleEnum: + enum: + - OWNER + - ADMIN + - CONTRIB + - VIEWER + type: string + ServiceAccount: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + readOnly: true + owner: + type: string + format: uri + nullable: true + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + description: + type: string + description: An optional description of the process or system using the + service account. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + last_used_at: + type: string + format: date-time + readOnly: true + nullable: true + description: The most recent date and time the service account was used. It + will be null if the service account has not been used. + required: + - created_at + - id + - last_used_at + - modified_at + - url + - user + ServiceAccountCreateRequest: + type: object + properties: + name: + type: string + description: The name of the process or system using the service account. + maxLength: 128 + description: + type: string + description: An optional description of the process or system using the + service account. + role: + type: string + writeOnly: true + description: The role for the service acount + owner: + type: string + description: The owner of the service account. + maxLength: 128 + required: + - name + ServiceAccountCreateResponse: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + readOnly: true + owner: + type: string + format: uri + nullable: true + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + description: + type: string + description: An optional description of the process or system using the + service account. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + last_used_at: + type: string + format: date-time + readOnly: true + nullable: true + description: The most recent date and time the service account was used. It + will be null if the service account has not been used. + apikey: + type: string + readOnly: true + description: The API Key to use as a Bearer token for the service account. + required: + - apikey + - created_at + - id + - last_used_at + - modified_at + - url + - user + ServiceAccountUpdateRequest: + type: object + properties: + description: + type: string + description: An optional description of the process or system using the + service account. + role: + type: string + readOnly: true + description: The role for the service acount + owner: + type: string + description: The owner of the service account. + maxLength: 128 + required: + - role + StateEnum: + enum: + - queued + - running + - skipped + - success + - failure + type: string + StatusEnum: + enum: + - unknown + - pending + - checking + - connected + - errored + - missing + type: string + Tag: + type: object + description: The details of a tag. + properties: + url: + type: string + format: uri + readOnly: true + description: The URL for the tag. + id: + type: string + format: uuid + readOnly: true + description: A unique identifier for the tag. + name: + type: string + description: The tag name. Tag names may contain alphanumeric, hyphen, underscore, + or period characters. Tag names are case sensitive. The name cannot be + modified. + pattern: ^[\w.-]+$ + maxLength: 64 + description: + type: string + description: A description of the tag. You may find it helpful to document + how this tag is used to assist others when they need to maintain software + that uses this content. + timestamp: + type: string + format: date-time + description: The point in time this tag represents. + immutable: + type: boolean + description: If True, this tag cannot be modified once it is created. + pushes: + type: array + items: + $ref: '#/components/schemas/AwsPush' + readOnly: true + description: Deprecated. Use `push_urls` instead. + push_urls: + type: array + items: + type: string + format: uri + readOnly: true + description: Push actions associated with the tag. + usage: + allOf: + - $ref: '#/components/schemas/TagReadUsage' + readOnly: true + required: + - id + - name + - push_urls + - pushes + - timestamp + - url + - usage + TagCreate: + type: object + description: Details for creating a tag. + properties: + name: + type: string + description: The tag name. Tag names may contain alphanumeric, hyphen, underscore, + or period characters. Tag names are case sensitive. The name cannot be + modified. + pattern: ^[\w.-]+$ + maxLength: 64 + description: + type: string + description: A description of the tag. You may find it helpful to document + how this tag is used to assist others when they need to maintain software + that uses this content. + timestamp: + type: string + format: date-time + nullable: true + description: The point in time this tag represents. If not specified then + the current time will be used. + immutable: + type: boolean + description: If True, this tag cannot be modified once it is created. + required: + - name + TagReadUsage: + type: object + description: The read usage details of a tag. + properties: + last_read: + type: string + format: date-time + nullable: true + description: The last time a configuration was retrieved with this tag. + last_read_by: + type: string + description: The last user (id) to use this tag to read configuration. + maxLength: 256 + total_reads: + type: integer + maximum: 2147483647 + minimum: -2147483648 + description: The number of times the tag has been used to read configuration. + required: + - last_read + - total_reads + TagUpdate: + type: object + description: Details for updating a tag. + properties: + id: + type: string + format: uuid + readOnly: true + description: A unique identifier for the tag. + name: + type: string + description: The tag name. Tag names may contain alphanumeric, hyphen, underscore, + or period characters. Tag names are case sensitive. The name cannot be + modified. + pattern: ^[\w.-]+$ + maxLength: 64 + description: + type: string + description: A description of the tag. You may find it helpful to document + how this tag is used to assist others when they need to maintain software + that uses this content. + timestamp: + type: string + format: date-time + nullable: true + description: The point in time this tag represents. If explicitly set to + `null` then the current time will be used. + immutable: + type: boolean + description: If True, this tag cannot be modified once it is created. + required: + - id + - name + TaskStep: + type: object + description: |- + Each task detail documents the synchronization of a single + value through an integration. + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + format: uuid + readOnly: true + description: Unique identifier for a task step. + operation: + allOf: + - $ref: '#/components/schemas/OperationEnum' + nullable: true + description: |- + The operation performed, if any. + + When the operation is an update, there may be additional details in the success_detail field to describe the change. + + When the project is filled in but the environment and parameterare not, the operation is on the project. When the environmentis filled in but the project and parameter are not, the operationis on the environment. When the project and parameter are filledin but the environment is not, the operation is on the parameter.When all three are filled in, the operation is on the value ofthe parameter of the project in the specified environment. + success: + type: boolean + description: Indicates if the operation was successful. + success_detail: + type: string + nullable: true + description: Additional details about the successful operation, if any. + fqn: + type: string + nullable: true + description: The fully-qualified name (FQN) this of the value that was changed. + maxLength: 1024 + environment: + type: string + format: uri + readOnly: true + nullable: true + description: The environment affected by this step. + environment_id: + type: string + format: uuid + nullable: true + description: The environment id involved in the operation. + environment_name: + type: string + nullable: true + description: The environment name involved in the operation. + maxLength: 256 + project: + type: string + format: uri + readOnly: true + nullable: true + description: The project affected by this step. + project_id: + type: string + format: uuid + nullable: true + description: The project id involved in the operation. + project_name: + type: string + nullable: true + description: The project name involved in the operation. + maxLength: 256 + parameter: + type: string + format: uri + readOnly: true + nullable: true + description: The parameter affected by this step. + parameter_id: + type: string + format: uuid + nullable: true + description: The parameter id involved in the operation. + parameter_name: + type: string + nullable: true + description: The parameter name involved in the operation. + maxLength: 256 + venue_id: + type: string + nullable: true + description: The integration-native id for the resource. + maxLength: 2048 + venue_name: + type: string + nullable: true + description: The name of the item or resource as known by the integration. + maxLength: 1024 + summary: + type: string + nullable: true + description: The summary of this step (what it was trying to do). + error_code: + type: string + nullable: true + description: An error code, if not successful. + maxLength: 256 + error_detail: + type: string + nullable: true + description: Details on the error that occurred during processing. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - environment + - id + - modified_at + - parameter + - project + - success + - url + Template: + type: object + description: A parameter template in a given project, optionally instantiated + against an environment. + properties: + url: + type: string + format: uri + readOnly: true + description: The templates this value references, if interpolated. + id: + type: string + readOnly: true + ledger_id: + type: string + readOnly: true + name: + type: string + description: The template name. + description: + type: string + description: ('A description of the template. You may find it helpful to + document how this template is used to assist others when they need to + maintain software that uses this content.',) + evaluated: + type: boolean + readOnly: true + description: If true, the `body` field has undergone evaluation. + body: + type: string + description: The content of the template. Use mustache-style templating + delimiters of `{{` and `}}` to reference parameter values by name for + substitution into the template result. + referenced_projects: + type: array + items: + type: string + readOnly: true + description: Projects (other than this template's project) that this template + references. This field is not valid for history requests. + referenced_parameters: + type: array + items: + type: string + readOnly: true + description: Parameters that this template references. This field is not + valid for history requests. + referenced_templates: + type: array + items: + type: string + readOnly: true + description: Other templates that this template references. This field + is not valid for history requests. + referencing_templates: + type: array + items: + type: string + readOnly: true + description: Other templates that reference this template. This field is + not valid for history requests. + referencing_values: + type: array + items: + type: string + readOnly: true + description: The dynamic values that reference this template. This field + is not valid for history requests. + has_secret: + type: boolean + readOnly: true + default: false + description: If True, this template contains secrets. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - evaluated + - has_secret + - id + - ledger_id + - modified_at + - name + - referenced_parameters + - referenced_projects + - referenced_templates + - referencing_templates + - referencing_values + - url + TemplateCreate: + type: object + description: A parameter template in a given project, optionally instantiated + against an environment. + properties: + name: + type: string + description: The template name. + maxLength: 256 + description: + type: string + description: ('A description of the template. You may find it helpful to + document how this template is used to assist others when they need to + maintain software that uses this content.',) + body: + type: string + description: The content of the template. Use mustache-style templating + delimiters of `{{` and `}}` to reference parameter values by name for + substitution into the template result. + required: + - name + TemplateLookupError: + type: object + description: Indicates errors occurred while retrieving values to substitute + into the template. + properties: + detail: + type: array + items: + $ref: '#/components/schemas/TemplateLookupErrorEntry' + required: + - detail + TemplateLookupErrorEntry: + type: object + properties: + parameter_id: + type: string + format: uuid + description: The parameter id. + parameter_name: + type: string + description: The parameter name. + error_code: + type: string + description: The error code. + error_detail: + type: string + description: Details about the error. + required: + - error_code + - error_detail + - parameter_id + - parameter_name + TemplatePreview: + type: object + properties: + body: + type: string + description: The template body to instantiate on request, instantiated on + response. + has_secret: + type: boolean + readOnly: true + description: If True, the instantiated template contains secrets. + required: + - body + - has_secret + TemplatePreviewCreateRequest: + type: object + properties: + body: + type: string + description: The template body to instantiate on request, instantiated on + response. + required: + - body + TemplateTimeline: + type: object + properties: + count: + type: integer + description: The number of records in this response. + next_as_of: + type: string + format: date-time + description: If present, additional history can be retrieved using this + timestamp in the next call for the as_of query parameter value. + results: + type: array + items: + $ref: '#/components/schemas/TemplateTimelineEntry' + required: + - count + - results + TemplateTimelineEntry: + type: object + description: Details about a single change. + properties: + history_type: + allOf: + - $ref: '#/components/schemas/HistoryTypeEnum' + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + modified_by: + type: string + history_template: + allOf: + - $ref: '#/components/schemas/TemplateTimelineEntryTemplate' + readOnly: true + description: The template record as it was when archived for history. + required: + - history_template + - history_type + - modified_at + TemplateTimelineEntryTemplate: + type: object + description: Helper methods for all views or serializers that expose template + concepts. + properties: + id: + type: string + readOnly: true + ledger_id: + type: string + readOnly: true + name: + type: string + description: The parameter name. + description: + type: string + body: + type: string + description: The content of the template. Use mustache-style templating + delimiters of `{{` and `}}` to reference parameter values by name for + substitution into the template result. + required: + - id + - ledger_id + - name + TemplateUpdate: + type: object + description: A parameter template in a given project, optionally instantiated + against an environment. + properties: + id: + type: string + readOnly: true + name: + type: string + description: The template name. + maxLength: 256 + description: + type: string + description: ('A description of the template. You may find it helpful to + document how this template is used to assist others when they need to + maintain software that uses this content.',) + evaluated: + type: boolean + readOnly: true + description: If true, the `body` field has undergone evaluation. + body: + type: string + description: The content of the template. Use mustache-style templating + delimiters of `{{` and `}}` to reference parameter values by name for + substitution into the template result. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - evaluated + - id + - modified_at + - name + User: + type: object + properties: + url: + type: string + format: uri + readOnly: true + id: + type: string + description: The unique identifier of a user. + maxLength: 256 + type: + type: string + description: The type of user record. + maxLength: 12 + name: + type: string + nullable: true + readOnly: true + organization_name: + type: string + nullable: true + readOnly: true + description: The user's organization name. + membership_id: + type: string + nullable: true + readOnly: true + description: Membership identifier for user. + role: + type: string + nullable: true + readOnly: true + description: The user's role in the current organization (defined by the + request authorization header). + email: + type: string + nullable: true + readOnly: true + picture_url: + type: string + nullable: true + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - email + - id + - membership_id + - modified_at + - name + - organization_name + - picture_url + - role + - url + Value: + type: object + description: A value for a parameter in a given environment. + properties: + url: + type: string + format: uri + readOnly: true + description: The value url. + id: + type: string + readOnly: true + ledger_id: + type: string + readOnly: true + active_environment: + type: string + readOnly: true + description: The active environment this Value is viewed under + active_environment_id: + type: string + readOnly: true + description: The active environment id this Value is viewed under + active_environment_name: + type: string + readOnly: true + description: The name of the environment that this environment is viewed + under + environment: + type: string + format: uri + readOnly: true + description: The environment this value is set in. + environment_id: + type: string + readOnly: true + description: The environment id for this value. + environment_name: + type: string + readOnly: true + description: The environment name for this value. This is a convenience + to avoid another query against the server to resolve the environment url + into a name. + parameter: + type: string + format: uri + readOnly: true + description: The parameter this value is for. + parameter_id: + type: string + readOnly: true + description: The parameter id for this value. + external: + type: boolean + external_fqn: + type: string + external_filter: + type: string + nullable: true + external_error: + type: string + nullable: true + readOnly: true + description: This field is deprecated and unused. + external_status: + allOf: + - $ref: '#/components/schemas/TaskStep' + readOnly: true + nullable: true + description: The most recent mapped pull status for an external value. + internal_value: + type: string + nullable: true + interpolated: + type: boolean + value: + type: string + nullable: true + readOnly: true + description: |- + This is the actual content of the Value for the given parameter in the given environment. + + If you request secret masking, no secret content will be included in the result and instead a series of asterisks will be used instead for the value. + + Clients applying this value to a shell environment should set `=` even if `value` is the empty string. If `value` is `null`, the client should unset that shell environment variable. + evaluated: + type: boolean + readOnly: true + description: If true, the `value` field has undergone template evaluation. + secret: + type: boolean + nullable: true + readOnly: true + description: Indicates the value content is a secret. Normally this is + `true` when the parameter is a secret. It is possible for a parameter + to be a secret with a external value that is not a secret. It is not + possible to convert a parameter from a secret to a non-secret if any of + the values are external and a secret. Clients can check this condition + by leveraging this field. It is also possible for a parameter to not + be a secret but for this value to be dynamic and reference a Parameter + that is a secret. In this case, we indicate the value is a secret. + referenced_projects: + type: array + items: + type: string + format: uri + readOnly: true + description: The projects this value references, if dynamic. This field + is not valid for history requests. + referenced_parameters: + type: array + items: + type: string + format: uri + readOnly: true + description: The parameters this value references, if dynamic. this field + is not valid for history requests. + referenced_templates: + type: array + items: + type: string + format: uri + readOnly: true + description: The templates this value references, if dynamic. This field + is not valid for history requests. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - active_environment + - active_environment_id + - active_environment_name + - created_at + - environment + - environment_id + - environment_name + - evaluated + - external_error + - external_status + - id + - ledger_id + - modified_at + - parameter + - parameter_id + - referenced_parameters + - referenced_projects + - referenced_templates + - secret + - url + - value + ValueCreate: + type: object + description: A value for a parameter in a given environment. + properties: + environment: + type: string + format: uri + description: The environment this value is set in. + external: + type: boolean + description: An external parameter leverages a CloudTruth integration to + retrieve content on-demand from an external source. When this is `false` + the value is stored by CloudTruth and considered to be _internal_. When + this is `true`, the `external_fqn` field must be set. + external_fqn: + type: string + description: The FQN, or Fully-Qualified Name, is the path through the integration + to get to the desired content. This must be present and reference a valid + integration when the value is `external`. + maxLength: 1024 + external_filter: + type: string + description: If the value is `external`, the content returned by the integration + can be reduced by applying a JMESpath expression. This is valid as long + as the content is structured and of a supported format. JMESpath expressions + are supported on `json`, `yaml`, and `dotenv` content. + maxLength: 1024 + internal_value: + type: string + nullable: true + description: This is the content to use when resolving the Value for an + internal non-secret, or when storing a secret. This field cannot be specified + when creating or updating an `external` value. + maxLength: 65536 + interpolated: + type: boolean + description: 'If `true`, apply template substitution rules to this value. If + `false`, this value is a literal value. Note: secrets cannot be interpolated.' + required: + - environment + ValueUpdate: + type: object + description: |- + Unlike other UpdateSerializers, we do not inherit from the CreateSerializer here + because `environment` is not a required field for updates. + properties: + id: + type: string + readOnly: true + external: + type: boolean + description: An external parameter leverages a CloudTruth integration to + retrieve content on-demand from an external source. When this is `false` + the value is stored by CloudTruth and considered to be _internal_. When + this is `true`, the `external_fqn` field must be set. + external_fqn: + type: string + description: The FQN, or Fully-Qualified Name, is the path through the integration + to get to the desired content. This must be present and reference a valid + integration when the value is `external`. + maxLength: 1024 + external_filter: + type: string + description: If the value is `external`, the content returned by the integration + can be reduced by applying a JMESpath expression. This is valid as long + as the content is structured and of a supported format. JMESpath expressions + are supported on `json`, `yaml`, and `dotenv` content. + maxLength: 1024 + internal_value: + type: string + nullable: true + description: This is the content to use when resolving the Value for an + internal non-secret, or when storing a secret. This field cannot be specified + when creating or updating an `external` value. + maxLength: 65536 + interpolated: + type: boolean + description: 'If `true`, apply template substitution rules to this value. If + `false`, this value is a literal value. Note: secrets cannot be interpolated.' + secret: + type: boolean + nullable: true + readOnly: true + description: Indicates the value content is a secret. Normally this is + `true` when the parameter is a secret. It is possible for a parameter + to be a secret with a external value that is not a secret. It is not + possible to convert a parameter from a secret to a non-secret if any of + the values are external and a secret. Clients can check this condition + by leveraging this field. It is also possible for a parameter to not + be a secret but for this value to be dynamic and reference a Parameter + that is a secret. In this case, we indicate the value is a secret. + value: + type: string + nullable: true + readOnly: true + description: |- + This is the actual content of the Value for the given parameter in the given environment. + + If you request secret masking, no secret content will be included in the result and instead a series of asterisks will be used instead for the value. + + Clients applying this value to a shell environment should set `=` even if `value` is the empty string. If `value` is `null`, the client should unset that shell environment variable. + created_at: + type: string + format: date-time + readOnly: true + modified_at: + type: string + format: date-time + readOnly: true + nullable: true + required: + - created_at + - id + - modified_at + - secret + - value + VersionEnum: + enum: + - 1 + - 2 + - 3 + - 4 + type: integer + securitySchemes: + ApiKeyAuth: + in: header + name: Authorization + type: apiKey + description: "\nUse your CloudTruth API Key to authenticate to the API. You\ + \ can get\nan API Key by creating a Service Account. During setup of the\ + \ Service\nAccount you will generate a long-lived API key intended for use\ + \ by automation\nand API clients. Access through the service account will\ + \ be audited separately\nfrom any other user.\n\nIf you are just trying to\ + \ use the API in a normal workflow, this is likely the\nauthentication mechanism\ + \ you want to use.\n\nTo use the API Key, place your API Key in the Authorization\ + \ header as 'Api-Key APIKEY', where\nAPIKEY is your CloudTruth API Key. For\ + \ example:\n\n Authorization: Api-Key fskur.ghlsiudhrg84so938r5u\n \ + \ " + JWTAuth: + in: header + name: Authorization + type: apiKey + description: "\nUse your JWT to authenticate to the API. This is how the CloudTruth\n\ + Web UI authenticates to the backend. It requires a user to have already logged\ + \ in\nand gotten a JWT from the login process. This is usually done by an\ + \ Auth0 authentication\nflow from one of the Auth0 javascript libraries. \ + \ Alternatively, you can pull the\nJWT from your browser if you have a logged\ + \ in session with the CloudTruth UI.\n\nThis authentication mechanism is intended\ + \ for deeper integrations into the CloudTruth\nsystem, where you want to handle\ + \ the user logins directly in your application. For\nnormal API use, you\ + \ likely want the Api-Key authentication header and not this one.\n\nTo use\ + \ the JWT, place your JWT in the Authorization header as 'Bearer JWT', where\n\ + JWT is your JWT. For example:\n\n Authorization: Bearer eyJhbGciOiJIkuydfy.eyJzdWIiOiIxMjM....\n\ + \ " + tokenAuth: + type: http + scheme: bearer +externalDocs: + url: https://docs.cloudtruth.com/