From eaea55f7c7d7036f5e3e8151575e6a4c55bc5f1f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 28 Sep 2026 02:25:36 +0000 Subject: [PATCH 1/6] Update generated API client --- v2/api/.kiota.log | 2 + v2/api/admin/admin_request_builder.go | 10 + .../admin/general_settings_request_builder.go | 100 + .../tfpolicy_versions_request_builder.go | 127 + ..._tfpolicy_versions_item_request_builder.go | 132 + .../get_sort_query_parameter_type.go | 36 + v2/api/kiota-lock.json | 2 +- v2/api/models/admin_general_settings.go | 136 + .../models/admin_general_settings_envelope.go | 83 + ...min_general_settings_escaped_attributes.go | 709 + .../admin_general_settings_escaped_type.go | 33 + .../admin_tfpolicy_version_architecture.go | 172 + ...olicy_version_architecture_escaped_arch.go | 40 + ...fpolicy_version_architecture_escaped_os.go | 34 + .../models/admin_tfpolicy_version_create.go | 42 + .../admin_tfpolicy_version_create_envelope.go | 83 + ...olicy_version_create_escaped_attributes.go | 83 + v2/api/models/admin_tfpolicy_versions.go | 136 + ...n_tfpolicy_versions_collection_envelope.go | 153 + ...rsions_collection_envelope_escaped_meta.go | 83 + .../admin_tfpolicy_versions_envelope.go | 83 + ...in_tfpolicy_versions_escaped_attributes.go | 380 + ..._escaped_attributes_escaped_permissions.go | 113 + .../admin_tfpolicy_versions_escaped_type.go | 33 + .../models/current_state_version_envelope.go | 18 +- ..._escaped_attributes_escaped_kms_options.go | 29 + ...sets_get_response_escaped_provider_sets.go | 153 + ..._get_response_escaped_provider_setsable.go | 21 + ..._get_response_escaped_recoverable_items.go | 153 + ..._response_escaped_recoverable_itemsable.go | 21 + ...t_response_escaped_stack_configurations.go | 173 + ...sponse_escaped_stack_configurationsable.go | 23 + ...item_stacks_get_response_escaped_stacks.go | 173 + ..._stacks_get_response_escaped_stacksable.go | 23 + .../item_tasks_get_response_escaped_tasks.go | 180 + ...em_tasks_get_response_escaped_tasksable.go | 23 + ...kspaces_get_response_escaped_workspaces.go | 180 + ...ces_get_response_escaped_workspacesable.go | 23 + .../no_code_query_escaped_attributes.go | 6 +- v2/api/models/onboarding_task_lists.go | 165 + ...nboarding_task_lists_escaped_attributes.go | 141 + ...arding_task_lists_escaped_relationships.go | 83 + .../onboarding_task_lists_escaped_type.go | 33 + v2/api/models/ootb_policies.go | 200 + .../ootb_policies_escaped_attributes.go | 317 + ...olicies_escaped_attributes_escaped_kind.go | 37 + v2/api/models/ootb_policies_escaped_links.go | 83 + .../ootb_policies_escaped_relationships.go | 83 + v2/api/models/ootb_policies_escaped_type.go | 33 + .../models/ootb_policy_libraries_has_many.go | 96 + .../ootb_policy_libraries_identifier.go | 113 + ...olicy_libraries_identifier_escaped_type.go | 33 + .../models/ootb_policy_library_references.go | 143 + ...y_library_references_escaped_attributes.go | 83 + ..._policy_library_references_escaped_type.go | 33 + v2/api/models/organizations_envelope.go | 16 +- ...ions_get_response_escaped_organizations.go | 180 + ..._get_response_escaped_organizationsable.go | 23 + v2/api/models/policy_sets_envelope.go | 222 +- v2/api/models/provider_sets_envelope.go | 16 +- v2/api/models/queries_escaped_attributes.go | 12 +- ...eries_escaped_attributes_escaped_source.go | 1 + v2/api/models/runs_envelope.go | 289 + v2/api/models/stack_aggregate_outputs.go | 158 + ...ck_aggregate_outputs_escaped_attributes.go | 239 + ...tputs_escaped_attributes_escaped_status.go | 48 + ...aggregate_outputs_escaped_relationships.go | 112 + .../stack_aggregate_outputs_escaped_type.go | 33 + .../models/stack_configurations_envelope.go | 16 +- v2/api/models/stacks_envelope.go | 16 +- v2/api/models/tasks_envelope.go | 16 +- v2/api/models/teams_envelope.go | 135 + v2/api/models/workspace_transfer_events.go | 136 + ...pace_transfer_events_escaped_attributes.go | 170 + ...s_escaped_attributes_escaped_event_type.go | 51 + .../workspace_transfer_events_escaped_type.go | 33 + v2/api/models/workspaces_envelope.go | 16 +- .../organization_memberships_get_response.go | 22 +- .../get_include_query_parameter_type.go | 36 + .../item/get_include_query_parameter_type.go | 36 + ...m_organization_memberships_get_response.go | 22 +- .../item_provider_sets_get_response.go | 153 +- ...r_escaped_set_escaped_name_get_response.go | 178 + .../item_provider_sets_request_builder.go | 7 +- ...d_set_escaped_name_item_request_builder.go | 15 +- .../item_recoverable_items_get_response.go | 197 +- ...tionships_module_producers_get_response.go | 18 +- .../item_runs_request_builder.go | 2 +- .../organizations/item_stacks_get_response.go | 175 +- .../organizations/item_tasks_get_response.go | 153 +- .../organizations/item_teams_get_response.go | 28 +- .../item_vcs_events_get_response.go | 41 + ..._organization_escaped_name_get_response.go | 115 +- .../item_workspaces_get_response.go | 414 +- ...ith_workspace_escaped_name_get_response.go | 340 +- .../organizations_get_response.go | 174 +- .../item_provider_sets_get_response.go | 18 +- .../item/get_include_query_parameter_type.go | 36 + ...ovider_escaped_set_escaped_get_response.go | 178 + ...scaped_set_escaped_item_request_builder.go | 15 +- v2/api/runs/runs_get_response.go | 289 + ...em_stack_deployment_groups_get_response.go | 41 + ...aped_configuration_escaped_get_response.go | 222 + ...figuration_escaped_item_request_builder.go | 8 +- ...ment_escaped_group_escaped_get_response.go | 84 + ...aped_group_escaped_item_request_builder.go | 8 +- .../item_stack_configurations_get_response.go | 197 +- .../item/get_include_query_parameter_type.go | 45 + ...item_with_external_escaped_get_response.go | 222 + ...h_external_escaped_item_request_builder.go | 13 +- v2/api/tasks/item_tasks_get_response.go | 178 + v2/api/tasks/tasks_item_request_builder.go | 8 +- ...task_escaped_stage_escaped_get_response.go | 244 + ...aped_stage_escaped_item_request_builder.go | 8 +- v2/api/teams/item_request_builder.go | 8 +- ...item_current_state_version_get_response.go | 43 + ...m_current_state_version_request_builder.go | 8 +- .../item_provider_sets_get_response.go | 18 +- ...ips_remote_state_consumers_get_response.go | 18 +- ...tem_with_workspace_escaped_get_response.go | 396 +- ...e_escaped_transfer_escaped_get_response.go | 84 + ...d_transfer_escaped_item_request_builder.go | 8 +- v2/openapi/spec.json | 11386 +++++++++------- 123 files changed, 18267 insertions(+), 5260 deletions(-) create mode 100644 v2/api/admin/general_settings_request_builder.go create mode 100644 v2/api/admin/tfpolicy_versions_request_builder.go create mode 100644 v2/api/admin/tfpolicy_versions_tfpolicy_versions_item_request_builder.go create mode 100644 v2/api/admin/tfpolicyversions/get_sort_query_parameter_type.go create mode 100644 v2/api/models/admin_general_settings.go create mode 100644 v2/api/models/admin_general_settings_envelope.go create mode 100644 v2/api/models/admin_general_settings_escaped_attributes.go create mode 100644 v2/api/models/admin_general_settings_escaped_type.go create mode 100644 v2/api/models/admin_tfpolicy_version_architecture.go create mode 100644 v2/api/models/admin_tfpolicy_version_architecture_escaped_arch.go create mode 100644 v2/api/models/admin_tfpolicy_version_architecture_escaped_os.go create mode 100644 v2/api/models/admin_tfpolicy_version_create.go create mode 100644 v2/api/models/admin_tfpolicy_version_create_envelope.go create mode 100644 v2/api/models/admin_tfpolicy_version_create_escaped_attributes.go create mode 100644 v2/api/models/admin_tfpolicy_versions.go create mode 100644 v2/api/models/admin_tfpolicy_versions_collection_envelope.go create mode 100644 v2/api/models/admin_tfpolicy_versions_collection_envelope_escaped_meta.go create mode 100644 v2/api/models/admin_tfpolicy_versions_envelope.go create mode 100644 v2/api/models/admin_tfpolicy_versions_escaped_attributes.go create mode 100644 v2/api/models/admin_tfpolicy_versions_escaped_attributes_escaped_permissions.go create mode 100644 v2/api/models/admin_tfpolicy_versions_escaped_type.go create mode 100644 v2/api/models/item_provider_sets_get_response_escaped_provider_sets.go create mode 100644 v2/api/models/item_provider_sets_get_response_escaped_provider_setsable.go create mode 100644 v2/api/models/item_recoverable_items_get_response_escaped_recoverable_items.go create mode 100644 v2/api/models/item_recoverable_items_get_response_escaped_recoverable_itemsable.go create mode 100644 v2/api/models/item_stack_configurations_get_response_escaped_stack_configurations.go create mode 100644 v2/api/models/item_stack_configurations_get_response_escaped_stack_configurationsable.go create mode 100644 v2/api/models/item_stacks_get_response_escaped_stacks.go create mode 100644 v2/api/models/item_stacks_get_response_escaped_stacksable.go create mode 100644 v2/api/models/item_tasks_get_response_escaped_tasks.go create mode 100644 v2/api/models/item_tasks_get_response_escaped_tasksable.go create mode 100644 v2/api/models/item_workspaces_get_response_escaped_workspaces.go create mode 100644 v2/api/models/item_workspaces_get_response_escaped_workspacesable.go create mode 100644 v2/api/models/onboarding_task_lists.go create mode 100644 v2/api/models/onboarding_task_lists_escaped_attributes.go create mode 100644 v2/api/models/onboarding_task_lists_escaped_relationships.go create mode 100644 v2/api/models/onboarding_task_lists_escaped_type.go create mode 100644 v2/api/models/ootb_policies.go create mode 100644 v2/api/models/ootb_policies_escaped_attributes.go create mode 100644 v2/api/models/ootb_policies_escaped_attributes_escaped_kind.go create mode 100644 v2/api/models/ootb_policies_escaped_links.go create mode 100644 v2/api/models/ootb_policies_escaped_relationships.go create mode 100644 v2/api/models/ootb_policies_escaped_type.go create mode 100644 v2/api/models/ootb_policy_libraries_has_many.go create mode 100644 v2/api/models/ootb_policy_libraries_identifier.go create mode 100644 v2/api/models/ootb_policy_libraries_identifier_escaped_type.go create mode 100644 v2/api/models/ootb_policy_library_references.go create mode 100644 v2/api/models/ootb_policy_library_references_escaped_attributes.go create mode 100644 v2/api/models/ootb_policy_library_references_escaped_type.go create mode 100644 v2/api/models/organizations_get_response_escaped_organizations.go create mode 100644 v2/api/models/organizations_get_response_escaped_organizationsable.go create mode 100644 v2/api/models/stack_aggregate_outputs.go create mode 100644 v2/api/models/stack_aggregate_outputs_escaped_attributes.go create mode 100644 v2/api/models/stack_aggregate_outputs_escaped_attributes_escaped_status.go create mode 100644 v2/api/models/stack_aggregate_outputs_escaped_relationships.go create mode 100644 v2/api/models/stack_aggregate_outputs_escaped_type.go create mode 100644 v2/api/models/workspace_transfer_events.go create mode 100644 v2/api/models/workspace_transfer_events_escaped_attributes.go create mode 100644 v2/api/models/workspace_transfer_events_escaped_attributes_escaped_event_type.go create mode 100644 v2/api/models/workspace_transfer_events_escaped_type.go create mode 100644 v2/api/organizations/item/providersets/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/providersets/item/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item_provider_sets_item_with_provider_escaped_set_escaped_name_get_response.go create mode 100644 v2/api/providersets/item/get_include_query_parameter_type.go create mode 100644 v2/api/providersets/item_with_provider_escaped_set_escaped_get_response.go create mode 100644 v2/api/stackconfigurations/item_with_stack_escaped_configuration_escaped_get_response.go create mode 100644 v2/api/stackdeploymentgroups/item_with_stack_escaped_deployment_escaped_group_escaped_get_response.go create mode 100644 v2/api/taskconfigs/item/get_include_query_parameter_type.go create mode 100644 v2/api/taskconfigs/item_with_external_escaped_get_response.go create mode 100644 v2/api/tasks/item_tasks_get_response.go create mode 100644 v2/api/taskstages/item_with_task_escaped_stage_escaped_get_response.go create mode 100644 v2/api/workspaces/item_current_state_version_get_response.go create mode 100644 v2/api/workspacetransfers/item_with_workspace_escaped_transfer_escaped_get_response.go diff --git a/v2/api/.kiota.log b/v2/api/.kiota.log index 2c3384937..bbd8d40c3 100644 --- a/v2/api/.kiota.log +++ b/v2/api/.kiota.log @@ -1,5 +1,7 @@ Warning: KiotaBuilder OpenAPI warning: #/ - A servers entry (v3) or host + basePath + schemes properties (v2) was not present in the OpenAPI description. The root URL will need to be set manually with the request adapter. Warning: KiotaBuilder OpenAPI warning: #/paths/~1organizations~1{organization_name}~1organization-memberships/get/parameters/3/schema - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/admin-tfpolicy-version-architecture/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/admin-tfpolicy-versions/properties/attributes/properties/url - The format uri is not supported by Kiota and the string type will be used. Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-memberships/properties/attributes/properties/email - The format email is not supported by Kiota and the string type will be used. Warning: KiotaBuilder No server url found in the OpenAPI document. The base url will need to be set when using the client. Warning: KiotaBuilder Discriminator projects-identifier is not inherited from inheritedFromHasOne_data. diff --git a/v2/api/admin/admin_request_builder.go b/v2/api/admin/admin_request_builder.go index ddd13eee3..a90a12de3 100644 --- a/v2/api/admin/admin_request_builder.go +++ b/v2/api/admin/admin_request_builder.go @@ -34,6 +34,11 @@ func NewAdminRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb func (m *AdminRequestBuilder) CustomizationSettings()(*CustomizationSettingsRequestBuilder) { return NewCustomizationSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// GeneralSettings the generalSettings property +// returns a *GeneralSettingsRequestBuilder when successful +func (m *AdminRequestBuilder) GeneralSettings()(*GeneralSettingsRequestBuilder) { + return NewGeneralSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // GithubAppInstallations the githubAppInstallations property // returns a *GithubAppInstallationsRequestBuilder when successful func (m *AdminRequestBuilder) GithubAppInstallations()(*GithubAppInstallationsRequestBuilder) { @@ -49,3 +54,8 @@ func (m *AdminRequestBuilder) SamlSettings()(*SamlSettingsRequestBuilder) { func (m *AdminRequestBuilder) ScimSettings()(*ScimSettingsRequestBuilder) { return NewScimSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// TfpolicyVersions the tfpolicyVersions property +// returns a *TfpolicyVersionsRequestBuilder when successful +func (m *AdminRequestBuilder) TfpolicyVersions()(*TfpolicyVersionsRequestBuilder) { + return NewTfpolicyVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/v2/api/admin/general_settings_request_builder.go b/v2/api/admin/general_settings_request_builder.go new file mode 100644 index 000000000..ad9f31944 --- /dev/null +++ b/v2/api/admin/general_settings_request_builder.go @@ -0,0 +1,100 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package admin + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +// GeneralSettingsRequestBuilder builds and executes requests for operations under \admin\general-settings +type GeneralSettingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// GeneralSettingsRequestBuilderGetQueryParameters returns the current admin general settings singleton. This endpoint is available to all authenticated users so that the UI can read general settings values for display. The enable-public-registration attribute is only present in the response when running Terraform Enterprise. +type GeneralSettingsRequestBuilderGetQueryParameters struct { + // Return only the specified fields for general-settings resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. + FieldsgeneralSettings []string "uriparametername:\"fields%5Bgeneral%2Dsettings%5D\"" +} +// NewGeneralSettingsRequestBuilderInternal instantiates a new GeneralSettingsRequestBuilder and sets the default values. +func NewGeneralSettingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GeneralSettingsRequestBuilder) { + m := &GeneralSettingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/general-settings{?fields%5Bgeneral%2Dsettings%5D}", pathParameters), + } + return m +} +// NewGeneralSettingsRequestBuilder instantiates a new GeneralSettingsRequestBuilder and sets the default values. +func NewGeneralSettingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GeneralSettingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGeneralSettingsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the current admin general settings singleton. This endpoint is available to all authenticated users so that the UI can read general settings values for display. The enable-public-registration attribute is only present in the response when running Terraform Enterprise. +// returns a AdminGeneralSettingsEnvelopeable when successful +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *GeneralSettingsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[GeneralSettingsRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminGeneralSettingsEnvelopeable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateAdminGeneralSettingsEnvelopeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminGeneralSettingsEnvelopeable), nil +} +// Patch updates the admin general settings singleton. Only site administrators may update these settings. Partial updates are supported: only attributes present in the request body are modified. The enable-public-registration attribute is silently ignored when submitted against an HCP Terraform instance. +// returns a AdminGeneralSettingsEnvelopeable when successful +// returns a Errors error when the service returns a 422 status code +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *GeneralSettingsRequestBuilder) Patch(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminGeneralSettingsEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminGeneralSettingsEnvelopeable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateAdminGeneralSettingsEnvelopeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminGeneralSettingsEnvelopeable), nil +} +// ToGetRequestInformation returns the current admin general settings singleton. This endpoint is available to all authenticated users so that the UI can read general settings values for display. The enable-public-registration attribute is only present in the response when running Terraform Enterprise. +// returns a *RequestInformation when successful +func (m *GeneralSettingsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[GeneralSettingsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the admin general settings singleton. Only site administrators may update these settings. Partial updates are supported: only attributes present in the request body are modified. The enable-public-registration attribute is silently ignored when submitted against an HCP Terraform instance. +// returns a *RequestInformation when successful +func (m *GeneralSettingsRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminGeneralSettingsEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/vnd.api+json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *GeneralSettingsRequestBuilder when successful +func (m *GeneralSettingsRequestBuilder) WithUrl(rawUrl string)(*GeneralSettingsRequestBuilder) { + return NewGeneralSettingsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/v2/api/admin/tfpolicy_versions_request_builder.go b/v2/api/admin/tfpolicy_versions_request_builder.go new file mode 100644 index 000000000..bddbacea9 --- /dev/null +++ b/v2/api/admin/tfpolicy_versions_request_builder.go @@ -0,0 +1,127 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package admin + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ia16e8737ddf2ad063a37598194ddff2f3fb658ecf5179e2bacc2c283234bd6b9 "github.com/hashicorp/go-tfe/v2/api/admin/tfpolicyversions" +) + +// TfpolicyVersionsRequestBuilder builds and executes requests for operations under \admin\tfpolicy-versions +type TfpolicyVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TfpolicyVersionsRequestBuilderGetQueryParameters lists the TFPolicy versions registered on this installation. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +type TfpolicyVersionsRequestBuilderGetQueryParameters struct { + // Return only the specified fields for tfpolicy-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. + FieldstfpolicyVersions []string "uriparametername:\"fields%5Btfpolicy%2Dversions%5D\"" + // Returns only the TFPolicy version with an exact match on this version string. + Filterversion *string "uriparametername:\"filter%5Bversion%5D\"" + // The page number to retrieve. + Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" + // The number of items to retrieve per page. Defaults to 20. + Pagesize *int32 "uriparametername:\"page%5Bsize%5D\"" + // Returns TFPolicy versions whose version string fuzzily matches this value (case-insensitive substring match). Ignored if `filter[version]` is also present. + Searchversion *string "uriparametername:\"search%5Bversion%5D\"" + // Allows sorting the returned versions by semantic version. Valid values are "version" (ascending) and "-version" (descending). Defaults to "-version" (newest first) when omitted or blank. Any other value returns 400 Bad Request. + Sort *ia16e8737ddf2ad063a37598194ddff2f3fb658ecf5179e2bacc2c283234bd6b9.GetSortQueryParameterType "uriparametername:\"sort\"" +} +// ById gets an item from the github.com/hashicorp/go-tfe/v2/api.admin.tfpolicyVersions.item collection +// returns a *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder when successful +func (m *TfpolicyVersionsRequestBuilder) ById(id string)(*TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if id != "" { + urlTplParams["id"] = id + } + return NewTfpolicyVersionsTfpolicyVersionsItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewTfpolicyVersionsRequestBuilderInternal instantiates a new TfpolicyVersionsRequestBuilder and sets the default values. +func NewTfpolicyVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TfpolicyVersionsRequestBuilder) { + m := &TfpolicyVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/tfpolicy-versions{?fields%5Btfpolicy%2Dversions%5D,filter%5Bversion%5D*,page%5Bnumber%5D*,page%5Bsize%5D*,search%5Bversion%5D*,sort*}", pathParameters), + } + return m +} +// NewTfpolicyVersionsRequestBuilder instantiates a new TfpolicyVersionsRequestBuilder and sets the default values. +func NewTfpolicyVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TfpolicyVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTfpolicyVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the TFPolicy versions registered on this installation. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a AdminTfpolicyVersionsCollectionEnvelopeable when successful +// returns a Errors error when the service returns a 400 status code +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *TfpolicyVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TfpolicyVersionsRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsCollectionEnvelopeable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateAdminTfpolicyVersionsCollectionEnvelopeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsCollectionEnvelopeable), nil +} +// Post registers a new TFPolicy version. Requires administrator access. Provide at least one entry in `archs`, or both top-level `url` and `sha` fields. We recommend using `archs` to specify binary URLs and SHA-256 checksums. If both forms are given and include a linux/amd64 architecture, their `url`/`sha` values must match exactly or the request returns 422 Unprocessable Content. Omitting both `archs` and `url`/`sha` returns 400 Bad Request.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a AdminTfpolicyVersionsEnvelopeable when successful +// returns a Errors error when the service returns a 400 status code +// returns a Errors error when the service returns a 422 status code +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *TfpolicyVersionsRequestBuilder) Post(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionCreateEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "422": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateAdminTfpolicyVersionsEnvelopeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable), nil +} +// ToGetRequestInformation lists the TFPolicy versions registered on this installation. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *TfpolicyVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TfpolicyVersionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + return requestInfo, nil +} +// ToPostRequestInformation registers a new TFPolicy version. Requires administrator access. Provide at least one entry in `archs`, or both top-level `url` and `sha` fields. We recommend using `archs` to specify binary URLs and SHA-256 checksums. If both forms are given and include a linux/amd64 architecture, their `url`/`sha` values must match exactly or the request returns 422 Unprocessable Content. Omitting both `archs` and `url`/`sha` returns 400 Bad Request.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *TfpolicyVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionCreateEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/vnd.api+json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *TfpolicyVersionsRequestBuilder when successful +func (m *TfpolicyVersionsRequestBuilder) WithUrl(rawUrl string)(*TfpolicyVersionsRequestBuilder) { + return NewTfpolicyVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/v2/api/admin/tfpolicy_versions_tfpolicy_versions_item_request_builder.go b/v2/api/admin/tfpolicy_versions_tfpolicy_versions_item_request_builder.go new file mode 100644 index 000000000..a044a8f56 --- /dev/null +++ b/v2/api/admin/tfpolicy_versions_tfpolicy_versions_item_request_builder.go @@ -0,0 +1,132 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package admin + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +// TfpolicyVersionsTfpolicyVersionsItemRequestBuilder builds and executes requests for operations under \admin\tfpolicy-versions\{id} +type TfpolicyVersionsTfpolicyVersionsItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TfpolicyVersionsTfpolicyVersionsItemRequestBuilderGetQueryParameters returns a single TFPolicy version by its external ID. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +type TfpolicyVersionsTfpolicyVersionsItemRequestBuilderGetQueryParameters struct { + // Return only the specified fields for tfpolicy-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. + FieldstfpolicyVersions []string "uriparametername:\"fields%5Btfpolicy%2Dversions%5D\"" +} +// NewTfpolicyVersionsTfpolicyVersionsItemRequestBuilderInternal instantiates a new TfpolicyVersionsTfpolicyVersionsItemRequestBuilder and sets the default values. +func NewTfpolicyVersionsTfpolicyVersionsItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) { + m := &TfpolicyVersionsTfpolicyVersionsItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/tfpolicy-versions/{id}{?fields%5Btfpolicy%2Dversions%5D}", pathParameters), + } + return m +} +// NewTfpolicyVersionsTfpolicyVersionsItemRequestBuilder instantiates a new TfpolicyVersionsTfpolicyVersionsItemRequestBuilder and sets the default values. +func NewTfpolicyVersionsTfpolicyVersionsItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTfpolicyVersionsTfpolicyVersionsItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a TFPolicy version. Official or in-use versions cannot be destroyed. Requires administrator access. Returns 204 No Content on success.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a Errors error when the service returns a 404 status code +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get returns a single TFPolicy version by its external ID. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a AdminTfpolicyVersionsEnvelopeable when successful +// returns a Errors error when the service returns a 404 status code +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TfpolicyVersionsTfpolicyVersionsItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateAdminTfpolicyVersionsEnvelopeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable), nil +} +// Patch partially updates an existing TFPolicy version. Only attributes present in the request body are modified. Requires administrator access. Setting `enabled` to `false` while the version is in use returns 409 Conflict. Providing `archs` as an empty array returns 422 Unprocessable Content, since a TFPolicy version must always have at least one architecture; omitting `archs` leaves existing architectures unchanged.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a AdminTfpolicyVersionsEnvelopeable when successful +// returns a Errors error when the service returns a 404 status code +// returns a Errors error when the service returns a 409 status code +// returns a Errors error when the service returns a 422 status code +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) Patch(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "409": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "422": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateAdminTfpolicyVersionsEnvelopeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable), nil +} +// ToDeleteRequestInformation deletes a TFPolicy version. Official or in-use versions cannot be destroyed. Requires administrator access. Returns 204 No Content on success.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + return requestInfo, nil +} +// ToGetRequestInformation returns a single TFPolicy version by its external ID. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TfpolicyVersionsTfpolicyVersionsItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + return requestInfo, nil +} +// ToPatchRequestInformation partially updates an existing TFPolicy version. Only attributes present in the request body are modified. Requires administrator access. Setting `enabled` to `false` while the version is in use returns 409 Conflict. Providing `archs` as an empty array returns 422 Unprocessable Content, since a TFPolicy version must always have at least one architecture; omitting `archs` leaves existing architectures unchanged.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/vnd.api+json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder when successful +func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) WithUrl(rawUrl string)(*TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) { + return NewTfpolicyVersionsTfpolicyVersionsItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/v2/api/admin/tfpolicyversions/get_sort_query_parameter_type.go b/v2/api/admin/tfpolicyversions/get_sort_query_parameter_type.go new file mode 100644 index 000000000..7112c599f --- /dev/null +++ b/v2/api/admin/tfpolicyversions/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package tfpolicyversions +type GetSortQueryParameterType int + +const ( + VERSION_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + MINUS_VERSION_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"version", "-version"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := VERSION_GETSORTQUERYPARAMETERTYPE + switch v { + case "version": + result = VERSION_GETSORTQUERYPARAMETERTYPE + case "-version": + result = MINUS_VERSION_GETSORTQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/kiota-lock.json b/v2/api/kiota-lock.json index 9c67039a9..efe69ea45 100644 --- a/v2/api/kiota-lock.json +++ b/v2/api/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "5A1181302CBCBFF4259D1F76F716B78BF41AE1F3E0C5AE3815959092B2E6D005226EC3404B75EA9BF94D318AD48CAE2BEC83E0A1CF235CC0437835F4C8946BDC", + "descriptionHash": "86D5D2994A1351A9293C0CADE345CF91608CEB4607EAE285E28290A66E896CF03B92254126FBB60A1C62CA9402A42A52F1A483815392428B46FC1D7656B90353", "descriptionLocation": "../openapi/spec.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.31.1", diff --git a/v2/api/models/admin_general_settings.go b/v2/api/models/admin_general_settings.go new file mode 100644 index 000000000..ebca9ba42 --- /dev/null +++ b/v2/api/models/admin_general_settings.go @@ -0,0 +1,136 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminGeneralSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes AdminGeneralSettings_attributesable + // Always "general". + id *string + // The type property + typeEscaped *AdminGeneralSettings_type +} +// NewAdminGeneralSettings instantiates a new AdminGeneralSettings and sets the default values. +func NewAdminGeneralSettings()(*AdminGeneralSettings) { + m := &AdminGeneralSettings{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminGeneralSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminGeneralSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminGeneralSettings(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminGeneralSettings) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a AdminGeneralSettings_attributesable when successful +func (m *AdminGeneralSettings) GetAttributes()(AdminGeneralSettings_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminGeneralSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminGeneralSettings_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(AdminGeneralSettings_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAdminGeneralSettings_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*AdminGeneralSettings_type)) + } + return nil + } + return res +} +// GetId gets the id property value. Always "general". +// returns a *string when successful +func (m *AdminGeneralSettings) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *AdminGeneralSettings_type when successful +func (m *AdminGeneralSettings) GetTypeEscaped()(*AdminGeneralSettings_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *AdminGeneralSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminGeneralSettings) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *AdminGeneralSettings) SetAttributes(value AdminGeneralSettings_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. Always "general". +func (m *AdminGeneralSettings) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *AdminGeneralSettings) SetTypeEscaped(value *AdminGeneralSettings_type)() { + m.typeEscaped = value +} +type AdminGeneralSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(AdminGeneralSettings_attributesable) + GetId()(*string) + GetTypeEscaped()(*AdminGeneralSettings_type) + SetAttributes(value AdminGeneralSettings_attributesable)() + SetId(value *string)() + SetTypeEscaped(value *AdminGeneralSettings_type)() +} diff --git a/v2/api/models/admin_general_settings_envelope.go b/v2/api/models/admin_general_settings_envelope.go new file mode 100644 index 000000000..696ba3cac --- /dev/null +++ b/v2/api/models/admin_general_settings_envelope.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminGeneralSettingsEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data AdminGeneralSettingsable +} +// NewAdminGeneralSettingsEnvelope instantiates a new AdminGeneralSettingsEnvelope and sets the default values. +func NewAdminGeneralSettingsEnvelope()(*AdminGeneralSettingsEnvelope) { + m := &AdminGeneralSettingsEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminGeneralSettingsEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminGeneralSettingsEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminGeneralSettingsEnvelope(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminGeneralSettingsEnvelope) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a AdminGeneralSettingsable when successful +func (m *AdminGeneralSettingsEnvelope) GetData()(AdminGeneralSettingsable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminGeneralSettingsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminGeneralSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetData(val.(AdminGeneralSettingsable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AdminGeneralSettingsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminGeneralSettingsEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *AdminGeneralSettingsEnvelope) SetData(value AdminGeneralSettingsable)() { + m.data = value +} +type AdminGeneralSettingsEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()(AdminGeneralSettingsable) + SetData(value AdminGeneralSettingsable)() +} diff --git a/v2/api/models/admin_general_settings_escaped_attributes.go b/v2/api/models/admin_general_settings_escaped_attributes.go new file mode 100644 index 000000000..f0fedd10c --- /dev/null +++ b/v2/api/models/admin_general_settings_escaped_attributes.go @@ -0,0 +1,709 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminGeneralSettings_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The number of seconds agents wait before polling for new work. + agentPollingRetryAfter *int32 + // Whether HCP Terraform agents are enabled. + agentsEnabled *bool + // Whether speculative plans are allowed on pull requests originating from forked repositories. + allowSpeculativePlansOnPullRequestsFromForks *bool + // The number of API requests allowed per second, per user token or IP address. + apiRateLimit *int32 + // Whether API rate limiting is enabled. + apiRateLimitingEnabled *bool + // Alias of terraform-build-worker-apply-timeout. The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string. + applyTimeout *string + // The interval, in hours, at which automatic health assessments run. + automaticAssessmentInterval *int32 + // The default maximum number of organizations a single user may create. + defaultOrganizationsPerUserCeiling *int32 + // Whether new workspaces allow global remote state access by default. + defaultRemoteStateAccess *bool + // The default maximum number of workspaces per organization. + defaultWorkspacesPerOrganizationCeiling *int32 + // Whether public (self-service) user registration is enabled. Available only on Terraform Enterprise; silently ignored on HCP Terraform.This attribute is only available in Terraform Enterprise. + enablePublicRegistration *bool + // Deprecated. Always returns false. Retained for backwards compatibility with the public API contract. + fairRunQueuingEnabled *bool + // Whether the number of organizations a user may create is limited. + limitOrganizationsPerUser *bool + // Whether the creation of new organizations is limited to site administrators. + limitUserOrganizationCreation *bool + // Whether the number of workspaces per organization is limited. + limitWorkspacesPerOrganization *bool + // The maximum number of health assessments that may run concurrently. + maximumConcurrentAssessments *int32 + // Alias of terraform-build-worker-plan-timeout. The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string. + planTimeout *string + // Whether two-factor authentication is required for site administrators. + requireTwoFactorForAdmins *bool + // Whether passing commit statuses are sent for untriggered speculative plans. + sendPassingStatusesForUntriggeredSpeculativePlans *bool + // Whether stacks are enabled for use in this instance.This attribute is only available in Terraform Enterprise. + stacksEnabled *bool + // Whether the instance is licensed to use stacks. + stacksEntitled *bool + // The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string (for example, "24h"). + terraformBuildWorkerApplyTimeout *string + // The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string (for example, "24h"). + terraformBuildWorkerPlanTimeout *string +} +// NewAdminGeneralSettings_attributes instantiates a new AdminGeneralSettings_attributes and sets the default values. +func NewAdminGeneralSettings_attributes()(*AdminGeneralSettings_attributes) { + m := &AdminGeneralSettings_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminGeneralSettings_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminGeneralSettings_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminGeneralSettings_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminGeneralSettings_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAgentPollingRetryAfter gets the agent-polling-retry-after property value. The number of seconds agents wait before polling for new work. +// returns a *int32 when successful +func (m *AdminGeneralSettings_attributes) GetAgentPollingRetryAfter()(*int32) { + return m.agentPollingRetryAfter +} +// GetAgentsEnabled gets the agents-enabled property value. Whether HCP Terraform agents are enabled. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetAgentsEnabled()(*bool) { + return m.agentsEnabled +} +// GetAllowSpeculativePlansOnPullRequestsFromForks gets the allow-speculative-plans-on-pull-requests-from-forks property value. Whether speculative plans are allowed on pull requests originating from forked repositories. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetAllowSpeculativePlansOnPullRequestsFromForks()(*bool) { + return m.allowSpeculativePlansOnPullRequestsFromForks +} +// GetApiRateLimit gets the api-rate-limit property value. The number of API requests allowed per second, per user token or IP address. +// returns a *int32 when successful +func (m *AdminGeneralSettings_attributes) GetApiRateLimit()(*int32) { + return m.apiRateLimit +} +// GetApiRateLimitingEnabled gets the api-rate-limiting-enabled property value. Whether API rate limiting is enabled. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetApiRateLimitingEnabled()(*bool) { + return m.apiRateLimitingEnabled +} +// GetApplyTimeout gets the apply-timeout property value. Alias of terraform-build-worker-apply-timeout. The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string. +// returns a *string when successful +func (m *AdminGeneralSettings_attributes) GetApplyTimeout()(*string) { + return m.applyTimeout +} +// GetAutomaticAssessmentInterval gets the automatic-assessment-interval property value. The interval, in hours, at which automatic health assessments run. +// returns a *int32 when successful +func (m *AdminGeneralSettings_attributes) GetAutomaticAssessmentInterval()(*int32) { + return m.automaticAssessmentInterval +} +// GetDefaultOrganizationsPerUserCeiling gets the default-organizations-per-user-ceiling property value. The default maximum number of organizations a single user may create. +// returns a *int32 when successful +func (m *AdminGeneralSettings_attributes) GetDefaultOrganizationsPerUserCeiling()(*int32) { + return m.defaultOrganizationsPerUserCeiling +} +// GetDefaultRemoteStateAccess gets the default-remote-state-access property value. Whether new workspaces allow global remote state access by default. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetDefaultRemoteStateAccess()(*bool) { + return m.defaultRemoteStateAccess +} +// GetDefaultWorkspacesPerOrganizationCeiling gets the default-workspaces-per-organization-ceiling property value. The default maximum number of workspaces per organization. +// returns a *int32 when successful +func (m *AdminGeneralSettings_attributes) GetDefaultWorkspacesPerOrganizationCeiling()(*int32) { + return m.defaultWorkspacesPerOrganizationCeiling +} +// GetEnablePublicRegistration gets the enable-public-registration property value. Whether public (self-service) user registration is enabled. Available only on Terraform Enterprise; silently ignored on HCP Terraform.This attribute is only available in Terraform Enterprise. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetEnablePublicRegistration()(*bool) { + return m.enablePublicRegistration +} +// GetFairRunQueuingEnabled gets the fair-run-queuing-enabled property value. Deprecated. Always returns false. Retained for backwards compatibility with the public API contract. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetFairRunQueuingEnabled()(*bool) { + return m.fairRunQueuingEnabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminGeneralSettings_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["agent-polling-retry-after"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAgentPollingRetryAfter(val) + } + return nil + } + res["agents-enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAgentsEnabled(val) + } + return nil + } + res["allow-speculative-plans-on-pull-requests-from-forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowSpeculativePlansOnPullRequestsFromForks(val) + } + return nil + } + res["api-rate-limit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetApiRateLimit(val) + } + return nil + } + res["api-rate-limiting-enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetApiRateLimitingEnabled(val) + } + return nil + } + res["apply-timeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplyTimeout(val) + } + return nil + } + res["automatic-assessment-interval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAutomaticAssessmentInterval(val) + } + return nil + } + res["default-organizations-per-user-ceiling"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultOrganizationsPerUserCeiling(val) + } + return nil + } + res["default-remote-state-access"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultRemoteStateAccess(val) + } + return nil + } + res["default-workspaces-per-organization-ceiling"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultWorkspacesPerOrganizationCeiling(val) + } + return nil + } + res["enable-public-registration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnablePublicRegistration(val) + } + return nil + } + res["fair-run-queuing-enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFairRunQueuingEnabled(val) + } + return nil + } + res["limit-organizations-per-user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLimitOrganizationsPerUser(val) + } + return nil + } + res["limit-user-organization-creation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLimitUserOrganizationCreation(val) + } + return nil + } + res["limit-workspaces-per-organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLimitWorkspacesPerOrganization(val) + } + return nil + } + res["maximum-concurrent-assessments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumConcurrentAssessments(val) + } + return nil + } + res["plan-timeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlanTimeout(val) + } + return nil + } + res["require-two-factor-for-admins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireTwoFactorForAdmins(val) + } + return nil + } + res["send-passing-statuses-for-untriggered-speculative-plans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSendPassingStatusesForUntriggeredSpeculativePlans(val) + } + return nil + } + res["stacks-enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStacksEnabled(val) + } + return nil + } + res["stacks-entitled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStacksEntitled(val) + } + return nil + } + res["terraform-build-worker-apply-timeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTerraformBuildWorkerApplyTimeout(val) + } + return nil + } + res["terraform-build-worker-plan-timeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTerraformBuildWorkerPlanTimeout(val) + } + return nil + } + return res +} +// GetLimitOrganizationsPerUser gets the limit-organizations-per-user property value. Whether the number of organizations a user may create is limited. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetLimitOrganizationsPerUser()(*bool) { + return m.limitOrganizationsPerUser +} +// GetLimitUserOrganizationCreation gets the limit-user-organization-creation property value. Whether the creation of new organizations is limited to site administrators. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetLimitUserOrganizationCreation()(*bool) { + return m.limitUserOrganizationCreation +} +// GetLimitWorkspacesPerOrganization gets the limit-workspaces-per-organization property value. Whether the number of workspaces per organization is limited. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetLimitWorkspacesPerOrganization()(*bool) { + return m.limitWorkspacesPerOrganization +} +// GetMaximumConcurrentAssessments gets the maximum-concurrent-assessments property value. The maximum number of health assessments that may run concurrently. +// returns a *int32 when successful +func (m *AdminGeneralSettings_attributes) GetMaximumConcurrentAssessments()(*int32) { + return m.maximumConcurrentAssessments +} +// GetPlanTimeout gets the plan-timeout property value. Alias of terraform-build-worker-plan-timeout. The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string. +// returns a *string when successful +func (m *AdminGeneralSettings_attributes) GetPlanTimeout()(*string) { + return m.planTimeout +} +// GetRequireTwoFactorForAdmins gets the require-two-factor-for-admins property value. Whether two-factor authentication is required for site administrators. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetRequireTwoFactorForAdmins()(*bool) { + return m.requireTwoFactorForAdmins +} +// GetSendPassingStatusesForUntriggeredSpeculativePlans gets the send-passing-statuses-for-untriggered-speculative-plans property value. Whether passing commit statuses are sent for untriggered speculative plans. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetSendPassingStatusesForUntriggeredSpeculativePlans()(*bool) { + return m.sendPassingStatusesForUntriggeredSpeculativePlans +} +// GetStacksEnabled gets the stacks-enabled property value. Whether stacks are enabled for use in this instance.This attribute is only available in Terraform Enterprise. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetStacksEnabled()(*bool) { + return m.stacksEnabled +} +// GetStacksEntitled gets the stacks-entitled property value. Whether the instance is licensed to use stacks. +// returns a *bool when successful +func (m *AdminGeneralSettings_attributes) GetStacksEntitled()(*bool) { + return m.stacksEntitled +} +// GetTerraformBuildWorkerApplyTimeout gets the terraform-build-worker-apply-timeout property value. The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string (for example, "24h"). +// returns a *string when successful +func (m *AdminGeneralSettings_attributes) GetTerraformBuildWorkerApplyTimeout()(*string) { + return m.terraformBuildWorkerApplyTimeout +} +// GetTerraformBuildWorkerPlanTimeout gets the terraform-build-worker-plan-timeout property value. The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string (for example, "24h"). +// returns a *string when successful +func (m *AdminGeneralSettings_attributes) GetTerraformBuildWorkerPlanTimeout()(*string) { + return m.terraformBuildWorkerPlanTimeout +} +// Serialize serializes information the current object +func (m *AdminGeneralSettings_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("agent-polling-retry-after", m.GetAgentPollingRetryAfter()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("agents-enabled", m.GetAgentsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow-speculative-plans-on-pull-requests-from-forks", m.GetAllowSpeculativePlansOnPullRequestsFromForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("api-rate-limit", m.GetApiRateLimit()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("api-rate-limiting-enabled", m.GetApiRateLimitingEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("apply-timeout", m.GetApplyTimeout()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("automatic-assessment-interval", m.GetAutomaticAssessmentInterval()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("default-organizations-per-user-ceiling", m.GetDefaultOrganizationsPerUserCeiling()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("default-remote-state-access", m.GetDefaultRemoteStateAccess()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("default-workspaces-per-organization-ceiling", m.GetDefaultWorkspacesPerOrganizationCeiling()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enable-public-registration", m.GetEnablePublicRegistration()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("limit-organizations-per-user", m.GetLimitOrganizationsPerUser()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("limit-user-organization-creation", m.GetLimitUserOrganizationCreation()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("limit-workspaces-per-organization", m.GetLimitWorkspacesPerOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maximum-concurrent-assessments", m.GetMaximumConcurrentAssessments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("plan-timeout", m.GetPlanTimeout()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require-two-factor-for-admins", m.GetRequireTwoFactorForAdmins()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("send-passing-statuses-for-untriggered-speculative-plans", m.GetSendPassingStatusesForUntriggeredSpeculativePlans()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("stacks-enabled", m.GetStacksEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("terraform-build-worker-apply-timeout", m.GetTerraformBuildWorkerApplyTimeout()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("terraform-build-worker-plan-timeout", m.GetTerraformBuildWorkerPlanTimeout()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminGeneralSettings_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAgentPollingRetryAfter sets the agent-polling-retry-after property value. The number of seconds agents wait before polling for new work. +func (m *AdminGeneralSettings_attributes) SetAgentPollingRetryAfter(value *int32)() { + m.agentPollingRetryAfter = value +} +// SetAgentsEnabled sets the agents-enabled property value. Whether HCP Terraform agents are enabled. +func (m *AdminGeneralSettings_attributes) SetAgentsEnabled(value *bool)() { + m.agentsEnabled = value +} +// SetAllowSpeculativePlansOnPullRequestsFromForks sets the allow-speculative-plans-on-pull-requests-from-forks property value. Whether speculative plans are allowed on pull requests originating from forked repositories. +func (m *AdminGeneralSettings_attributes) SetAllowSpeculativePlansOnPullRequestsFromForks(value *bool)() { + m.allowSpeculativePlansOnPullRequestsFromForks = value +} +// SetApiRateLimit sets the api-rate-limit property value. The number of API requests allowed per second, per user token or IP address. +func (m *AdminGeneralSettings_attributes) SetApiRateLimit(value *int32)() { + m.apiRateLimit = value +} +// SetApiRateLimitingEnabled sets the api-rate-limiting-enabled property value. Whether API rate limiting is enabled. +func (m *AdminGeneralSettings_attributes) SetApiRateLimitingEnabled(value *bool)() { + m.apiRateLimitingEnabled = value +} +// SetApplyTimeout sets the apply-timeout property value. Alias of terraform-build-worker-apply-timeout. The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string. +func (m *AdminGeneralSettings_attributes) SetApplyTimeout(value *string)() { + m.applyTimeout = value +} +// SetAutomaticAssessmentInterval sets the automatic-assessment-interval property value. The interval, in hours, at which automatic health assessments run. +func (m *AdminGeneralSettings_attributes) SetAutomaticAssessmentInterval(value *int32)() { + m.automaticAssessmentInterval = value +} +// SetDefaultOrganizationsPerUserCeiling sets the default-organizations-per-user-ceiling property value. The default maximum number of organizations a single user may create. +func (m *AdminGeneralSettings_attributes) SetDefaultOrganizationsPerUserCeiling(value *int32)() { + m.defaultOrganizationsPerUserCeiling = value +} +// SetDefaultRemoteStateAccess sets the default-remote-state-access property value. Whether new workspaces allow global remote state access by default. +func (m *AdminGeneralSettings_attributes) SetDefaultRemoteStateAccess(value *bool)() { + m.defaultRemoteStateAccess = value +} +// SetDefaultWorkspacesPerOrganizationCeiling sets the default-workspaces-per-organization-ceiling property value. The default maximum number of workspaces per organization. +func (m *AdminGeneralSettings_attributes) SetDefaultWorkspacesPerOrganizationCeiling(value *int32)() { + m.defaultWorkspacesPerOrganizationCeiling = value +} +// SetEnablePublicRegistration sets the enable-public-registration property value. Whether public (self-service) user registration is enabled. Available only on Terraform Enterprise; silently ignored on HCP Terraform.This attribute is only available in Terraform Enterprise. +func (m *AdminGeneralSettings_attributes) SetEnablePublicRegistration(value *bool)() { + m.enablePublicRegistration = value +} +// SetFairRunQueuingEnabled sets the fair-run-queuing-enabled property value. Deprecated. Always returns false. Retained for backwards compatibility with the public API contract. +func (m *AdminGeneralSettings_attributes) SetFairRunQueuingEnabled(value *bool)() { + m.fairRunQueuingEnabled = value +} +// SetLimitOrganizationsPerUser sets the limit-organizations-per-user property value. Whether the number of organizations a user may create is limited. +func (m *AdminGeneralSettings_attributes) SetLimitOrganizationsPerUser(value *bool)() { + m.limitOrganizationsPerUser = value +} +// SetLimitUserOrganizationCreation sets the limit-user-organization-creation property value. Whether the creation of new organizations is limited to site administrators. +func (m *AdminGeneralSettings_attributes) SetLimitUserOrganizationCreation(value *bool)() { + m.limitUserOrganizationCreation = value +} +// SetLimitWorkspacesPerOrganization sets the limit-workspaces-per-organization property value. Whether the number of workspaces per organization is limited. +func (m *AdminGeneralSettings_attributes) SetLimitWorkspacesPerOrganization(value *bool)() { + m.limitWorkspacesPerOrganization = value +} +// SetMaximumConcurrentAssessments sets the maximum-concurrent-assessments property value. The maximum number of health assessments that may run concurrently. +func (m *AdminGeneralSettings_attributes) SetMaximumConcurrentAssessments(value *int32)() { + m.maximumConcurrentAssessments = value +} +// SetPlanTimeout sets the plan-timeout property value. Alias of terraform-build-worker-plan-timeout. The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string. +func (m *AdminGeneralSettings_attributes) SetPlanTimeout(value *string)() { + m.planTimeout = value +} +// SetRequireTwoFactorForAdmins sets the require-two-factor-for-admins property value. Whether two-factor authentication is required for site administrators. +func (m *AdminGeneralSettings_attributes) SetRequireTwoFactorForAdmins(value *bool)() { + m.requireTwoFactorForAdmins = value +} +// SetSendPassingStatusesForUntriggeredSpeculativePlans sets the send-passing-statuses-for-untriggered-speculative-plans property value. Whether passing commit statuses are sent for untriggered speculative plans. +func (m *AdminGeneralSettings_attributes) SetSendPassingStatusesForUntriggeredSpeculativePlans(value *bool)() { + m.sendPassingStatusesForUntriggeredSpeculativePlans = value +} +// SetStacksEnabled sets the stacks-enabled property value. Whether stacks are enabled for use in this instance.This attribute is only available in Terraform Enterprise. +func (m *AdminGeneralSettings_attributes) SetStacksEnabled(value *bool)() { + m.stacksEnabled = value +} +// SetStacksEntitled sets the stacks-entitled property value. Whether the instance is licensed to use stacks. +func (m *AdminGeneralSettings_attributes) SetStacksEntitled(value *bool)() { + m.stacksEntitled = value +} +// SetTerraformBuildWorkerApplyTimeout sets the terraform-build-worker-apply-timeout property value. The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string (for example, "24h"). +func (m *AdminGeneralSettings_attributes) SetTerraformBuildWorkerApplyTimeout(value *string)() { + m.terraformBuildWorkerApplyTimeout = value +} +// SetTerraformBuildWorkerPlanTimeout sets the terraform-build-worker-plan-timeout property value. The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string (for example, "24h"). +func (m *AdminGeneralSettings_attributes) SetTerraformBuildWorkerPlanTimeout(value *string)() { + m.terraformBuildWorkerPlanTimeout = value +} +type AdminGeneralSettings_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPollingRetryAfter()(*int32) + GetAgentsEnabled()(*bool) + GetAllowSpeculativePlansOnPullRequestsFromForks()(*bool) + GetApiRateLimit()(*int32) + GetApiRateLimitingEnabled()(*bool) + GetApplyTimeout()(*string) + GetAutomaticAssessmentInterval()(*int32) + GetDefaultOrganizationsPerUserCeiling()(*int32) + GetDefaultRemoteStateAccess()(*bool) + GetDefaultWorkspacesPerOrganizationCeiling()(*int32) + GetEnablePublicRegistration()(*bool) + GetFairRunQueuingEnabled()(*bool) + GetLimitOrganizationsPerUser()(*bool) + GetLimitUserOrganizationCreation()(*bool) + GetLimitWorkspacesPerOrganization()(*bool) + GetMaximumConcurrentAssessments()(*int32) + GetPlanTimeout()(*string) + GetRequireTwoFactorForAdmins()(*bool) + GetSendPassingStatusesForUntriggeredSpeculativePlans()(*bool) + GetStacksEnabled()(*bool) + GetStacksEntitled()(*bool) + GetTerraformBuildWorkerApplyTimeout()(*string) + GetTerraformBuildWorkerPlanTimeout()(*string) + SetAgentPollingRetryAfter(value *int32)() + SetAgentsEnabled(value *bool)() + SetAllowSpeculativePlansOnPullRequestsFromForks(value *bool)() + SetApiRateLimit(value *int32)() + SetApiRateLimitingEnabled(value *bool)() + SetApplyTimeout(value *string)() + SetAutomaticAssessmentInterval(value *int32)() + SetDefaultOrganizationsPerUserCeiling(value *int32)() + SetDefaultRemoteStateAccess(value *bool)() + SetDefaultWorkspacesPerOrganizationCeiling(value *int32)() + SetEnablePublicRegistration(value *bool)() + SetFairRunQueuingEnabled(value *bool)() + SetLimitOrganizationsPerUser(value *bool)() + SetLimitUserOrganizationCreation(value *bool)() + SetLimitWorkspacesPerOrganization(value *bool)() + SetMaximumConcurrentAssessments(value *int32)() + SetPlanTimeout(value *string)() + SetRequireTwoFactorForAdmins(value *bool)() + SetSendPassingStatusesForUntriggeredSpeculativePlans(value *bool)() + SetStacksEnabled(value *bool)() + SetStacksEntitled(value *bool)() + SetTerraformBuildWorkerApplyTimeout(value *string)() + SetTerraformBuildWorkerPlanTimeout(value *string)() +} diff --git a/v2/api/models/admin_general_settings_escaped_type.go b/v2/api/models/admin_general_settings_escaped_type.go new file mode 100644 index 000000000..e479588bc --- /dev/null +++ b/v2/api/models/admin_general_settings_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type AdminGeneralSettings_type int + +const ( + GENERALSETTINGS_ADMINGENERALSETTINGS_TYPE AdminGeneralSettings_type = iota +) + +func (i AdminGeneralSettings_type) String() string { + return []string{"general-settings"}[i] +} +func ParseAdminGeneralSettings_type(v string) (any, error) { + result := GENERALSETTINGS_ADMINGENERALSETTINGS_TYPE + switch v { + case "general-settings": + result = GENERALSETTINGS_ADMINGENERALSETTINGS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeAdminGeneralSettings_type(values []AdminGeneralSettings_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AdminGeneralSettings_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/admin_tfpolicy_version_architecture.go b/v2/api/models/admin_tfpolicy_version_architecture.go new file mode 100644 index 000000000..6de12da58 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_version_architecture.go @@ -0,0 +1,172 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminTfpolicyVersionArchitecture struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // CPU architecture. + arch *AdminTfpolicyVersionArchitecture_arch + // Operating system for this architecture. Currently only "linux" is supported. + os *AdminTfpolicyVersionArchitecture_os + // SHA-256 checksum (64 lowercase hex characters) of the binary at `url`. + sha *string + // Download URL for this platform/architecture's binary. + url *string +} +// NewAdminTfpolicyVersionArchitecture instantiates a new AdminTfpolicyVersionArchitecture and sets the default values. +func NewAdminTfpolicyVersionArchitecture()(*AdminTfpolicyVersionArchitecture) { + m := &AdminTfpolicyVersionArchitecture{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminTfpolicyVersionArchitectureFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersionArchitectureFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersionArchitecture(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminTfpolicyVersionArchitecture) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArch gets the arch property value. CPU architecture. +// returns a *AdminTfpolicyVersionArchitecture_arch when successful +func (m *AdminTfpolicyVersionArchitecture) GetArch()(*AdminTfpolicyVersionArchitecture_arch) { + return m.arch +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersionArchitecture) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["arch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAdminTfpolicyVersionArchitecture_arch) + if err != nil { + return err + } + if val != nil { + m.SetArch(val.(*AdminTfpolicyVersionArchitecture_arch)) + } + return nil + } + res["os"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAdminTfpolicyVersionArchitecture_os) + if err != nil { + return err + } + if val != nil { + m.SetOs(val.(*AdminTfpolicyVersionArchitecture_os)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetOs gets the os property value. Operating system for this architecture. Currently only "linux" is supported. +// returns a *AdminTfpolicyVersionArchitecture_os when successful +func (m *AdminTfpolicyVersionArchitecture) GetOs()(*AdminTfpolicyVersionArchitecture_os) { + return m.os +} +// GetSha gets the sha property value. SHA-256 checksum (64 lowercase hex characters) of the binary at `url`. +// returns a *string when successful +func (m *AdminTfpolicyVersionArchitecture) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. Download URL for this platform/architecture's binary. +// returns a *string when successful +func (m *AdminTfpolicyVersionArchitecture) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersionArchitecture) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetArch() != nil { + cast := (*m.GetArch()).String() + err := writer.WriteStringValue("arch", &cast) + if err != nil { + return err + } + } + if m.GetOs() != nil { + cast := (*m.GetOs()).String() + err := writer.WriteStringValue("os", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminTfpolicyVersionArchitecture) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArch sets the arch property value. CPU architecture. +func (m *AdminTfpolicyVersionArchitecture) SetArch(value *AdminTfpolicyVersionArchitecture_arch)() { + m.arch = value +} +// SetOs sets the os property value. Operating system for this architecture. Currently only "linux" is supported. +func (m *AdminTfpolicyVersionArchitecture) SetOs(value *AdminTfpolicyVersionArchitecture_os)() { + m.os = value +} +// SetSha sets the sha property value. SHA-256 checksum (64 lowercase hex characters) of the binary at `url`. +func (m *AdminTfpolicyVersionArchitecture) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. Download URL for this platform/architecture's binary. +func (m *AdminTfpolicyVersionArchitecture) SetUrl(value *string)() { + m.url = value +} +type AdminTfpolicyVersionArchitectureable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArch()(*AdminTfpolicyVersionArchitecture_arch) + GetOs()(*AdminTfpolicyVersionArchitecture_os) + GetSha()(*string) + GetUrl()(*string) + SetArch(value *AdminTfpolicyVersionArchitecture_arch)() + SetOs(value *AdminTfpolicyVersionArchitecture_os)() + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/v2/api/models/admin_tfpolicy_version_architecture_escaped_arch.go b/v2/api/models/admin_tfpolicy_version_architecture_escaped_arch.go new file mode 100644 index 000000000..fd305a656 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_version_architecture_escaped_arch.go @@ -0,0 +1,40 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// CPU architecture. +type AdminTfpolicyVersionArchitecture_arch int + +const ( + AMD64_ADMINTFPOLICYVERSIONARCHITECTURE_ARCH AdminTfpolicyVersionArchitecture_arch = iota + ARM64_ADMINTFPOLICYVERSIONARCHITECTURE_ARCH + S390X_ADMINTFPOLICYVERSIONARCHITECTURE_ARCH +) + +func (i AdminTfpolicyVersionArchitecture_arch) String() string { + return []string{"amd64", "arm64", "s390x"}[i] +} +func ParseAdminTfpolicyVersionArchitecture_arch(v string) (any, error) { + result := AMD64_ADMINTFPOLICYVERSIONARCHITECTURE_ARCH + switch v { + case "amd64": + result = AMD64_ADMINTFPOLICYVERSIONARCHITECTURE_ARCH + case "arm64": + result = ARM64_ADMINTFPOLICYVERSIONARCHITECTURE_ARCH + case "s390x": + result = S390X_ADMINTFPOLICYVERSIONARCHITECTURE_ARCH + default: + return nil, nil + } + return &result, nil +} +func SerializeAdminTfpolicyVersionArchitecture_arch(values []AdminTfpolicyVersionArchitecture_arch) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AdminTfpolicyVersionArchitecture_arch) isMultiValue() bool { + return false +} diff --git a/v2/api/models/admin_tfpolicy_version_architecture_escaped_os.go b/v2/api/models/admin_tfpolicy_version_architecture_escaped_os.go new file mode 100644 index 000000000..c92aadc65 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_version_architecture_escaped_os.go @@ -0,0 +1,34 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// Operating system for this architecture. Currently only "linux" is supported. +type AdminTfpolicyVersionArchitecture_os int + +const ( + LINUX_ADMINTFPOLICYVERSIONARCHITECTURE_OS AdminTfpolicyVersionArchitecture_os = iota +) + +func (i AdminTfpolicyVersionArchitecture_os) String() string { + return []string{"linux"}[i] +} +func ParseAdminTfpolicyVersionArchitecture_os(v string) (any, error) { + result := LINUX_ADMINTFPOLICYVERSIONARCHITECTURE_OS + switch v { + case "linux": + result = LINUX_ADMINTFPOLICYVERSIONARCHITECTURE_OS + default: + return nil, nil + } + return &result, nil +} +func SerializeAdminTfpolicyVersionArchitecture_os(values []AdminTfpolicyVersionArchitecture_os) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AdminTfpolicyVersionArchitecture_os) isMultiValue() bool { + return false +} diff --git a/v2/api/models/admin_tfpolicy_version_create.go b/v2/api/models/admin_tfpolicy_version_create.go new file mode 100644 index 000000000..103742646 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_version_create.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminTfpolicyVersionCreate struct { + AdminTfpolicyVersions +} +// NewAdminTfpolicyVersionCreate instantiates a new AdminTfpolicyVersionCreate and sets the default values. +func NewAdminTfpolicyVersionCreate()(*AdminTfpolicyVersionCreate) { + m := &AdminTfpolicyVersionCreate{ + AdminTfpolicyVersions: *NewAdminTfpolicyVersions(), + } + return m +} +// CreateAdminTfpolicyVersionCreateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersionCreateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersionCreate(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersionCreate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AdminTfpolicyVersions.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersionCreate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AdminTfpolicyVersions.Serialize(writer) + if err != nil { + return err + } + return nil +} +type AdminTfpolicyVersionCreateable interface { + AdminTfpolicyVersionsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/v2/api/models/admin_tfpolicy_version_create_envelope.go b/v2/api/models/admin_tfpolicy_version_create_envelope.go new file mode 100644 index 000000000..8f64d4155 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_version_create_envelope.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminTfpolicyVersionCreateEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data AdminTfpolicyVersionCreateable +} +// NewAdminTfpolicyVersionCreateEnvelope instantiates a new AdminTfpolicyVersionCreateEnvelope and sets the default values. +func NewAdminTfpolicyVersionCreateEnvelope()(*AdminTfpolicyVersionCreateEnvelope) { + m := &AdminTfpolicyVersionCreateEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminTfpolicyVersionCreateEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersionCreateEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersionCreateEnvelope(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminTfpolicyVersionCreateEnvelope) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a AdminTfpolicyVersionCreateable when successful +func (m *AdminTfpolicyVersionCreateEnvelope) GetData()(AdminTfpolicyVersionCreateable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersionCreateEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminTfpolicyVersionCreateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetData(val.(AdminTfpolicyVersionCreateable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersionCreateEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminTfpolicyVersionCreateEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *AdminTfpolicyVersionCreateEnvelope) SetData(value AdminTfpolicyVersionCreateable)() { + m.data = value +} +type AdminTfpolicyVersionCreateEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()(AdminTfpolicyVersionCreateable) + SetData(value AdminTfpolicyVersionCreateable)() +} diff --git a/v2/api/models/admin_tfpolicy_version_create_escaped_attributes.go b/v2/api/models/admin_tfpolicy_version_create_escaped_attributes.go new file mode 100644 index 000000000..67fe46839 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_version_create_escaped_attributes.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminTfpolicyVersionCreate_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The version property + version *string +} +// NewAdminTfpolicyVersionCreate_attributes instantiates a new AdminTfpolicyVersionCreate_attributes and sets the default values. +func NewAdminTfpolicyVersionCreate_attributes()(*AdminTfpolicyVersionCreate_attributes) { + m := &AdminTfpolicyVersionCreate_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminTfpolicyVersionCreate_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersionCreate_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersionCreate_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminTfpolicyVersionCreate_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersionCreate_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetVersion gets the version property value. The version property +// returns a *string when successful +func (m *AdminTfpolicyVersionCreate_attributes) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersionCreate_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminTfpolicyVersionCreate_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetVersion sets the version property value. The version property +func (m *AdminTfpolicyVersionCreate_attributes) SetVersion(value *string)() { + m.version = value +} +type AdminTfpolicyVersionCreate_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetVersion()(*string) + SetVersion(value *string)() +} diff --git a/v2/api/models/admin_tfpolicy_versions.go b/v2/api/models/admin_tfpolicy_versions.go new file mode 100644 index 000000000..b15533290 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_versions.go @@ -0,0 +1,136 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminTfpolicyVersions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes AdminTfpolicyVersions_attributesable + // The external ID of the TFPolicy version (e.g. tool-xxxxxxxxxxxxxxxx). + id *string + // The type property + typeEscaped *AdminTfpolicyVersions_type +} +// NewAdminTfpolicyVersions instantiates a new AdminTfpolicyVersions and sets the default values. +func NewAdminTfpolicyVersions()(*AdminTfpolicyVersions) { + m := &AdminTfpolicyVersions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminTfpolicyVersionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminTfpolicyVersions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a AdminTfpolicyVersions_attributesable when successful +func (m *AdminTfpolicyVersions) GetAttributes()(AdminTfpolicyVersions_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminTfpolicyVersions_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(AdminTfpolicyVersions_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAdminTfpolicyVersions_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*AdminTfpolicyVersions_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The external ID of the TFPolicy version (e.g. tool-xxxxxxxxxxxxxxxx). +// returns a *string when successful +func (m *AdminTfpolicyVersions) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *AdminTfpolicyVersions_type when successful +func (m *AdminTfpolicyVersions) GetTypeEscaped()(*AdminTfpolicyVersions_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminTfpolicyVersions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *AdminTfpolicyVersions) SetAttributes(value AdminTfpolicyVersions_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The external ID of the TFPolicy version (e.g. tool-xxxxxxxxxxxxxxxx). +func (m *AdminTfpolicyVersions) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *AdminTfpolicyVersions) SetTypeEscaped(value *AdminTfpolicyVersions_type)() { + m.typeEscaped = value +} +type AdminTfpolicyVersionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(AdminTfpolicyVersions_attributesable) + GetId()(*string) + GetTypeEscaped()(*AdminTfpolicyVersions_type) + SetAttributes(value AdminTfpolicyVersions_attributesable)() + SetId(value *string)() + SetTypeEscaped(value *AdminTfpolicyVersions_type)() +} diff --git a/v2/api/models/admin_tfpolicy_versions_collection_envelope.go b/v2/api/models/admin_tfpolicy_versions_collection_envelope.go new file mode 100644 index 000000000..1ced49e74 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_versions_collection_envelope.go @@ -0,0 +1,153 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminTfpolicyVersionsCollectionEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data []AdminTfpolicyVersionsable + // The links property + links SelfWithPaginationable + // The meta property + meta AdminTfpolicyVersionsCollectionEnvelope_metaable +} +// NewAdminTfpolicyVersionsCollectionEnvelope instantiates a new AdminTfpolicyVersionsCollectionEnvelope and sets the default values. +func NewAdminTfpolicyVersionsCollectionEnvelope()(*AdminTfpolicyVersionsCollectionEnvelope) { + m := &AdminTfpolicyVersionsCollectionEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminTfpolicyVersionsCollectionEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersionsCollectionEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersionsCollectionEnvelope(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminTfpolicyVersionsCollectionEnvelope) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a []AdminTfpolicyVersionsable when successful +func (m *AdminTfpolicyVersionsCollectionEnvelope) GetData()([]AdminTfpolicyVersionsable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersionsCollectionEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAdminTfpolicyVersionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AdminTfpolicyVersionsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AdminTfpolicyVersionsable) + } + } + m.SetData(res) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSelfWithPaginationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(SelfWithPaginationable)) + } + return nil + } + res["meta"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminTfpolicyVersionsCollectionEnvelope_metaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeta(val.(AdminTfpolicyVersionsCollectionEnvelope_metaable)) + } + return nil + } + return res +} +// GetLinks gets the links property value. The links property +// returns a SelfWithPaginationable when successful +func (m *AdminTfpolicyVersionsCollectionEnvelope) GetLinks()(SelfWithPaginationable) { + return m.links +} +// GetMeta gets the meta property value. The meta property +// returns a AdminTfpolicyVersionsCollectionEnvelope_metaable when successful +func (m *AdminTfpolicyVersionsCollectionEnvelope) GetMeta()(AdminTfpolicyVersionsCollectionEnvelope_metaable) { + return m.meta +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersionsCollectionEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetData())) + for i, v := range m.GetData() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("data", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("meta", m.GetMeta()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminTfpolicyVersionsCollectionEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *AdminTfpolicyVersionsCollectionEnvelope) SetData(value []AdminTfpolicyVersionsable)() { + m.data = value +} +// SetLinks sets the links property value. The links property +func (m *AdminTfpolicyVersionsCollectionEnvelope) SetLinks(value SelfWithPaginationable)() { + m.links = value +} +// SetMeta sets the meta property value. The meta property +func (m *AdminTfpolicyVersionsCollectionEnvelope) SetMeta(value AdminTfpolicyVersionsCollectionEnvelope_metaable)() { + m.meta = value +} +type AdminTfpolicyVersionsCollectionEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()([]AdminTfpolicyVersionsable) + GetLinks()(SelfWithPaginationable) + GetMeta()(AdminTfpolicyVersionsCollectionEnvelope_metaable) + SetData(value []AdminTfpolicyVersionsable)() + SetLinks(value SelfWithPaginationable)() + SetMeta(value AdminTfpolicyVersionsCollectionEnvelope_metaable)() +} diff --git a/v2/api/models/admin_tfpolicy_versions_collection_envelope_escaped_meta.go b/v2/api/models/admin_tfpolicy_versions_collection_envelope_escaped_meta.go new file mode 100644 index 000000000..f722d4aa6 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_versions_collection_envelope_escaped_meta.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminTfpolicyVersionsCollectionEnvelope_meta struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The pagination property + pagination Paginationable +} +// NewAdminTfpolicyVersionsCollectionEnvelope_meta instantiates a new AdminTfpolicyVersionsCollectionEnvelope_meta and sets the default values. +func NewAdminTfpolicyVersionsCollectionEnvelope_meta()(*AdminTfpolicyVersionsCollectionEnvelope_meta) { + m := &AdminTfpolicyVersionsCollectionEnvelope_meta{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminTfpolicyVersionsCollectionEnvelope_metaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersionsCollectionEnvelope_metaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersionsCollectionEnvelope_meta(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminTfpolicyVersionsCollectionEnvelope_meta) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersionsCollectionEnvelope_meta) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pagination"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePaginationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPagination(val.(Paginationable)) + } + return nil + } + return res +} +// GetPagination gets the pagination property value. The pagination property +// returns a Paginationable when successful +func (m *AdminTfpolicyVersionsCollectionEnvelope_meta) GetPagination()(Paginationable) { + return m.pagination +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersionsCollectionEnvelope_meta) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("pagination", m.GetPagination()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminTfpolicyVersionsCollectionEnvelope_meta) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPagination sets the pagination property value. The pagination property +func (m *AdminTfpolicyVersionsCollectionEnvelope_meta) SetPagination(value Paginationable)() { + m.pagination = value +} +type AdminTfpolicyVersionsCollectionEnvelope_metaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPagination()(Paginationable) + SetPagination(value Paginationable)() +} diff --git a/v2/api/models/admin_tfpolicy_versions_envelope.go b/v2/api/models/admin_tfpolicy_versions_envelope.go new file mode 100644 index 000000000..03047aa08 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_versions_envelope.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminTfpolicyVersionsEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data AdminTfpolicyVersionsable +} +// NewAdminTfpolicyVersionsEnvelope instantiates a new AdminTfpolicyVersionsEnvelope and sets the default values. +func NewAdminTfpolicyVersionsEnvelope()(*AdminTfpolicyVersionsEnvelope) { + m := &AdminTfpolicyVersionsEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminTfpolicyVersionsEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersionsEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersionsEnvelope(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminTfpolicyVersionsEnvelope) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a AdminTfpolicyVersionsable when successful +func (m *AdminTfpolicyVersionsEnvelope) GetData()(AdminTfpolicyVersionsable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersionsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminTfpolicyVersionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetData(val.(AdminTfpolicyVersionsable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersionsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminTfpolicyVersionsEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *AdminTfpolicyVersionsEnvelope) SetData(value AdminTfpolicyVersionsable)() { + m.data = value +} +type AdminTfpolicyVersionsEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()(AdminTfpolicyVersionsable) + SetData(value AdminTfpolicyVersionsable)() +} diff --git a/v2/api/models/admin_tfpolicy_versions_escaped_attributes.go b/v2/api/models/admin_tfpolicy_versions_escaped_attributes.go new file mode 100644 index 000000000..4a956910d --- /dev/null +++ b/v2/api/models/admin_tfpolicy_versions_escaped_attributes.go @@ -0,0 +1,380 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdminTfpolicyVersions_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The set of platform/architecture builds available for this version. On create, either at least one entry here or the top-level `url`/`sha` pair must be provided. On update, providing `archs` replaces the full set of architectures for this version; omitting it leaves existing architectures unchanged, while providing an empty array is rejected with 422 Unprocessable Content (a TFPolicy version must always have at least one architecture). + archs []AdminTfpolicyVersionArchitectureable + // Whether this version is a beta/pre-release. + beta *bool + // The timestamp when this version was created. + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Whether this version is deprecated. On update (`PATCH`), when set to `true` without a `deprecated-reason` in the same request, the server fills in a default reason referencing the current version. This default does not apply on create. + deprecated *bool + // Explanation shown to users when `deprecated` is `true`. + deprecatedReason *string + // Whether this version can be selected for use. Attempting to set `enabled` to `false` while the version is in use returns 409 Conflict. + enabled *bool + // Whether this is an official HashiCorp-published release. + official *bool + // The current user's permissions for this TFPolicy version, when included. + permissions AdminTfpolicyVersions_attributes_permissionsable + // The SHA-256 checksum of the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].sha` field instead. Null under the same conditions as `url`. + // Deprecated: + sha *string + // The URL where you can download the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].url` field instead. Null when no linux/amd64 architecture has been registered for this version (e.g. an arm64-only release). On create, either `url` and `sha` or at least one entry in `archs` must be provided. If both are given, the linux/amd64 entry in `archs` (when present) must match `url`/`sha` exactly, or the request is rejected with 422 Unprocessable Content. + // Deprecated: + url *string + // The semantic version string for this TFPolicy release (e.g. "0.1.0"). Must be unique among TFPolicy versions. + version *string +} +// NewAdminTfpolicyVersions_attributes instantiates a new AdminTfpolicyVersions_attributes and sets the default values. +func NewAdminTfpolicyVersions_attributes()(*AdminTfpolicyVersions_attributes) { + m := &AdminTfpolicyVersions_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminTfpolicyVersions_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersions_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersions_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminTfpolicyVersions_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchs gets the archs property value. The set of platform/architecture builds available for this version. On create, either at least one entry here or the top-level `url`/`sha` pair must be provided. On update, providing `archs` replaces the full set of architectures for this version; omitting it leaves existing architectures unchanged, while providing an empty array is rejected with 422 Unprocessable Content (a TFPolicy version must always have at least one architecture). +// returns a []AdminTfpolicyVersionArchitectureable when successful +func (m *AdminTfpolicyVersions_attributes) GetArchs()([]AdminTfpolicyVersionArchitectureable) { + return m.archs +} +// GetBeta gets the beta property value. Whether this version is a beta/pre-release. +// returns a *bool when successful +func (m *AdminTfpolicyVersions_attributes) GetBeta()(*bool) { + return m.beta +} +// GetCreatedAt gets the created-at property value. The timestamp when this version was created. +// returns a *Time when successful +func (m *AdminTfpolicyVersions_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetDeprecated gets the deprecated property value. Whether this version is deprecated. On update (`PATCH`), when set to `true` without a `deprecated-reason` in the same request, the server fills in a default reason referencing the current version. This default does not apply on create. +// returns a *bool when successful +func (m *AdminTfpolicyVersions_attributes) GetDeprecated()(*bool) { + return m.deprecated +} +// GetDeprecatedReason gets the deprecated-reason property value. Explanation shown to users when `deprecated` is `true`. +// returns a *string when successful +func (m *AdminTfpolicyVersions_attributes) GetDeprecatedReason()(*string) { + return m.deprecatedReason +} +// GetEnabled gets the enabled property value. Whether this version can be selected for use. Attempting to set `enabled` to `false` while the version is in use returns 409 Conflict. +// returns a *bool when successful +func (m *AdminTfpolicyVersions_attributes) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersions_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["archs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAdminTfpolicyVersionArchitectureFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AdminTfpolicyVersionArchitectureable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AdminTfpolicyVersionArchitectureable) + } + } + m.SetArchs(res) + } + return nil + } + res["beta"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBeta(val) + } + return nil + } + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["deprecated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeprecated(val) + } + return nil + } + res["deprecated-reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeprecatedReason(val) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["official"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOfficial(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminTfpolicyVersions_attributes_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(AdminTfpolicyVersions_attributes_permissionsable)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetOfficial gets the official property value. Whether this is an official HashiCorp-published release. +// returns a *bool when successful +func (m *AdminTfpolicyVersions_attributes) GetOfficial()(*bool) { + return m.official +} +// GetPermissions gets the permissions property value. The current user's permissions for this TFPolicy version, when included. +// returns a AdminTfpolicyVersions_attributes_permissionsable when successful +func (m *AdminTfpolicyVersions_attributes) GetPermissions()(AdminTfpolicyVersions_attributes_permissionsable) { + return m.permissions +} +// GetSha gets the sha property value. The SHA-256 checksum of the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].sha` field instead. Null under the same conditions as `url`. +// Deprecated: +// returns a *string when successful +func (m *AdminTfpolicyVersions_attributes) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The URL where you can download the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].url` field instead. Null when no linux/amd64 architecture has been registered for this version (e.g. an arm64-only release). On create, either `url` and `sha` or at least one entry in `archs` must be provided. If both are given, the linux/amd64 entry in `archs` (when present) must match `url`/`sha` exactly, or the request is rejected with 422 Unprocessable Content. +// Deprecated: +// returns a *string when successful +func (m *AdminTfpolicyVersions_attributes) GetUrl()(*string) { + return m.url +} +// GetVersion gets the version property value. The semantic version string for this TFPolicy release (e.g. "0.1.0"). Must be unique among TFPolicy versions. +// returns a *string when successful +func (m *AdminTfpolicyVersions_attributes) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersions_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetArchs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetArchs())) + for i, v := range m.GetArchs() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("archs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("beta", m.GetBeta()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("deprecated", m.GetDeprecated()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deprecated-reason", m.GetDeprecatedReason()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("official", m.GetOfficial()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminTfpolicyVersions_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchs sets the archs property value. The set of platform/architecture builds available for this version. On create, either at least one entry here or the top-level `url`/`sha` pair must be provided. On update, providing `archs` replaces the full set of architectures for this version; omitting it leaves existing architectures unchanged, while providing an empty array is rejected with 422 Unprocessable Content (a TFPolicy version must always have at least one architecture). +func (m *AdminTfpolicyVersions_attributes) SetArchs(value []AdminTfpolicyVersionArchitectureable)() { + m.archs = value +} +// SetBeta sets the beta property value. Whether this version is a beta/pre-release. +func (m *AdminTfpolicyVersions_attributes) SetBeta(value *bool)() { + m.beta = value +} +// SetCreatedAt sets the created-at property value. The timestamp when this version was created. +func (m *AdminTfpolicyVersions_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetDeprecated sets the deprecated property value. Whether this version is deprecated. On update (`PATCH`), when set to `true` without a `deprecated-reason` in the same request, the server fills in a default reason referencing the current version. This default does not apply on create. +func (m *AdminTfpolicyVersions_attributes) SetDeprecated(value *bool)() { + m.deprecated = value +} +// SetDeprecatedReason sets the deprecated-reason property value. Explanation shown to users when `deprecated` is `true`. +func (m *AdminTfpolicyVersions_attributes) SetDeprecatedReason(value *string)() { + m.deprecatedReason = value +} +// SetEnabled sets the enabled property value. Whether this version can be selected for use. Attempting to set `enabled` to `false` while the version is in use returns 409 Conflict. +func (m *AdminTfpolicyVersions_attributes) SetEnabled(value *bool)() { + m.enabled = value +} +// SetOfficial sets the official property value. Whether this is an official HashiCorp-published release. +func (m *AdminTfpolicyVersions_attributes) SetOfficial(value *bool)() { + m.official = value +} +// SetPermissions sets the permissions property value. The current user's permissions for this TFPolicy version, when included. +func (m *AdminTfpolicyVersions_attributes) SetPermissions(value AdminTfpolicyVersions_attributes_permissionsable)() { + m.permissions = value +} +// SetSha sets the sha property value. The SHA-256 checksum of the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].sha` field instead. Null under the same conditions as `url`. +// Deprecated: +func (m *AdminTfpolicyVersions_attributes) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The URL where you can download the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].url` field instead. Null when no linux/amd64 architecture has been registered for this version (e.g. an arm64-only release). On create, either `url` and `sha` or at least one entry in `archs` must be provided. If both are given, the linux/amd64 entry in `archs` (when present) must match `url`/`sha` exactly, or the request is rejected with 422 Unprocessable Content. +// Deprecated: +func (m *AdminTfpolicyVersions_attributes) SetUrl(value *string)() { + m.url = value +} +// SetVersion sets the version property value. The semantic version string for this TFPolicy release (e.g. "0.1.0"). Must be unique among TFPolicy versions. +func (m *AdminTfpolicyVersions_attributes) SetVersion(value *string)() { + m.version = value +} +type AdminTfpolicyVersions_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchs()([]AdminTfpolicyVersionArchitectureable) + GetBeta()(*bool) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeprecated()(*bool) + GetDeprecatedReason()(*string) + GetEnabled()(*bool) + GetOfficial()(*bool) + GetPermissions()(AdminTfpolicyVersions_attributes_permissionsable) + GetSha()(*string) + GetUrl()(*string) + GetVersion()(*string) + SetArchs(value []AdminTfpolicyVersionArchitectureable)() + SetBeta(value *bool)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeprecated(value *bool)() + SetDeprecatedReason(value *string)() + SetEnabled(value *bool)() + SetOfficial(value *bool)() + SetPermissions(value AdminTfpolicyVersions_attributes_permissionsable)() + SetSha(value *string)() + SetUrl(value *string)() + SetVersion(value *string)() +} diff --git a/v2/api/models/admin_tfpolicy_versions_escaped_attributes_escaped_permissions.go b/v2/api/models/admin_tfpolicy_versions_escaped_attributes_escaped_permissions.go new file mode 100644 index 000000000..b5612c4b3 --- /dev/null +++ b/v2/api/models/admin_tfpolicy_versions_escaped_attributes_escaped_permissions.go @@ -0,0 +1,113 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminTfpolicyVersions_attributes_permissions the current user's permissions for this TFPolicy version, when included. +type AdminTfpolicyVersions_attributes_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The canRead property + canRead *bool + // The canUpdate property + canUpdate *bool +} +// NewAdminTfpolicyVersions_attributes_permissions instantiates a new AdminTfpolicyVersions_attributes_permissions and sets the default values. +func NewAdminTfpolicyVersions_attributes_permissions()(*AdminTfpolicyVersions_attributes_permissions) { + m := &AdminTfpolicyVersions_attributes_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdminTfpolicyVersions_attributes_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdminTfpolicyVersions_attributes_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminTfpolicyVersions_attributes_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdminTfpolicyVersions_attributes_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCanRead gets the can-read property value. The canRead property +// returns a *bool when successful +func (m *AdminTfpolicyVersions_attributes_permissions) GetCanRead()(*bool) { + return m.canRead +} +// GetCanUpdate gets the can-update property value. The canUpdate property +// returns a *bool when successful +func (m *AdminTfpolicyVersions_attributes_permissions) GetCanUpdate()(*bool) { + return m.canUpdate +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdminTfpolicyVersions_attributes_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["can-read"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanRead(val) + } + return nil + } + res["can-update"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanUpdate(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AdminTfpolicyVersions_attributes_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("can-read", m.GetCanRead()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("can-update", m.GetCanUpdate()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AdminTfpolicyVersions_attributes_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCanRead sets the can-read property value. The canRead property +func (m *AdminTfpolicyVersions_attributes_permissions) SetCanRead(value *bool)() { + m.canRead = value +} +// SetCanUpdate sets the can-update property value. The canUpdate property +func (m *AdminTfpolicyVersions_attributes_permissions) SetCanUpdate(value *bool)() { + m.canUpdate = value +} +type AdminTfpolicyVersions_attributes_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanRead()(*bool) + GetCanUpdate()(*bool) + SetCanRead(value *bool)() + SetCanUpdate(value *bool)() +} diff --git a/v2/api/models/admin_tfpolicy_versions_escaped_type.go b/v2/api/models/admin_tfpolicy_versions_escaped_type.go new file mode 100644 index 000000000..6b38f1e8f --- /dev/null +++ b/v2/api/models/admin_tfpolicy_versions_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type AdminTfpolicyVersions_type int + +const ( + TFPOLICYVERSIONS_ADMINTFPOLICYVERSIONS_TYPE AdminTfpolicyVersions_type = iota +) + +func (i AdminTfpolicyVersions_type) String() string { + return []string{"tfpolicy-versions"}[i] +} +func ParseAdminTfpolicyVersions_type(v string) (any, error) { + result := TFPOLICYVERSIONS_ADMINTFPOLICYVERSIONS_TYPE + switch v { + case "tfpolicy-versions": + result = TFPOLICYVERSIONS_ADMINTFPOLICYVERSIONS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeAdminTfpolicyVersions_type(values []AdminTfpolicyVersions_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AdminTfpolicyVersions_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/current_state_version_envelope.go b/v2/api/models/current_state_version_envelope.go index e431aaf6a..44470e03c 100644 --- a/v2/api/models/current_state_version_envelope.go +++ b/v2/api/models/current_state_version_envelope.go @@ -13,7 +13,7 @@ type CurrentStateVersionEnvelope struct { // The data property data StateVersionsable // The included property - included []CurrentStateVersionEnvelope_includedable + included []StateVersionOutputsable } // NewCurrentStateVersionEnvelope instantiates a new CurrentStateVersionEnvelope and sets the default values. func NewCurrentStateVersionEnvelope()(*CurrentStateVersionEnvelope) { @@ -52,15 +52,15 @@ func (m *CurrentStateVersionEnvelope) GetFieldDeserializers()(map[string]func(i8 return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateCurrentStateVersionEnvelope_includedFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateStateVersionOutputsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]CurrentStateVersionEnvelope_includedable, len(val)) + res := make([]StateVersionOutputsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(CurrentStateVersionEnvelope_includedable) + res[i] = v.(StateVersionOutputsable) } } m.SetIncluded(res) @@ -70,8 +70,8 @@ func (m *CurrentStateVersionEnvelope) GetFieldDeserializers()(map[string]func(i8 return res } // GetIncluded gets the included property value. The included property -// returns a []CurrentStateVersionEnvelope_includedable when successful -func (m *CurrentStateVersionEnvelope) GetIncluded()([]CurrentStateVersionEnvelope_includedable) { +// returns a []StateVersionOutputsable when successful +func (m *CurrentStateVersionEnvelope) GetIncluded()([]StateVersionOutputsable) { return m.included } // Serialize serializes information the current object @@ -111,14 +111,14 @@ func (m *CurrentStateVersionEnvelope) SetData(value StateVersionsable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *CurrentStateVersionEnvelope) SetIncluded(value []CurrentStateVersionEnvelope_includedable)() { +func (m *CurrentStateVersionEnvelope) SetIncluded(value []StateVersionOutputsable)() { m.included = value } type CurrentStateVersionEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(StateVersionsable) - GetIncluded()([]CurrentStateVersionEnvelope_includedable) + GetIncluded()([]StateVersionOutputsable) SetData(value StateVersionsable)() - SetIncluded(value []CurrentStateVersionEnvelope_includedable)() + SetIncluded(value []StateVersionOutputsable)() } diff --git a/v2/api/models/hyok_configurations_escaped_attributes_escaped_kms_options.go b/v2/api/models/hyok_configurations_escaped_attributes_escaped_kms_options.go index d4484bc5b..74c5e6c52 100644 --- a/v2/api/models/hyok_configurations_escaped_attributes_escaped_kms_options.go +++ b/v2/api/models/hyok_configurations_escaped_attributes_escaped_kms_options.go @@ -18,6 +18,8 @@ type HyokConfigurations_attributes_kmsOptions struct { keyRingId *string // Optional for AWS KMS multiRegion *bool + // Optional for Vault KMS. The mount path of Vault's Transit Secrets Engine. Defaults to "transit". + transitPath *string } // NewHyokConfigurations_attributes_kmsOptions instantiates a new HyokConfigurations_attributes_kmsOptions and sets the default values. func NewHyokConfigurations_attributes_kmsOptions()(*HyokConfigurations_attributes_kmsOptions) { @@ -80,6 +82,16 @@ func (m *HyokConfigurations_attributes_kmsOptions) GetFieldDeserializers()(map[s } return nil } + res["transit-path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTransitPath(val) + } + return nil + } return res } // GetKeyLocation gets the key-location property value. Only required with GCP KMS @@ -102,6 +114,11 @@ func (m *HyokConfigurations_attributes_kmsOptions) GetKeyRingId()(*string) { func (m *HyokConfigurations_attributes_kmsOptions) GetMultiRegion()(*bool) { return m.multiRegion } +// GetTransitPath gets the transit-path property value. Optional for Vault KMS. The mount path of Vault's Transit Secrets Engine. Defaults to "transit". +// returns a *string when successful +func (m *HyokConfigurations_attributes_kmsOptions) GetTransitPath()(*string) { + return m.transitPath +} // Serialize serializes information the current object func (m *HyokConfigurations_attributes_kmsOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -128,6 +145,12 @@ func (m *HyokConfigurations_attributes_kmsOptions) Serialize(writer i878a80d2330 return err } } + { + err := writer.WriteStringValue("transit-path", m.GetTransitPath()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -156,6 +179,10 @@ func (m *HyokConfigurations_attributes_kmsOptions) SetKeyRingId(value *string)() func (m *HyokConfigurations_attributes_kmsOptions) SetMultiRegion(value *bool)() { m.multiRegion = value } +// SetTransitPath sets the transit-path property value. Optional for Vault KMS. The mount path of Vault's Transit Secrets Engine. Defaults to "transit". +func (m *HyokConfigurations_attributes_kmsOptions) SetTransitPath(value *string)() { + m.transitPath = value +} type HyokConfigurations_attributes_kmsOptionsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -163,8 +190,10 @@ type HyokConfigurations_attributes_kmsOptionsable interface { GetKeyRegion()(*string) GetKeyRingId()(*string) GetMultiRegion()(*bool) + GetTransitPath()(*string) SetKeyLocation(value *string)() SetKeyRegion(value *string)() SetKeyRingId(value *string)() SetMultiRegion(value *bool)() + SetTransitPath(value *string)() } diff --git a/v2/api/models/item_provider_sets_get_response_escaped_provider_sets.go b/v2/api/models/item_provider_sets_get_response_escaped_provider_sets.go new file mode 100644 index 000000000..133050975 --- /dev/null +++ b/v2/api/models/item_provider_sets_get_response_escaped_provider_sets.go @@ -0,0 +1,153 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemProviderSetsGetResponse_ProviderSets struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes ProviderSets_attributesable + // The id property + id *string + // The relationships property + relationships ProviderSets_relationshipsable + // The type property + typeEscaped *ProviderSets_type +} +// NewItemProviderSetsGetResponse_ProviderSets instantiates a new ItemProviderSetsGetResponse_ProviderSets and sets the default values. +func NewItemProviderSetsGetResponse_ProviderSets()(*ItemProviderSetsGetResponse_ProviderSets) { + m := &ItemProviderSetsGetResponse_ProviderSets{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemProviderSetsGetResponse_ProviderSets(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a ProviderSets_attributesable when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetAttributes()(ProviderSets_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProviderSets_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(ProviderSets_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProviderSets_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(ProviderSets_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseProviderSets_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*ProviderSets_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetId()(*string) { + return m.id +} +// GetRelationships gets the relationships property value. The relationships property +// returns a ProviderSets_relationshipsable when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetRelationships()(ProviderSets_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *ProviderSets_type when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetTypeEscaped()(*ProviderSets_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *ItemProviderSetsGetResponse_ProviderSets) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemProviderSetsGetResponse_ProviderSets) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *ItemProviderSetsGetResponse_ProviderSets) SetAttributes(value ProviderSets_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *ItemProviderSetsGetResponse_ProviderSets) SetId(value *string)() { + m.id = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *ItemProviderSetsGetResponse_ProviderSets) SetRelationships(value ProviderSets_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ItemProviderSetsGetResponse_ProviderSets) SetTypeEscaped(value *ProviderSets_type)() { + m.typeEscaped = value +} diff --git a/v2/api/models/item_provider_sets_get_response_escaped_provider_setsable.go b/v2/api/models/item_provider_sets_get_response_escaped_provider_setsable.go new file mode 100644 index 000000000..15e22208b --- /dev/null +++ b/v2/api/models/item_provider_sets_get_response_escaped_provider_setsable.go @@ -0,0 +1,21 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemProviderSetsGetResponse_ProviderSetsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(ProviderSets_attributesable) + GetId()(*string) + GetRelationships()(ProviderSets_relationshipsable) + GetTypeEscaped()(*ProviderSets_type) + SetAttributes(value ProviderSets_attributesable)() + SetId(value *string)() + SetRelationships(value ProviderSets_relationshipsable)() + SetTypeEscaped(value *ProviderSets_type)() +} diff --git a/v2/api/models/item_recoverable_items_get_response_escaped_recoverable_items.go b/v2/api/models/item_recoverable_items_get_response_escaped_recoverable_items.go new file mode 100644 index 000000000..7c81d9ed5 --- /dev/null +++ b/v2/api/models/item_recoverable_items_get_response_escaped_recoverable_items.go @@ -0,0 +1,153 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemRecoverableItemsGetResponse_RecoverableItems struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes RecoverableItems_attributesable + // The ID of the recoverable item + id *string + // The relationships property + relationships RecoverableItems_relationshipsable + // The type property + typeEscaped *RecoverableItems_type +} +// NewItemRecoverableItemsGetResponse_RecoverableItems instantiates a new ItemRecoverableItemsGetResponse_RecoverableItems and sets the default values. +func NewItemRecoverableItemsGetResponse_RecoverableItems()(*ItemRecoverableItemsGetResponse_RecoverableItems) { + m := &ItemRecoverableItemsGetResponse_RecoverableItems{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemRecoverableItemsGetResponse_RecoverableItems(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a RecoverableItems_attributesable when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetAttributes()(RecoverableItems_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecoverableItems_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(RecoverableItems_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecoverableItems_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(RecoverableItems_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecoverableItems_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RecoverableItems_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the recoverable item +// returns a *string when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetId()(*string) { + return m.id +} +// GetRelationships gets the relationships property value. The relationships property +// returns a RecoverableItems_relationshipsable when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetRelationships()(RecoverableItems_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RecoverableItems_type when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetTypeEscaped()(*RecoverableItems_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetAttributes(value RecoverableItems_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The ID of the recoverable item +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetId(value *string)() { + m.id = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetRelationships(value RecoverableItems_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetTypeEscaped(value *RecoverableItems_type)() { + m.typeEscaped = value +} diff --git a/v2/api/models/item_recoverable_items_get_response_escaped_recoverable_itemsable.go b/v2/api/models/item_recoverable_items_get_response_escaped_recoverable_itemsable.go new file mode 100644 index 000000000..2ffdaecc0 --- /dev/null +++ b/v2/api/models/item_recoverable_items_get_response_escaped_recoverable_itemsable.go @@ -0,0 +1,21 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemRecoverableItemsGetResponse_RecoverableItemsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(RecoverableItems_attributesable) + GetId()(*string) + GetRelationships()(RecoverableItems_relationshipsable) + GetTypeEscaped()(*RecoverableItems_type) + SetAttributes(value RecoverableItems_attributesable)() + SetId(value *string)() + SetRelationships(value RecoverableItems_relationshipsable)() + SetTypeEscaped(value *RecoverableItems_type)() +} diff --git a/v2/api/models/item_stack_configurations_get_response_escaped_stack_configurations.go b/v2/api/models/item_stack_configurations_get_response_escaped_stack_configurations.go new file mode 100644 index 000000000..4c4ee04d8 --- /dev/null +++ b/v2/api/models/item_stack_configurations_get_response_escaped_stack_configurations.go @@ -0,0 +1,173 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemStackConfigurationsGetResponse_StackConfigurations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes StackConfigurations_attributesable + // The id property + id *string + // The links property + links StackConfigurations_linksable + // The relationships property + relationships StackConfigurations_relationshipsable + // The type property + typeEscaped *StackConfigurations_type +} +// NewItemStackConfigurationsGetResponse_StackConfigurations instantiates a new ItemStackConfigurationsGetResponse_StackConfigurations and sets the default values. +func NewItemStackConfigurationsGetResponse_StackConfigurations()(*ItemStackConfigurationsGetResponse_StackConfigurations) { + m := &ItemStackConfigurationsGetResponse_StackConfigurations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemStackConfigurationsGetResponse_StackConfigurations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a StackConfigurations_attributesable when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetAttributes()(StackConfigurations_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackConfigurations_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(StackConfigurations_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackConfigurations_linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(StackConfigurations_linksable)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackConfigurations_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(StackConfigurations_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackConfigurations_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackConfigurations_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a StackConfigurations_linksable when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetLinks()(StackConfigurations_linksable) { + return m.links +} +// GetRelationships gets the relationships property value. The relationships property +// returns a StackConfigurations_relationshipsable when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetRelationships()(StackConfigurations_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackConfigurations_type when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetTypeEscaped()(*StackConfigurations_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetAttributes(value StackConfigurations_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetLinks(value StackConfigurations_linksable)() { + m.links = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetRelationships(value StackConfigurations_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetTypeEscaped(value *StackConfigurations_type)() { + m.typeEscaped = value +} diff --git a/v2/api/models/item_stack_configurations_get_response_escaped_stack_configurationsable.go b/v2/api/models/item_stack_configurations_get_response_escaped_stack_configurationsable.go new file mode 100644 index 000000000..8621c6630 --- /dev/null +++ b/v2/api/models/item_stack_configurations_get_response_escaped_stack_configurationsable.go @@ -0,0 +1,23 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemStackConfigurationsGetResponse_StackConfigurationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(StackConfigurations_attributesable) + GetId()(*string) + GetLinks()(StackConfigurations_linksable) + GetRelationships()(StackConfigurations_relationshipsable) + GetTypeEscaped()(*StackConfigurations_type) + SetAttributes(value StackConfigurations_attributesable)() + SetId(value *string)() + SetLinks(value StackConfigurations_linksable)() + SetRelationships(value StackConfigurations_relationshipsable)() + SetTypeEscaped(value *StackConfigurations_type)() +} diff --git a/v2/api/models/item_stacks_get_response_escaped_stacks.go b/v2/api/models/item_stacks_get_response_escaped_stacks.go new file mode 100644 index 000000000..7c182ae0f --- /dev/null +++ b/v2/api/models/item_stacks_get_response_escaped_stacks.go @@ -0,0 +1,173 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemStacksGetResponse_Stacks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes Stacks_attributesable + // The id property + id *string + // The links property + links Stacks_linksable + // The relationships property + relationships Stacks_relationshipsable + // The type property + typeEscaped *Stacks_type +} +// NewItemStacksGetResponse_Stacks instantiates a new ItemStacksGetResponse_Stacks and sets the default values. +func NewItemStacksGetResponse_Stacks()(*ItemStacksGetResponse_Stacks) { + m := &ItemStacksGetResponse_Stacks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemStacksGetResponse_StacksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStacksGetResponse_StacksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemStacksGetResponse_Stacks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemStacksGetResponse_Stacks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a Stacks_attributesable when successful +func (m *ItemStacksGetResponse_Stacks) GetAttributes()(Stacks_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStacksGetResponse_Stacks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStacks_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(Stacks_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStacks_linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(Stacks_linksable)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStacks_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(Stacks_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStacks_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*Stacks_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *ItemStacksGetResponse_Stacks) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a Stacks_linksable when successful +func (m *ItemStacksGetResponse_Stacks) GetLinks()(Stacks_linksable) { + return m.links +} +// GetRelationships gets the relationships property value. The relationships property +// returns a Stacks_relationshipsable when successful +func (m *ItemStacksGetResponse_Stacks) GetRelationships()(Stacks_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *Stacks_type when successful +func (m *ItemStacksGetResponse_Stacks) GetTypeEscaped()(*Stacks_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *ItemStacksGetResponse_Stacks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemStacksGetResponse_Stacks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *ItemStacksGetResponse_Stacks) SetAttributes(value Stacks_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *ItemStacksGetResponse_Stacks) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *ItemStacksGetResponse_Stacks) SetLinks(value Stacks_linksable)() { + m.links = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *ItemStacksGetResponse_Stacks) SetRelationships(value Stacks_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ItemStacksGetResponse_Stacks) SetTypeEscaped(value *Stacks_type)() { + m.typeEscaped = value +} diff --git a/v2/api/models/item_stacks_get_response_escaped_stacksable.go b/v2/api/models/item_stacks_get_response_escaped_stacksable.go new file mode 100644 index 000000000..fdc51fdc5 --- /dev/null +++ b/v2/api/models/item_stacks_get_response_escaped_stacksable.go @@ -0,0 +1,23 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemStacksGetResponse_Stacksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(Stacks_attributesable) + GetId()(*string) + GetLinks()(Stacks_linksable) + GetRelationships()(Stacks_relationshipsable) + GetTypeEscaped()(*Stacks_type) + SetAttributes(value Stacks_attributesable)() + SetId(value *string)() + SetLinks(value Stacks_linksable)() + SetRelationships(value Stacks_relationshipsable)() + SetTypeEscaped(value *Stacks_type)() +} diff --git a/v2/api/models/item_tasks_get_response_escaped_tasks.go b/v2/api/models/item_tasks_get_response_escaped_tasks.go new file mode 100644 index 000000000..26f64b6bf --- /dev/null +++ b/v2/api/models/item_tasks_get_response_escaped_tasks.go @@ -0,0 +1,180 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTasksGetResponse_Tasks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes Tasks_attributesable + // The id property + id *string + // The links property + links Selfable + // The relationships property + relationships Tasks_relationshipsable + // The type property + typeEscaped *Tasks_type +} +// NewItemTasksGetResponse_Tasks instantiates a new ItemTasksGetResponse_Tasks and sets the default values. +func NewItemTasksGetResponse_Tasks()(*ItemTasksGetResponse_Tasks) { + m := &ItemTasksGetResponse_Tasks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTasksGetResponse_TasksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTasksGetResponse_TasksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTasksGetResponse_Tasks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTasksGetResponse_Tasks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a Tasks_attributesable when successful +func (m *ItemTasksGetResponse_Tasks) GetAttributes()(Tasks_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTasksGetResponse_Tasks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTasks_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(Tasks_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSelfFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(Selfable)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTasks_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(Tasks_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTasks_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*Tasks_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *ItemTasksGetResponse_Tasks) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a Selfable when successful +func (m *ItemTasksGetResponse_Tasks) GetLinks()(Selfable) { + return m.links +} +// GetRelationships gets the relationships property value. The relationships property +// returns a Tasks_relationshipsable when successful +func (m *ItemTasksGetResponse_Tasks) GetRelationships()(Tasks_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *Tasks_type when successful +func (m *ItemTasksGetResponse_Tasks) GetTypeEscaped()(*Tasks_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *ItemTasksGetResponse_Tasks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTasksGetResponse_Tasks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *ItemTasksGetResponse_Tasks) SetAttributes(value Tasks_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *ItemTasksGetResponse_Tasks) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *ItemTasksGetResponse_Tasks) SetLinks(value Selfable)() { + m.links = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *ItemTasksGetResponse_Tasks) SetRelationships(value Tasks_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ItemTasksGetResponse_Tasks) SetTypeEscaped(value *Tasks_type)() { + m.typeEscaped = value +} diff --git a/v2/api/models/item_tasks_get_response_escaped_tasksable.go b/v2/api/models/item_tasks_get_response_escaped_tasksable.go new file mode 100644 index 000000000..1f5b08588 --- /dev/null +++ b/v2/api/models/item_tasks_get_response_escaped_tasksable.go @@ -0,0 +1,23 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTasksGetResponse_Tasksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(Tasks_attributesable) + GetId()(*string) + GetLinks()(Selfable) + GetRelationships()(Tasks_relationshipsable) + GetTypeEscaped()(*Tasks_type) + SetAttributes(value Tasks_attributesable)() + SetId(value *string)() + SetLinks(value Selfable)() + SetRelationships(value Tasks_relationshipsable)() + SetTypeEscaped(value *Tasks_type)() +} diff --git a/v2/api/models/item_workspaces_get_response_escaped_workspaces.go b/v2/api/models/item_workspaces_get_response_escaped_workspaces.go new file mode 100644 index 000000000..3fd30078d --- /dev/null +++ b/v2/api/models/item_workspaces_get_response_escaped_workspaces.go @@ -0,0 +1,180 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemWorkspacesGetResponse_Workspaces struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes Workspaces_attributesable + // The id property + id *string + // The links property + links WorkspaceLinksable + // The relationships property + relationships Workspaces_relationshipsable + // The type property + typeEscaped *Workspaces_type +} +// NewItemWorkspacesGetResponse_Workspaces instantiates a new ItemWorkspacesGetResponse_Workspaces and sets the default values. +func NewItemWorkspacesGetResponse_Workspaces()(*ItemWorkspacesGetResponse_Workspaces) { + m := &ItemWorkspacesGetResponse_Workspaces{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWorkspacesGetResponse_Workspaces(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a Workspaces_attributesable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetAttributes()(Workspaces_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkspaces_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(Workspaces_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkspaceLinksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(WorkspaceLinksable)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkspaces_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(Workspaces_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkspaces_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*Workspaces_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a WorkspaceLinksable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetLinks()(WorkspaceLinksable) { + return m.links +} +// GetRelationships gets the relationships property value. The relationships property +// returns a Workspaces_relationshipsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetRelationships()(Workspaces_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *Workspaces_type when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetTypeEscaped()(*Workspaces_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *ItemWorkspacesGetResponse_Workspaces) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemWorkspacesGetResponse_Workspaces) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *ItemWorkspacesGetResponse_Workspaces) SetAttributes(value Workspaces_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *ItemWorkspacesGetResponse_Workspaces) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *ItemWorkspacesGetResponse_Workspaces) SetLinks(value WorkspaceLinksable)() { + m.links = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *ItemWorkspacesGetResponse_Workspaces) SetRelationships(value Workspaces_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ItemWorkspacesGetResponse_Workspaces) SetTypeEscaped(value *Workspaces_type)() { + m.typeEscaped = value +} diff --git a/v2/api/models/item_workspaces_get_response_escaped_workspacesable.go b/v2/api/models/item_workspaces_get_response_escaped_workspacesable.go new file mode 100644 index 000000000..4e419970c --- /dev/null +++ b/v2/api/models/item_workspaces_get_response_escaped_workspacesable.go @@ -0,0 +1,23 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemWorkspacesGetResponse_Workspacesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(Workspaces_attributesable) + GetId()(*string) + GetLinks()(WorkspaceLinksable) + GetRelationships()(Workspaces_relationshipsable) + GetTypeEscaped()(*Workspaces_type) + SetAttributes(value Workspaces_attributesable)() + SetId(value *string)() + SetLinks(value WorkspaceLinksable)() + SetRelationships(value Workspaces_relationshipsable)() + SetTypeEscaped(value *Workspaces_type)() +} diff --git a/v2/api/models/no_code_query_escaped_attributes.go b/v2/api/models/no_code_query_escaped_attributes.go index 74b27154b..5957114e6 100644 --- a/v2/api/models/no_code_query_escaped_attributes.go +++ b/v2/api/models/no_code_query_escaped_attributes.go @@ -14,7 +14,7 @@ type NoCodeQuery_attributes struct { generateConfigOut *bool // The noCodeQueryProviders property noCodeQueryProviders []NoCodeQuery_attributes_noCodeQueryProvidersable - // Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration and is invalid for Terraform MCP queries. When the feature is inactive, all values resolve to false. + // Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration for both UI and Terraform MCP queries. When the feature is inactive, all values resolve to false and workspace policy evaluation retains its existing query-policy behavior. policyEvaluationOptIn *bool // The source assigned to the query run triggered on create. Only Terraform MCP may explicitly set this value. When omitted, the query run uses the default No-Code Query source. source *NoCodeQuery_attributes_source @@ -98,7 +98,7 @@ func (m *NoCodeQuery_attributes) GetGenerateConfigOut()(*bool) { func (m *NoCodeQuery_attributes) GetNoCodeQueryProviders()([]NoCodeQuery_attributes_noCodeQueryProvidersable) { return m.noCodeQueryProviders } -// GetPolicyEvaluationOptIn gets the policy-evaluation-opt-in property value. Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration and is invalid for Terraform MCP queries. When the feature is inactive, all values resolve to false. +// GetPolicyEvaluationOptIn gets the policy-evaluation-opt-in property value. Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration for both UI and Terraform MCP queries. When the feature is inactive, all values resolve to false and workspace policy evaluation retains its existing query-policy behavior. // returns a *bool when successful func (m *NoCodeQuery_attributes) GetPolicyEvaluationOptIn()(*bool) { return m.policyEvaluationOptIn @@ -161,7 +161,7 @@ func (m *NoCodeQuery_attributes) SetGenerateConfigOut(value *bool)() { func (m *NoCodeQuery_attributes) SetNoCodeQueryProviders(value []NoCodeQuery_attributes_noCodeQueryProvidersable)() { m.noCodeQueryProviders = value } -// SetPolicyEvaluationOptIn sets the policy-evaluation-opt-in property value. Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration and is invalid for Terraform MCP queries. When the feature is inactive, all values resolve to false. +// SetPolicyEvaluationOptIn sets the policy-evaluation-opt-in property value. Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration for both UI and Terraform MCP queries. When the feature is inactive, all values resolve to false and workspace policy evaluation retains its existing query-policy behavior. func (m *NoCodeQuery_attributes) SetPolicyEvaluationOptIn(value *bool)() { m.policyEvaluationOptIn = value } diff --git a/v2/api/models/onboarding_task_lists.go b/v2/api/models/onboarding_task_lists.go new file mode 100644 index 000000000..cb4eca678 --- /dev/null +++ b/v2/api/models/onboarding_task_lists.go @@ -0,0 +1,165 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OnboardingTaskLists struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes OnboardingTaskLists_attributesable + // The id property + id *string + // The relationships property + relationships OnboardingTaskLists_relationshipsable + // The type property + typeEscaped *OnboardingTaskLists_type +} +// NewOnboardingTaskLists instantiates a new OnboardingTaskLists and sets the default values. +func NewOnboardingTaskLists()(*OnboardingTaskLists) { + m := &OnboardingTaskLists{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOnboardingTaskListsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOnboardingTaskListsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnboardingTaskLists(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OnboardingTaskLists) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a OnboardingTaskLists_attributesable when successful +func (m *OnboardingTaskLists) GetAttributes()(OnboardingTaskLists_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OnboardingTaskLists) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnboardingTaskLists_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(OnboardingTaskLists_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnboardingTaskLists_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(OnboardingTaskLists_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnboardingTaskLists_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*OnboardingTaskLists_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *OnboardingTaskLists) GetId()(*string) { + return m.id +} +// GetRelationships gets the relationships property value. The relationships property +// returns a OnboardingTaskLists_relationshipsable when successful +func (m *OnboardingTaskLists) GetRelationships()(OnboardingTaskLists_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *OnboardingTaskLists_type when successful +func (m *OnboardingTaskLists) GetTypeEscaped()(*OnboardingTaskLists_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *OnboardingTaskLists) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OnboardingTaskLists) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *OnboardingTaskLists) SetAttributes(value OnboardingTaskLists_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *OnboardingTaskLists) SetId(value *string)() { + m.id = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *OnboardingTaskLists) SetRelationships(value OnboardingTaskLists_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *OnboardingTaskLists) SetTypeEscaped(value *OnboardingTaskLists_type)() { + m.typeEscaped = value +} +type OnboardingTaskListsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(OnboardingTaskLists_attributesable) + GetId()(*string) + GetRelationships()(OnboardingTaskLists_relationshipsable) + GetTypeEscaped()(*OnboardingTaskLists_type) + SetAttributes(value OnboardingTaskLists_attributesable)() + SetId(value *string)() + SetRelationships(value OnboardingTaskLists_relationshipsable)() + SetTypeEscaped(value *OnboardingTaskLists_type)() +} diff --git a/v2/api/models/onboarding_task_lists_escaped_attributes.go b/v2/api/models/onboarding_task_lists_escaped_attributes.go new file mode 100644 index 000000000..6e4278698 --- /dev/null +++ b/v2/api/models/onboarding_task_lists_escaped_attributes.go @@ -0,0 +1,141 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OnboardingTaskLists_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The expired property + expired *bool + // The incompleteTaskCount property + incompleteTaskCount *int32 + // The totalTaskCount property + totalTaskCount *int32 +} +// NewOnboardingTaskLists_attributes instantiates a new OnboardingTaskLists_attributes and sets the default values. +func NewOnboardingTaskLists_attributes()(*OnboardingTaskLists_attributes) { + m := &OnboardingTaskLists_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOnboardingTaskLists_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOnboardingTaskLists_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnboardingTaskLists_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OnboardingTaskLists_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExpired gets the expired property value. The expired property +// returns a *bool when successful +func (m *OnboardingTaskLists_attributes) GetExpired()(*bool) { + return m.expired +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OnboardingTaskLists_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExpired(val) + } + return nil + } + res["incomplete-task-count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteTaskCount(val) + } + return nil + } + res["total-task-count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaskCount(val) + } + return nil + } + return res +} +// GetIncompleteTaskCount gets the incomplete-task-count property value. The incompleteTaskCount property +// returns a *int32 when successful +func (m *OnboardingTaskLists_attributes) GetIncompleteTaskCount()(*int32) { + return m.incompleteTaskCount +} +// GetTotalTaskCount gets the total-task-count property value. The totalTaskCount property +// returns a *int32 when successful +func (m *OnboardingTaskLists_attributes) GetTotalTaskCount()(*int32) { + return m.totalTaskCount +} +// Serialize serializes information the current object +func (m *OnboardingTaskLists_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("expired", m.GetExpired()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("incomplete-task-count", m.GetIncompleteTaskCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total-task-count", m.GetTotalTaskCount()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OnboardingTaskLists_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExpired sets the expired property value. The expired property +func (m *OnboardingTaskLists_attributes) SetExpired(value *bool)() { + m.expired = value +} +// SetIncompleteTaskCount sets the incomplete-task-count property value. The incompleteTaskCount property +func (m *OnboardingTaskLists_attributes) SetIncompleteTaskCount(value *int32)() { + m.incompleteTaskCount = value +} +// SetTotalTaskCount sets the total-task-count property value. The totalTaskCount property +func (m *OnboardingTaskLists_attributes) SetTotalTaskCount(value *int32)() { + m.totalTaskCount = value +} +type OnboardingTaskLists_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpired()(*bool) + GetIncompleteTaskCount()(*int32) + GetTotalTaskCount()(*int32) + SetExpired(value *bool)() + SetIncompleteTaskCount(value *int32)() + SetTotalTaskCount(value *int32)() +} diff --git a/v2/api/models/onboarding_task_lists_escaped_relationships.go b/v2/api/models/onboarding_task_lists_escaped_relationships.go new file mode 100644 index 000000000..06de14b90 --- /dev/null +++ b/v2/api/models/onboarding_task_lists_escaped_relationships.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OnboardingTaskLists_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The organization property + organization OrganizationsHasOneable +} +// NewOnboardingTaskLists_relationships instantiates a new OnboardingTaskLists_relationships and sets the default values. +func NewOnboardingTaskLists_relationships()(*OnboardingTaskLists_relationships) { + m := &OnboardingTaskLists_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOnboardingTaskLists_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOnboardingTaskLists_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnboardingTaskLists_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OnboardingTaskLists_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OnboardingTaskLists_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationsHasOneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(OrganizationsHasOneable)) + } + return nil + } + return res +} +// GetOrganization gets the organization property value. The organization property +// returns a OrganizationsHasOneable when successful +func (m *OnboardingTaskLists_relationships) GetOrganization()(OrganizationsHasOneable) { + return m.organization +} +// Serialize serializes information the current object +func (m *OnboardingTaskLists_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OnboardingTaskLists_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOrganization sets the organization property value. The organization property +func (m *OnboardingTaskLists_relationships) SetOrganization(value OrganizationsHasOneable)() { + m.organization = value +} +type OnboardingTaskLists_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganization()(OrganizationsHasOneable) + SetOrganization(value OrganizationsHasOneable)() +} diff --git a/v2/api/models/onboarding_task_lists_escaped_type.go b/v2/api/models/onboarding_task_lists_escaped_type.go new file mode 100644 index 000000000..48eb9bb28 --- /dev/null +++ b/v2/api/models/onboarding_task_lists_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type OnboardingTaskLists_type int + +const ( + ONBOARDINGTASKLISTS_ONBOARDINGTASKLISTS_TYPE OnboardingTaskLists_type = iota +) + +func (i OnboardingTaskLists_type) String() string { + return []string{"onboarding-task-lists"}[i] +} +func ParseOnboardingTaskLists_type(v string) (any, error) { + result := ONBOARDINGTASKLISTS_ONBOARDINGTASKLISTS_TYPE + switch v { + case "onboarding-task-lists": + result = ONBOARDINGTASKLISTS_ONBOARDINGTASKLISTS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeOnboardingTaskLists_type(values []OnboardingTaskLists_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OnboardingTaskLists_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/ootb_policies.go b/v2/api/models/ootb_policies.go new file mode 100644 index 000000000..1b46c41da --- /dev/null +++ b/v2/api/models/ootb_policies.go @@ -0,0 +1,200 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OotbPolicies struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes OotbPolicies_attributesable + // The external ID of the OOTB policy. + id *string + // The links property + links OotbPolicies_linksable + // The relationships property + relationships OotbPolicies_relationshipsable + // The type property + typeEscaped *OotbPolicies_type +} +// NewOotbPolicies instantiates a new OotbPolicies and sets the default values. +func NewOotbPolicies()(*OotbPolicies) { + m := &OotbPolicies{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPoliciesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPoliciesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicies(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicies) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a OotbPolicies_attributesable when successful +func (m *OotbPolicies) GetAttributes()(OotbPolicies_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicies) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOotbPolicies_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(OotbPolicies_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOotbPolicies_linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(OotbPolicies_linksable)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOotbPolicies_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(OotbPolicies_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOotbPolicies_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*OotbPolicies_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The external ID of the OOTB policy. +// returns a *string when successful +func (m *OotbPolicies) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a OotbPolicies_linksable when successful +func (m *OotbPolicies) GetLinks()(OotbPolicies_linksable) { + return m.links +} +// GetRelationships gets the relationships property value. The relationships property +// returns a OotbPolicies_relationshipsable when successful +func (m *OotbPolicies) GetRelationships()(OotbPolicies_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *OotbPolicies_type when successful +func (m *OotbPolicies) GetTypeEscaped()(*OotbPolicies_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *OotbPolicies) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicies) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *OotbPolicies) SetAttributes(value OotbPolicies_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The external ID of the OOTB policy. +func (m *OotbPolicies) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *OotbPolicies) SetLinks(value OotbPolicies_linksable)() { + m.links = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *OotbPolicies) SetRelationships(value OotbPolicies_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *OotbPolicies) SetTypeEscaped(value *OotbPolicies_type)() { + m.typeEscaped = value +} +type OotbPoliciesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(OotbPolicies_attributesable) + GetId()(*string) + GetLinks()(OotbPolicies_linksable) + GetRelationships()(OotbPolicies_relationshipsable) + GetTypeEscaped()(*OotbPolicies_type) + SetAttributes(value OotbPolicies_attributesable)() + SetId(value *string)() + SetLinks(value OotbPolicies_linksable)() + SetRelationships(value OotbPolicies_relationshipsable)() + SetTypeEscaped(value *OotbPolicies_type)() +} diff --git a/v2/api/models/ootb_policies_escaped_attributes.go b/v2/api/models/ootb_policies_escaped_attributes.go new file mode 100644 index 000000000..cdee2b228 --- /dev/null +++ b/v2/api/models/ootb_policies_escaped_attributes.go @@ -0,0 +1,317 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OotbPolicies_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Source location (docs/repository URL) for this policy, taken from the latest version's library policy. Null when no active library release is available. + controlSource *string + // Catalog record creation time (not policy release/publication time). + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Policy description. + description *string + // Array of Terraform resource types this policy governs. + governedResources []string + // The policy engine type. + kind *OotbPolicies_attributes_kind + // The name of the policy. + name *string + // Cloud provider the policy targets, stored lower-cased (e.g. `aws`, `azure`, `gcp`). Use as the value of `filter[provider]` on the list endpoint; matching is case-insensitive. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.providers`. + provider *string + // Cloud service the policy targets (e.g. `s3`, `iam`, `compute`). Use as the value of `filter[service]` on the list endpoint. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.services`. + service *string + // URL-friendly unique identifier for the policy. + slug *string +} +// NewOotbPolicies_attributes instantiates a new OotbPolicies_attributes and sets the default values. +func NewOotbPolicies_attributes()(*OotbPolicies_attributes) { + m := &OotbPolicies_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPolicies_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPolicies_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicies_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicies_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetControlSource gets the control-source property value. Source location (docs/repository URL) for this policy, taken from the latest version's library policy. Null when no active library release is available. +// returns a *string when successful +func (m *OotbPolicies_attributes) GetControlSource()(*string) { + return m.controlSource +} +// GetCreatedAt gets the created-at property value. Catalog record creation time (not policy release/publication time). +// returns a *Time when successful +func (m *OotbPolicies_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetDescription gets the description property value. Policy description. +// returns a *string when successful +func (m *OotbPolicies_attributes) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicies_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["control-source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetControlSource(val) + } + return nil + } + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["governed-resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGovernedResources(res) + } + return nil + } + res["kind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOotbPolicies_attributes_kind) + if err != nil { + return err + } + if val != nil { + m.SetKind(val.(*OotbPolicies_attributes_kind)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["provider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvider(val) + } + return nil + } + res["service"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetService(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + return res +} +// GetGovernedResources gets the governed-resources property value. Array of Terraform resource types this policy governs. +// returns a []string when successful +func (m *OotbPolicies_attributes) GetGovernedResources()([]string) { + return m.governedResources +} +// GetKind gets the kind property value. The policy engine type. +// returns a *OotbPolicies_attributes_kind when successful +func (m *OotbPolicies_attributes) GetKind()(*OotbPolicies_attributes_kind) { + return m.kind +} +// GetName gets the name property value. The name of the policy. +// returns a *string when successful +func (m *OotbPolicies_attributes) GetName()(*string) { + return m.name +} +// GetProvider gets the provider property value. Cloud provider the policy targets, stored lower-cased (e.g. `aws`, `azure`, `gcp`). Use as the value of `filter[provider]` on the list endpoint; matching is case-insensitive. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.providers`. +// returns a *string when successful +func (m *OotbPolicies_attributes) GetProvider()(*string) { + return m.provider +} +// GetService gets the service property value. Cloud service the policy targets (e.g. `s3`, `iam`, `compute`). Use as the value of `filter[service]` on the list endpoint. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.services`. +// returns a *string when successful +func (m *OotbPolicies_attributes) GetService()(*string) { + return m.service +} +// GetSlug gets the slug property value. URL-friendly unique identifier for the policy. +// returns a *string when successful +func (m *OotbPolicies_attributes) GetSlug()(*string) { + return m.slug +} +// Serialize serializes information the current object +func (m *OotbPolicies_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("control-source", m.GetControlSource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetGovernedResources() != nil { + err := writer.WriteCollectionOfStringValues("governed-resources", m.GetGovernedResources()) + if err != nil { + return err + } + } + if m.GetKind() != nil { + cast := (*m.GetKind()).String() + err := writer.WriteStringValue("kind", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("provider", m.GetProvider()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("service", m.GetService()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicies_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetControlSource sets the control-source property value. Source location (docs/repository URL) for this policy, taken from the latest version's library policy. Null when no active library release is available. +func (m *OotbPolicies_attributes) SetControlSource(value *string)() { + m.controlSource = value +} +// SetCreatedAt sets the created-at property value. Catalog record creation time (not policy release/publication time). +func (m *OotbPolicies_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetDescription sets the description property value. Policy description. +func (m *OotbPolicies_attributes) SetDescription(value *string)() { + m.description = value +} +// SetGovernedResources sets the governed-resources property value. Array of Terraform resource types this policy governs. +func (m *OotbPolicies_attributes) SetGovernedResources(value []string)() { + m.governedResources = value +} +// SetKind sets the kind property value. The policy engine type. +func (m *OotbPolicies_attributes) SetKind(value *OotbPolicies_attributes_kind)() { + m.kind = value +} +// SetName sets the name property value. The name of the policy. +func (m *OotbPolicies_attributes) SetName(value *string)() { + m.name = value +} +// SetProvider sets the provider property value. Cloud provider the policy targets, stored lower-cased (e.g. `aws`, `azure`, `gcp`). Use as the value of `filter[provider]` on the list endpoint; matching is case-insensitive. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.providers`. +func (m *OotbPolicies_attributes) SetProvider(value *string)() { + m.provider = value +} +// SetService sets the service property value. Cloud service the policy targets (e.g. `s3`, `iam`, `compute`). Use as the value of `filter[service]` on the list endpoint. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.services`. +func (m *OotbPolicies_attributes) SetService(value *string)() { + m.service = value +} +// SetSlug sets the slug property value. URL-friendly unique identifier for the policy. +func (m *OotbPolicies_attributes) SetSlug(value *string)() { + m.slug = value +} +type OotbPolicies_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetControlSource()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetGovernedResources()([]string) + GetKind()(*OotbPolicies_attributes_kind) + GetName()(*string) + GetProvider()(*string) + GetService()(*string) + GetSlug()(*string) + SetControlSource(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetGovernedResources(value []string)() + SetKind(value *OotbPolicies_attributes_kind)() + SetName(value *string)() + SetProvider(value *string)() + SetService(value *string)() + SetSlug(value *string)() +} diff --git a/v2/api/models/ootb_policies_escaped_attributes_escaped_kind.go b/v2/api/models/ootb_policies_escaped_attributes_escaped_kind.go new file mode 100644 index 000000000..951216716 --- /dev/null +++ b/v2/api/models/ootb_policies_escaped_attributes_escaped_kind.go @@ -0,0 +1,37 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// The policy engine type. +type OotbPolicies_attributes_kind int + +const ( + SENTINEL_OOTBPOLICIES_ATTRIBUTES_KIND OotbPolicies_attributes_kind = iota + TFPOLICY_OOTBPOLICIES_ATTRIBUTES_KIND +) + +func (i OotbPolicies_attributes_kind) String() string { + return []string{"sentinel", "tfpolicy"}[i] +} +func ParseOotbPolicies_attributes_kind(v string) (any, error) { + result := SENTINEL_OOTBPOLICIES_ATTRIBUTES_KIND + switch v { + case "sentinel": + result = SENTINEL_OOTBPOLICIES_ATTRIBUTES_KIND + case "tfpolicy": + result = TFPOLICY_OOTBPOLICIES_ATTRIBUTES_KIND + default: + return nil, nil + } + return &result, nil +} +func SerializeOotbPolicies_attributes_kind(values []OotbPolicies_attributes_kind) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OotbPolicies_attributes_kind) isMultiValue() bool { + return false +} diff --git a/v2/api/models/ootb_policies_escaped_links.go b/v2/api/models/ootb_policies_escaped_links.go new file mode 100644 index 000000000..6ec01e3a1 --- /dev/null +++ b/v2/api/models/ootb_policies_escaped_links.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OotbPolicies_links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // URL to download the latest version of this policy's source content. + download *string +} +// NewOotbPolicies_links instantiates a new OotbPolicies_links and sets the default values. +func NewOotbPolicies_links()(*OotbPolicies_links) { + m := &OotbPolicies_links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPolicies_linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPolicies_linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicies_links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicies_links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDownload gets the download property value. URL to download the latest version of this policy's source content. +// returns a *string when successful +func (m *OotbPolicies_links) GetDownload()(*string) { + return m.download +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicies_links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["download"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownload(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OotbPolicies_links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("download", m.GetDownload()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicies_links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDownload sets the download property value. URL to download the latest version of this policy's source content. +func (m *OotbPolicies_links) SetDownload(value *string)() { + m.download = value +} +type OotbPolicies_linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDownload()(*string) + SetDownload(value *string)() +} diff --git a/v2/api/models/ootb_policies_escaped_relationships.go b/v2/api/models/ootb_policies_escaped_relationships.go new file mode 100644 index 000000000..c6e77b13e --- /dev/null +++ b/v2/api/models/ootb_policies_escaped_relationships.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OotbPolicies_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Libraries this policy belongs to. Only present when ?include=ootb-policy-libraries is passed on the list endpoint. + ootbPolicyLibraries OotbPolicyLibrariesHasManyable +} +// NewOotbPolicies_relationships instantiates a new OotbPolicies_relationships and sets the default values. +func NewOotbPolicies_relationships()(*OotbPolicies_relationships) { + m := &OotbPolicies_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPolicies_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPolicies_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicies_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicies_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicies_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ootb-policy-libraries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOotbPolicyLibrariesHasManyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOotbPolicyLibraries(val.(OotbPolicyLibrariesHasManyable)) + } + return nil + } + return res +} +// GetOotbPolicyLibraries gets the ootb-policy-libraries property value. Libraries this policy belongs to. Only present when ?include=ootb-policy-libraries is passed on the list endpoint. +// returns a OotbPolicyLibrariesHasManyable when successful +func (m *OotbPolicies_relationships) GetOotbPolicyLibraries()(OotbPolicyLibrariesHasManyable) { + return m.ootbPolicyLibraries +} +// Serialize serializes information the current object +func (m *OotbPolicies_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("ootb-policy-libraries", m.GetOotbPolicyLibraries()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicies_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOotbPolicyLibraries sets the ootb-policy-libraries property value. Libraries this policy belongs to. Only present when ?include=ootb-policy-libraries is passed on the list endpoint. +func (m *OotbPolicies_relationships) SetOotbPolicyLibraries(value OotbPolicyLibrariesHasManyable)() { + m.ootbPolicyLibraries = value +} +type OotbPolicies_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOotbPolicyLibraries()(OotbPolicyLibrariesHasManyable) + SetOotbPolicyLibraries(value OotbPolicyLibrariesHasManyable)() +} diff --git a/v2/api/models/ootb_policies_escaped_type.go b/v2/api/models/ootb_policies_escaped_type.go new file mode 100644 index 000000000..d0e8768c1 --- /dev/null +++ b/v2/api/models/ootb_policies_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type OotbPolicies_type int + +const ( + OOTBPOLICIES_OOTBPOLICIES_TYPE OotbPolicies_type = iota +) + +func (i OotbPolicies_type) String() string { + return []string{"ootb-policies"}[i] +} +func ParseOotbPolicies_type(v string) (any, error) { + result := OOTBPOLICIES_OOTBPOLICIES_TYPE + switch v { + case "ootb-policies": + result = OOTBPOLICIES_OOTBPOLICIES_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeOotbPolicies_type(values []OotbPolicies_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OotbPolicies_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/ootb_policy_libraries_has_many.go b/v2/api/models/ootb_policy_libraries_has_many.go new file mode 100644 index 000000000..5dc805fe0 --- /dev/null +++ b/v2/api/models/ootb_policy_libraries_has_many.go @@ -0,0 +1,96 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OotbPolicyLibrariesHasMany libraries this policy belongs to. Only present when ?include=ootb-policy-libraries is passed on the list endpoint. +type OotbPolicyLibrariesHasMany struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data []OotbPolicyLibrariesIdentifierable +} +// NewOotbPolicyLibrariesHasMany instantiates a new OotbPolicyLibrariesHasMany and sets the default values. +func NewOotbPolicyLibrariesHasMany()(*OotbPolicyLibrariesHasMany) { + m := &OotbPolicyLibrariesHasMany{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPolicyLibrariesHasManyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPolicyLibrariesHasManyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicyLibrariesHasMany(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicyLibrariesHasMany) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a []OotbPolicyLibrariesIdentifierable when successful +func (m *OotbPolicyLibrariesHasMany) GetData()([]OotbPolicyLibrariesIdentifierable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicyLibrariesHasMany) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOotbPolicyLibrariesIdentifierFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OotbPolicyLibrariesIdentifierable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(OotbPolicyLibrariesIdentifierable) + } + } + m.SetData(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OotbPolicyLibrariesHasMany) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetData())) + for i, v := range m.GetData() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("data", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicyLibrariesHasMany) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *OotbPolicyLibrariesHasMany) SetData(value []OotbPolicyLibrariesIdentifierable)() { + m.data = value +} +type OotbPolicyLibrariesHasManyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()([]OotbPolicyLibrariesIdentifierable) + SetData(value []OotbPolicyLibrariesIdentifierable)() +} diff --git a/v2/api/models/ootb_policy_libraries_identifier.go b/v2/api/models/ootb_policy_libraries_identifier.go new file mode 100644 index 000000000..8d59b6028 --- /dev/null +++ b/v2/api/models/ootb_policy_libraries_identifier.go @@ -0,0 +1,113 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OotbPolicyLibrariesIdentifier struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The slug of the library. + id *string + // The type property + typeEscaped *OotbPolicyLibrariesIdentifier_type +} +// NewOotbPolicyLibrariesIdentifier instantiates a new OotbPolicyLibrariesIdentifier and sets the default values. +func NewOotbPolicyLibrariesIdentifier()(*OotbPolicyLibrariesIdentifier) { + m := &OotbPolicyLibrariesIdentifier{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPolicyLibrariesIdentifierFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPolicyLibrariesIdentifierFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicyLibrariesIdentifier(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicyLibrariesIdentifier) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicyLibrariesIdentifier) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOotbPolicyLibrariesIdentifier_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*OotbPolicyLibrariesIdentifier_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The slug of the library. +// returns a *string when successful +func (m *OotbPolicyLibrariesIdentifier) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *OotbPolicyLibrariesIdentifier_type when successful +func (m *OotbPolicyLibrariesIdentifier) GetTypeEscaped()(*OotbPolicyLibrariesIdentifier_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *OotbPolicyLibrariesIdentifier) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicyLibrariesIdentifier) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The slug of the library. +func (m *OotbPolicyLibrariesIdentifier) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *OotbPolicyLibrariesIdentifier) SetTypeEscaped(value *OotbPolicyLibrariesIdentifier_type)() { + m.typeEscaped = value +} +type OotbPolicyLibrariesIdentifierable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetTypeEscaped()(*OotbPolicyLibrariesIdentifier_type) + SetId(value *string)() + SetTypeEscaped(value *OotbPolicyLibrariesIdentifier_type)() +} diff --git a/v2/api/models/ootb_policy_libraries_identifier_escaped_type.go b/v2/api/models/ootb_policy_libraries_identifier_escaped_type.go new file mode 100644 index 000000000..d533bb100 --- /dev/null +++ b/v2/api/models/ootb_policy_libraries_identifier_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type OotbPolicyLibrariesIdentifier_type int + +const ( + OOTBPOLICYLIBRARIES_OOTBPOLICYLIBRARIESIDENTIFIER_TYPE OotbPolicyLibrariesIdentifier_type = iota +) + +func (i OotbPolicyLibrariesIdentifier_type) String() string { + return []string{"ootb-policy-libraries"}[i] +} +func ParseOotbPolicyLibrariesIdentifier_type(v string) (any, error) { + result := OOTBPOLICYLIBRARIES_OOTBPOLICYLIBRARIESIDENTIFIER_TYPE + switch v { + case "ootb-policy-libraries": + result = OOTBPOLICYLIBRARIES_OOTBPOLICYLIBRARIESIDENTIFIER_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeOotbPolicyLibrariesIdentifier_type(values []OotbPolicyLibrariesIdentifier_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OotbPolicyLibrariesIdentifier_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/ootb_policy_library_references.go b/v2/api/models/ootb_policy_library_references.go new file mode 100644 index 000000000..2677b1421 --- /dev/null +++ b/v2/api/models/ootb_policy_library_references.go @@ -0,0 +1,143 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OotbPolicyLibraryReferences a slim reference to an OOTB policy library, returned in the `included` array when ?include=ootb-policy-libraries is passed. Contains only the name attribute. +type OotbPolicyLibraryReferences struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes OotbPolicyLibraryReferences_attributesable + // The slug of the OOTB policy library. + id *string + // The type property + typeEscaped *OotbPolicyLibraryReferences_type +} +// NewOotbPolicyLibraryReferences instantiates a new OotbPolicyLibraryReferences and sets the default values. +func NewOotbPolicyLibraryReferences()(*OotbPolicyLibraryReferences) { + m := &OotbPolicyLibraryReferences{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPolicyLibraryReferencesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPolicyLibraryReferencesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicyLibraryReferences(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicyLibraryReferences) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a OotbPolicyLibraryReferences_attributesable when successful +func (m *OotbPolicyLibraryReferences) GetAttributes()(OotbPolicyLibraryReferences_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicyLibraryReferences) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOotbPolicyLibraryReferences_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(OotbPolicyLibraryReferences_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOotbPolicyLibraryReferences_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*OotbPolicyLibraryReferences_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The slug of the OOTB policy library. +// returns a *string when successful +func (m *OotbPolicyLibraryReferences) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *OotbPolicyLibraryReferences_type when successful +func (m *OotbPolicyLibraryReferences) GetTypeEscaped()(*OotbPolicyLibraryReferences_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *OotbPolicyLibraryReferences) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicyLibraryReferences) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *OotbPolicyLibraryReferences) SetAttributes(value OotbPolicyLibraryReferences_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The slug of the OOTB policy library. +func (m *OotbPolicyLibraryReferences) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *OotbPolicyLibraryReferences) SetTypeEscaped(value *OotbPolicyLibraryReferences_type)() { + m.typeEscaped = value +} +type OotbPolicyLibraryReferencesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(OotbPolicyLibraryReferences_attributesable) + GetId()(*string) + GetTypeEscaped()(*OotbPolicyLibraryReferences_type) + SetAttributes(value OotbPolicyLibraryReferences_attributesable)() + SetId(value *string)() + SetTypeEscaped(value *OotbPolicyLibraryReferences_type)() +} diff --git a/v2/api/models/ootb_policy_library_references_escaped_attributes.go b/v2/api/models/ootb_policy_library_references_escaped_attributes.go new file mode 100644 index 000000000..6685a8563 --- /dev/null +++ b/v2/api/models/ootb_policy_library_references_escaped_attributes.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OotbPolicyLibraryReferences_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Human-readable library name. + name *string +} +// NewOotbPolicyLibraryReferences_attributes instantiates a new OotbPolicyLibraryReferences_attributes and sets the default values. +func NewOotbPolicyLibraryReferences_attributes()(*OotbPolicyLibraryReferences_attributes) { + m := &OotbPolicyLibraryReferences_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPolicyLibraryReferences_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPolicyLibraryReferences_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicyLibraryReferences_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicyLibraryReferences_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicyLibraryReferences_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Human-readable library name. +// returns a *string when successful +func (m *OotbPolicyLibraryReferences_attributes) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *OotbPolicyLibraryReferences_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicyLibraryReferences_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. Human-readable library name. +func (m *OotbPolicyLibraryReferences_attributes) SetName(value *string)() { + m.name = value +} +type OotbPolicyLibraryReferences_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + SetName(value *string)() +} diff --git a/v2/api/models/ootb_policy_library_references_escaped_type.go b/v2/api/models/ootb_policy_library_references_escaped_type.go new file mode 100644 index 000000000..180b2101f --- /dev/null +++ b/v2/api/models/ootb_policy_library_references_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type OotbPolicyLibraryReferences_type int + +const ( + OOTBPOLICYLIBRARIES_OOTBPOLICYLIBRARYREFERENCES_TYPE OotbPolicyLibraryReferences_type = iota +) + +func (i OotbPolicyLibraryReferences_type) String() string { + return []string{"ootb-policy-libraries"}[i] +} +func ParseOotbPolicyLibraryReferences_type(v string) (any, error) { + result := OOTBPOLICYLIBRARIES_OOTBPOLICYLIBRARYREFERENCES_TYPE + switch v { + case "ootb-policy-libraries": + result = OOTBPOLICYLIBRARIES_OOTBPOLICYLIBRARYREFERENCES_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeOotbPolicyLibraryReferences_type(values []OotbPolicyLibraryReferences_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OotbPolicyLibraryReferences_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/organizations_envelope.go b/v2/api/models/organizations_envelope.go index ff1046687..03bfed793 100644 --- a/v2/api/models/organizations_envelope.go +++ b/v2/api/models/organizations_envelope.go @@ -11,7 +11,7 @@ type OrganizationsEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data Organizationsable + data OrganizationsGetResponse_Organizationsable } // NewOrganizationsEnvelope instantiates a new OrganizationsEnvelope and sets the default values. func NewOrganizationsEnvelope()(*OrganizationsEnvelope) { @@ -31,8 +31,8 @@ func (m *OrganizationsEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a Organizationsable when successful -func (m *OrganizationsEnvelope) GetData()(Organizationsable) { +// returns a OrganizationsGetResponse_Organizationsable when successful +func (m *OrganizationsEnvelope) GetData()(OrganizationsGetResponse_Organizationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *OrganizationsEnvelope) GetData()(Organizationsable) { func (m *OrganizationsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateOrganizationsFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(Organizationsable)) + m.SetData(val.(OrganizationsGetResponse_Organizationsable)) } return nil } @@ -72,12 +72,12 @@ func (m *OrganizationsEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *OrganizationsEnvelope) SetData(value Organizationsable)() { +func (m *OrganizationsEnvelope) SetData(value OrganizationsGetResponse_Organizationsable)() { m.data = value } type OrganizationsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(Organizationsable) - SetData(value Organizationsable)() + GetData()(OrganizationsGetResponse_Organizationsable) + SetData(value OrganizationsGetResponse_Organizationsable)() } diff --git a/v2/api/models/organizations_get_response_escaped_organizations.go b/v2/api/models/organizations_get_response_escaped_organizations.go new file mode 100644 index 000000000..47011118a --- /dev/null +++ b/v2/api/models/organizations_get_response_escaped_organizations.go @@ -0,0 +1,180 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationsGetResponse_Organizations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes Organizations_attributesable + // The id property + id *string + // The links property + links Selfable + // The relationships property + relationships Organizations_relationshipsable + // The type property + typeEscaped *Organizations_type +} +// NewOrganizationsGetResponse_Organizations instantiates a new OrganizationsGetResponse_Organizations and sets the default values. +func NewOrganizationsGetResponse_Organizations()(*OrganizationsGetResponse_Organizations) { + m := &OrganizationsGetResponse_Organizations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationsGetResponse_Organizations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationsGetResponse_Organizations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a Organizations_attributesable when successful +func (m *OrganizationsGetResponse_Organizations) GetAttributes()(Organizations_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationsGetResponse_Organizations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizations_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(Organizations_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSelfFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(Selfable)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizations_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(Organizations_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizations_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*Organizations_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *OrganizationsGetResponse_Organizations) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a Selfable when successful +func (m *OrganizationsGetResponse_Organizations) GetLinks()(Selfable) { + return m.links +} +// GetRelationships gets the relationships property value. The relationships property +// returns a Organizations_relationshipsable when successful +func (m *OrganizationsGetResponse_Organizations) GetRelationships()(Organizations_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *Organizations_type when successful +func (m *OrganizationsGetResponse_Organizations) GetTypeEscaped()(*Organizations_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *OrganizationsGetResponse_Organizations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationsGetResponse_Organizations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *OrganizationsGetResponse_Organizations) SetAttributes(value Organizations_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *OrganizationsGetResponse_Organizations) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *OrganizationsGetResponse_Organizations) SetLinks(value Selfable)() { + m.links = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *OrganizationsGetResponse_Organizations) SetRelationships(value Organizations_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *OrganizationsGetResponse_Organizations) SetTypeEscaped(value *Organizations_type)() { + m.typeEscaped = value +} diff --git a/v2/api/models/organizations_get_response_escaped_organizationsable.go b/v2/api/models/organizations_get_response_escaped_organizationsable.go new file mode 100644 index 000000000..59f5bdf22 --- /dev/null +++ b/v2/api/models/organizations_get_response_escaped_organizationsable.go @@ -0,0 +1,23 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationsGetResponse_Organizationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(Organizations_attributesable) + GetId()(*string) + GetLinks()(Selfable) + GetRelationships()(Organizations_relationshipsable) + GetTypeEscaped()(*Organizations_type) + SetAttributes(value Organizations_attributesable)() + SetId(value *string)() + SetLinks(value Selfable)() + SetRelationships(value Organizations_relationshipsable)() + SetTypeEscaped(value *Organizations_type)() +} diff --git a/v2/api/models/policy_sets_envelope.go b/v2/api/models/policy_sets_envelope.go index 2a06c83ab..1cf14eb11 100644 --- a/v2/api/models/policy_sets_envelope.go +++ b/v2/api/models/policy_sets_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -13,7 +14,210 @@ type PolicySetsEnvelope struct { // The data property data PolicySetsable // Sideloaded resources. `?include=policies` sideloads the full policy resources. - included []PolicySetsEnvelope_includedable + included []PolicySetsEnvelope_PolicySetsEnvelope_includedable +} +// PolicySetsEnvelope_PolicySetsEnvelope_included composed type wrapper for classes ItemStacksGetResponse_Stacksable, ItemWorkspacesGetResponse_Workspacesable, OotbPoliciesable, OotbPolicyLibraryReferencesable, Policiesable, PolicySetVersionsable, Projectsable +type PolicySetsEnvelope_PolicySetsEnvelope_included struct { + // Composed type representation for type OotbPoliciesable + ootbPolicies OotbPoliciesable + // Composed type representation for type OotbPolicyLibraryReferencesable + ootbPolicyLibraryReferences OotbPolicyLibraryReferencesable + // Composed type representation for type Policiesable + policies Policiesable + // Composed type representation for type PolicySetVersionsable + policySetVersions PolicySetVersionsable + // Composed type representation for type Projectsable + projects Projectsable + // Composed type representation for type ItemStacksGetResponse_Stacksable + stacks ItemStacksGetResponse_Stacksable + // Composed type representation for type ItemWorkspacesGetResponse_Workspacesable + workspaces ItemWorkspacesGetResponse_Workspacesable +} +// NewPolicySetsEnvelope_PolicySetsEnvelope_included instantiates a new PolicySetsEnvelope_PolicySetsEnvelope_included and sets the default values. +func NewPolicySetsEnvelope_PolicySetsEnvelope_included()(*PolicySetsEnvelope_PolicySetsEnvelope_included) { + m := &PolicySetsEnvelope_PolicySetsEnvelope_included{ + } + return m +} +// CreatePolicySetsEnvelope_PolicySetsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePolicySetsEnvelope_PolicySetsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewPolicySetsEnvelope_PolicySetsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ootb-policies") { + result.SetOotbPolicies(NewOotbPolicies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ootb-policy-libraries") { + result.SetOotbPolicyLibraryReferences(NewOotbPolicyLibraryReferences()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policies") { + result.SetPolicies(NewPolicies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policy-set-versions") { + result.SetPolicySetVersions(NewPolicySetVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(NewItemStacksGetResponse_Stacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOotbPolicies() != nil { + return m.GetOotbPolicies().GetFieldDeserializers() + } else if m.GetOotbPolicyLibraryReferences() != nil { + return m.GetOotbPolicyLibraryReferences().GetFieldDeserializers() + } else if m.GetPolicies() != nil { + return m.GetPolicies().GetFieldDeserializers() + } else if m.GetPolicySetVersions() != nil { + return m.GetPolicySetVersions().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOotbPolicies gets the ootbPolicies property value. Composed type representation for type OotbPoliciesable +// returns a OotbPoliciesable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetOotbPolicies()(OotbPoliciesable) { + return m.ootbPolicies +} +// GetOotbPolicyLibraryReferences gets the ootbPolicyLibraryReferences property value. Composed type representation for type OotbPolicyLibraryReferencesable +// returns a OotbPolicyLibraryReferencesable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetOotbPolicyLibraryReferences()(OotbPolicyLibraryReferencesable) { + return m.ootbPolicyLibraryReferences +} +// GetPolicies gets the policies property value. Composed type representation for type Policiesable +// returns a Policiesable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetPolicies()(Policiesable) { + return m.policies +} +// GetPolicySetVersions gets the policySetVersions property value. Composed type representation for type PolicySetVersionsable +// returns a PolicySetVersionsable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetPolicySetVersions()(PolicySetVersionsable) { + return m.policySetVersions +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// GetStacks gets the stacks property value. Composed type representation for type ItemStacksGetResponse_Stacksable +// returns a ItemStacksGetResponse_Stacksable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetStacks()(ItemStacksGetResponse_Stacksable) { + return m.stacks +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetWorkspaces()(ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOotbPolicies() != nil { + err := writer.WriteObjectValue("", m.GetOotbPolicies()) + if err != nil { + return err + } + } else if m.GetOotbPolicyLibraryReferences() != nil { + err := writer.WriteObjectValue("", m.GetOotbPolicyLibraryReferences()) + if err != nil { + return err + } + } else if m.GetPolicies() != nil { + err := writer.WriteObjectValue("", m.GetPolicies()) + if err != nil { + return err + } + } else if m.GetPolicySetVersions() != nil { + err := writer.WriteObjectValue("", m.GetPolicySetVersions()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetOotbPolicies sets the ootbPolicies property value. Composed type representation for type OotbPoliciesable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetOotbPolicies(value OotbPoliciesable)() { + m.ootbPolicies = value +} +// SetOotbPolicyLibraryReferences sets the ootbPolicyLibraryReferences property value. Composed type representation for type OotbPolicyLibraryReferencesable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetOotbPolicyLibraryReferences(value OotbPolicyLibraryReferencesable)() { + m.ootbPolicyLibraryReferences = value +} +// SetPolicies sets the policies property value. Composed type representation for type Policiesable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetPolicies(value Policiesable)() { + m.policies = value +} +// SetPolicySetVersions sets the policySetVersions property value. Composed type representation for type PolicySetVersionsable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetPolicySetVersions(value PolicySetVersionsable)() { + m.policySetVersions = value +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +// SetStacks sets the stacks property value. Composed type representation for type ItemStacksGetResponse_Stacksable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetStacks(value ItemStacksGetResponse_Stacksable)() { + m.stacks = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type ItemWorkspacesGetResponse_Workspacesable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetWorkspaces(value ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +type PolicySetsEnvelope_PolicySetsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOotbPolicies()(OotbPoliciesable) + GetOotbPolicyLibraryReferences()(OotbPolicyLibraryReferencesable) + GetPolicies()(Policiesable) + GetPolicySetVersions()(PolicySetVersionsable) + GetProjects()(Projectsable) + GetStacks()(ItemStacksGetResponse_Stacksable) + GetWorkspaces()(ItemWorkspacesGetResponse_Workspacesable) + SetOotbPolicies(value OotbPoliciesable)() + SetOotbPolicyLibraryReferences(value OotbPolicyLibraryReferencesable)() + SetPolicies(value Policiesable)() + SetPolicySetVersions(value PolicySetVersionsable)() + SetProjects(value Projectsable)() + SetStacks(value ItemStacksGetResponse_Stacksable)() + SetWorkspaces(value ItemWorkspacesGetResponse_Workspacesable)() } // NewPolicySetsEnvelope instantiates a new PolicySetsEnvelope and sets the default values. func NewPolicySetsEnvelope()(*PolicySetsEnvelope) { @@ -52,15 +256,15 @@ func (m *PolicySetsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d233 return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreatePolicySetsEnvelope_includedFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreatePolicySetsEnvelope_PolicySetsEnvelope_includedFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]PolicySetsEnvelope_includedable, len(val)) + res := make([]PolicySetsEnvelope_PolicySetsEnvelope_includedable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(PolicySetsEnvelope_includedable) + res[i] = v.(PolicySetsEnvelope_PolicySetsEnvelope_includedable) } } m.SetIncluded(res) @@ -70,8 +274,8 @@ func (m *PolicySetsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d233 return res } // GetIncluded gets the included property value. Sideloaded resources. `?include=policies` sideloads the full policy resources. -// returns a []PolicySetsEnvelope_includedable when successful -func (m *PolicySetsEnvelope) GetIncluded()([]PolicySetsEnvelope_includedable) { +// returns a []PolicySetsEnvelope_PolicySetsEnvelope_includedable when successful +func (m *PolicySetsEnvelope) GetIncluded()([]PolicySetsEnvelope_PolicySetsEnvelope_includedable) { return m.included } // Serialize serializes information the current object @@ -111,14 +315,14 @@ func (m *PolicySetsEnvelope) SetData(value PolicySetsable)() { m.data = value } // SetIncluded sets the included property value. Sideloaded resources. `?include=policies` sideloads the full policy resources. -func (m *PolicySetsEnvelope) SetIncluded(value []PolicySetsEnvelope_includedable)() { +func (m *PolicySetsEnvelope) SetIncluded(value []PolicySetsEnvelope_PolicySetsEnvelope_includedable)() { m.included = value } type PolicySetsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(PolicySetsable) - GetIncluded()([]PolicySetsEnvelope_includedable) + GetIncluded()([]PolicySetsEnvelope_PolicySetsEnvelope_includedable) SetData(value PolicySetsable)() - SetIncluded(value []PolicySetsEnvelope_includedable)() + SetIncluded(value []PolicySetsEnvelope_PolicySetsEnvelope_includedable)() } diff --git a/v2/api/models/provider_sets_envelope.go b/v2/api/models/provider_sets_envelope.go index f18f32687..4455f91dc 100644 --- a/v2/api/models/provider_sets_envelope.go +++ b/v2/api/models/provider_sets_envelope.go @@ -11,7 +11,7 @@ type ProviderSetsEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data ProviderSetsable + data ItemProviderSetsGetResponse_ProviderSetsable } // NewProviderSetsEnvelope instantiates a new ProviderSetsEnvelope and sets the default values. func NewProviderSetsEnvelope()(*ProviderSetsEnvelope) { @@ -31,8 +31,8 @@ func (m *ProviderSetsEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a ProviderSetsable when successful -func (m *ProviderSetsEnvelope) GetData()(ProviderSetsable) { +// returns a ItemProviderSetsGetResponse_ProviderSetsable when successful +func (m *ProviderSetsEnvelope) GetData()(ItemProviderSetsGetResponse_ProviderSetsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *ProviderSetsEnvelope) GetData()(ProviderSetsable) { func (m *ProviderSetsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateProviderSetsFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(ProviderSetsable)) + m.SetData(val.(ItemProviderSetsGetResponse_ProviderSetsable)) } return nil } @@ -72,12 +72,12 @@ func (m *ProviderSetsEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *ProviderSetsEnvelope) SetData(value ProviderSetsable)() { +func (m *ProviderSetsEnvelope) SetData(value ItemProviderSetsGetResponse_ProviderSetsable)() { m.data = value } type ProviderSetsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(ProviderSetsable) - SetData(value ProviderSetsable)() + GetData()(ItemProviderSetsGetResponse_ProviderSetsable) + SetData(value ItemProviderSetsGetResponse_ProviderSetsable)() } diff --git a/v2/api/models/queries_escaped_attributes.go b/v2/api/models/queries_escaped_attributes.go index 22b504ef1..1b28dcb42 100644 --- a/v2/api/models/queries_escaped_attributes.go +++ b/v2/api/models/queries_escaped_attributes.go @@ -25,13 +25,13 @@ type Queries_attributes struct { logReadUrl *string // The permissions property permissions Queries_attributes_permissionsable - // Opts this query into policy evaluation. When query-policy-opt-in is enabled, omitted input defaults to true only for tfe-ui queries with generate-config-out enabled (which defaults to true); otherwise it defaults to false. Explicit true requires a UI source and generated configuration. Explicit false opts out. Supplied input must be a non-null boolean when the feature is enabled. When the feature is disabled, this input is ignored and false is persisted. + // Opts this query into policy evaluation. When query-policy-opt-in is enabled, omitted input defaults to true only for tfe-ui queries with generate-config-out enabled (which defaults to true); otherwise it defaults to false. Explicit true requires a UI, API, or MCP source and generated configuration. Explicit false opts out for those sources. Terraform CLI queries (source terraform) retain workspace policy evaluation regardless of this preference or generate-config-out, subject to the existing query-policy gates. Supplied input must be a non-null boolean when the feature is enabled. When the feature is disabled, this input is ignored and false is persisted; workspace policy evaluation retains its existing query-policy behavior. policyEvaluationOptIn *bool // The policyPaths property policyPaths []string // The number of resources discovered by the query run. resourcesDiscovered *int32 - // The source property + // The query source. Requests with the X-Terraform-Integration header set to cloud are stored and returned with source terraform, overriding the submitted source. Terraform CLI 1.14 sends this header with source tfe-api. source *Queries_attributes_source // The status property status *Queries_attributes_status @@ -244,7 +244,7 @@ func (m *Queries_attributes) GetLogReadUrl()(*string) { func (m *Queries_attributes) GetPermissions()(Queries_attributes_permissionsable) { return m.permissions } -// GetPolicyEvaluationOptIn gets the policy-evaluation-opt-in property value. Opts this query into policy evaluation. When query-policy-opt-in is enabled, omitted input defaults to true only for tfe-ui queries with generate-config-out enabled (which defaults to true); otherwise it defaults to false. Explicit true requires a UI source and generated configuration. Explicit false opts out. Supplied input must be a non-null boolean when the feature is enabled. When the feature is disabled, this input is ignored and false is persisted. +// GetPolicyEvaluationOptIn gets the policy-evaluation-opt-in property value. Opts this query into policy evaluation. When query-policy-opt-in is enabled, omitted input defaults to true only for tfe-ui queries with generate-config-out enabled (which defaults to true); otherwise it defaults to false. Explicit true requires a UI, API, or MCP source and generated configuration. Explicit false opts out for those sources. Terraform CLI queries (source terraform) retain workspace policy evaluation regardless of this preference or generate-config-out, subject to the existing query-policy gates. Supplied input must be a non-null boolean when the feature is enabled. When the feature is disabled, this input is ignored and false is persisted; workspace policy evaluation retains its existing query-policy behavior. // returns a *bool when successful func (m *Queries_attributes) GetPolicyEvaluationOptIn()(*bool) { return m.policyEvaluationOptIn @@ -259,7 +259,7 @@ func (m *Queries_attributes) GetPolicyPaths()([]string) { func (m *Queries_attributes) GetResourcesDiscovered()(*int32) { return m.resourcesDiscovered } -// GetSource gets the source property value. The source property +// GetSource gets the source property value. The query source. Requests with the X-Terraform-Integration header set to cloud are stored and returned with source terraform, overriding the submitted source. Terraform CLI 1.14 sends this header with source tfe-api. // returns a *Queries_attributes_source when successful func (m *Queries_attributes) GetSource()(*Queries_attributes_source) { return m.source @@ -371,7 +371,7 @@ func (m *Queries_attributes) SetLogReadUrl(value *string)() { func (m *Queries_attributes) SetPermissions(value Queries_attributes_permissionsable)() { m.permissions = value } -// SetPolicyEvaluationOptIn sets the policy-evaluation-opt-in property value. Opts this query into policy evaluation. When query-policy-opt-in is enabled, omitted input defaults to true only for tfe-ui queries with generate-config-out enabled (which defaults to true); otherwise it defaults to false. Explicit true requires a UI source and generated configuration. Explicit false opts out. Supplied input must be a non-null boolean when the feature is enabled. When the feature is disabled, this input is ignored and false is persisted. +// SetPolicyEvaluationOptIn sets the policy-evaluation-opt-in property value. Opts this query into policy evaluation. When query-policy-opt-in is enabled, omitted input defaults to true only for tfe-ui queries with generate-config-out enabled (which defaults to true); otherwise it defaults to false. Explicit true requires a UI, API, or MCP source and generated configuration. Explicit false opts out for those sources. Terraform CLI queries (source terraform) retain workspace policy evaluation regardless of this preference or generate-config-out, subject to the existing query-policy gates. Supplied input must be a non-null boolean when the feature is enabled. When the feature is disabled, this input is ignored and false is persisted; workspace policy evaluation retains its existing query-policy behavior. func (m *Queries_attributes) SetPolicyEvaluationOptIn(value *bool)() { m.policyEvaluationOptIn = value } @@ -383,7 +383,7 @@ func (m *Queries_attributes) SetPolicyPaths(value []string)() { func (m *Queries_attributes) SetResourcesDiscovered(value *int32)() { m.resourcesDiscovered = value } -// SetSource sets the source property value. The source property +// SetSource sets the source property value. The query source. Requests with the X-Terraform-Integration header set to cloud are stored and returned with source terraform, overriding the submitted source. Terraform CLI 1.14 sends this header with source tfe-api. func (m *Queries_attributes) SetSource(value *Queries_attributes_source)() { m.source = value } diff --git a/v2/api/models/queries_escaped_attributes_escaped_source.go b/v2/api/models/queries_escaped_attributes_escaped_source.go index af3820f03..f96d3c4b2 100644 --- a/v2/api/models/queries_escaped_attributes_escaped_source.go +++ b/v2/api/models/queries_escaped_attributes_escaped_source.go @@ -2,6 +2,7 @@ // Changes may cause incorrect behavior and will be lost if the code is regenerated. package models +// The query source. Requests with the X-Terraform-Integration header set to cloud are stored and returned with source terraform, overriding the submitted source. Terraform CLI 1.14 sends this header with source tfe-api. type Queries_attributes_source int const ( diff --git a/v2/api/models/runs_envelope.go b/v2/api/models/runs_envelope.go index 7b4085768..d272b9af4 100644 --- a/v2/api/models/runs_envelope.go +++ b/v2/api/models/runs_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,255 @@ type RunsEnvelope struct { additionalData map[string]any // The data property data Runsable + // The included property + included []RunsEnvelope_RunsEnvelope_includedable +} +// RunsEnvelope_RunsEnvelope_included composed type wrapper for classes Appliesable, ConfigurationVersionsable, CostEstimatesable, IngressAttributesable, ItemWorkspacesGetResponse_Workspacesable, Plansable, TaskStagesable, TfPolicyEvaluationable, Usersable +type RunsEnvelope_RunsEnvelope_included struct { + // Composed type representation for type Appliesable + applies Appliesable + // Composed type representation for type ConfigurationVersionsable + configurationVersions ConfigurationVersionsable + // Composed type representation for type CostEstimatesable + costEstimates CostEstimatesable + // Composed type representation for type IngressAttributesable + ingressAttributes IngressAttributesable + // Composed type representation for type Plansable + plans Plansable + // Composed type representation for type TaskStagesable + taskStages TaskStagesable + // Composed type representation for type TfPolicyEvaluationable + tfPolicyEvaluation TfPolicyEvaluationable + // Composed type representation for type Usersable + users Usersable + // Composed type representation for type ItemWorkspacesGetResponse_Workspacesable + workspaces ItemWorkspacesGetResponse_Workspacesable +} +// NewRunsEnvelope_RunsEnvelope_included instantiates a new RunsEnvelope_RunsEnvelope_included and sets the default values. +func NewRunsEnvelope_RunsEnvelope_included()(*RunsEnvelope_RunsEnvelope_included) { + m := &RunsEnvelope_RunsEnvelope_included{ + } + return m +} +// CreateRunsEnvelope_RunsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRunsEnvelope_RunsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewRunsEnvelope_RunsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { + result.SetCostEstimates(NewCostEstimates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-stages") { + result.SetTaskStages(NewTaskStages()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tf-policy-evaluations") { + result.SetTfPolicyEvaluation(NewTfPolicyEvaluation()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil +} +// GetApplies gets the applies property value. Composed type representation for type Appliesable +// returns a Appliesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetApplies()(Appliesable) { + return m.applies +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetConfigurationVersions()(ConfigurationVersionsable) { + return m.configurationVersions +} +// GetCostEstimates gets the costEstimates property value. Composed type representation for type CostEstimatesable +// returns a CostEstimatesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetCostEstimates()(CostEstimatesable) { + return m.costEstimates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetCostEstimates() != nil { + return m.GetCostEstimates().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetTaskStages() != nil { + return m.GetTaskStages().GetFieldDeserializers() + } else if m.GetTfPolicyEvaluation() != nil { + return m.GetTfPolicyEvaluation().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type IngressAttributesable +// returns a IngressAttributesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetIngressAttributes()(IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetPlans gets the plans property value. Composed type representation for type Plansable +// returns a Plansable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetPlans()(Plansable) { + return m.plans +} +// GetTaskStages gets the taskStages property value. Composed type representation for type TaskStagesable +// returns a TaskStagesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetTaskStages()(TaskStagesable) { + return m.taskStages +} +// GetTfPolicyEvaluation gets the tfPolicyEvaluation property value. Composed type representation for type TfPolicyEvaluationable +// returns a TfPolicyEvaluationable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetTfPolicyEvaluation()(TfPolicyEvaluationable) { + return m.tfPolicyEvaluation +} +// GetUsers gets the users property value. Composed type representation for type Usersable +// returns a Usersable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetUsers()(Usersable) { + return m.users +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetWorkspaces()(ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *RunsEnvelope_RunsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetCostEstimates() != nil { + err := writer.WriteObjectValue("", m.GetCostEstimates()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetTaskStages() != nil { + err := writer.WriteObjectValue("", m.GetTaskStages()) + if err != nil { + return err + } + } else if m.GetTfPolicyEvaluation() != nil { + err := writer.WriteObjectValue("", m.GetTfPolicyEvaluation()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetApplies sets the applies property value. Composed type representation for type Appliesable +func (m *RunsEnvelope_RunsEnvelope_included) SetApplies(value Appliesable)() { + m.applies = value +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable +func (m *RunsEnvelope_RunsEnvelope_included) SetConfigurationVersions(value ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetCostEstimates sets the costEstimates property value. Composed type representation for type CostEstimatesable +func (m *RunsEnvelope_RunsEnvelope_included) SetCostEstimates(value CostEstimatesable)() { + m.costEstimates = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type IngressAttributesable +func (m *RunsEnvelope_RunsEnvelope_included) SetIngressAttributes(value IngressAttributesable)() { + m.ingressAttributes = value +} +// SetPlans sets the plans property value. Composed type representation for type Plansable +func (m *RunsEnvelope_RunsEnvelope_included) SetPlans(value Plansable)() { + m.plans = value +} +// SetTaskStages sets the taskStages property value. Composed type representation for type TaskStagesable +func (m *RunsEnvelope_RunsEnvelope_included) SetTaskStages(value TaskStagesable)() { + m.taskStages = value +} +// SetTfPolicyEvaluation sets the tfPolicyEvaluation property value. Composed type representation for type TfPolicyEvaluationable +func (m *RunsEnvelope_RunsEnvelope_included) SetTfPolicyEvaluation(value TfPolicyEvaluationable)() { + m.tfPolicyEvaluation = value +} +// SetUsers sets the users property value. Composed type representation for type Usersable +func (m *RunsEnvelope_RunsEnvelope_included) SetUsers(value Usersable)() { + m.users = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type ItemWorkspacesGetResponse_Workspacesable +func (m *RunsEnvelope_RunsEnvelope_included) SetWorkspaces(value ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +type RunsEnvelope_RunsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplies()(Appliesable) + GetConfigurationVersions()(ConfigurationVersionsable) + GetCostEstimates()(CostEstimatesable) + GetIngressAttributes()(IngressAttributesable) + GetPlans()(Plansable) + GetTaskStages()(TaskStagesable) + GetTfPolicyEvaluation()(TfPolicyEvaluationable) + GetUsers()(Usersable) + GetWorkspaces()(ItemWorkspacesGetResponse_Workspacesable) + SetApplies(value Appliesable)() + SetConfigurationVersions(value ConfigurationVersionsable)() + SetCostEstimates(value CostEstimatesable)() + SetIngressAttributes(value IngressAttributesable)() + SetPlans(value Plansable)() + SetTaskStages(value TaskStagesable)() + SetTfPolicyEvaluation(value TfPolicyEvaluationable)() + SetUsers(value Usersable)() + SetWorkspaces(value ItemWorkspacesGetResponse_Workspacesable)() } // NewRunsEnvelope instantiates a new RunsEnvelope and sets the default values. func NewRunsEnvelope()(*RunsEnvelope) { @@ -49,8 +299,29 @@ func (m *RunsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRunsEnvelope_RunsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RunsEnvelope_RunsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RunsEnvelope_RunsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []RunsEnvelope_RunsEnvelope_includedable when successful +func (m *RunsEnvelope) GetIncluded()([]RunsEnvelope_RunsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *RunsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +330,18 @@ func (m *RunsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +358,15 @@ func (m *RunsEnvelope) SetAdditionalData(value map[string]any)() { func (m *RunsEnvelope) SetData(value Runsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *RunsEnvelope) SetIncluded(value []RunsEnvelope_RunsEnvelope_includedable)() { + m.included = value +} type RunsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Runsable) + GetIncluded()([]RunsEnvelope_RunsEnvelope_includedable) SetData(value Runsable)() + SetIncluded(value []RunsEnvelope_RunsEnvelope_includedable)() } diff --git a/v2/api/models/stack_aggregate_outputs.go b/v2/api/models/stack_aggregate_outputs.go new file mode 100644 index 000000000..80efa3d0d --- /dev/null +++ b/v2/api/models/stack_aggregate_outputs.go @@ -0,0 +1,158 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackAggregateOutputs struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes StackAggregateOutputs_attributesable + // The id property + id *string + // The relationships property + relationships StackAggregateOutputs_relationshipsable + // The type property + typeEscaped *StackAggregateOutputs_type +} +// NewStackAggregateOutputs instantiates a new StackAggregateOutputs and sets the default values. +func NewStackAggregateOutputs()(*StackAggregateOutputs) { + m := &StackAggregateOutputs{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackAggregateOutputsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackAggregateOutputsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackAggregateOutputs(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackAggregateOutputs) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a StackAggregateOutputs_attributesable when successful +func (m *StackAggregateOutputs) GetAttributes()(StackAggregateOutputs_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackAggregateOutputs) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackAggregateOutputs_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(StackAggregateOutputs_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackAggregateOutputs_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(StackAggregateOutputs_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackAggregateOutputs_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackAggregateOutputs_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackAggregateOutputs) GetId()(*string) { + return m.id +} +// GetRelationships gets the relationships property value. The relationships property +// returns a StackAggregateOutputs_relationshipsable when successful +func (m *StackAggregateOutputs) GetRelationships()(StackAggregateOutputs_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackAggregateOutputs_type when successful +func (m *StackAggregateOutputs) GetTypeEscaped()(*StackAggregateOutputs_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackAggregateOutputs) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackAggregateOutputs) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *StackAggregateOutputs) SetAttributes(value StackAggregateOutputs_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *StackAggregateOutputs) SetId(value *string)() { + m.id = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *StackAggregateOutputs) SetRelationships(value StackAggregateOutputs_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackAggregateOutputs) SetTypeEscaped(value *StackAggregateOutputs_type)() { + m.typeEscaped = value +} +type StackAggregateOutputsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(StackAggregateOutputs_attributesable) + GetId()(*string) + GetRelationships()(StackAggregateOutputs_relationshipsable) + GetTypeEscaped()(*StackAggregateOutputs_type) + SetAttributes(value StackAggregateOutputs_attributesable)() + SetId(value *string)() + SetRelationships(value StackAggregateOutputs_relationshipsable)() + SetTypeEscaped(value *StackAggregateOutputs_type)() +} diff --git a/v2/api/models/stack_aggregate_outputs_escaped_attributes.go b/v2/api/models/stack_aggregate_outputs_escaped_attributes.go new file mode 100644 index 000000000..6ba2dba10 --- /dev/null +++ b/v2/api/models/stack_aggregate_outputs_escaped_attributes.go @@ -0,0 +1,239 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackAggregateOutputs_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The completedAt property + completedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The createdAt property + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The failedAt property + failedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The publishedOutputCount property + publishedOutputCount *int32 + // The queuedAt property + queuedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The runningAt property + runningAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *StackAggregateOutputs_attributes_status + // The updatedAt property + updatedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewStackAggregateOutputs_attributes instantiates a new StackAggregateOutputs_attributes and sets the default values. +func NewStackAggregateOutputs_attributes()(*StackAggregateOutputs_attributes) { + m := &StackAggregateOutputs_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackAggregateOutputs_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackAggregateOutputs_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackAggregateOutputs_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackAggregateOutputs_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCompletedAt gets the completed-at property value. The completedAt property +// returns a *Time when successful +func (m *StackAggregateOutputs_attributes) GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedAt +} +// GetCreatedAt gets the created-at property value. The createdAt property +// returns a *Time when successful +func (m *StackAggregateOutputs_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetFailedAt gets the failed-at property value. The failedAt property +// returns a *Time when successful +func (m *StackAggregateOutputs_attributes) GetFailedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.failedAt +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackAggregateOutputs_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["completed-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedAt(val) + } + return nil + } + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["failed-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFailedAt(val) + } + return nil + } + res["published-output-count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublishedOutputCount(val) + } + return nil + } + res["queued-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetQueuedAt(val) + } + return nil + } + res["running-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRunningAt(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackAggregateOutputs_attributes_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*StackAggregateOutputs_attributes_status)) + } + return nil + } + res["updated-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetPublishedOutputCount gets the published-output-count property value. The publishedOutputCount property +// returns a *int32 when successful +func (m *StackAggregateOutputs_attributes) GetPublishedOutputCount()(*int32) { + return m.publishedOutputCount +} +// GetQueuedAt gets the queued-at property value. The queuedAt property +// returns a *Time when successful +func (m *StackAggregateOutputs_attributes) GetQueuedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.queuedAt +} +// GetRunningAt gets the running-at property value. The runningAt property +// returns a *Time when successful +func (m *StackAggregateOutputs_attributes) GetRunningAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.runningAt +} +// GetStatus gets the status property value. The status property +// returns a *StackAggregateOutputs_attributes_status when successful +func (m *StackAggregateOutputs_attributes) GetStatus()(*StackAggregateOutputs_attributes_status) { + return m.status +} +// GetUpdatedAt gets the updated-at property value. The updatedAt property +// returns a *Time when successful +func (m *StackAggregateOutputs_attributes) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedAt +} +// Serialize serializes information the current object +func (m *StackAggregateOutputs_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackAggregateOutputs_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCompletedAt sets the completed-at property value. The completedAt property +func (m *StackAggregateOutputs_attributes) SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedAt = value +} +// SetCreatedAt sets the created-at property value. The createdAt property +func (m *StackAggregateOutputs_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetFailedAt sets the failed-at property value. The failedAt property +func (m *StackAggregateOutputs_attributes) SetFailedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.failedAt = value +} +// SetPublishedOutputCount sets the published-output-count property value. The publishedOutputCount property +func (m *StackAggregateOutputs_attributes) SetPublishedOutputCount(value *int32)() { + m.publishedOutputCount = value +} +// SetQueuedAt sets the queued-at property value. The queuedAt property +func (m *StackAggregateOutputs_attributes) SetQueuedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.queuedAt = value +} +// SetRunningAt sets the running-at property value. The runningAt property +func (m *StackAggregateOutputs_attributes) SetRunningAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.runningAt = value +} +// SetStatus sets the status property value. The status property +func (m *StackAggregateOutputs_attributes) SetStatus(value *StackAggregateOutputs_attributes_status)() { + m.status = value +} +// SetUpdatedAt sets the updated-at property value. The updatedAt property +func (m *StackAggregateOutputs_attributes) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedAt = value +} +type StackAggregateOutputs_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPublishedOutputCount()(*int32) + GetQueuedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRunningAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*StackAggregateOutputs_attributes_status) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPublishedOutputCount(value *int32)() + SetQueuedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRunningAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *StackAggregateOutputs_attributes_status)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/v2/api/models/stack_aggregate_outputs_escaped_attributes_escaped_status.go b/v2/api/models/stack_aggregate_outputs_escaped_attributes_escaped_status.go new file mode 100644 index 000000000..839d9b8b3 --- /dev/null +++ b/v2/api/models/stack_aggregate_outputs_escaped_attributes_escaped_status.go @@ -0,0 +1,48 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackAggregateOutputs_attributes_status int + +const ( + CREATED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS StackAggregateOutputs_attributes_status = iota + QUEUED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + RUNNING_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + COMPLETED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + FAILED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + CANCELED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS +) + +func (i StackAggregateOutputs_attributes_status) String() string { + return []string{"created", "queued", "running", "completed", "failed", "canceled"}[i] +} +func ParseStackAggregateOutputs_attributes_status(v string) (any, error) { + result := CREATED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + switch v { + case "created": + result = CREATED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + case "queued": + result = QUEUED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + case "running": + result = RUNNING_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + case "completed": + result = COMPLETED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + case "failed": + result = FAILED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + case "canceled": + result = CANCELED_STACKAGGREGATEOUTPUTS_ATTRIBUTES_STATUS + default: + return nil, nil + } + return &result, nil +} +func SerializeStackAggregateOutputs_attributes_status(values []StackAggregateOutputs_attributes_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackAggregateOutputs_attributes_status) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_aggregate_outputs_escaped_relationships.go b/v2/api/models/stack_aggregate_outputs_escaped_relationships.go new file mode 100644 index 000000000..09c684813 --- /dev/null +++ b/v2/api/models/stack_aggregate_outputs_escaped_relationships.go @@ -0,0 +1,112 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackAggregateOutputs_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The stackConfiguration property + stackConfiguration StackConfigurationsHasOneable + // The stackPublishedOutputs property + stackPublishedOutputs Links_relatedable +} +// NewStackAggregateOutputs_relationships instantiates a new StackAggregateOutputs_relationships and sets the default values. +func NewStackAggregateOutputs_relationships()(*StackAggregateOutputs_relationships) { + m := &StackAggregateOutputs_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackAggregateOutputs_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackAggregateOutputs_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackAggregateOutputs_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackAggregateOutputs_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackAggregateOutputs_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["stack-configuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackConfigurationsHasOneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStackConfiguration(val.(StackConfigurationsHasOneable)) + } + return nil + } + res["stack-published-outputs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinks_relatedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStackPublishedOutputs(val.(Links_relatedable)) + } + return nil + } + return res +} +// GetStackConfiguration gets the stack-configuration property value. The stackConfiguration property +// returns a StackConfigurationsHasOneable when successful +func (m *StackAggregateOutputs_relationships) GetStackConfiguration()(StackConfigurationsHasOneable) { + return m.stackConfiguration +} +// GetStackPublishedOutputs gets the stack-published-outputs property value. The stackPublishedOutputs property +// returns a Links_relatedable when successful +func (m *StackAggregateOutputs_relationships) GetStackPublishedOutputs()(Links_relatedable) { + return m.stackPublishedOutputs +} +// Serialize serializes information the current object +func (m *StackAggregateOutputs_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("stack-configuration", m.GetStackConfiguration()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("stack-published-outputs", m.GetStackPublishedOutputs()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackAggregateOutputs_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStackConfiguration sets the stack-configuration property value. The stackConfiguration property +func (m *StackAggregateOutputs_relationships) SetStackConfiguration(value StackConfigurationsHasOneable)() { + m.stackConfiguration = value +} +// SetStackPublishedOutputs sets the stack-published-outputs property value. The stackPublishedOutputs property +func (m *StackAggregateOutputs_relationships) SetStackPublishedOutputs(value Links_relatedable)() { + m.stackPublishedOutputs = value +} +type StackAggregateOutputs_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackConfiguration()(StackConfigurationsHasOneable) + GetStackPublishedOutputs()(Links_relatedable) + SetStackConfiguration(value StackConfigurationsHasOneable)() + SetStackPublishedOutputs(value Links_relatedable)() +} diff --git a/v2/api/models/stack_aggregate_outputs_escaped_type.go b/v2/api/models/stack_aggregate_outputs_escaped_type.go new file mode 100644 index 000000000..8f32fafce --- /dev/null +++ b/v2/api/models/stack_aggregate_outputs_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackAggregateOutputs_type int + +const ( + STACKAGGREGATEOUTPUTS_STACKAGGREGATEOUTPUTS_TYPE StackAggregateOutputs_type = iota +) + +func (i StackAggregateOutputs_type) String() string { + return []string{"stack-aggregate-outputs"}[i] +} +func ParseStackAggregateOutputs_type(v string) (any, error) { + result := STACKAGGREGATEOUTPUTS_STACKAGGREGATEOUTPUTS_TYPE + switch v { + case "stack-aggregate-outputs": + result = STACKAGGREGATEOUTPUTS_STACKAGGREGATEOUTPUTS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackAggregateOutputs_type(values []StackAggregateOutputs_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackAggregateOutputs_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_configurations_envelope.go b/v2/api/models/stack_configurations_envelope.go index f93fa8ad9..7df556ce7 100644 --- a/v2/api/models/stack_configurations_envelope.go +++ b/v2/api/models/stack_configurations_envelope.go @@ -11,7 +11,7 @@ type StackConfigurationsEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data StackConfigurationsable + data ItemStackConfigurationsGetResponse_StackConfigurationsable } // NewStackConfigurationsEnvelope instantiates a new StackConfigurationsEnvelope and sets the default values. func NewStackConfigurationsEnvelope()(*StackConfigurationsEnvelope) { @@ -31,8 +31,8 @@ func (m *StackConfigurationsEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a StackConfigurationsable when successful -func (m *StackConfigurationsEnvelope) GetData()(StackConfigurationsable) { +// returns a ItemStackConfigurationsGetResponse_StackConfigurationsable when successful +func (m *StackConfigurationsEnvelope) GetData()(ItemStackConfigurationsGetResponse_StackConfigurationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *StackConfigurationsEnvelope) GetData()(StackConfigurationsable) { func (m *StackConfigurationsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateStackConfigurationsFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(StackConfigurationsable)) + m.SetData(val.(ItemStackConfigurationsGetResponse_StackConfigurationsable)) } return nil } @@ -72,12 +72,12 @@ func (m *StackConfigurationsEnvelope) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. The data property -func (m *StackConfigurationsEnvelope) SetData(value StackConfigurationsable)() { +func (m *StackConfigurationsEnvelope) SetData(value ItemStackConfigurationsGetResponse_StackConfigurationsable)() { m.data = value } type StackConfigurationsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(StackConfigurationsable) - SetData(value StackConfigurationsable)() + GetData()(ItemStackConfigurationsGetResponse_StackConfigurationsable) + SetData(value ItemStackConfigurationsGetResponse_StackConfigurationsable)() } diff --git a/v2/api/models/stacks_envelope.go b/v2/api/models/stacks_envelope.go index d46c44137..b65cca550 100644 --- a/v2/api/models/stacks_envelope.go +++ b/v2/api/models/stacks_envelope.go @@ -11,7 +11,7 @@ type StacksEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data Stacksable + data ItemStacksGetResponse_Stacksable } // NewStacksEnvelope instantiates a new StacksEnvelope and sets the default values. func NewStacksEnvelope()(*StacksEnvelope) { @@ -31,8 +31,8 @@ func (m *StacksEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a Stacksable when successful -func (m *StacksEnvelope) GetData()(Stacksable) { +// returns a ItemStacksGetResponse_Stacksable when successful +func (m *StacksEnvelope) GetData()(ItemStacksGetResponse_Stacksable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *StacksEnvelope) GetData()(Stacksable) { func (m *StacksEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateStacksFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateItemStacksGetResponse_StacksFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(Stacksable)) + m.SetData(val.(ItemStacksGetResponse_Stacksable)) } return nil } @@ -72,12 +72,12 @@ func (m *StacksEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *StacksEnvelope) SetData(value Stacksable)() { +func (m *StacksEnvelope) SetData(value ItemStacksGetResponse_Stacksable)() { m.data = value } type StacksEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(Stacksable) - SetData(value Stacksable)() + GetData()(ItemStacksGetResponse_Stacksable) + SetData(value ItemStacksGetResponse_Stacksable)() } diff --git a/v2/api/models/tasks_envelope.go b/v2/api/models/tasks_envelope.go index a2ae59696..eed467220 100644 --- a/v2/api/models/tasks_envelope.go +++ b/v2/api/models/tasks_envelope.go @@ -11,7 +11,7 @@ type TasksEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data Tasksable + data ItemTasksGetResponse_Tasksable } // NewTasksEnvelope instantiates a new TasksEnvelope and sets the default values. func NewTasksEnvelope()(*TasksEnvelope) { @@ -31,8 +31,8 @@ func (m *TasksEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a Tasksable when successful -func (m *TasksEnvelope) GetData()(Tasksable) { +// returns a ItemTasksGetResponse_Tasksable when successful +func (m *TasksEnvelope) GetData()(ItemTasksGetResponse_Tasksable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *TasksEnvelope) GetData()(Tasksable) { func (m *TasksEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateTasksFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateItemTasksGetResponse_TasksFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(Tasksable)) + m.SetData(val.(ItemTasksGetResponse_Tasksable)) } return nil } @@ -72,12 +72,12 @@ func (m *TasksEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *TasksEnvelope) SetData(value Tasksable)() { +func (m *TasksEnvelope) SetData(value ItemTasksGetResponse_Tasksable)() { m.data = value } type TasksEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(Tasksable) - SetData(value Tasksable)() + GetData()(ItemTasksGetResponse_Tasksable) + SetData(value ItemTasksGetResponse_Tasksable)() } diff --git a/v2/api/models/teams_envelope.go b/v2/api/models/teams_envelope.go index d87f9b687..afabd268d 100644 --- a/v2/api/models/teams_envelope.go +++ b/v2/api/models/teams_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,101 @@ type TeamsEnvelope struct { additionalData map[string]any // The data property data Teamsable + // The included property + included []TeamsEnvelope_TeamsEnvelope_includedable +} +// TeamsEnvelope_TeamsEnvelope_included composed type wrapper for classes OrganizationMembershipsable, Usersable +type TeamsEnvelope_TeamsEnvelope_included struct { + // Composed type representation for type OrganizationMembershipsable + organizationMemberships OrganizationMembershipsable + // Composed type representation for type Usersable + users Usersable +} +// NewTeamsEnvelope_TeamsEnvelope_included instantiates a new TeamsEnvelope_TeamsEnvelope_included and sets the default values. +func NewTeamsEnvelope_TeamsEnvelope_included()(*TeamsEnvelope_TeamsEnvelope_included) { + m := &TeamsEnvelope_TeamsEnvelope_included{ + } + return m +} +// CreateTeamsEnvelope_TeamsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamsEnvelope_TeamsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewTeamsEnvelope_TeamsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organization-memberships") { + result.SetOrganizationMemberships(NewOrganizationMemberships()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(NewUsers()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamsEnvelope_TeamsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOrganizationMemberships() != nil { + return m.GetOrganizationMemberships().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *TeamsEnvelope_TeamsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOrganizationMemberships gets the organizationMemberships property value. Composed type representation for type OrganizationMembershipsable +// returns a OrganizationMembershipsable when successful +func (m *TeamsEnvelope_TeamsEnvelope_included) GetOrganizationMemberships()(OrganizationMembershipsable) { + return m.organizationMemberships +} +// GetUsers gets the users property value. Composed type representation for type Usersable +// returns a Usersable when successful +func (m *TeamsEnvelope_TeamsEnvelope_included) GetUsers()(Usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *TeamsEnvelope_TeamsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizationMemberships() != nil { + err := writer.WriteObjectValue("", m.GetOrganizationMemberships()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil +} +// SetOrganizationMemberships sets the organizationMemberships property value. Composed type representation for type OrganizationMembershipsable +func (m *TeamsEnvelope_TeamsEnvelope_included) SetOrganizationMemberships(value OrganizationMembershipsable)() { + m.organizationMemberships = value +} +// SetUsers sets the users property value. Composed type representation for type Usersable +func (m *TeamsEnvelope_TeamsEnvelope_included) SetUsers(value Usersable)() { + m.users = value +} +type TeamsEnvelope_TeamsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizationMemberships()(OrganizationMembershipsable) + GetUsers()(Usersable) + SetOrganizationMemberships(value OrganizationMembershipsable)() + SetUsers(value Usersable)() } // NewTeamsEnvelope instantiates a new TeamsEnvelope and sets the default values. func NewTeamsEnvelope()(*TeamsEnvelope) { @@ -49,8 +145,29 @@ func (m *TeamsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamsEnvelope_TeamsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamsEnvelope_TeamsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TeamsEnvelope_TeamsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []TeamsEnvelope_TeamsEnvelope_includedable when successful +func (m *TeamsEnvelope) GetIncluded()([]TeamsEnvelope_TeamsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *TeamsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +176,18 @@ func (m *TeamsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +204,15 @@ func (m *TeamsEnvelope) SetAdditionalData(value map[string]any)() { func (m *TeamsEnvelope) SetData(value Teamsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TeamsEnvelope) SetIncluded(value []TeamsEnvelope_TeamsEnvelope_includedable)() { + m.included = value +} type TeamsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Teamsable) + GetIncluded()([]TeamsEnvelope_TeamsEnvelope_includedable) SetData(value Teamsable)() + SetIncluded(value []TeamsEnvelope_TeamsEnvelope_includedable)() } diff --git a/v2/api/models/workspace_transfer_events.go b/v2/api/models/workspace_transfer_events.go new file mode 100644 index 000000000..f581cb60f --- /dev/null +++ b/v2/api/models/workspace_transfer_events.go @@ -0,0 +1,136 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkspaceTransferEvents struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes WorkspaceTransferEvents_attributesable + // The id property + id *string + // The type property + typeEscaped *WorkspaceTransferEvents_type +} +// NewWorkspaceTransferEvents instantiates a new WorkspaceTransferEvents and sets the default values. +func NewWorkspaceTransferEvents()(*WorkspaceTransferEvents) { + m := &WorkspaceTransferEvents{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkspaceTransferEventsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkspaceTransferEventsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkspaceTransferEvents(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkspaceTransferEvents) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a WorkspaceTransferEvents_attributesable when successful +func (m *WorkspaceTransferEvents) GetAttributes()(WorkspaceTransferEvents_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkspaceTransferEvents) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkspaceTransferEvents_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(WorkspaceTransferEvents_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkspaceTransferEvents_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*WorkspaceTransferEvents_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *WorkspaceTransferEvents) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *WorkspaceTransferEvents_type when successful +func (m *WorkspaceTransferEvents) GetTypeEscaped()(*WorkspaceTransferEvents_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *WorkspaceTransferEvents) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *WorkspaceTransferEvents) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *WorkspaceTransferEvents) SetAttributes(value WorkspaceTransferEvents_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *WorkspaceTransferEvents) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *WorkspaceTransferEvents) SetTypeEscaped(value *WorkspaceTransferEvents_type)() { + m.typeEscaped = value +} +type WorkspaceTransferEventsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(WorkspaceTransferEvents_attributesable) + GetId()(*string) + GetTypeEscaped()(*WorkspaceTransferEvents_type) + SetAttributes(value WorkspaceTransferEvents_attributesable)() + SetId(value *string)() + SetTypeEscaped(value *WorkspaceTransferEvents_type)() +} diff --git a/v2/api/models/workspace_transfer_events_escaped_attributes.go b/v2/api/models/workspace_transfer_events_escaped_attributes.go new file mode 100644 index 000000000..680aff823 --- /dev/null +++ b/v2/api/models/workspace_transfer_events_escaped_attributes.go @@ -0,0 +1,170 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkspaceTransferEvents_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The createdAt property + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The eventType property + eventType *WorkspaceTransferEvents_attributes_eventType + // The message property + message *string + // The operationName property + operationName *string + // The userId property + userId *string +} +// NewWorkspaceTransferEvents_attributes instantiates a new WorkspaceTransferEvents_attributes and sets the default values. +func NewWorkspaceTransferEvents_attributes()(*WorkspaceTransferEvents_attributes) { + m := &WorkspaceTransferEvents_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkspaceTransferEvents_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkspaceTransferEvents_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkspaceTransferEvents_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkspaceTransferEvents_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created-at property value. The createdAt property +// returns a *Time when successful +func (m *WorkspaceTransferEvents_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetEventType gets the event-type property value. The eventType property +// returns a *WorkspaceTransferEvents_attributes_eventType when successful +func (m *WorkspaceTransferEvents_attributes) GetEventType()(*WorkspaceTransferEvents_attributes_eventType) { + return m.eventType +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkspaceTransferEvents_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event-type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkspaceTransferEvents_attributes_eventType) + if err != nil { + return err + } + if val != nil { + m.SetEventType(val.(*WorkspaceTransferEvents_attributes_eventType)) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["operation-name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperationName(val) + } + return nil + } + res["user-id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *WorkspaceTransferEvents_attributes) GetMessage()(*string) { + return m.message +} +// GetOperationName gets the operation-name property value. The operationName property +// returns a *string when successful +func (m *WorkspaceTransferEvents_attributes) GetOperationName()(*string) { + return m.operationName +} +// GetUserId gets the user-id property value. The userId property +// returns a *string when successful +func (m *WorkspaceTransferEvents_attributes) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *WorkspaceTransferEvents_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *WorkspaceTransferEvents_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created-at property value. The createdAt property +func (m *WorkspaceTransferEvents_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetEventType sets the event-type property value. The eventType property +func (m *WorkspaceTransferEvents_attributes) SetEventType(value *WorkspaceTransferEvents_attributes_eventType)() { + m.eventType = value +} +// SetMessage sets the message property value. The message property +func (m *WorkspaceTransferEvents_attributes) SetMessage(value *string)() { + m.message = value +} +// SetOperationName sets the operation-name property value. The operationName property +func (m *WorkspaceTransferEvents_attributes) SetOperationName(value *string)() { + m.operationName = value +} +// SetUserId sets the user-id property value. The userId property +func (m *WorkspaceTransferEvents_attributes) SetUserId(value *string)() { + m.userId = value +} +type WorkspaceTransferEvents_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEventType()(*WorkspaceTransferEvents_attributes_eventType) + GetMessage()(*string) + GetOperationName()(*string) + GetUserId()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEventType(value *WorkspaceTransferEvents_attributes_eventType)() + SetMessage(value *string)() + SetOperationName(value *string)() + SetUserId(value *string)() +} diff --git a/v2/api/models/workspace_transfer_events_escaped_attributes_escaped_event_type.go b/v2/api/models/workspace_transfer_events_escaped_attributes_escaped_event_type.go new file mode 100644 index 000000000..29381cd13 --- /dev/null +++ b/v2/api/models/workspace_transfer_events_escaped_attributes_escaped_event_type.go @@ -0,0 +1,51 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type WorkspaceTransferEvents_attributes_eventType int + +const ( + CREATED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE WorkspaceTransferEvents_attributes_eventType = iota + STARTED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + COMPLETED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + FAILED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + PAUSED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + RESUMED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + CANCELED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE +) + +func (i WorkspaceTransferEvents_attributes_eventType) String() string { + return []string{"created", "started", "completed", "failed", "paused", "resumed", "canceled"}[i] +} +func ParseWorkspaceTransferEvents_attributes_eventType(v string) (any, error) { + result := CREATED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + switch v { + case "created": + result = CREATED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + case "started": + result = STARTED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + case "completed": + result = COMPLETED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + case "failed": + result = FAILED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + case "paused": + result = PAUSED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + case "resumed": + result = RESUMED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + case "canceled": + result = CANCELED_WORKSPACETRANSFEREVENTS_ATTRIBUTES_EVENTTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeWorkspaceTransferEvents_attributes_eventType(values []WorkspaceTransferEvents_attributes_eventType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WorkspaceTransferEvents_attributes_eventType) isMultiValue() bool { + return false +} diff --git a/v2/api/models/workspace_transfer_events_escaped_type.go b/v2/api/models/workspace_transfer_events_escaped_type.go new file mode 100644 index 000000000..d90b795f7 --- /dev/null +++ b/v2/api/models/workspace_transfer_events_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type WorkspaceTransferEvents_type int + +const ( + WORKSPACETRANSFEREVENTS_WORKSPACETRANSFEREVENTS_TYPE WorkspaceTransferEvents_type = iota +) + +func (i WorkspaceTransferEvents_type) String() string { + return []string{"workspace-transfer-events"}[i] +} +func ParseWorkspaceTransferEvents_type(v string) (any, error) { + result := WORKSPACETRANSFEREVENTS_WORKSPACETRANSFEREVENTS_TYPE + switch v { + case "workspace-transfer-events": + result = WORKSPACETRANSFEREVENTS_WORKSPACETRANSFEREVENTS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeWorkspaceTransferEvents_type(values []WorkspaceTransferEvents_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WorkspaceTransferEvents_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/workspaces_envelope.go b/v2/api/models/workspaces_envelope.go index 4b8584573..f4e76f460 100644 --- a/v2/api/models/workspaces_envelope.go +++ b/v2/api/models/workspaces_envelope.go @@ -11,7 +11,7 @@ type WorkspacesEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data Workspacesable + data ItemWorkspacesGetResponse_Workspacesable } // NewWorkspacesEnvelope instantiates a new WorkspacesEnvelope and sets the default values. func NewWorkspacesEnvelope()(*WorkspacesEnvelope) { @@ -31,8 +31,8 @@ func (m *WorkspacesEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a Workspacesable when successful -func (m *WorkspacesEnvelope) GetData()(Workspacesable) { +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *WorkspacesEnvelope) GetData()(ItemWorkspacesGetResponse_Workspacesable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *WorkspacesEnvelope) GetData()(Workspacesable) { func (m *WorkspacesEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateWorkspacesFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(Workspacesable)) + m.SetData(val.(ItemWorkspacesGetResponse_Workspacesable)) } return nil } @@ -72,12 +72,12 @@ func (m *WorkspacesEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *WorkspacesEnvelope) SetData(value Workspacesable)() { +func (m *WorkspacesEnvelope) SetData(value ItemWorkspacesGetResponse_Workspacesable)() { m.data = value } type WorkspacesEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(Workspacesable) - SetData(value Workspacesable)() + GetData()(ItemWorkspacesGetResponse_Workspacesable) + SetData(value ItemWorkspacesGetResponse_Workspacesable)() } diff --git a/v2/api/organizationmemberships/organization_memberships_get_response.go b/v2/api/organizationmemberships/organization_memberships_get_response.go index f99eebd7a..56c5cd0bd 100644 --- a/v2/api/organizationmemberships/organization_memberships_get_response.go +++ b/v2/api/organizationmemberships/organization_memberships_get_response.go @@ -21,10 +21,10 @@ type OrganizationMembershipsGetResponse struct { // The meta property meta OrganizationMembershipsGetResponse_metaable } -// OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable type OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable - organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable teams i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable @@ -52,7 +52,7 @@ func CreateOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse } if mappingValue != nil { if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { - result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizations()) + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "teams") { result.SetTeams(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTeams()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { @@ -80,9 +80,9 @@ func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_i func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetIsComposedType()(bool) { return true } -// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable -// returns a Organizationsable when successful -func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +// returns a OrganizationsGetResponse_Organizationsable when successful +func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { return m.organizations } // GetTeams gets the teams property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable @@ -115,8 +115,8 @@ func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_i } return nil } -// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable -func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { m.organizations = value } // SetTeams sets the teams property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable @@ -129,10 +129,10 @@ func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_i } type OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) GetTeams()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() SetTeams(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() } diff --git a/v2/api/organizations/item/providersets/get_include_query_parameter_type.go b/v2/api/organizations/item/providersets/get_include_query_parameter_type.go new file mode 100644 index 000000000..af63f8c47 --- /dev/null +++ b/v2/api/organizations/item/providersets/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package providersets +type GetIncludeQueryParameterType int + +const ( + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"projects", "workspaces"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/providersets/item/get_include_query_parameter_type.go b/v2/api/organizations/item/providersets/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..6536aab2f --- /dev/null +++ b/v2/api/organizations/item/providersets/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"projects", "workspaces"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item_organization_memberships_get_response.go b/v2/api/organizations/item_organization_memberships_get_response.go index 609c4519d..706140824 100644 --- a/v2/api/organizations/item_organization_memberships_get_response.go +++ b/v2/api/organizations/item_organization_memberships_get_response.go @@ -21,10 +21,10 @@ type ItemOrganizationMembershipsGetResponse struct { // The meta property meta ItemOrganizationMembershipsGetResponse_metaable } -// ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable type ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable - organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable scimIdentities i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable @@ -54,7 +54,7 @@ func CreateItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResp } if mappingValue != nil { if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { - result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizations()) + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "scim-identities") { result.SetScimIdentities(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewScimIdentities()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "teams") { @@ -86,9 +86,9 @@ func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetRespon func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetIsComposedType()(bool) { return true } -// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable -// returns a Organizationsable when successful -func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +// returns a OrganizationsGetResponse_Organizationsable when successful +func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { return m.organizations } // GetScimIdentities gets the scimIdentities property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable @@ -131,8 +131,8 @@ func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetRespon } return nil } -// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable -func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { m.organizations = value } // SetScimIdentities sets the scimIdentities property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable @@ -149,11 +149,11 @@ func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetRespon } type ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) GetScimIdentities()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable) GetTeams()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() SetScimIdentities(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable)() SetTeams(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() diff --git a/v2/api/organizations/item_provider_sets_get_response.go b/v2/api/organizations/item_provider_sets_get_response.go index daf15d2bd..56d6f1bc7 100644 --- a/v2/api/organizations/item_provider_sets_get_response.go +++ b/v2/api/organizations/item_provider_sets_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -12,12 +13,107 @@ type ItemProviderSetsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable + // The included property + included []ItemProviderSetsGetResponse_ProviderSetsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemProviderSetsGetResponse_metaable } +// ItemProviderSetsGetResponse_ProviderSets composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +type ItemProviderSetsGetResponse_ProviderSets struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +} +// NewItemProviderSetsGetResponse_ProviderSets instantiates a new ItemProviderSetsGetResponse_ProviderSets and sets the default values. +func NewItemProviderSetsGetResponse_ProviderSets()(*ItemProviderSetsGetResponse_ProviderSets) { + m := &ItemProviderSetsGetResponse_ProviderSets{ + } + return m +} +// CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemProviderSetsGetResponse_ProviderSets() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemProviderSetsGetResponse_ProviderSets) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemProviderSetsGetResponse_ProviderSets) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemProviderSetsGetResponse_ProviderSets) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +func (m *ItemProviderSetsGetResponse_ProviderSets) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +type ItemProviderSetsGetResponse_ProviderSetsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() +} // NewItemProviderSetsGetResponse instantiates a new ItemProviderSetsGetResponse and sets the default values. func NewItemProviderSetsGetResponse()(*ItemProviderSetsGetResponse) { m := &ItemProviderSetsGetResponse{ @@ -36,8 +132,8 @@ func (m *ItemProviderSetsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ProviderSetsable when successful -func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) { +// returns a []ItemProviderSetsGetResponse_ProviderSetsable when successful +func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,21 +141,37 @@ func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7 func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) } } m.SetData(res) } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemProviderSetsGetResponse_ProviderSetsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemProviderSetsGetResponse_ProviderSetsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +194,11 @@ func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemProviderSetsGetResponse_ProviderSetsable when successful +func (m *ItemProviderSetsGetResponse) GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemProviderSetsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +223,18 @@ func (m *ItemProviderSetsGetResponse) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -131,9 +260,13 @@ func (m *ItemProviderSetsGetResponse) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() { +func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemProviderSetsGetResponse) SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemProviderSetsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -145,10 +278,12 @@ func (m *ItemProviderSetsGetResponse) SetMeta(value ItemProviderSetsGetResponse_ type ItemProviderSetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) + GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemProviderSetsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() + SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemProviderSetsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_provider_sets_item_with_provider_escaped_set_escaped_name_get_response.go b/v2/api/organizations/item_provider_sets_item_with_provider_escaped_set_escaped_name_get_response.go new file mode 100644 index 000000000..3a1c3d68d --- /dev/null +++ b/v2/api/organizations/item_provider_sets_item_with_provider_escaped_set_escaped_name_get_response.go @@ -0,0 +1,178 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package organizations + +import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemProviderSetsItemWithProvider_set_nameGetResponse struct { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelope + // The included property + included []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable +} +// ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +type ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +} +// NewItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name instantiates a new ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name and sets the default values. +func NewItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name()(*ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) { + m := &ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name{ + } + return m +} +// CreateItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +type ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() +} +// NewItemProviderSetsItemWithProvider_set_nameGetResponse instantiates a new ItemProviderSetsItemWithProvider_set_nameGetResponse and sets the default values. +func NewItemProviderSetsItemWithProvider_set_nameGetResponse()(*ItemProviderSetsItemWithProvider_set_nameGetResponse) { + m := &ItemProviderSetsItemWithProvider_set_nameGetResponse{ + ProviderSetsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProviderSetsEnvelope(), + } + return m +} +// CreateItemProviderSetsItemWithProvider_set_nameGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProviderSetsItemWithProvider_set_nameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemProviderSetsItemWithProvider_set_nameGetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ProviderSetsEnvelope.GetFieldDeserializers() + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable) + } + } + m.SetIncluded(res) + } + return nil + } + return res +} +// GetIncluded gets the included property value. The included property +// returns a []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable when successful +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) GetIncluded()([]ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable) { + return m.included +} +// Serialize serializes information the current object +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ProviderSetsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil +} +// SetIncluded sets the included property value. The included property +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) SetIncluded(value []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable)() { + m.included = value +} +type ItemProviderSetsItemWithProvider_set_nameGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable + GetIncluded()([]ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable) + SetIncluded(value []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable)() +} diff --git a/v2/api/organizations/item_provider_sets_request_builder.go b/v2/api/organizations/item_provider_sets_request_builder.go index 5d349abe9..c2c230d30 100644 --- a/v2/api/organizations/item_provider_sets_request_builder.go +++ b/v2/api/organizations/item_provider_sets_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i4d2258e86a88b1e2d87bab80c93f231487cbf97938134a31c2d84dd287aca2cb "github.com/hashicorp/go-tfe/v2/api/organizations/item/providersets" ) // ItemProviderSetsRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\provider-sets @@ -17,8 +18,8 @@ type ItemProviderSetsRequestBuilder struct { type ItemProviderSetsRequestBuilderGetQueryParameters struct { // Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsproviderSets []string "uriparametername:\"fields%5Bprovider%2Dsets%5D\"" - // Comma-separated list of related resources to include. Valid values: projects, workspaces. - Include *string "uriparametername:\"include\"" + // Comma-separated list of related resources to include. + Include []i4d2258e86a88b1e2d87bab80c93f231487cbf97938134a31c2d84dd287aca2cb.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -39,7 +40,7 @@ func (m *ItemProviderSetsRequestBuilder) ByProvider_set_name(provider_set_name s // NewItemProviderSetsRequestBuilderInternal instantiates a new ItemProviderSetsRequestBuilder and sets the default values. func NewItemProviderSetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProviderSetsRequestBuilder) { m := &ItemProviderSetsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/provider-sets{?fields%5Bprovider%2Dsets%5D,include*,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/provider-sets{?fields%5Bprovider%2Dsets%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_provider_sets_with_provider_escaped_set_escaped_name_item_request_builder.go b/v2/api/organizations/item_provider_sets_with_provider_escaped_set_escaped_name_item_request_builder.go index 8c8f1d384..c16fa3583 100644 --- a/v2/api/organizations/item_provider_sets_with_provider_escaped_set_escaped_name_item_request_builder.go +++ b/v2/api/organizations/item_provider_sets_with_provider_escaped_set_escaped_name_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie5bf1a07a4aed9c1b7f92edc407a7e27e2c292d7939e34eaadad1916c2f40c95 "github.com/hashicorp/go-tfe/v2/api/organizations/item/providersets/item" ) // ItemProviderSetsWithProvider_set_nameItemRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\provider-sets\{provider_set_name} @@ -17,13 +18,13 @@ type ItemProviderSetsWithProvider_set_nameItemRequestBuilder struct { type ItemProviderSetsWithProvider_set_nameItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsproviderSets []string "uriparametername:\"fields%5Bprovider%2Dsets%5D\"" - // Comma-separated list of related resources to include. Valid values: projects, workspaces. - Include *string "uriparametername:\"include\"" + // Comma-separated list of related resources to include. + Include []ie5bf1a07a4aed9c1b7f92edc407a7e27e2c292d7939e34eaadad1916c2f40c95.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewItemProviderSetsWithProvider_set_nameItemRequestBuilderInternal instantiates a new ItemProviderSetsWithProvider_set_nameItemRequestBuilder and sets the default values. func NewItemProviderSetsWithProvider_set_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProviderSetsWithProvider_set_nameItemRequestBuilder) { m := &ItemProviderSetsWithProvider_set_nameItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/provider-sets/{provider_set_name}{?fields%5Bprovider%2Dsets%5D,include*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/provider-sets/{provider_set_name}{?fields%5Bprovider%2Dsets%5D,include}", pathParameters), } return m } @@ -34,9 +35,9 @@ func NewItemProviderSetsWithProvider_set_nameItemRequestBuilder(rawUrl string, r return NewItemProviderSetsWithProvider_set_nameItemRequestBuilderInternal(urlParams, requestAdapter) } // Get fetch details about the specified provider set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. -// returns a ProviderSetsEnvelopeable when successful +// returns a ItemProviderSetsItemWithProvider_set_nameGetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *ItemProviderSetsWithProvider_set_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProviderSetsWithProvider_set_nameItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable, error) { +func (m *ItemProviderSetsWithProvider_set_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProviderSetsWithProvider_set_nameItemRequestBuilderGetQueryParameters])(ItemProviderSetsItemWithProvider_set_nameGetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -44,14 +45,14 @@ func (m *ItemProviderSetsWithProvider_set_nameItemRequestBuilder) Get(ctx contex errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemProviderSetsItemWithProvider_set_nameGetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable), nil + return res.(ItemProviderSetsItemWithProvider_set_nameGetResponseable), nil } // ToGetRequestInformation fetch details about the specified provider set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. // returns a *RequestInformation when successful diff --git a/v2/api/organizations/item_recoverable_items_get_response.go b/v2/api/organizations/item_recoverable_items_get_response.go index dbdbc287e..7d261a998 100644 --- a/v2/api/organizations/item_recoverable_items_get_response.go +++ b/v2/api/organizations/item_recoverable_items_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -12,12 +13,151 @@ type ItemRecoverableItemsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable + // The included property + included []ItemRecoverableItemsGetResponse_RecoverableItemsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemRecoverableItemsGetResponse_metaable } +// ItemRecoverableItemsGetResponse_RecoverableItems composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +type ItemRecoverableItemsGetResponse_RecoverableItems struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable + stacks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +} +// NewItemRecoverableItemsGetResponse_RecoverableItems instantiates a new ItemRecoverableItemsGetResponse_RecoverableItems and sets the default values. +func NewItemRecoverableItemsGetResponse_RecoverableItems()(*ItemRecoverableItemsGetResponse_RecoverableItems) { + m := &ItemRecoverableItemsGetResponse_RecoverableItems{ + } + return m +} +// CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemRecoverableItemsGetResponse_RecoverableItems() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemStacksGetResponse_Stacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetStacks gets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable +// returns a ItemStacksGetResponse_Stacksable when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) { + return m.stacks +} +// GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// returns a Usersable when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + return m.users +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetStacks sets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable)() { + m.stacks = value +} +// SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { + m.users = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +type ItemRecoverableItemsGetResponse_RecoverableItemsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) + GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable)() + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() +} // NewItemRecoverableItemsGetResponse instantiates a new ItemRecoverableItemsGetResponse and sets the default values. func NewItemRecoverableItemsGetResponse()(*ItemRecoverableItemsGetResponse) { m := &ItemRecoverableItemsGetResponse{ @@ -36,8 +176,8 @@ func (m *ItemRecoverableItemsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []RecoverableItemsable when successful -func (m *ItemRecoverableItemsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable) { +// returns a []ItemRecoverableItemsGetResponse_RecoverableItemsable when successful +func (m *ItemRecoverableItemsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,21 +185,37 @@ func (m *ItemRecoverableItemsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c9 func (m *ItemRecoverableItemsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateRecoverableItemsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable) } } m.SetData(res) } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemRecoverableItemsGetResponse_RecoverableItemsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemRecoverableItemsGetResponse_RecoverableItemsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +238,11 @@ func (m *ItemRecoverableItemsGetResponse) GetFieldDeserializers()(map[string]fun } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemRecoverableItemsGetResponse_RecoverableItemsable when successful +func (m *ItemRecoverableItemsGetResponse) GetIncluded()([]ItemRecoverableItemsGetResponse_RecoverableItemsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemRecoverableItemsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +267,18 @@ func (m *ItemRecoverableItemsGetResponse) Serialize(writer i878a80d2330e89d26896 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -131,9 +304,13 @@ func (m *ItemRecoverableItemsGetResponse) SetAdditionalData(value map[string]any m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemRecoverableItemsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable)() { +func (m *ItemRecoverableItemsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemRecoverableItemsGetResponse) SetIncluded(value []ItemRecoverableItemsGetResponse_RecoverableItemsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemRecoverableItemsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -145,10 +322,12 @@ func (m *ItemRecoverableItemsGetResponse) SetMeta(value ItemRecoverableItemsGetR type ItemRecoverableItemsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable) + GetIncluded()([]ItemRecoverableItemsGetResponse_RecoverableItemsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRecoverableItemsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable)() + SetIncluded(value []ItemRecoverableItemsGetResponse_RecoverableItemsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRecoverableItemsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_relationships_module_producers_get_response.go b/v2/api/organizations/item_relationships_module_producers_get_response.go index 9466ff4ea..d24f3b091 100644 --- a/v2/api/organizations/item_relationships_module_producers_get_response.go +++ b/v2/api/organizations/item_relationships_module_producers_get_response.go @@ -12,7 +12,7 @@ type ItemRelationshipsModuleProducersGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemRelationshipsModuleProducersGetResponse) GetAdditionalData()(map[st return m.additionalData } // GetData gets the data property value. The data property -// returns a []Organizationsable when successful -func (m *ItemRelationshipsModuleProducersGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { +// returns a []OrganizationsGetResponse_Organizationsable when successful +func (m *ItemRelationshipsModuleProducersGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemRelationshipsModuleProducersGetResponse) GetData()([]i05d5aa6b14db2 func (m *ItemRelationshipsModuleProducersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemRelationshipsModuleProducersGetResponse) SetAdditionalData(value ma m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemRelationshipsModuleProducersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { +func (m *ItemRelationshipsModuleProducersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemRelationshipsModuleProducersGetResponse) SetMeta(value ItemRelation type ItemRelationshipsModuleProducersGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRelationshipsModuleProducersGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRelationshipsModuleProducersGetResponse_metaable)() } diff --git a/v2/api/organizations/item_runs_request_builder.go b/v2/api/organizations/item_runs_request_builder.go index c44d323c7..dd7382a9c 100644 --- a/v2/api/organizations/item_runs_request_builder.go +++ b/v2/api/organizations/item_runs_request_builder.go @@ -21,7 +21,7 @@ type ItemRunsRequestBuilderGetQueryParameters struct { Filteroperation *string "uriparametername:\"filter%5Boperation%5D\"" // Filter by run status. Filterstatus *string "uriparametername:\"filter%5Bstatus%5D\"" - // Filter by timeframe. Must be a numeric year or "year" for the last 12 months (the default). + // Filter by timeframe. Must be a numeric year from 2018 through the current calendar year, or "year" for the last 12 months (the default). Filtertimeframe *string "uriparametername:\"filter%5Btimeframe%5D\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/item_stacks_get_response.go b/v2/api/organizations/item_stacks_get_response.go index 9ed7567a0..0ac12ed6e 100644 --- a/v2/api/organizations/item_stacks_get_response.go +++ b/v2/api/organizations/item_stacks_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -12,12 +13,129 @@ type ItemStacksGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable + // The included property + included []ItemStacksGetResponse_Stacksable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemStacksGetResponse_metaable } +// ItemStacksGetResponse_Stacks composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +type ItemStacksGetResponse_Stacks struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable + stackConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable + stackDiagnostics i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +} +// NewItemStacksGetResponse_Stacks instantiates a new ItemStacksGetResponse_Stacks and sets the default values. +func NewItemStacksGetResponse_Stacks()(*ItemStacksGetResponse_Stacks) { + m := &ItemStacksGetResponse_Stacks{ + } + return m +} +// CreateItemStacksGetResponse_StacksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStacksGetResponse_StacksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemStacksGetResponse_Stacks() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configurations") { + result.SetStackConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemStackConfigurationsGetResponse_StackConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-diagnostics") { + result.SetStackDiagnostics(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDiagnostics()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStacksGetResponse_Stacks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStackConfigurations() != nil { + return m.GetStackConfigurations().GetFieldDeserializers() + } else if m.GetStackDiagnostics() != nil { + return m.GetStackDiagnostics().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemStacksGetResponse_Stacks) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemStacksGetResponse_Stacks) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetStackConfigurations gets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable +// returns a ItemStackConfigurationsGetResponse_StackConfigurationsable when successful +func (m *ItemStacksGetResponse_Stacks) GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) { + return m.stackConfigurations +} +// GetStackDiagnostics gets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +// returns a StackDiagnosticsable when successful +func (m *ItemStacksGetResponse_Stacks) GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) { + return m.stackDiagnostics +} +// Serialize serializes information the current object +func (m *ItemStacksGetResponse_Stacks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStackConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurations()) + if err != nil { + return err + } + } else if m.GetStackDiagnostics() != nil { + err := writer.WriteObjectValue("", m.GetStackDiagnostics()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemStacksGetResponse_Stacks) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetStackConfigurations sets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable +func (m *ItemStacksGetResponse_Stacks) SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable)() { + m.stackConfigurations = value +} +// SetStackDiagnostics sets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +func (m *ItemStacksGetResponse_Stacks) SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() { + m.stackDiagnostics = value +} +type ItemStacksGetResponse_Stacksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) + GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable)() + SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() +} // NewItemStacksGetResponse instantiates a new ItemStacksGetResponse and sets the default values. func NewItemStacksGetResponse()(*ItemStacksGetResponse) { m := &ItemStacksGetResponse{ @@ -36,8 +154,8 @@ func (m *ItemStacksGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []Stacksable when successful -func (m *ItemStacksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) { +// returns a []ItemStacksGetResponse_Stacksable when successful +func (m *ItemStacksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,21 +163,37 @@ func (m *ItemStacksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b func (m *ItemStacksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStacksFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemStacksGetResponse_StacksFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) } } m.SetData(res) } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemStacksGetResponse_StacksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemStacksGetResponse_Stacksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemStacksGetResponse_Stacksable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +216,11 @@ func (m *ItemStacksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemStacksGetResponse_Stacksable when successful +func (m *ItemStacksGetResponse) GetIncluded()([]ItemStacksGetResponse_Stacksable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemStacksGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +245,18 @@ func (m *ItemStacksGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487e return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -131,9 +282,13 @@ func (m *ItemStacksGetResponse) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemStacksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() { +func (m *ItemStacksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemStacksGetResponse) SetIncluded(value []ItemStacksGetResponse_Stacksable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemStacksGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -145,10 +300,12 @@ func (m *ItemStacksGetResponse) SetMeta(value ItemStacksGetResponse_metaable)() type ItemStacksGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) + GetIncluded()([]ItemStacksGetResponse_Stacksable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStacksGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable)() + SetIncluded(value []ItemStacksGetResponse_Stacksable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStacksGetResponse_metaable)() } diff --git a/v2/api/organizations/item_tasks_get_response.go b/v2/api/organizations/item_tasks_get_response.go index 02ac93307..93225aced 100644 --- a/v2/api/organizations/item_tasks_get_response.go +++ b/v2/api/organizations/item_tasks_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -12,12 +13,107 @@ type ItemTasksGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable + // The included property + included []ItemTasksGetResponse_Tasksable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemTasksGetResponse_metaable } +// ItemTasksGetResponse_Tasks composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable +type ItemTasksGetResponse_Tasks struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable + workspaceTasks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable +} +// NewItemTasksGetResponse_Tasks instantiates a new ItemTasksGetResponse_Tasks and sets the default values. +func NewItemTasksGetResponse_Tasks()(*ItemTasksGetResponse_Tasks) { + m := &ItemTasksGetResponse_Tasks{ + } + return m +} +// CreateItemTasksGetResponse_TasksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTasksGetResponse_TasksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemTasksGetResponse_Tasks() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-tasks") { + result.SetWorkspaceTasks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceTasks()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTasksGetResponse_Tasks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } else if m.GetWorkspaceTasks() != nil { + return m.GetWorkspaceTasks().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemTasksGetResponse_Tasks) GetIsComposedType()(bool) { + return true +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemTasksGetResponse_Tasks) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// GetWorkspaceTasks gets the workspaceTasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable +// returns a WorkspaceTasksable when successful +func (m *ItemTasksGetResponse_Tasks) GetWorkspaceTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) { + return m.workspaceTasks +} +// Serialize serializes information the current object +func (m *ItemTasksGetResponse_Tasks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } else if m.GetWorkspaceTasks() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceTasks()) + if err != nil { + return err + } + } + return nil +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +func (m *ItemTasksGetResponse_Tasks) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +// SetWorkspaceTasks sets the workspaceTasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable +func (m *ItemTasksGetResponse_Tasks) SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() { + m.workspaceTasks = value +} +type ItemTasksGetResponse_Tasksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + GetWorkspaceTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() +} // NewItemTasksGetResponse instantiates a new ItemTasksGetResponse and sets the default values. func NewItemTasksGetResponse()(*ItemTasksGetResponse) { m := &ItemTasksGetResponse{ @@ -36,8 +132,8 @@ func (m *ItemTasksGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []Tasksable when successful -func (m *ItemTasksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable) { +// returns a []ItemTasksGetResponse_Tasksable when successful +func (m *ItemTasksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,21 +141,37 @@ func (m *ItemTasksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b7 func (m *ItemTasksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTasksFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemTasksGetResponse_TasksFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) } } m.SetData(res) } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemTasksGetResponse_TasksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemTasksGetResponse_Tasksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemTasksGetResponse_Tasksable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +194,11 @@ func (m *ItemTasksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemTasksGetResponse_Tasksable when successful +func (m *ItemTasksGetResponse) GetIncluded()([]ItemTasksGetResponse_Tasksable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemTasksGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +223,18 @@ func (m *ItemTasksGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487ee return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -131,9 +260,13 @@ func (m *ItemTasksGetResponse) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemTasksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable)() { +func (m *ItemTasksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemTasksGetResponse) SetIncluded(value []ItemTasksGetResponse_Tasksable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemTasksGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -145,10 +278,12 @@ func (m *ItemTasksGetResponse) SetMeta(value ItemTasksGetResponse_metaable)() { type ItemTasksGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) + GetIncluded()([]ItemTasksGetResponse_Tasksable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemTasksGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable)() + SetIncluded(value []ItemTasksGetResponse_Tasksable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemTasksGetResponse_metaable)() } diff --git a/v2/api/organizations/item_teams_get_response.go b/v2/api/organizations/item_teams_get_response.go index 4139558e0..87608f945 100644 --- a/v2/api/organizations/item_teams_get_response.go +++ b/v2/api/organizations/item_teams_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -38,19 +39,21 @@ func NewItemTeamsGetResponse_TeamsGetResponse_included()(*ItemTeamsGetResponse_T func CreateItemTeamsGetResponse_TeamsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { result := NewItemTeamsGetResponse_TeamsGetResponse_included() if parseNode != nil { - if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationMembershipsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable); ok { - result.SetOrganizationMemberships(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateUsersFromDiscriminatorValue); val != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() if err != nil { return nil, err } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable); ok { - result.SetUsers(cast) + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organization-memberships") { + result.SetOrganizationMemberships(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationMemberships()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } } } } @@ -59,6 +62,11 @@ func CreateItemTeamsGetResponse_TeamsGetResponse_includedFromDiscriminatorValue( // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ItemTeamsGetResponse_TeamsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOrganizationMemberships() != nil { + return m.GetOrganizationMemberships().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } // GetIsComposedType determines if the current object is a wrapper around a composed type diff --git a/v2/api/organizations/item_vcs_events_get_response.go b/v2/api/organizations/item_vcs_events_get_response.go index 7aba1ea13..47e17bd1c 100644 --- a/v2/api/organizations/item_vcs_events_get_response.go +++ b/v2/api/organizations/item_vcs_events_get_response.go @@ -13,6 +13,8 @@ type ItemVcsEventsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VcsEventsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemVcsEventsGetResponse) GetFieldDeserializers()(map[string]func(i878a } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOauthClientsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemVcsEventsGetResponse) GetFieldDeserializers()(map[string]func(i878a } return res } +// GetIncluded gets the included property value. The included property +// returns a []OauthClientsable when successful +func (m *ItemVcsEventsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemVcsEventsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemVcsEventsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f4 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemVcsEventsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemVcsEventsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VcsEventsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemVcsEventsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemVcsEventsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemVcsEventsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VcsEventsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemVcsEventsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VcsEventsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemVcsEventsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_with_organization_escaped_name_get_response.go b/v2/api/organizations/item_with_organization_escaped_name_get_response.go index 865603208..4240bee68 100644 --- a/v2/api/organizations/item_with_organization_escaped_name_get_response.go +++ b/v2/api/organizations/item_with_organization_escaped_name_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -11,48 +12,49 @@ import ( type ItemWithOrganization_nameGetResponse struct { i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelope // The included property - included []ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedable + included []ItemWithOrganization_nameGetResponse_WithOrganization_nameable } -// ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable -type ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included struct { +// ItemWithOrganization_nameGetResponse_WithOrganization_name composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +type ItemWithOrganization_nameGetResponse_WithOrganization_name struct { // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable entitlementSets i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable + onboardingTaskLists i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable subscriptions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable } -// NewItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included instantiates a new ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included and sets the default values. -func NewItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included()(*ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) { - m := &ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included{ +// NewItemWithOrganization_nameGetResponse_WithOrganization_name instantiates a new ItemWithOrganization_nameGetResponse_WithOrganization_name and sets the default values. +func NewItemWithOrganization_nameGetResponse_WithOrganization_name()(*ItemWithOrganization_nameGetResponse_WithOrganization_name) { + m := &ItemWithOrganization_nameGetResponse_WithOrganization_name{ } return m } -// CreateItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemWithOrganization_nameGetResponse_WithOrganization_nameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included() +func CreateItemWithOrganization_nameGetResponse_WithOrganization_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithOrganization_nameGetResponse_WithOrganization_name() if parseNode != nil { - if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateEntitlementSetsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable); ok { - result.SetEntitlementSets(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProjectsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable); ok { - result.SetProjects(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSubscriptionsFromDiscriminatorValue); val != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() if err != nil { return nil, err } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable); ok { - result.SetSubscriptions(cast) + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "entitlement-sets") { + result.SetEntitlementSets(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEntitlementSets()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "onboarding-task-lists") { + result.SetOnboardingTaskLists(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOnboardingTaskLists()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "subscriptions") { + result.SetSubscriptions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewSubscriptions()) + } } } } @@ -60,36 +62,55 @@ func CreateItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse } // GetEntitlementSets gets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable // returns a EntitlementSetsable when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) { +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) { return m.entitlementSets } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetEntitlementSets() != nil { + return m.GetEntitlementSets().GetFieldDeserializers() + } else if m.GetOnboardingTaskLists() != nil { + return m.GetOnboardingTaskLists().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetSubscriptions() != nil { + return m.GetSubscriptions().GetFieldDeserializers() + } return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) GetIsComposedType()(bool) { +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetIsComposedType()(bool) { return true } +// GetOnboardingTaskLists gets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable +// returns a OnboardingTaskListsable when successful +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) { + return m.onboardingTaskLists +} // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { return m.projects } // GetSubscriptions gets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable // returns a Subscriptionsable when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { return m.subscriptions } // Serialize serializes information the current object -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetEntitlementSets() != nil { err := writer.WriteObjectValue("", m.GetEntitlementSets()) if err != nil { return err } + } else if m.GetOnboardingTaskLists() != nil { + err := writer.WriteObjectValue("", m.GetOnboardingTaskLists()) + if err != nil { + return err + } } else if m.GetProjects() != nil { err := writer.WriteObjectValue("", m.GetProjects()) if err != nil { @@ -104,23 +125,29 @@ func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_i return nil } // SetEntitlementSets sets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() { +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() { m.entitlementSets = value } +// SetOnboardingTaskLists sets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() { + m.onboardingTaskLists = value +} // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { m.projects = value } // SetSubscriptions sets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_included) SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() { +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() { m.subscriptions = value } -type ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedable interface { +type ItemWithOrganization_nameGetResponse_WithOrganization_nameable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) + GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() + SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() } @@ -141,15 +168,15 @@ func CreateItemWithOrganization_nameGetResponseFromDiscriminatorValue(parseNode func (m *ItemWithOrganization_nameGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.OrganizationsEnvelope.GetFieldDeserializers() res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateItemWithOrganization_nameGetResponse_WithOrganization_nameFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedable, len(val)) + res := make([]ItemWithOrganization_nameGetResponse_WithOrganization_nameable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedable) + res[i] = v.(ItemWithOrganization_nameGetResponse_WithOrganization_nameable) } } m.SetIncluded(res) @@ -159,8 +186,8 @@ func (m *ItemWithOrganization_nameGetResponse) GetFieldDeserializers()(map[strin return res } // GetIncluded gets the included property value. The included property -// returns a []ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedable when successful -func (m *ItemWithOrganization_nameGetResponse) GetIncluded()([]ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedable) { +// returns a []ItemWithOrganization_nameGetResponse_WithOrganization_nameable when successful +func (m *ItemWithOrganization_nameGetResponse) GetIncluded()([]ItemWithOrganization_nameGetResponse_WithOrganization_nameable) { return m.included } // Serialize serializes information the current object @@ -184,12 +211,12 @@ func (m *ItemWithOrganization_nameGetResponse) Serialize(writer i878a80d2330e89d return nil } // SetIncluded sets the included property value. The included property -func (m *ItemWithOrganization_nameGetResponse) SetIncluded(value []ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedable)() { +func (m *ItemWithOrganization_nameGetResponse) SetIncluded(value []ItemWithOrganization_nameGetResponse_WithOrganization_nameable)() { m.included = value } type ItemWithOrganization_nameGetResponseable interface { i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelopeable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetIncluded()([]ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedable) - SetIncluded(value []ItemWithOrganization_nameGetResponse_WithOrganization_nameGetResponse_includedable)() + GetIncluded()([]ItemWithOrganization_nameGetResponse_WithOrganization_nameable) + SetIncluded(value []ItemWithOrganization_nameGetResponse_WithOrganization_nameable)() } diff --git a/v2/api/organizations/item_workspaces_get_response.go b/v2/api/organizations/item_workspaces_get_response.go index 9b0695da1..55e4d40ce 100644 --- a/v2/api/organizations/item_workspaces_get_response.go +++ b/v2/api/organizations/item_workspaces_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -12,101 +13,275 @@ type ItemWorkspacesGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable // The included property - included []ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable + included []ItemWorkspacesGetResponse_Workspacesable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemWorkspacesGetResponse_metaable } -// ItemWorkspacesGetResponse_WorkspacesGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable -type ItemWorkspacesGetResponse_WorkspacesGetResponse_included struct { +// ItemWorkspacesGetResponse_Workspaces composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable +type ItemWorkspacesGetResponse_Workspaces struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + assessmentResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + effectiveTagBindings i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable noCodeModules i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable noCodeModuleVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + stateVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable workspaceOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable workspaceReadme i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable } -// NewItemWorkspacesGetResponse_WorkspacesGetResponse_included instantiates a new ItemWorkspacesGetResponse_WorkspacesGetResponse_included and sets the default values. -func NewItemWorkspacesGetResponse_WorkspacesGetResponse_included()(*ItemWorkspacesGetResponse_WorkspacesGetResponse_included) { - m := &ItemWorkspacesGetResponse_WorkspacesGetResponse_included{ +// NewItemWorkspacesGetResponse_Workspaces instantiates a new ItemWorkspacesGetResponse_Workspaces and sets the default values. +func NewItemWorkspacesGetResponse_Workspaces()(*ItemWorkspacesGetResponse_Workspaces) { + m := &ItemWorkspacesGetResponse_Workspaces{ } return m } -// CreateItemWorkspacesGetResponse_WorkspacesGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWorkspacesGetResponse_WorkspacesGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWorkspacesGetResponse_WorkspacesGetResponse_included() +func CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWorkspacesGetResponse_Workspaces() if parseNode != nil { - if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateNoCodeModulesFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable); ok { - result.SetNoCodeModules(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateNoCodeModuleVersionsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable); ok { - result.SetNoCodeModuleVersions(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceOutputsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable); ok { - result.SetWorkspaceOutputs(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceReadmeFromDiscriminatorValue); val != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() if err != nil { return nil, err } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable); ok { - result.SetWorkspaceReadme(cast) + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "assessment-results") { + result.SetAssessmentResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAssessmentResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "effective-tag-bindings") { + result.SetEffectiveTagBindings(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEffectiveTagBindings()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-modules") { + result.SetNoCodeModules(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModules()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-module-versions") { + result.SetNoCodeModuleVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModuleVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-versions") { + result.SetStateVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStateVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-outputs") { + result.SetWorkspaceOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-readme") { + result.SetWorkspaceReadme(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceReadme()) + } } } } return result, nil } +// GetAgentPools gets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +// returns a AgentPoolsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { + return m.agentPools +} +// GetApplies gets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +// returns a Appliesable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { + return m.applies +} +// GetAssessmentResults gets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable +// returns a AssessmentResultsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) { + return m.assessmentResults +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + return m.configurationVersions +} +// GetEffectiveTagBindings gets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable +// returns a EffectiveTagBindingsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { + return m.effectiveTagBindings +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemWorkspacesGetResponse_Workspaces) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetAssessmentResults() != nil { + return m.GetAssessmentResults().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetEffectiveTagBindings() != nil { + return m.GetEffectiveTagBindings().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetNoCodeModules() != nil { + return m.GetNoCodeModules().GetFieldDeserializers() + } else if m.GetNoCodeModuleVersions() != nil { + return m.GetNoCodeModuleVersions().GetFieldDeserializers() + } else if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetStateVersions() != nil { + return m.GetStateVersions().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaceOutputs() != nil { + return m.GetWorkspaceOutputs().GetFieldDeserializers() + } else if m.GetWorkspaceReadme() != nil { + return m.GetWorkspaceReadme().GetFieldDeserializers() + } return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetIsComposedType()(bool) { +func (m *ItemWorkspacesGetResponse_Workspaces) GetIsComposedType()(bool) { return true } // GetNoCodeModules gets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable // returns a NoCodeModulesable when successful -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { +func (m *ItemWorkspacesGetResponse_Workspaces) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { return m.noCodeModules } // GetNoCodeModuleVersions gets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable // returns a NoCodeModuleVersionsable when successful -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { +func (m *ItemWorkspacesGetResponse_Workspaces) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { return m.noCodeModuleVersions } +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +// returns a OrganizationsGetResponse_Organizationsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { + return m.organizations +} +// GetPlans gets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +// returns a Plansable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { + return m.plans +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +// returns a Runsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + return m.runs +} +// GetStateVersions gets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable +// returns a StateVersionsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) { + return m.stateVersions +} +// GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// returns a Usersable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + return m.users +} +// GetVars gets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +// returns a Varsable when successful +func (m *ItemWorkspacesGetResponse_Workspaces) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.vars +} // GetWorkspaceOutputs gets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable // returns a WorkspaceOutputsable when successful -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { +func (m *ItemWorkspacesGetResponse_Workspaces) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { return m.workspaceOutputs } // GetWorkspaceReadme gets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable // returns a WorkspaceReadmeable when successful -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { +func (m *ItemWorkspacesGetResponse_Workspaces) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { return m.workspaceReadme } // Serialize serializes information the current object -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetNoCodeModules() != nil { +func (m *ItemWorkspacesGetResponse_Workspaces) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetAssessmentResults() != nil { + err := writer.WriteObjectValue("", m.GetAssessmentResults()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetEffectiveTagBindings() != nil { + err := writer.WriteObjectValue("", m.GetEffectiveTagBindings()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetNoCodeModules() != nil { err := writer.WriteObjectValue("", m.GetNoCodeModules()) if err != nil { return err @@ -116,6 +291,41 @@ func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) Serialize(wri if err != nil { return err } + } else if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetStateVersions() != nil { + err := writer.WriteObjectValue("", m.GetStateVersions()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } } else if m.GetWorkspaceOutputs() != nil { err := writer.WriteObjectValue("", m.GetWorkspaceOutputs()) if err != nil { @@ -129,30 +339,108 @@ func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) Serialize(wri } return nil } +// SetAgentPools sets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +func (m *ItemWorkspacesGetResponse_Workspaces) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { + m.agentPools = value +} +// SetApplies sets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +func (m *ItemWorkspacesGetResponse_Workspaces) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() { + m.applies = value +} +// SetAssessmentResults sets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable +func (m *ItemWorkspacesGetResponse_Workspaces) SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() { + m.assessmentResults = value +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +func (m *ItemWorkspacesGetResponse_Workspaces) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetEffectiveTagBindings sets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable +func (m *ItemWorkspacesGetResponse_Workspaces) SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() { + m.effectiveTagBindings = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *ItemWorkspacesGetResponse_Workspaces) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} // SetNoCodeModules sets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() { +func (m *ItemWorkspacesGetResponse_Workspaces) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() { m.noCodeModules = value } // SetNoCodeModuleVersions sets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() { +func (m *ItemWorkspacesGetResponse_Workspaces) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() { m.noCodeModuleVersions = value } +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +func (m *ItemWorkspacesGetResponse_Workspaces) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { + m.organizations = value +} +// SetPlans sets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +func (m *ItemWorkspacesGetResponse_Workspaces) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() { + m.plans = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemWorkspacesGetResponse_Workspaces) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +func (m *ItemWorkspacesGetResponse_Workspaces) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { + m.runs = value +} +// SetStateVersions sets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable +func (m *ItemWorkspacesGetResponse_Workspaces) SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() { + m.stateVersions = value +} +// SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +func (m *ItemWorkspacesGetResponse_Workspaces) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { + m.users = value +} +// SetVars sets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +func (m *ItemWorkspacesGetResponse_Workspaces) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.vars = value +} // SetWorkspaceOutputs sets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() { +func (m *ItemWorkspacesGetResponse_Workspaces) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() { m.workspaceOutputs = value } // SetWorkspaceReadme sets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable -func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() { +func (m *ItemWorkspacesGetResponse_Workspaces) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() { m.workspaceReadme = value } -type ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable interface { +type ItemWorkspacesGetResponse_Workspacesable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) + GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) + GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) + GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) + GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) + SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() + SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() + SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() + SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() + SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() } @@ -174,8 +462,8 @@ func (m *ItemWorkspacesGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []Workspacesable when successful -func (m *ItemWorkspacesGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { +// returns a []ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemWorkspacesGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -183,15 +471,15 @@ func (m *ItemWorkspacesGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7 func (m *ItemWorkspacesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspacesFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) } } m.SetData(res) @@ -199,15 +487,15 @@ func (m *ItemWorkspacesGetResponse) GetFieldDeserializers()(map[string]func(i878 return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWorkspacesGetResponse_WorkspacesGetResponse_includedFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable, len(val)) + res := make([]ItemWorkspacesGetResponse_Workspacesable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable) + res[i] = v.(ItemWorkspacesGetResponse_Workspacesable) } } m.SetIncluded(res) @@ -237,8 +525,8 @@ func (m *ItemWorkspacesGetResponse) GetFieldDeserializers()(map[string]func(i878 return res } // GetIncluded gets the included property value. The included property -// returns a []ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable when successful -func (m *ItemWorkspacesGetResponse) GetIncluded()([]ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable) { +// returns a []ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemWorkspacesGetResponse) GetIncluded()([]ItemWorkspacesGetResponse_Workspacesable) { return m.included } // GetLinks gets the links property value. The links property @@ -302,11 +590,11 @@ func (m *ItemWorkspacesGetResponse) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemWorkspacesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { +func (m *ItemWorkspacesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *ItemWorkspacesGetResponse) SetIncluded(value []ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable)() { +func (m *ItemWorkspacesGetResponse) SetIncluded(value []ItemWorkspacesGetResponse_Workspacesable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -320,12 +608,12 @@ func (m *ItemWorkspacesGetResponse) SetMeta(value ItemWorkspacesGetResponse_meta type ItemWorkspacesGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) - GetIncluded()([]ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + GetIncluded()([]ItemWorkspacesGetResponse_Workspacesable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemWorkspacesGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() - SetIncluded(value []ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + SetIncluded(value []ItemWorkspacesGetResponse_Workspacesable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemWorkspacesGetResponse_metaable)() } diff --git a/v2/api/organizations/item_workspaces_item_with_workspace_escaped_name_get_response.go b/v2/api/organizations/item_workspaces_item_with_workspace_escaped_name_get_response.go index 40b753ced..6c2a93aee 100644 --- a/v2/api/organizations/item_workspaces_item_with_workspace_escaped_name_get_response.go +++ b/v2/api/organizations/item_workspaces_item_with_workspace_escaped_name_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,12 +14,38 @@ type ItemWorkspacesItemWithWorkspace_nameGetResponse struct { // The included property included []ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable } -// ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable +// ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable type ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + assessmentResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + effectiveTagBindings i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable noCodeModules i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable noCodeModuleVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + stateVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable workspaceOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable @@ -35,43 +62,126 @@ func NewItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetRes func CreateItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { result := NewItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included() if parseNode != nil { - if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateNoCodeModulesFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable); ok { - result.SetNoCodeModules(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateNoCodeModuleVersionsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable); ok { - result.SetNoCodeModuleVersions(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceOutputsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable); ok { - result.SetWorkspaceOutputs(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceReadmeFromDiscriminatorValue); val != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() if err != nil { return nil, err } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable); ok { - result.SetWorkspaceReadme(cast) + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "assessment-results") { + result.SetAssessmentResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAssessmentResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "effective-tag-bindings") { + result.SetEffectiveTagBindings(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEffectiveTagBindings()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-modules") { + result.SetNoCodeModules(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModules()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-module-versions") { + result.SetNoCodeModuleVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModuleVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-versions") { + result.SetStateVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStateVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-outputs") { + result.SetWorkspaceOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-readme") { + result.SetWorkspaceReadme(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceReadme()) + } } } } return result, nil } +// GetAgentPools gets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +// returns a AgentPoolsable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { + return m.agentPools +} +// GetApplies gets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +// returns a Appliesable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { + return m.applies +} +// GetAssessmentResults gets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable +// returns a AssessmentResultsable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) { + return m.assessmentResults +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + return m.configurationVersions +} +// GetEffectiveTagBindings gets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable +// returns a EffectiveTagBindingsable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { + return m.effectiveTagBindings +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetAssessmentResults() != nil { + return m.GetAssessmentResults().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetEffectiveTagBindings() != nil { + return m.GetEffectiveTagBindings().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetNoCodeModules() != nil { + return m.GetNoCodeModules().GetFieldDeserializers() + } else if m.GetNoCodeModuleVersions() != nil { + return m.GetNoCodeModuleVersions().GetFieldDeserializers() + } else if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetStateVersions() != nil { + return m.GetStateVersions().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaceOutputs() != nil { + return m.GetWorkspaceOutputs().GetFieldDeserializers() + } else if m.GetWorkspaceReadme() != nil { + return m.GetWorkspaceReadme().GetFieldDeserializers() + } return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetIsComposedType()(bool) { @@ -87,6 +197,41 @@ func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetRe func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { return m.noCodeModuleVersions } +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +// returns a OrganizationsGetResponse_Organizationsable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { + return m.organizations +} +// GetPlans gets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +// returns a Plansable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { + return m.plans +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +// returns a Runsable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + return m.runs +} +// GetStateVersions gets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable +// returns a StateVersionsable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) { + return m.stateVersions +} +// GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// returns a Usersable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + return m.users +} +// GetVars gets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +// returns a Varsable when successful +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.vars +} // GetWorkspaceOutputs gets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable // returns a WorkspaceOutputsable when successful func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { @@ -99,7 +244,37 @@ func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetRe } // Serialize serializes information the current object func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetNoCodeModules() != nil { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetAssessmentResults() != nil { + err := writer.WriteObjectValue("", m.GetAssessmentResults()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetEffectiveTagBindings() != nil { + err := writer.WriteObjectValue("", m.GetEffectiveTagBindings()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetNoCodeModules() != nil { err := writer.WriteObjectValue("", m.GetNoCodeModules()) if err != nil { return err @@ -109,6 +284,41 @@ func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetRe if err != nil { return err } + } else if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetStateVersions() != nil { + err := writer.WriteObjectValue("", m.GetStateVersions()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } } else if m.GetWorkspaceOutputs() != nil { err := writer.WriteObjectValue("", m.GetWorkspaceOutputs()) if err != nil { @@ -122,6 +332,30 @@ func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetRe } return nil } +// SetAgentPools sets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { + m.agentPools = value +} +// SetApplies sets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() { + m.applies = value +} +// SetAssessmentResults sets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() { + m.assessmentResults = value +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetEffectiveTagBindings sets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() { + m.effectiveTagBindings = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} // SetNoCodeModules sets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() { m.noCodeModules = value @@ -130,6 +364,34 @@ func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetRe func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() { m.noCodeModuleVersions = value } +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { + m.organizations = value +} +// SetPlans sets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() { + m.plans = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { + m.runs = value +} +// SetStateVersions sets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() { + m.stateVersions = value +} +// SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { + m.users = value +} +// SetVars sets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.vars = value +} // SetWorkspaceOutputs sets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() { m.workspaceOutputs = value @@ -140,12 +402,38 @@ func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetRe } type ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) + GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) + GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) + GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) + GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) + SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() + SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() + SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() + SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() + SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() } diff --git a/v2/api/organizations/organizations_get_response.go b/v2/api/organizations/organizations_get_response.go index 5684fe078..83044fd46 100644 --- a/v2/api/organizations/organizations_get_response.go +++ b/v2/api/organizations/organizations_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -12,14 +13,151 @@ type OrganizationsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable // The included property - included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable + included []OrganizationsGetResponse_Organizationsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta OrganizationsGetResponse_metaable } +// OrganizationsGetResponse_Organizations composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +type OrganizationsGetResponse_Organizations struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable + entitlementSets i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable + onboardingTaskLists i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable + subscriptions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +} +// NewOrganizationsGetResponse_Organizations instantiates a new OrganizationsGetResponse_Organizations and sets the default values. +func NewOrganizationsGetResponse_Organizations()(*OrganizationsGetResponse_Organizations) { + m := &OrganizationsGetResponse_Organizations{ + } + return m +} +// CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewOrganizationsGetResponse_Organizations() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "entitlement-sets") { + result.SetEntitlementSets(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEntitlementSets()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "onboarding-task-lists") { + result.SetOnboardingTaskLists(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOnboardingTaskLists()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "subscriptions") { + result.SetSubscriptions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewSubscriptions()) + } + } + } + } + return result, nil +} +// GetEntitlementSets gets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable +// returns a EntitlementSetsable when successful +func (m *OrganizationsGetResponse_Organizations) GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) { + return m.entitlementSets +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationsGetResponse_Organizations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetEntitlementSets() != nil { + return m.GetEntitlementSets().GetFieldDeserializers() + } else if m.GetOnboardingTaskLists() != nil { + return m.GetOnboardingTaskLists().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetSubscriptions() != nil { + return m.GetSubscriptions().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *OrganizationsGetResponse_Organizations) GetIsComposedType()(bool) { + return true +} +// GetOnboardingTaskLists gets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable +// returns a OnboardingTaskListsable when successful +func (m *OrganizationsGetResponse_Organizations) GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) { + return m.onboardingTaskLists +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *OrganizationsGetResponse_Organizations) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetSubscriptions gets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +// returns a Subscriptionsable when successful +func (m *OrganizationsGetResponse_Organizations) GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { + return m.subscriptions +} +// Serialize serializes information the current object +func (m *OrganizationsGetResponse_Organizations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEntitlementSets() != nil { + err := writer.WriteObjectValue("", m.GetEntitlementSets()) + if err != nil { + return err + } + } else if m.GetOnboardingTaskLists() != nil { + err := writer.WriteObjectValue("", m.GetOnboardingTaskLists()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetSubscriptions() != nil { + err := writer.WriteObjectValue("", m.GetSubscriptions()) + if err != nil { + return err + } + } + return nil +} +// SetEntitlementSets sets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable +func (m *OrganizationsGetResponse_Organizations) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() { + m.entitlementSets = value +} +// SetOnboardingTaskLists sets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable +func (m *OrganizationsGetResponse_Organizations) SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() { + m.onboardingTaskLists = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *OrganizationsGetResponse_Organizations) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetSubscriptions sets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +func (m *OrganizationsGetResponse_Organizations) SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() { + m.subscriptions = value +} +type OrganizationsGetResponse_Organizationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) + GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) + SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() + SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() +} // NewOrganizationsGetResponse instantiates a new OrganizationsGetResponse and sets the default values. func NewOrganizationsGetResponse()(*OrganizationsGetResponse) { m := &OrganizationsGetResponse{ @@ -38,8 +176,8 @@ func (m *OrganizationsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []Organizationsable when successful -func (m *OrganizationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { +// returns a []OrganizationsGetResponse_Organizationsable when successful +func (m *OrganizationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -47,15 +185,15 @@ func (m *OrganizationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a70 func (m *OrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) } } m.SetData(res) @@ -63,15 +201,15 @@ func (m *OrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSubscriptionsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable, len(val)) + res := make([]OrganizationsGetResponse_Organizationsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) + res[i] = v.(OrganizationsGetResponse_Organizationsable) } } m.SetIncluded(res) @@ -101,8 +239,8 @@ func (m *OrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a return res } // GetIncluded gets the included property value. The included property -// returns a []Subscriptionsable when successful -func (m *OrganizationsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { +// returns a []OrganizationsGetResponse_Organizationsable when successful +func (m *OrganizationsGetResponse) GetIncluded()([]OrganizationsGetResponse_Organizationsable) { return m.included } // GetLinks gets the links property value. The links property @@ -166,11 +304,11 @@ func (m *OrganizationsGetResponse) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *OrganizationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { +func (m *OrganizationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *OrganizationsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() { +func (m *OrganizationsGetResponse) SetIncluded(value []OrganizationsGetResponse_Organizationsable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -184,12 +322,12 @@ func (m *OrganizationsGetResponse) SetMeta(value OrganizationsGetResponse_metaab type OrganizationsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) - GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + GetIncluded()([]OrganizationsGetResponse_Organizationsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(OrganizationsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() - SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() + SetIncluded(value []OrganizationsGetResponse_Organizationsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value OrganizationsGetResponse_metaable)() } diff --git a/v2/api/projects/item_provider_sets_get_response.go b/v2/api/projects/item_provider_sets_get_response.go index 8da7e664b..9ed2544c5 100644 --- a/v2/api/projects/item_provider_sets_get_response.go +++ b/v2/api/projects/item_provider_sets_get_response.go @@ -12,7 +12,7 @@ type ItemProviderSetsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemProviderSetsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ProviderSetsable when successful -func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) { +// returns a []ItemProviderSetsGetResponse_ProviderSetsable when successful +func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7 func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemProviderSetsGetResponse) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() { +func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemProviderSetsGetResponse) SetMeta(value ItemProviderSetsGetResponse_ type ItemProviderSetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemProviderSetsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemProviderSetsGetResponse_metaable)() } diff --git a/v2/api/providersets/item/get_include_query_parameter_type.go b/v2/api/providersets/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..6536aab2f --- /dev/null +++ b/v2/api/providersets/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"projects", "workspaces"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/providersets/item_with_provider_escaped_set_escaped_get_response.go b/v2/api/providersets/item_with_provider_escaped_set_escaped_get_response.go new file mode 100644 index 000000000..65aaac042 --- /dev/null +++ b/v2/api/providersets/item_with_provider_escaped_set_escaped_get_response.go @@ -0,0 +1,178 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package providersets + +import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemWithProvider_set_GetResponse struct { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelope + // The included property + included []ItemWithProvider_set_GetResponse_WithProvider_set_able +} +// ItemWithProvider_set_GetResponse_WithProvider_set_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +type ItemWithProvider_set_GetResponse_WithProvider_set_ struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +} +// NewItemWithProvider_set_GetResponse_WithProvider_set_ instantiates a new ItemWithProvider_set_GetResponse_WithProvider_set_ and sets the default values. +func NewItemWithProvider_set_GetResponse_WithProvider_set_()(*ItemWithProvider_set_GetResponse_WithProvider_set_) { + m := &ItemWithProvider_set_GetResponse_WithProvider_set_{ + } + return m +} +// CreateItemWithProvider_set_GetResponse_WithProvider_set_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithProvider_set_GetResponse_WithProvider_set_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithProvider_set_GetResponse_WithProvider_set_() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +type ItemWithProvider_set_GetResponse_WithProvider_set_able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() +} +// NewItemWithProvider_set_GetResponse instantiates a new ItemWithProvider_set_GetResponse and sets the default values. +func NewItemWithProvider_set_GetResponse()(*ItemWithProvider_set_GetResponse) { + m := &ItemWithProvider_set_GetResponse{ + ProviderSetsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProviderSetsEnvelope(), + } + return m +} +// CreateItemWithProvider_set_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithProvider_set_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithProvider_set_GetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithProvider_set_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ProviderSetsEnvelope.GetFieldDeserializers() + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithProvider_set_GetResponse_WithProvider_set_FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithProvider_set_GetResponse_WithProvider_set_able, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithProvider_set_GetResponse_WithProvider_set_able) + } + } + m.SetIncluded(res) + } + return nil + } + return res +} +// GetIncluded gets the included property value. The included property +// returns a []ItemWithProvider_set_GetResponse_WithProvider_set_able when successful +func (m *ItemWithProvider_set_GetResponse) GetIncluded()([]ItemWithProvider_set_GetResponse_WithProvider_set_able) { + return m.included +} +// Serialize serializes information the current object +func (m *ItemWithProvider_set_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ProviderSetsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil +} +// SetIncluded sets the included property value. The included property +func (m *ItemWithProvider_set_GetResponse) SetIncluded(value []ItemWithProvider_set_GetResponse_WithProvider_set_able)() { + m.included = value +} +type ItemWithProvider_set_GetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable + GetIncluded()([]ItemWithProvider_set_GetResponse_WithProvider_set_able) + SetIncluded(value []ItemWithProvider_set_GetResponse_WithProvider_set_able)() +} diff --git a/v2/api/providersets/with_provider_escaped_set_escaped_item_request_builder.go b/v2/api/providersets/with_provider_escaped_set_escaped_item_request_builder.go index a3b9a0517..a0adde4ab 100644 --- a/v2/api/providersets/with_provider_escaped_set_escaped_item_request_builder.go +++ b/v2/api/providersets/with_provider_escaped_set_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i5c8ba1c3eef4913cb538ecee85883454e5b337265617e2a1235fce55b26b1be5 "github.com/hashicorp/go-tfe/v2/api/providersets/item" ) // WithProvider_set_ItemRequestBuilder builds and executes requests for operations under \provider-sets\{provider_set_id} @@ -17,13 +18,13 @@ type WithProvider_set_ItemRequestBuilder struct { type WithProvider_set_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsproviderSets []string "uriparametername:\"fields%5Bprovider%2Dsets%5D\"" - // Comma-separated list of related resources to include. Valid values: projects, workspaces. - Include *string "uriparametername:\"include\"" + // Comma-separated list of related resources to include. + Include []i5c8ba1c3eef4913cb538ecee85883454e5b337265617e2a1235fce55b26b1be5.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithProvider_set_ItemRequestBuilderInternal instantiates a new WithProvider_set_ItemRequestBuilder and sets the default values. func NewWithProvider_set_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithProvider_set_ItemRequestBuilder) { m := &WithProvider_set_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/provider-sets/{provider_set_id}{?fields%5Bprovider%2Dsets%5D,include*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/provider-sets/{provider_set_id}{?fields%5Bprovider%2Dsets%5D,include}", pathParameters), } return m } @@ -50,9 +51,9 @@ func (m *WithProvider_set_ItemRequestBuilder) Delete(ctx context.Context, reques return nil } // Get fetch details about the specified provider set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. -// returns a ProviderSetsEnvelopeable when successful +// returns a ItemWithProvider_set_GetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithProvider_set_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithProvider_set_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable, error) { +func (m *WithProvider_set_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithProvider_set_ItemRequestBuilderGetQueryParameters])(ItemWithProvider_set_GetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -60,14 +61,14 @@ func (m *WithProvider_set_ItemRequestBuilder) Get(ctx context.Context, requestCo errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithProvider_set_GetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable), nil + return res.(ItemWithProvider_set_GetResponseable), nil } // Patch update attributes of an existing provider set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. // returns a ProviderSetsEnvelopeable when successful diff --git a/v2/api/runs/runs_get_response.go b/v2/api/runs/runs_get_response.go index a58da32a4..af606e3b6 100644 --- a/v2/api/runs/runs_get_response.go +++ b/v2/api/runs/runs_get_response.go @@ -4,6 +4,7 @@ package runs import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,260 @@ type RunsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // The included property + included []RunsGetResponse_RunsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta RunsGetResponse_metaable } +// RunsGetResponse_RunsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +type RunsGetResponse_RunsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + costEstimates i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable + taskStages i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable + tfPolicyEvaluation i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +} +// NewRunsGetResponse_RunsGetResponse_included instantiates a new RunsGetResponse_RunsGetResponse_included and sets the default values. +func NewRunsGetResponse_RunsGetResponse_included()(*RunsGetResponse_RunsGetResponse_included) { + m := &RunsGetResponse_RunsGetResponse_included{ + } + return m +} +// CreateRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewRunsGetResponse_RunsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { + result.SetCostEstimates(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCostEstimates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-stages") { + result.SetTaskStages(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskStages()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tf-policy-evaluations") { + result.SetTfPolicyEvaluation(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTfPolicyEvaluation()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil +} +// GetApplies gets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +// returns a Appliesable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { + return m.applies +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + return m.configurationVersions +} +// GetCostEstimates gets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable +// returns a CostEstimatesable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) { + return m.costEstimates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetCostEstimates() != nil { + return m.GetCostEstimates().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetTaskStages() != nil { + return m.GetTaskStages().GetFieldDeserializers() + } else if m.GetTfPolicyEvaluation() != nil { + return m.GetTfPolicyEvaluation().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetPlans gets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +// returns a Plansable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { + return m.plans +} +// GetTaskStages gets the taskStages property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable +// returns a TaskStagesable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetTaskStages()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable) { + return m.taskStages +} +// GetTfPolicyEvaluation gets the tfPolicyEvaluation property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable +// returns a TfPolicyEvaluationable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetTfPolicyEvaluation()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable) { + return m.tfPolicyEvaluation +} +// GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// returns a Usersable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + return m.users +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *RunsGetResponse_RunsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetCostEstimates() != nil { + err := writer.WriteObjectValue("", m.GetCostEstimates()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetTaskStages() != nil { + err := writer.WriteObjectValue("", m.GetTaskStages()) + if err != nil { + return err + } + } else if m.GetTfPolicyEvaluation() != nil { + err := writer.WriteObjectValue("", m.GetTfPolicyEvaluation()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetApplies sets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +func (m *RunsGetResponse_RunsGetResponse_included) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() { + m.applies = value +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +func (m *RunsGetResponse_RunsGetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetCostEstimates sets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable +func (m *RunsGetResponse_RunsGetResponse_included) SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() { + m.costEstimates = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *RunsGetResponse_RunsGetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} +// SetPlans sets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +func (m *RunsGetResponse_RunsGetResponse_included) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() { + m.plans = value +} +// SetTaskStages sets the taskStages property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable +func (m *RunsGetResponse_RunsGetResponse_included) SetTaskStages(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable)() { + m.taskStages = value +} +// SetTfPolicyEvaluation sets the tfPolicyEvaluation property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable +func (m *RunsGetResponse_RunsGetResponse_included) SetTfPolicyEvaluation(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable)() { + m.tfPolicyEvaluation = value +} +// SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +func (m *RunsGetResponse_RunsGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { + m.users = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +func (m *RunsGetResponse_RunsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +type RunsGetResponse_RunsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) + GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) + GetTaskStages()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable) + GetTfPolicyEvaluation()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable) + GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() + SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() + SetTaskStages(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable)() + SetTfPolicyEvaluation(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable)() + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() +} // NewRunsGetResponse instantiates a new RunsGetResponse and sets the default values. func NewRunsGetResponse()(*RunsGetResponse) { m := &RunsGetResponse{ @@ -60,6 +310,22 @@ func (m *RunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RunsGetResponse_RunsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RunsGetResponse_RunsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +348,11 @@ func (m *RunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []RunsGetResponse_RunsGetResponse_includedable when successful +func (m *RunsGetResponse) GetIncluded()([]RunsGetResponse_RunsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *RunsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +377,18 @@ func (m *RunsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +417,10 @@ func (m *RunsGetResponse) SetAdditionalData(value map[string]any)() { func (m *RunsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *RunsGetResponse) SetIncluded(value []RunsGetResponse_RunsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *RunsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +433,11 @@ type RunsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetIncluded()([]RunsGetResponse_RunsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(RunsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetIncluded(value []RunsGetResponse_RunsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value RunsGetResponse_metaable)() } diff --git a/v2/api/stackconfigurations/item_stack_deployment_groups_get_response.go b/v2/api/stackconfigurations/item_stack_deployment_groups_get_response.go index f76fa353a..06f4e9618 100644 --- a/v2/api/stackconfigurations/item_stack_deployment_groups_get_response.go +++ b/v2/api/stackconfigurations/item_stack_deployment_groups_get_response.go @@ -13,6 +13,8 @@ type ItemStackDeploymentGroupsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemStackDeploymentGroupsGetResponse) GetFieldDeserializers()(map[strin } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackDeploymentGroupSummariesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemStackDeploymentGroupsGetResponse) GetFieldDeserializers()(map[strin } return res } +// GetIncluded gets the included property value. The included property +// returns a []StackDeploymentGroupSummariesable when successful +func (m *ItemStackDeploymentGroupsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemStackDeploymentGroupsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemStackDeploymentGroupsGetResponse) Serialize(writer i878a80d2330e89d return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemStackDeploymentGroupsGetResponse) SetAdditionalData(value map[strin func (m *ItemStackDeploymentGroupsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemStackDeploymentGroupsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemStackDeploymentGroupsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemStackDeploymentGroupsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStackDeploymentGroupsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStackDeploymentGroupsGetResponse_metaable)() } diff --git a/v2/api/stackconfigurations/item_with_stack_escaped_configuration_escaped_get_response.go b/v2/api/stackconfigurations/item_with_stack_escaped_configuration_escaped_get_response.go new file mode 100644 index 000000000..7b05f17ba --- /dev/null +++ b/v2/api/stackconfigurations/item_with_stack_escaped_configuration_escaped_get_response.go @@ -0,0 +1,222 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackconfigurations + +import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemWithStack_configuration_GetResponse struct { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelope + // The included property + included []ItemWithStack_configuration_GetResponse_WithStack_configuration_able +} +// ItemWithStack_configuration_GetResponse_WithStack_configuration_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +type ItemWithStack_configuration_GetResponse_WithStack_configuration_ struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable + stackAggregateOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable + stackConfigurationSummaries i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable + stackDiagnostics i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +} +// NewItemWithStack_configuration_GetResponse_WithStack_configuration_ instantiates a new ItemWithStack_configuration_GetResponse_WithStack_configuration_ and sets the default values. +func NewItemWithStack_configuration_GetResponse_WithStack_configuration_()(*ItemWithStack_configuration_GetResponse_WithStack_configuration_) { + m := &ItemWithStack_configuration_GetResponse_WithStack_configuration_{ + } + return m +} +// CreateItemWithStack_configuration_GetResponse_WithStack_configuration_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithStack_configuration_GetResponse_WithStack_configuration_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithStack_configuration_GetResponse_WithStack_configuration_() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-aggregate-outputs") { + result.SetStackAggregateOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackAggregateOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configuration-summaries") { + result.SetStackConfigurationSummaries(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurationSummaries()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-diagnostics") { + result.SetStackDiagnostics(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDiagnostics()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetStackAggregateOutputs() != nil { + return m.GetStackAggregateOutputs().GetFieldDeserializers() + } else if m.GetStackConfigurationSummaries() != nil { + return m.GetStackConfigurationSummaries().GetFieldDeserializers() + } else if m.GetStackDiagnostics() != nil { + return m.GetStackDiagnostics().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetIsComposedType()(bool) { + return true +} +// GetStackAggregateOutputs gets the stackAggregateOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable +// returns a StackAggregateOutputsable when successful +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetStackAggregateOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) { + return m.stackAggregateOutputs +} +// GetStackConfigurationSummaries gets the stackConfigurationSummaries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable +// returns a StackConfigurationSummariesable when successful +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetStackConfigurationSummaries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) { + return m.stackConfigurationSummaries +} +// GetStackDiagnostics gets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +// returns a StackDiagnosticsable when successful +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) { + return m.stackDiagnostics +} +// Serialize serializes information the current object +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetStackAggregateOutputs() != nil { + err := writer.WriteObjectValue("", m.GetStackAggregateOutputs()) + if err != nil { + return err + } + } else if m.GetStackConfigurationSummaries() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurationSummaries()) + if err != nil { + return err + } + } else if m.GetStackDiagnostics() != nil { + err := writer.WriteObjectValue("", m.GetStackDiagnostics()) + if err != nil { + return err + } + } + return nil +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} +// SetStackAggregateOutputs sets the stackAggregateOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable)() { + m.stackAggregateOutputs = value +} +// SetStackConfigurationSummaries sets the stackConfigurationSummaries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() { + m.stackConfigurationSummaries = value +} +// SetStackDiagnostics sets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() { + m.stackDiagnostics = value +} +type ItemWithStack_configuration_GetResponse_WithStack_configuration_able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + GetStackAggregateOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) + GetStackConfigurationSummaries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) + GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() + SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable)() + SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() + SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() +} +// NewItemWithStack_configuration_GetResponse instantiates a new ItemWithStack_configuration_GetResponse and sets the default values. +func NewItemWithStack_configuration_GetResponse()(*ItemWithStack_configuration_GetResponse) { + m := &ItemWithStack_configuration_GetResponse{ + StackConfigurationsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurationsEnvelope(), + } + return m +} +// CreateItemWithStack_configuration_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithStack_configuration_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithStack_configuration_GetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithStack_configuration_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.StackConfigurationsEnvelope.GetFieldDeserializers() + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithStack_configuration_GetResponse_WithStack_configuration_FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithStack_configuration_GetResponse_WithStack_configuration_able, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithStack_configuration_GetResponse_WithStack_configuration_able) + } + } + m.SetIncluded(res) + } + return nil + } + return res +} +// GetIncluded gets the included property value. The included property +// returns a []ItemWithStack_configuration_GetResponse_WithStack_configuration_able when successful +func (m *ItemWithStack_configuration_GetResponse) GetIncluded()([]ItemWithStack_configuration_GetResponse_WithStack_configuration_able) { + return m.included +} +// Serialize serializes information the current object +func (m *ItemWithStack_configuration_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.StackConfigurationsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil +} +// SetIncluded sets the included property value. The included property +func (m *ItemWithStack_configuration_GetResponse) SetIncluded(value []ItemWithStack_configuration_GetResponse_WithStack_configuration_able)() { + m.included = value +} +type ItemWithStack_configuration_GetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelopeable + GetIncluded()([]ItemWithStack_configuration_GetResponse_WithStack_configuration_able) + SetIncluded(value []ItemWithStack_configuration_GetResponse_WithStack_configuration_able)() +} diff --git a/v2/api/stackconfigurations/with_stack_escaped_configuration_escaped_item_request_builder.go b/v2/api/stackconfigurations/with_stack_escaped_configuration_escaped_item_request_builder.go index 59f4f57a9..91d455181 100644 --- a/v2/api/stackconfigurations/with_stack_escaped_configuration_escaped_item_request_builder.go +++ b/v2/api/stackconfigurations/with_stack_escaped_configuration_escaped_item_request_builder.go @@ -35,9 +35,9 @@ func NewWithStack_configuration_ItemRequestBuilder(rawUrl string, requestAdapter return NewWithStack_configuration_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a stack configuration -// returns a StackConfigurationsEnvelopeable when successful +// returns a ItemWithStack_configuration_GetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithStack_configuration_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithStack_configuration_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelopeable, error) { +func (m *WithStack_configuration_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithStack_configuration_ItemRequestBuilderGetQueryParameters])(ItemWithStack_configuration_GetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -45,14 +45,14 @@ func (m *WithStack_configuration_ItemRequestBuilder) Get(ctx context.Context, re errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackConfigurationsEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithStack_configuration_GetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelopeable), nil + return res.(ItemWithStack_configuration_GetResponseable), nil } // StackDeploymentGroups the stackDeploymentGroups property // returns a *ItemStackDeploymentGroupsRequestBuilder when successful diff --git a/v2/api/stackdeploymentgroups/item_with_stack_escaped_deployment_escaped_group_escaped_get_response.go b/v2/api/stackdeploymentgroups/item_with_stack_escaped_deployment_escaped_group_escaped_get_response.go new file mode 100644 index 000000000..2ed29b1d1 --- /dev/null +++ b/v2/api/stackdeploymentgroups/item_with_stack_escaped_deployment_escaped_group_escaped_get_response.go @@ -0,0 +1,84 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackdeploymentgroups + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemWithStack_deployment_group_GetResponse struct { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsEnvelope + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable +} +// NewItemWithStack_deployment_group_GetResponse instantiates a new ItemWithStack_deployment_group_GetResponse and sets the default values. +func NewItemWithStack_deployment_group_GetResponse()(*ItemWithStack_deployment_group_GetResponse) { + m := &ItemWithStack_deployment_group_GetResponse{ + StackDeploymentGroupsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDeploymentGroupsEnvelope(), + } + return m +} +// CreateItemWithStack_deployment_group_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithStack_deployment_group_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithStack_deployment_group_GetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithStack_deployment_group_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.StackDeploymentGroupsEnvelope.GetFieldDeserializers() + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackDeploymentGroupSummariesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable) + } + } + m.SetIncluded(res) + } + return nil + } + return res +} +// GetIncluded gets the included property value. The included property +// returns a []StackDeploymentGroupSummariesable when successful +func (m *ItemWithStack_deployment_group_GetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable) { + return m.included +} +// Serialize serializes information the current object +func (m *ItemWithStack_deployment_group_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.StackDeploymentGroupsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil +} +// SetIncluded sets the included property value. The included property +func (m *ItemWithStack_deployment_group_GetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable)() { + m.included = value +} +type ItemWithStack_deployment_group_GetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsEnvelopeable + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable) + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupSummariesable)() +} diff --git a/v2/api/stackdeploymentgroups/with_stack_escaped_deployment_escaped_group_escaped_item_request_builder.go b/v2/api/stackdeploymentgroups/with_stack_escaped_deployment_escaped_group_escaped_item_request_builder.go index e717e79ef..771218923 100644 --- a/v2/api/stackdeploymentgroups/with_stack_escaped_deployment_escaped_group_escaped_item_request_builder.go +++ b/v2/api/stackdeploymentgroups/with_stack_escaped_deployment_escaped_group_escaped_item_request_builder.go @@ -40,9 +40,9 @@ func NewWithStack_deployment_group_ItemRequestBuilder(rawUrl string, requestAdap return NewWithStack_deployment_group_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a stack deployment group. -// returns a StackDeploymentGroupsEnvelopeable when successful +// returns a ItemWithStack_deployment_group_GetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithStack_deployment_group_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithStack_deployment_group_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsEnvelopeable, error) { +func (m *WithStack_deployment_group_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithStack_deployment_group_ItemRequestBuilderGetQueryParameters])(ItemWithStack_deployment_group_GetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -50,14 +50,14 @@ func (m *WithStack_deployment_group_ItemRequestBuilder) Get(ctx context.Context, errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackDeploymentGroupsEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithStack_deployment_group_GetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsEnvelopeable), nil + return res.(ItemWithStack_deployment_group_GetResponseable), nil } // Rerun the rerun property // returns a *ItemRerunRequestBuilder when successful diff --git a/v2/api/stacks/item_stack_configurations_get_response.go b/v2/api/stacks/item_stack_configurations_get_response.go index 355bd2fcc..8329d3ba5 100644 --- a/v2/api/stacks/item_stack_configurations_get_response.go +++ b/v2/api/stacks/item_stack_configurations_get_response.go @@ -4,6 +4,7 @@ package stacks import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -12,12 +13,151 @@ type ItemStackConfigurationsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable + // The included property + included []ItemStackConfigurationsGetResponse_StackConfigurationsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemStackConfigurationsGetResponse_metaable } +// ItemStackConfigurationsGetResponse_StackConfigurations composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +type ItemStackConfigurationsGetResponse_StackConfigurations struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable + stackAggregateOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable + stackConfigurationSummaries i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable + stackDiagnostics i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +} +// NewItemStackConfigurationsGetResponse_StackConfigurations instantiates a new ItemStackConfigurationsGetResponse_StackConfigurations and sets the default values. +func NewItemStackConfigurationsGetResponse_StackConfigurations()(*ItemStackConfigurationsGetResponse_StackConfigurations) { + m := &ItemStackConfigurationsGetResponse_StackConfigurations{ + } + return m +} +// CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemStackConfigurationsGetResponse_StackConfigurations() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-aggregate-outputs") { + result.SetStackAggregateOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackAggregateOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configuration-summaries") { + result.SetStackConfigurationSummaries(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurationSummaries()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-diagnostics") { + result.SetStackDiagnostics(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDiagnostics()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetStackAggregateOutputs() != nil { + return m.GetStackAggregateOutputs().GetFieldDeserializers() + } else if m.GetStackConfigurationSummaries() != nil { + return m.GetStackConfigurationSummaries().GetFieldDeserializers() + } else if m.GetStackDiagnostics() != nil { + return m.GetStackDiagnostics().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetIsComposedType()(bool) { + return true +} +// GetStackAggregateOutputs gets the stackAggregateOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable +// returns a StackAggregateOutputsable when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetStackAggregateOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) { + return m.stackAggregateOutputs +} +// GetStackConfigurationSummaries gets the stackConfigurationSummaries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable +// returns a StackConfigurationSummariesable when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetStackConfigurationSummaries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) { + return m.stackConfigurationSummaries +} +// GetStackDiagnostics gets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +// returns a StackDiagnosticsable when successful +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) { + return m.stackDiagnostics +} +// Serialize serializes information the current object +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetStackAggregateOutputs() != nil { + err := writer.WriteObjectValue("", m.GetStackAggregateOutputs()) + if err != nil { + return err + } + } else if m.GetStackConfigurationSummaries() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurationSummaries()) + if err != nil { + return err + } + } else if m.GetStackDiagnostics() != nil { + err := writer.WriteObjectValue("", m.GetStackDiagnostics()) + if err != nil { + return err + } + } + return nil +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} +// SetStackAggregateOutputs sets the stackAggregateOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable)() { + m.stackAggregateOutputs = value +} +// SetStackConfigurationSummaries sets the stackConfigurationSummaries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() { + m.stackConfigurationSummaries = value +} +// SetStackDiagnostics sets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable +func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() { + m.stackDiagnostics = value +} +type ItemStackConfigurationsGetResponse_StackConfigurationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + GetStackAggregateOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) + GetStackConfigurationSummaries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) + GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() + SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable)() + SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() + SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() +} // NewItemStackConfigurationsGetResponse instantiates a new ItemStackConfigurationsGetResponse and sets the default values. func NewItemStackConfigurationsGetResponse()(*ItemStackConfigurationsGetResponse) { m := &ItemStackConfigurationsGetResponse{ @@ -36,8 +176,8 @@ func (m *ItemStackConfigurationsGetResponse) GetAdditionalData()(map[string]any) return m.additionalData } // GetData gets the data property value. The data property -// returns a []StackConfigurationsable when successful -func (m *ItemStackConfigurationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) { +// returns a []ItemStackConfigurationsGetResponse_StackConfigurationsable when successful +func (m *ItemStackConfigurationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,21 +185,37 @@ func (m *ItemStackConfigurationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df4 func (m *ItemStackConfigurationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackConfigurationsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) } } m.SetData(res) } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemStackConfigurationsGetResponse_StackConfigurationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemStackConfigurationsGetResponse_StackConfigurationsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +238,11 @@ func (m *ItemStackConfigurationsGetResponse) GetFieldDeserializers()(map[string] } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemStackConfigurationsGetResponse_StackConfigurationsable when successful +func (m *ItemStackConfigurationsGetResponse) GetIncluded()([]ItemStackConfigurationsGetResponse_StackConfigurationsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemStackConfigurationsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +267,18 @@ func (m *ItemStackConfigurationsGetResponse) Serialize(writer i878a80d2330e89d26 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -131,9 +304,13 @@ func (m *ItemStackConfigurationsGetResponse) SetAdditionalData(value map[string] m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemStackConfigurationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() { +func (m *ItemStackConfigurationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemStackConfigurationsGetResponse) SetIncluded(value []ItemStackConfigurationsGetResponse_StackConfigurationsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemStackConfigurationsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -145,10 +322,12 @@ func (m *ItemStackConfigurationsGetResponse) SetMeta(value ItemStackConfiguratio type ItemStackConfigurationsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) + GetIncluded()([]ItemStackConfigurationsGetResponse_StackConfigurationsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStackConfigurationsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable)() + SetIncluded(value []ItemStackConfigurationsGetResponse_StackConfigurationsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStackConfigurationsGetResponse_metaable)() } diff --git a/v2/api/taskconfigs/item/get_include_query_parameter_type.go b/v2/api/taskconfigs/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..111277b3d --- /dev/null +++ b/v2/api/taskconfigs/item/get_include_query_parameter_type.go @@ -0,0 +1,45 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + TASK_GETINCLUDEQUERYPARAMETERTYPE + OWNER_GETINCLUDEQUERYPARAMETERTYPE + ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"projects", "task", "owner", "organization", "workspaces"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "task": + result = TASK_GETINCLUDEQUERYPARAMETERTYPE + case "owner": + result = OWNER_GETINCLUDEQUERYPARAMETERTYPE + case "organization": + result = ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/taskconfigs/item_with_external_escaped_get_response.go b/v2/api/taskconfigs/item_with_external_escaped_get_response.go new file mode 100644 index 000000000..1af35bc89 --- /dev/null +++ b/v2/api/taskconfigs/item_with_external_escaped_get_response.go @@ -0,0 +1,222 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package taskconfigs + +import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemWithExternal_GetResponse struct { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelope + // The included property + included []ItemWithExternal_GetResponse_WithExternal_able +} +// ItemWithExternal_GetResponse_WithExternal_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +type ItemWithExternal_GetResponse_WithExternal_ struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable + tasks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +} +// NewItemWithExternal_GetResponse_WithExternal_ instantiates a new ItemWithExternal_GetResponse_WithExternal_ and sets the default values. +func NewItemWithExternal_GetResponse_WithExternal_()(*ItemWithExternal_GetResponse_WithExternal_) { + m := &ItemWithExternal_GetResponse_WithExternal_{ + } + return m +} +// CreateItemWithExternal_GetResponse_WithExternal_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithExternal_GetResponse_WithExternal_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithExternal_GetResponse_WithExternal_() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tasks") { + result.SetTasks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemTasksGetResponse_Tasks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithExternal_GetResponse_WithExternal_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetTasks() != nil { + return m.GetTasks().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemWithExternal_GetResponse_WithExternal_) GetIsComposedType()(bool) { + return true +} +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +// returns a OrganizationsGetResponse_Organizationsable when successful +func (m *ItemWithExternal_GetResponse_WithExternal_) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { + return m.organizations +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemWithExternal_GetResponse_WithExternal_) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetTasks gets the tasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable +// returns a ItemTasksGetResponse_Tasksable when successful +func (m *ItemWithExternal_GetResponse_WithExternal_) GetTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) { + return m.tasks +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemWithExternal_GetResponse_WithExternal_) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemWithExternal_GetResponse_WithExternal_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetTasks() != nil { + err := writer.WriteObjectValue("", m.GetTasks()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +func (m *ItemWithExternal_GetResponse_WithExternal_) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { + m.organizations = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemWithExternal_GetResponse_WithExternal_) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetTasks sets the tasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable +func (m *ItemWithExternal_GetResponse_WithExternal_) SetTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable)() { + m.tasks = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +func (m *ItemWithExternal_GetResponse_WithExternal_) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +type ItemWithExternal_GetResponse_WithExternal_able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() +} +// NewItemWithExternal_GetResponse instantiates a new ItemWithExternal_GetResponse and sets the default values. +func NewItemWithExternal_GetResponse()(*ItemWithExternal_GetResponse) { + m := &ItemWithExternal_GetResponse{ + TaskConfigsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskConfigsEnvelope(), + } + return m +} +// CreateItemWithExternal_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithExternal_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithExternal_GetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithExternal_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TaskConfigsEnvelope.GetFieldDeserializers() + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithExternal_GetResponse_WithExternal_FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithExternal_GetResponse_WithExternal_able, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithExternal_GetResponse_WithExternal_able) + } + } + m.SetIncluded(res) + } + return nil + } + return res +} +// GetIncluded gets the included property value. The included property +// returns a []ItemWithExternal_GetResponse_WithExternal_able when successful +func (m *ItemWithExternal_GetResponse) GetIncluded()([]ItemWithExternal_GetResponse_WithExternal_able) { + return m.included +} +// Serialize serializes information the current object +func (m *ItemWithExternal_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TaskConfigsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil +} +// SetIncluded sets the included property value. The included property +func (m *ItemWithExternal_GetResponse) SetIncluded(value []ItemWithExternal_GetResponse_WithExternal_able)() { + m.included = value +} +type ItemWithExternal_GetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelopeable + GetIncluded()([]ItemWithExternal_GetResponse_WithExternal_able) + SetIncluded(value []ItemWithExternal_GetResponse_WithExternal_able)() +} diff --git a/v2/api/taskconfigs/with_external_escaped_item_request_builder.go b/v2/api/taskconfigs/with_external_escaped_item_request_builder.go index c9fb39067..8f841b1e7 100644 --- a/v2/api/taskconfigs/with_external_escaped_item_request_builder.go +++ b/v2/api/taskconfigs/with_external_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i42462dc6584d5465d4564f70e24254d294ef50e2cbf66cf71340733a7ea71be0 "github.com/hashicorp/go-tfe/v2/api/taskconfigs/item" ) // WithExternal_ItemRequestBuilder builds and executes requests for operations under \task-configs\{external_id} @@ -18,12 +19,12 @@ type WithExternal_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for task-configs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldstaskConfigs []string "uriparametername:\"fields%5Btask%2Dconfigs%5D\"" // Allows including related resource data. Value must be a comma-separated list containing one or more of `projects`, `task`, `owner`, or `organization`. - Include *string "uriparametername:\"include\"" + Include []i42462dc6584d5465d4564f70e24254d294ef50e2cbf66cf71340733a7ea71be0.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithExternal_ItemRequestBuilderInternal instantiates a new WithExternal_ItemRequestBuilder and sets the default values. func NewWithExternal_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithExternal_ItemRequestBuilder) { m := &WithExternal_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/task-configs/{external_id}{?fields%5Btask%2Dconfigs%5D,include*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/task-configs/{external_id}{?fields%5Btask%2Dconfigs%5D,include}", pathParameters), } return m } @@ -34,9 +35,9 @@ func NewWithExternal_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7 return NewWithExternal_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a task configuration. -// returns a TaskConfigsEnvelopeable when successful +// returns a ItemWithExternal_GetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithExternal_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithExternal_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelopeable, error) { +func (m *WithExternal_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithExternal_ItemRequestBuilderGetQueryParameters])(ItemWithExternal_GetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -44,14 +45,14 @@ func (m *WithExternal_ItemRequestBuilder) Get(ctx context.Context, requestConfig errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTaskConfigsEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithExternal_GetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelopeable), nil + return res.(ItemWithExternal_GetResponseable), nil } // Patch update a task configuration. // returns a TaskConfigsEnvelopeable when successful diff --git a/v2/api/tasks/item_tasks_get_response.go b/v2/api/tasks/item_tasks_get_response.go new file mode 100644 index 000000000..b24d1012e --- /dev/null +++ b/v2/api/tasks/item_tasks_get_response.go @@ -0,0 +1,178 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package tasks + +import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemTasksGetResponse struct { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelope + // The included property + included []ItemTasksGetResponse_Tasksable +} +// ItemTasksGetResponse_Tasks composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable +type ItemTasksGetResponse_Tasks struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable + workspaceTasks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable +} +// NewItemTasksGetResponse_Tasks instantiates a new ItemTasksGetResponse_Tasks and sets the default values. +func NewItemTasksGetResponse_Tasks()(*ItemTasksGetResponse_Tasks) { + m := &ItemTasksGetResponse_Tasks{ + } + return m +} +// CreateItemTasksGetResponse_TasksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTasksGetResponse_TasksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemTasksGetResponse_Tasks() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-tasks") { + result.SetWorkspaceTasks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceTasks()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTasksGetResponse_Tasks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } else if m.GetWorkspaceTasks() != nil { + return m.GetWorkspaceTasks().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemTasksGetResponse_Tasks) GetIsComposedType()(bool) { + return true +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemTasksGetResponse_Tasks) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// GetWorkspaceTasks gets the workspaceTasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable +// returns a WorkspaceTasksable when successful +func (m *ItemTasksGetResponse_Tasks) GetWorkspaceTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) { + return m.workspaceTasks +} +// Serialize serializes information the current object +func (m *ItemTasksGetResponse_Tasks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } else if m.GetWorkspaceTasks() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceTasks()) + if err != nil { + return err + } + } + return nil +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +func (m *ItemTasksGetResponse_Tasks) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +// SetWorkspaceTasks sets the workspaceTasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable +func (m *ItemTasksGetResponse_Tasks) SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() { + m.workspaceTasks = value +} +type ItemTasksGetResponse_Tasksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + GetWorkspaceTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() +} +// NewItemTasksGetResponse instantiates a new ItemTasksGetResponse and sets the default values. +func NewItemTasksGetResponse()(*ItemTasksGetResponse) { + m := &ItemTasksGetResponse{ + TasksEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTasksEnvelope(), + } + return m +} +// CreateItemTasksGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTasksGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTasksGetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTasksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TasksEnvelope.GetFieldDeserializers() + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemTasksGetResponse_TasksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemTasksGetResponse_Tasksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemTasksGetResponse_Tasksable) + } + } + m.SetIncluded(res) + } + return nil + } + return res +} +// GetIncluded gets the included property value. The included property +// returns a []ItemTasksGetResponse_Tasksable when successful +func (m *ItemTasksGetResponse) GetIncluded()([]ItemTasksGetResponse_Tasksable) { + return m.included +} +// Serialize serializes information the current object +func (m *ItemTasksGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TasksEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil +} +// SetIncluded sets the included property value. The included property +func (m *ItemTasksGetResponse) SetIncluded(value []ItemTasksGetResponse_Tasksable)() { + m.included = value +} +type ItemTasksGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelopeable + GetIncluded()([]ItemTasksGetResponse_Tasksable) + SetIncluded(value []ItemTasksGetResponse_Tasksable)() +} diff --git a/v2/api/tasks/tasks_item_request_builder.go b/v2/api/tasks/tasks_item_request_builder.go index 3c8e9cccc..da81a7005 100644 --- a/v2/api/tasks/tasks_item_request_builder.go +++ b/v2/api/tasks/tasks_item_request_builder.go @@ -51,9 +51,9 @@ func (m *TasksItemRequestBuilder) Delete(ctx context.Context, requestConfigurati return nil } // Get get details about a run task. -// returns a TasksEnvelopeable when successful +// returns a ItemTasksGetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *TasksItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TasksItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelopeable, error) { +func (m *TasksItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TasksItemRequestBuilderGetQueryParameters])(ItemTasksGetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -61,14 +61,14 @@ func (m *TasksItemRequestBuilder) Get(ctx context.Context, requestConfiguration errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTasksEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemTasksGetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelopeable), nil + return res.(ItemTasksGetResponseable), nil } // Patch update a run task. // returns a TasksEnvelopeable when successful diff --git a/v2/api/taskstages/item_with_task_escaped_stage_escaped_get_response.go b/v2/api/taskstages/item_with_task_escaped_stage_escaped_get_response.go new file mode 100644 index 000000000..57e4dc33a --- /dev/null +++ b/v2/api/taskstages/item_with_task_escaped_stage_escaped_get_response.go @@ -0,0 +1,244 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package taskstages + +import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemWithTask_stage_GetResponse struct { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelope + // The included property + included []ItemWithTask_stage_GetResponse_WithTask_stage_able +} +// ItemWithTask_stage_GetResponse_WithTask_stage_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable +type ItemWithTask_stage_GetResponse_WithTask_stage_ struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + costEstimates i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable + policyEvaluations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable + taskResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +} +// NewItemWithTask_stage_GetResponse_WithTask_stage_ instantiates a new ItemWithTask_stage_GetResponse_WithTask_stage_ and sets the default values. +func NewItemWithTask_stage_GetResponse_WithTask_stage_()(*ItemWithTask_stage_GetResponse_WithTask_stage_) { + m := &ItemWithTask_stage_GetResponse_WithTask_stage_{ + } + return m +} +// CreateItemWithTask_stage_GetResponse_WithTask_stage_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithTask_stage_GetResponse_WithTask_stage_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithTask_stage_GetResponse_WithTask_stage_() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { + result.SetCostEstimates(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCostEstimates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policy-evaluations") { + result.SetPolicyEvaluations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPolicyEvaluations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-results") { + result.SetTaskResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil +} +// GetCostEstimates gets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable +// returns a CostEstimatesable when successful +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) { + return m.costEstimates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetCostEstimates() != nil { + return m.GetCostEstimates().GetFieldDeserializers() + } else if m.GetPolicyEvaluations() != nil { + return m.GetPolicyEvaluations().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetTaskResults() != nil { + return m.GetTaskResults().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetIsComposedType()(bool) { + return true +} +// GetPolicyEvaluations gets the policyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable +// returns a PolicyEvaluationsable when successful +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable) { + return m.policyEvaluations +} +// GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +// returns a Runsable when successful +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + return m.runs +} +// GetTaskResults gets the taskResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable +// returns a TaskResultsable when successful +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetTaskResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable) { + return m.taskResults +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// returns a ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCostEstimates() != nil { + err := writer.WriteObjectValue("", m.GetCostEstimates()) + if err != nil { + return err + } + } else if m.GetPolicyEvaluations() != nil { + err := writer.WriteObjectValue("", m.GetPolicyEvaluations()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetTaskResults() != nil { + err := writer.WriteObjectValue("", m.GetTaskResults()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetCostEstimates sets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() { + m.costEstimates = value +} +// SetPolicyEvaluations sets the policyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable)() { + m.policyEvaluations = value +} +// SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { + m.runs = value +} +// SetTaskResults sets the taskResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetTaskResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable)() { + m.taskResults = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { + m.workspaces = value +} +type ItemWithTask_stage_GetResponse_WithTask_stage_able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) + GetPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable) + GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetTaskResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() + SetPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable)() + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetTaskResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() +} +// NewItemWithTask_stage_GetResponse instantiates a new ItemWithTask_stage_GetResponse and sets the default values. +func NewItemWithTask_stage_GetResponse()(*ItemWithTask_stage_GetResponse) { + m := &ItemWithTask_stage_GetResponse{ + TaskStagesEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskStagesEnvelope(), + } + return m +} +// CreateItemWithTask_stage_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithTask_stage_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithTask_stage_GetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithTask_stage_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TaskStagesEnvelope.GetFieldDeserializers() + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithTask_stage_GetResponse_WithTask_stage_FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithTask_stage_GetResponse_WithTask_stage_able, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithTask_stage_GetResponse_WithTask_stage_able) + } + } + m.SetIncluded(res) + } + return nil + } + return res +} +// GetIncluded gets the included property value. The included property +// returns a []ItemWithTask_stage_GetResponse_WithTask_stage_able when successful +func (m *ItemWithTask_stage_GetResponse) GetIncluded()([]ItemWithTask_stage_GetResponse_WithTask_stage_able) { + return m.included +} +// Serialize serializes information the current object +func (m *ItemWithTask_stage_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TaskStagesEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil +} +// SetIncluded sets the included property value. The included property +func (m *ItemWithTask_stage_GetResponse) SetIncluded(value []ItemWithTask_stage_GetResponse_WithTask_stage_able)() { + m.included = value +} +type ItemWithTask_stage_GetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelopeable + GetIncluded()([]ItemWithTask_stage_GetResponse_WithTask_stage_able) + SetIncluded(value []ItemWithTask_stage_GetResponse_WithTask_stage_able)() +} diff --git a/v2/api/taskstages/with_task_escaped_stage_escaped_item_request_builder.go b/v2/api/taskstages/with_task_escaped_stage_escaped_item_request_builder.go index b0253f39f..90b535652 100644 --- a/v2/api/taskstages/with_task_escaped_stage_escaped_item_request_builder.go +++ b/v2/api/taskstages/with_task_escaped_stage_escaped_item_request_builder.go @@ -40,9 +40,9 @@ func NewWithTask_stage_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187 return NewWithTask_stage_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a specific run task stage. -// returns a TaskStagesEnvelopeable when successful +// returns a ItemWithTask_stage_GetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithTask_stage_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithTask_stage_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelopeable, error) { +func (m *WithTask_stage_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithTask_stage_ItemRequestBuilderGetQueryParameters])(ItemWithTask_stage_GetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -50,14 +50,14 @@ func (m *WithTask_stage_ItemRequestBuilder) Get(ctx context.Context, requestConf errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTaskStagesEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithTask_stage_GetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelopeable), nil + return res.(ItemWithTask_stage_GetResponseable), nil } // PolicyEvaluations the policyEvaluations property // returns a *ItemPolicyEvaluationsRequestBuilder when successful diff --git a/v2/api/teams/item_request_builder.go b/v2/api/teams/item_request_builder.go index 1311a1a87..62561433f 100644 --- a/v2/api/teams/item_request_builder.go +++ b/v2/api/teams/item_request_builder.go @@ -58,11 +58,11 @@ func (m *ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i return nil } // Get get details about a team. -// returns a ItemGetResponseable when successful +// returns a TeamsEnvelopeable when successful // returns a Errors error when the service returns a 400 status code // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRequestBuilderGetQueryParameters])(ItemGetResponseable, error) { +func (m *ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamsEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -72,14 +72,14 @@ func (m *ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemGetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTeamsEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemGetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamsEnvelopeable), nil } // NotificationConfigurations the notificationConfigurations property // returns a *ItemNotificationConfigurationsRequestBuilder when successful diff --git a/v2/api/workspaces/item_current_state_version_get_response.go b/v2/api/workspaces/item_current_state_version_get_response.go new file mode 100644 index 000000000..3bc817afd --- /dev/null +++ b/v2/api/workspaces/item_current_state_version_get_response.go @@ -0,0 +1,43 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package workspaces + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemCurrentStateVersionGetResponse struct { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CurrentStateVersionEnvelope +} +// NewItemCurrentStateVersionGetResponse instantiates a new ItemCurrentStateVersionGetResponse and sets the default values. +func NewItemCurrentStateVersionGetResponse()(*ItemCurrentStateVersionGetResponse) { + m := &ItemCurrentStateVersionGetResponse{ + CurrentStateVersionEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCurrentStateVersionEnvelope(), + } + return m +} +// CreateItemCurrentStateVersionGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCurrentStateVersionGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCurrentStateVersionGetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCurrentStateVersionGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CurrentStateVersionEnvelope.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ItemCurrentStateVersionGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CurrentStateVersionEnvelope.Serialize(writer) + if err != nil { + return err + } + return nil +} +type ItemCurrentStateVersionGetResponseable interface { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CurrentStateVersionEnvelopeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/v2/api/workspaces/item_current_state_version_request_builder.go b/v2/api/workspaces/item_current_state_version_request_builder.go index e463577fd..91ad93bbc 100644 --- a/v2/api/workspaces/item_current_state_version_request_builder.go +++ b/v2/api/workspaces/item_current_state_version_request_builder.go @@ -35,10 +35,10 @@ func NewItemCurrentStateVersionRequestBuilder(rawUrl string, requestAdapter i2ae return NewItemCurrentStateVersionRequestBuilderInternal(urlParams, requestAdapter) } // Get get the current state version for a workspace. -// returns a CurrentStateVersionEnvelopeable when successful +// returns a ItemCurrentStateVersionGetResponseable when successful // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *ItemCurrentStateVersionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCurrentStateVersionRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CurrentStateVersionEnvelopeable, error) { +func (m *ItemCurrentStateVersionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCurrentStateVersionRequestBuilderGetQueryParameters])(ItemCurrentStateVersionGetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -47,14 +47,14 @@ func (m *ItemCurrentStateVersionRequestBuilder) Get(ctx context.Context, request "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateCurrentStateVersionEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCurrentStateVersionGetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CurrentStateVersionEnvelopeable), nil + return res.(ItemCurrentStateVersionGetResponseable), nil } // ToGetRequestInformation get the current state version for a workspace. // returns a *RequestInformation when successful diff --git a/v2/api/workspaces/item_provider_sets_get_response.go b/v2/api/workspaces/item_provider_sets_get_response.go index e05649fcc..4198bac85 100644 --- a/v2/api/workspaces/item_provider_sets_get_response.go +++ b/v2/api/workspaces/item_provider_sets_get_response.go @@ -12,7 +12,7 @@ type ItemProviderSetsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemProviderSetsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ProviderSetsable when successful -func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) { +// returns a []ItemProviderSetsGetResponse_ProviderSetsable when successful +func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7 func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemProviderSetsGetResponse) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() { +func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemProviderSetsGetResponse) SetMeta(value ItemProviderSetsGetResponse_ type ItemProviderSetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemProviderSetsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemProviderSetsGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_relationships_remote_state_consumers_get_response.go b/v2/api/workspaces/item_relationships_remote_state_consumers_get_response.go index a222fefdf..c1bfb5c49 100644 --- a/v2/api/workspaces/item_relationships_remote_state_consumers_get_response.go +++ b/v2/api/workspaces/item_relationships_remote_state_consumers_get_response.go @@ -12,7 +12,7 @@ type ItemRelationshipsRemoteStateConsumersGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetAdditionalData()(m return m.additionalData } // GetData gets the data property value. The data property -// returns a []Workspacesable when successful -func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { +// returns a []ItemWorkspacesGetResponse_Workspacesable when successful +func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetData()([]i05d5aa6b func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspacesFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemRelationshipsRemoteStateConsumersGetResponse) SetAdditionalData(val m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemRelationshipsRemoteStateConsumersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { +func (m *ItemRelationshipsRemoteStateConsumersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemRelationshipsRemoteStateConsumersGetResponse) SetMeta(value ItemRel type ItemRelationshipsRemoteStateConsumersGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRelationshipsRemoteStateConsumersGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRelationshipsRemoteStateConsumersGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_with_workspace_escaped_get_response.go b/v2/api/workspaces/item_with_workspace_escaped_get_response.go index f981c43ec..27c352b95 100644 --- a/v2/api/workspaces/item_with_workspace_escaped_get_response.go +++ b/v2/api/workspaces/item_with_workspace_escaped_get_response.go @@ -4,6 +4,7 @@ package workspaces import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -11,95 +12,269 @@ import ( type ItemWithWorkspace_GetResponse struct { i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelope // The included property - included []ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedable + included []ItemWithWorkspace_GetResponse_WithWorkspace_able } -// ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable -type ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included struct { +// ItemWithWorkspace_GetResponse_WithWorkspace_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable +type ItemWithWorkspace_GetResponse_WithWorkspace_ struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + assessmentResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + effectiveTagBindings i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable noCodeModules i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable noCodeModuleVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + stateVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable workspaceOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable workspaceReadme i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable } -// NewItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included instantiates a new ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included and sets the default values. -func NewItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included()(*ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) { - m := &ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included{ +// NewItemWithWorkspace_GetResponse_WithWorkspace_ instantiates a new ItemWithWorkspace_GetResponse_WithWorkspace_ and sets the default values. +func NewItemWithWorkspace_GetResponse_WithWorkspace_()(*ItemWithWorkspace_GetResponse_WithWorkspace_) { + m := &ItemWithWorkspace_GetResponse_WithWorkspace_{ } return m } -// CreateItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemWithWorkspace_GetResponse_WithWorkspace_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included() +func CreateItemWithWorkspace_GetResponse_WithWorkspace_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithWorkspace_GetResponse_WithWorkspace_() if parseNode != nil { - if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateNoCodeModulesFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable); ok { - result.SetNoCodeModules(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateNoCodeModuleVersionsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable); ok { - result.SetNoCodeModuleVersions(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceOutputsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable); ok { - result.SetWorkspaceOutputs(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceReadmeFromDiscriminatorValue); val != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() if err != nil { return nil, err } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable); ok { - result.SetWorkspaceReadme(cast) + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "assessment-results") { + result.SetAssessmentResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAssessmentResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "effective-tag-bindings") { + result.SetEffectiveTagBindings(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEffectiveTagBindings()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-modules") { + result.SetNoCodeModules(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModules()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-module-versions") { + result.SetNoCodeModuleVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModuleVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-versions") { + result.SetStateVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStateVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-outputs") { + result.SetWorkspaceOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-readme") { + result.SetWorkspaceReadme(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceReadme()) + } } } } return result, nil } +// GetAgentPools gets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +// returns a AgentPoolsable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { + return m.agentPools +} +// GetApplies gets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +// returns a Appliesable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { + return m.applies +} +// GetAssessmentResults gets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable +// returns a AssessmentResultsable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) { + return m.assessmentResults +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + return m.configurationVersions +} +// GetEffectiveTagBindings gets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable +// returns a EffectiveTagBindingsable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { + return m.effectiveTagBindings +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetAssessmentResults() != nil { + return m.GetAssessmentResults().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetEffectiveTagBindings() != nil { + return m.GetEffectiveTagBindings().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetNoCodeModules() != nil { + return m.GetNoCodeModules().GetFieldDeserializers() + } else if m.GetNoCodeModuleVersions() != nil { + return m.GetNoCodeModuleVersions().GetFieldDeserializers() + } else if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetStateVersions() != nil { + return m.GetStateVersions().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaceOutputs() != nil { + return m.GetWorkspaceOutputs().GetFieldDeserializers() + } else if m.GetWorkspaceReadme() != nil { + return m.GetWorkspaceReadme().GetFieldDeserializers() + } return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) GetIsComposedType()(bool) { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetIsComposedType()(bool) { return true } // GetNoCodeModules gets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable // returns a NoCodeModulesable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { return m.noCodeModules } // GetNoCodeModuleVersions gets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable // returns a NoCodeModuleVersionsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { return m.noCodeModuleVersions } +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +// returns a OrganizationsGetResponse_Organizationsable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { + return m.organizations +} +// GetPlans gets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +// returns a Plansable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { + return m.plans +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +// returns a Runsable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + return m.runs +} +// GetStateVersions gets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable +// returns a StateVersionsable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) { + return m.stateVersions +} +// GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// returns a Usersable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + return m.users +} +// GetVars gets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +// returns a Varsable when successful +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.vars +} // GetWorkspaceOutputs gets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable // returns a WorkspaceOutputsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { return m.workspaceOutputs } // GetWorkspaceReadme gets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable // returns a WorkspaceReadmeable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { return m.workspaceReadme } // Serialize serializes information the current object -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetNoCodeModules() != nil { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetAssessmentResults() != nil { + err := writer.WriteObjectValue("", m.GetAssessmentResults()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetEffectiveTagBindings() != nil { + err := writer.WriteObjectValue("", m.GetEffectiveTagBindings()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetNoCodeModules() != nil { err := writer.WriteObjectValue("", m.GetNoCodeModules()) if err != nil { return err @@ -109,6 +284,41 @@ func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) Seria if err != nil { return err } + } else if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetStateVersions() != nil { + err := writer.WriteObjectValue("", m.GetStateVersions()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } } else if m.GetWorkspaceOutputs() != nil { err := writer.WriteObjectValue("", m.GetWorkspaceOutputs()) if err != nil { @@ -122,30 +332,108 @@ func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) Seria } return nil } +// SetAgentPools sets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { + m.agentPools = value +} +// SetApplies sets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() { + m.applies = value +} +// SetAssessmentResults sets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() { + m.assessmentResults = value +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetEffectiveTagBindings sets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() { + m.effectiveTagBindings = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} // SetNoCodeModules sets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() { m.noCodeModules = value } // SetNoCodeModuleVersions sets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() { m.noCodeModuleVersions = value } +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { + m.organizations = value +} +// SetPlans sets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() { + m.plans = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { + m.runs = value +} +// SetStateVersions sets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() { + m.stateVersions = value +} +// SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { + m.users = value +} +// SetVars sets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.vars = value +} // SetWorkspaceOutputs sets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() { m.workspaceOutputs = value } // SetWorkspaceReadme sets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_included) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() { +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() { m.workspaceReadme = value } -type ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedable interface { +type ItemWithWorkspace_GetResponse_WithWorkspace_able interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) + GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) + GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) + GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) + GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) + SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() + SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() + SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() + SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() + SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() } @@ -166,15 +454,15 @@ func CreateItemWithWorkspace_GetResponseFromDiscriminatorValue(parseNode i878a80 func (m *ItemWithWorkspace_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.WorkspacesEnvelope.GetFieldDeserializers() res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateItemWithWorkspace_GetResponse_WithWorkspace_FromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedable, len(val)) + res := make([]ItemWithWorkspace_GetResponse_WithWorkspace_able, len(val)) for i, v := range val { if v != nil { - res[i] = v.(ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedable) + res[i] = v.(ItemWithWorkspace_GetResponse_WithWorkspace_able) } } m.SetIncluded(res) @@ -184,8 +472,8 @@ func (m *ItemWithWorkspace_GetResponse) GetFieldDeserializers()(map[string]func( return res } // GetIncluded gets the included property value. The included property -// returns a []ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedable when successful -func (m *ItemWithWorkspace_GetResponse) GetIncluded()([]ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedable) { +// returns a []ItemWithWorkspace_GetResponse_WithWorkspace_able when successful +func (m *ItemWithWorkspace_GetResponse) GetIncluded()([]ItemWithWorkspace_GetResponse_WithWorkspace_able) { return m.included } // Serialize serializes information the current object @@ -209,12 +497,12 @@ func (m *ItemWithWorkspace_GetResponse) Serialize(writer i878a80d2330e89d2689638 return nil } // SetIncluded sets the included property value. The included property -func (m *ItemWithWorkspace_GetResponse) SetIncluded(value []ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedable)() { +func (m *ItemWithWorkspace_GetResponse) SetIncluded(value []ItemWithWorkspace_GetResponse_WithWorkspace_able)() { m.included = value } type ItemWithWorkspace_GetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelopeable - GetIncluded()([]ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedable) - SetIncluded(value []ItemWithWorkspace_GetResponse_WithWorkspace_GetResponse_includedable)() + GetIncluded()([]ItemWithWorkspace_GetResponse_WithWorkspace_able) + SetIncluded(value []ItemWithWorkspace_GetResponse_WithWorkspace_able)() } diff --git a/v2/api/workspacetransfers/item_with_workspace_escaped_transfer_escaped_get_response.go b/v2/api/workspacetransfers/item_with_workspace_escaped_transfer_escaped_get_response.go new file mode 100644 index 000000000..0f25be2fa --- /dev/null +++ b/v2/api/workspacetransfers/item_with_workspace_escaped_transfer_escaped_get_response.go @@ -0,0 +1,84 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package workspacetransfers + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemWithWorkspace_transfer_GetResponse struct { + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersEnvelope + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable +} +// NewItemWithWorkspace_transfer_GetResponse instantiates a new ItemWithWorkspace_transfer_GetResponse and sets the default values. +func NewItemWithWorkspace_transfer_GetResponse()(*ItemWithWorkspace_transfer_GetResponse) { + m := &ItemWithWorkspace_transfer_GetResponse{ + WorkspaceTransfersEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceTransfersEnvelope(), + } + return m +} +// CreateItemWithWorkspace_transfer_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithWorkspace_transfer_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithWorkspace_transfer_GetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithWorkspace_transfer_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WorkspaceTransfersEnvelope.GetFieldDeserializers() + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceTransferEventsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable) + } + } + m.SetIncluded(res) + } + return nil + } + return res +} +// GetIncluded gets the included property value. The included property +// returns a []WorkspaceTransferEventsable when successful +func (m *ItemWithWorkspace_transfer_GetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable) { + return m.included +} +// Serialize serializes information the current object +func (m *ItemWithWorkspace_transfer_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WorkspaceTransfersEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil +} +// SetIncluded sets the included property value. The included property +func (m *ItemWithWorkspace_transfer_GetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable)() { + m.included = value +} +type ItemWithWorkspace_transfer_GetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersEnvelopeable + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable) + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable)() +} diff --git a/v2/api/workspacetransfers/with_workspace_escaped_transfer_escaped_item_request_builder.go b/v2/api/workspacetransfers/with_workspace_escaped_transfer_escaped_item_request_builder.go index 09801bb60..d42c00fbc 100644 --- a/v2/api/workspacetransfers/with_workspace_escaped_transfer_escaped_item_request_builder.go +++ b/v2/api/workspacetransfers/with_workspace_escaped_transfer_escaped_item_request_builder.go @@ -40,10 +40,10 @@ func NewWithWorkspace_transfer_ItemRequestBuilder(rawUrl string, requestAdapter return NewWithWorkspace_transfer_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a workspace transfer. -// returns a WorkspaceTransfersEnvelopeable when successful +// returns a ItemWithWorkspace_transfer_GetResponseable when successful // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithWorkspace_transfer_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithWorkspace_transfer_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersEnvelopeable, error) { +func (m *WithWorkspace_transfer_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithWorkspace_transfer_ItemRequestBuilderGetQueryParameters])(ItemWithWorkspace_transfer_GetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -52,14 +52,14 @@ func (m *WithWorkspace_transfer_ItemRequestBuilder) Get(ctx context.Context, req "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceTransfersEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithWorkspace_transfer_GetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersEnvelopeable), nil + return res.(ItemWithWorkspace_transfer_GetResponseable), nil } // ToGetRequestInformation get details about a workspace transfer. // returns a *RequestInformation when successful diff --git a/v2/openapi/spec.json b/v2/openapi/spec.json index 47c2037ff..8e87ed0e2 100644 --- a/v2/openapi/spec.json +++ b/v2/openapi/spec.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "2af413d3", + "version": "c6179f4d", "title": "HCP Terraform/Terraform Enterprise API v2-Beta", "description": "OpenAPI Specification for the HCP Terraform/Terraform Enterprise API V2 Public Beta.", "license": { @@ -490,6 +490,20 @@ "name": "admin-customization-settings", "x-displayName": "Admin Customization Settings", "description": "Admin customization settings for Terraform Enterprise and HCP Terraform. TFE-only attributes (internal-support-url, internal-documentation-url, internal-tutorials-url, avatar-sources) are available only on Terraform Enterprise.\n" + }, + { + "name": "admin-tfpolicy-versions", + "x-vis": [ + "public-beta", + "tfe" + ], + "x-displayName": "Admin TFPolicy Versions", + "description": "Management of TFPolicy tool versions available for use by site administrators." + }, + { + "name": "admin-general-settings", + "x-displayName": "Admin General Settings", + "description": "Admin general settings for Terraform Enterprise and HCP Terraform. The enable-public-registration attribute is available only on Terraform Enterprise.\n" } ], "paths": { @@ -1610,6 +1624,456 @@ } } }, + "/admin/tfpolicy-versions": { + "x-vis": [ + "public-beta", + "tfe" + ], + "get": { + "operationId": "listAdminTfpolicyVersions", + "summary": "List TFPolicy Versions (Admin)", + "description": "Lists the TFPolicy versions registered on this installation. Requires administrator access.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "tags": [ + "admin-tfpolicy-versions" + ], + "parameters": [ + { + "in": "query", + "name": "sort", + "schema": { + "type": "string", + "enum": [ + "version", + "-version" + ] + }, + "required": false, + "description": "Allows sorting the returned versions by semantic version. Valid values are \"version\" (ascending) and \"-version\" (descending). Defaults to \"-version\" (newest first) when omitted or blank. Any other value returns 400 Bad Request.\n" + }, + { + "in": "query", + "name": "filter[version]", + "schema": { + "type": "string" + }, + "required": false, + "description": "Returns only the TFPolicy version with an exact match on this version string." + }, + { + "in": "query", + "name": "search[version]", + "schema": { + "type": "string" + }, + "required": false, + "description": "Returns TFPolicy versions whose version string fuzzily matches this value (case-insensitive substring match). Ignored if `filter[version]` is also present.\n" + }, + { + "$ref": "#/components/parameters/page_number" + }, + { + "$ref": "#/components/parameters/page_size" + }, + { + "in": "query", + "name": "fields[tfpolicy-versions]", + "description": "Return only the specified fields for tfpolicy-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "TFPolicy versions retrieved successfully.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/admin-tfpolicy-versions-collection-envelope" + } + } + } + }, + "400": { + "description": "The `sort` query parameter has an unsupported value.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + }, + "post": { + "operationId": "createAdminTfpolicyVersion", + "summary": "Create TFPolicy Version (Admin)", + "description": "Registers a new TFPolicy version. Requires administrator access. Provide at least one entry in `archs`, or both top-level `url` and `sha` fields. We recommend using `archs` to specify binary URLs and SHA-256 checksums. If both forms are given and include a linux/amd64 architecture, their `url`/`sha` values must match exactly or the request returns 422 Unprocessable Content. Omitting both `archs` and `url`/`sha` returns 400 Bad Request.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "tags": [ + "admin-tfpolicy-versions" + ], + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/admin-tfpolicy-version-create-envelope" + } + } + } + }, + "responses": { + "201": { + "description": "TFPolicy version created successfully.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/admin-tfpolicy-versions-envelope" + } + } + } + }, + "400": { + "description": "Neither `archs` nor both `url` and `sha` were provided.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "422": { + "description": "Validation failed, e.g. an amd64 arch entry that does not match the top-level `url`/`sha`.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + } + }, + "/admin/tfpolicy-versions/{id}": { + "x-vis": [ + "public-beta", + "tfe" + ], + "get": { + "operationId": "getAdminTfpolicyVersion", + "summary": "Show TFPolicy Version (Admin)", + "description": "Returns a single TFPolicy version by its external ID. Requires administrator access.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "tags": [ + "admin-tfpolicy-versions" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string" + }, + "required": true, + "description": "The external ID of the TFPolicy version (e.g. tool-xxxxxxxxxxxxxxxx)." + }, + { + "in": "query", + "name": "fields[tfpolicy-versions]", + "description": "Return only the specified fields for tfpolicy-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "TFPolicy version retrieved successfully.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/admin-tfpolicy-versions-envelope" + } + } + } + }, + "404": { + "description": "Version not found or client is not authorized.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + }, + "patch": { + "operationId": "updateAdminTfpolicyVersion", + "summary": "Update TFPolicy Version (Admin)", + "description": "Partially updates an existing TFPolicy version. Only attributes present in the request body are modified. Requires administrator access. Setting `enabled` to `false` while the version is in use returns 409 Conflict. Providing `archs` as an empty array returns 422 Unprocessable Content, since a TFPolicy version must always have at least one architecture; omitting `archs` leaves existing architectures unchanged.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "tags": [ + "admin-tfpolicy-versions" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string" + }, + "required": true, + "description": "The external ID of the TFPolicy version (e.g. tool-xxxxxxxxxxxxxxxx)." + } + ], + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/admin-tfpolicy-versions-envelope" + } + } + } + }, + "responses": { + "200": { + "description": "TFPolicy version updated successfully.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/admin-tfpolicy-versions-envelope" + } + } + } + }, + "404": { + "description": "Version not found or client is not authorized.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "409": { + "description": "The version cannot be disabled because it is in use.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "422": { + "description": "Validation failed, e.g. an empty `archs` array or an amd64 arch entry that does not match the top-level `url`/`sha`.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteAdminTfpolicyVersion", + "summary": "Delete TFPolicy Version (Admin)", + "description": "Deletes a TFPolicy version. Official or in-use versions cannot be destroyed. Requires administrator access. Returns 204 No Content on success.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "tags": [ + "admin-tfpolicy-versions" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string" + }, + "required": true, + "description": "The external ID of the TFPolicy version (e.g. tool-xxxxxxxxxxxxxxxx)." + } + ], + "responses": { + "204": { + "description": "TFPolicy version deleted successfully." + }, + "404": { + "description": "Version not found or client is not authorized.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + } + }, + "/admin/general-settings": { + "get": { + "operationId": "getAdminGeneralSettings", + "summary": "Retrieve Admin General Settings", + "description": "Returns the current admin general settings singleton. This endpoint is available to all authenticated users so that the UI can read general settings values for display. The enable-public-registration attribute is only present in the response when running Terraform Enterprise.\n", + "tags": [ + "admin-general-settings" + ], + "responses": { + "200": { + "description": "General settings retrieved successfully.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/admin-general-settings-envelope" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + }, + "parameters": [ + { + "in": "query", + "name": "fields[general-settings]", + "description": "Return only the specified fields for general-settings resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ] + }, + "patch": { + "operationId": "updateAdminGeneralSettings", + "summary": "Update Admin General Settings", + "description": "Updates the admin general settings singleton. Only site administrators may update these settings. Partial updates are supported: only attributes present in the request body are modified. The enable-public-registration attribute is silently ignored when submitted against an HCP Terraform instance.\n", + "tags": [ + "admin-general-settings" + ], + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/admin-general-settings-envelope" + } + } + } + }, + "responses": { + "200": { + "description": "General settings updated successfully.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/admin-general-settings-envelope" + } + } + } + }, + "422": { + "description": "Validation failed. For example, an out-of-range value was submitted.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + } + }, "/account/details": { "get": { "operationId": "getAccountDetails", @@ -3500,6 +3964,9 @@ "$ref": "#/components/schemas/stacks" } }, + "included": { + "$ref": "#/components/schemas/stacks-included" + }, "meta": { "type": "object", "properties": { @@ -4033,6 +4500,9 @@ "$ref": "#/components/schemas/stack-configurations" } }, + "included": { + "$ref": "#/components/schemas/stack-configurations-included" + }, "links": { "$ref": "#/components/schemas/self-with-pagination" }, @@ -4120,7 +4590,19 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/stack-configurations-envelope" + "allOf": [ + { + "$ref": "#/components/schemas/stack-configurations-envelope" + }, + { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/stack-configurations-included" + } + } + } + ] } } } @@ -5356,6 +5838,9 @@ "$ref": "#/components/schemas/stack-deployment-groups" } }, + "included": { + "$ref": "#/components/schemas/stack-deployment-groups-included" + }, "meta": { "type": "object", "properties": { @@ -5505,7 +5990,19 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/stack-deployment-groups-envelope" + "allOf": [ + { + "$ref": "#/components/schemas/stack-deployment-groups-envelope" + }, + { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/stack-deployment-groups-included" + } + } + } + ] } } } @@ -6487,14 +6984,7 @@ "$ref": "#/components/schemas/self-with-pagination" }, "included": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/subscriptions" - } - ] - } + "$ref": "#/components/schemas/organizations-included" } } } @@ -6619,20 +7109,7 @@ "type": "object", "properties": { "included": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/subscriptions" - }, - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/entitlement-sets" - } - ] - } + "$ref": "#/components/schemas/organizations-included" } } } @@ -7631,6 +8108,9 @@ "$ref": "#/components/schemas/recoverable-items" } }, + "included": { + "$ref": "#/components/schemas/recoverable-items-included" + }, "links": { "$ref": "#/components/schemas/self-with-pagination" }, @@ -9153,32 +9633,7 @@ "$ref": "#/components/schemas/self-with-pagination" }, "included": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/no-code-module-versions" - }, - { - "$ref": "#/components/schemas/no-code-modules" - }, - { - "$ref": "#/components/schemas/workspace-readme" - }, - { - "$ref": "#/components/schemas/workspace-outputs" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "no-code-module-versions": "#/components/schemas/no-code-module-versions", - "no-code-modules": "#/components/schemas/no-code-modules", - "workspace-readme": "#/components/schemas/workspace-readme", - "workspace-outputs": "#/components/schemas/workspace-outputs" - } - } - } + "$ref": "#/components/schemas/workspaces-included" } } } @@ -9377,7 +9832,34 @@ "included": { "type": "array", "items": { - "anyOf": [ + "oneOf": [ + { + "$ref": "#/components/schemas/agent-pools" + }, + { + "$ref": "#/components/schemas/assessment-results" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/state-versions" + }, + { + "$ref": "#/components/schemas/users" + }, { "$ref": "#/components/schemas/no-code-module-versions" }, @@ -9385,19 +9867,44 @@ "$ref": "#/components/schemas/no-code-modules" }, { - "$ref": "#/components/schemas/workspace-readme" + "$ref": "#/components/schemas/organizations" }, { "$ref": "#/components/schemas/workspace-outputs" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspace-readme" + }, + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/effective-tag-bindings" } ], "discriminator": { "propertyName": "type", "mapping": { + "agent-pools": "#/components/schemas/agent-pools", + "assessment-results": "#/components/schemas/assessment-results", + "configuration-versions": "#/components/schemas/configuration-versions", + "runs": "#/components/schemas/runs", + "applies": "#/components/schemas/applies", + "plans": "#/components/schemas/plans", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "state-versions": "#/components/schemas/state-versions", + "users": "#/components/schemas/users", "no-code-module-versions": "#/components/schemas/no-code-module-versions", "no-code-modules": "#/components/schemas/no-code-modules", + "organizations": "#/components/schemas/organizations", + "workspace-outputs": "#/components/schemas/workspace-outputs", + "projects": "#/components/schemas/projects", "workspace-readme": "#/components/schemas/workspace-readme", - "workspace-outputs": "#/components/schemas/workspace-outputs" + "vars": "#/components/schemas/vars", + "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" } } } @@ -11302,12 +11809,20 @@ { "in": "query", "name": "include", - "description": "Comma-separated list of related resources to include. Valid values: projects, workspaces.\n", + "style": "form", + "explode": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string", + "enum": [ + "projects", + "workspaces" + ] + } }, "required": false, - "example": "projects,workspaces" + "description": "Comma-separated list of related resources to include." }, { "in": "query", @@ -11329,7 +11844,19 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/provider-sets-envelope" + "allOf": [ + { + "$ref": "#/components/schemas/provider-sets-envelope" + }, + { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/provider-sets-included" + } + } + } + ] } } } @@ -11642,12 +12169,20 @@ { "in": "query", "name": "include", - "description": "Comma-separated list of related resources to include. Valid values: projects, workspaces.\n", + "style": "form", + "explode": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string", + "enum": [ + "projects", + "workspaces" + ] + } }, "required": false, - "example": "projects,workspaces" + "description": "Comma-separated list of related resources to include." }, { "$ref": "#/components/parameters/page_number" @@ -11683,6 +12218,9 @@ "$ref": "#/components/schemas/provider-sets" } }, + "included": { + "$ref": "#/components/schemas/provider-sets-included" + }, "links": { "$ref": "#/components/schemas/self-with-pagination" }, @@ -11859,12 +12397,20 @@ { "in": "query", "name": "include", - "description": "Comma-separated list of related resources to include. Valid values: projects, workspaces.\n", + "style": "form", + "explode": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string", + "enum": [ + "projects", + "workspaces" + ] + } }, "required": false, - "example": "projects,workspaces" + "description": "Comma-separated list of related resources to include." }, { "in": "query", @@ -11886,7 +12432,19 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/provider-sets-envelope" + "allOf": [ + { + "$ref": "#/components/schemas/provider-sets-envelope" + }, + { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/provider-sets-included" + } + } + } + ] } } } @@ -13571,32 +14129,7 @@ "type": "object", "properties": { "included": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/no-code-module-versions" - }, - { - "$ref": "#/components/schemas/no-code-modules" - }, - { - "$ref": "#/components/schemas/workspace-readme" - }, - { - "$ref": "#/components/schemas/workspace-outputs" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "no-code-module-versions": "#/components/schemas/no-code-module-versions", - "no-code-modules": "#/components/schemas/no-code-modules", - "workspace-readme": "#/components/schemas/workspace-readme", - "workspace-outputs": "#/components/schemas/workspace-outputs" - } - } - } + "$ref": "#/components/schemas/workspaces-included" } } } @@ -15154,7 +15687,19 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/current-state-version-envelope" + "allOf": [ + { + "$ref": "#/components/schemas/current-state-version-envelope" + }, + { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/current-state-version-included" + } + } + } + ] } } } @@ -15613,6 +16158,54 @@ } } }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/cost-estimates" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/task-stages" + }, + { + "$ref": "#/components/schemas/tf-policy-evaluation" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "plans": "#/components/schemas/plans", + "applies": "#/components/schemas/applies", + "users": "#/components/schemas/users", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "cost-estimates": "#/components/schemas/cost-estimates", + "workspaces": "#/components/schemas/workspaces", + "task-stages": "#/components/schemas/task-stages", + "tf-policy-evaluations": "#/components/schemas/tf-policy-evaluation" + } + } + } + }, "links": { "$ref": "#/components/schemas/self-with-pagination" } @@ -16437,7 +17030,7 @@ "default": "year" }, "required": false, - "description": "Filter by timeframe. Must be a numeric year or \"year\" for the last 12 months (the default)." + "description": "Filter by timeframe. Must be a numeric year from 2018 through the current calendar year, or \"year\" for the last 12 months (the default)." }, { "$ref": "#/components/parameters/page_number" @@ -17852,7 +18445,13 @@ { "$ref": "#/components/schemas/tf-policy-set-outcome" } - ] + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "tf-policy-set-outcomes": "#/components/schemas/tf-policy-set-outcome" + } + } } } } @@ -23576,7 +24175,7 @@ "included": { "type": "array", "items": { - "anyOf": [ + "oneOf": [ { "$ref": "#/components/schemas/users" }, @@ -23768,36 +24367,7 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/teams-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/organization-memberships" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "users": "#/components/schemas/users", - "organization-memberships": "#/components/schemas/organization-memberships" - } - } - } - } - } - } - ] + "$ref": "#/components/schemas/teams-envelope" } } } @@ -25771,6 +26341,9 @@ "$ref": "#/components/schemas/vcs-events" } }, + "included": { + "$ref": "#/components/schemas/vcs-events-included" + }, "meta": { "type": "object", "properties": { @@ -28596,7 +29169,19 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/tasks-envelope" + "allOf": [ + { + "$ref": "#/components/schemas/tasks-envelope" + }, + { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/tasks-included" + } + } + } + ] } } } @@ -28769,6 +29354,9 @@ "$ref": "#/components/schemas/tasks" } }, + "included": { + "$ref": "#/components/schemas/tasks-included" + }, "meta": { "type": "object", "properties": { @@ -28951,8 +29539,20 @@ { "in": "query", "name": "include", + "style": "form", + "explode": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string", + "enum": [ + "projects", + "task", + "owner", + "organization", + "workspaces" + ] + } }, "required": false, "description": "Allows including related resource data. Value must be a comma-separated list containing one or more of `projects`, `task`, `owner`, or `organization`.\n" @@ -28977,7 +29577,19 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/task-configs-envelope" + "allOf": [ + { + "$ref": "#/components/schemas/task-configs-envelope" + }, + { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/task-configs-included" + } + } + } + ] } } } @@ -29658,7 +30270,19 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/task-stages-envelope" + "allOf": [ + { + "$ref": "#/components/schemas/task-stages-envelope" + }, + { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/task-stages-included" + } + } + } + ] } } } @@ -30329,7 +30953,19 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/workspace-transfers-envelope" + "allOf": [ + { + "$ref": "#/components/schemas/workspace-transfers-envelope" + }, + { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/workspace-transfers-included" + } + } + } + ] } } } @@ -32594,6 +33230,387 @@ } } }, + "admin-tfpolicy-version-architecture": { + "type": "object", + "required": [ + "url", + "sha", + "os", + "arch" + ], + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Download URL for this platform/architecture's binary." + }, + "sha": { + "type": "string", + "pattern": "^[a-f0-9]{64}$", + "description": "SHA-256 checksum (64 lowercase hex characters) of the binary at `url`." + }, + "os": { + "type": "string", + "enum": [ + "linux" + ], + "description": "Operating system for this architecture. Currently only \"linux\" is supported." + }, + "arch": { + "type": "string", + "enum": [ + "amd64", + "arm64", + "s390x" + ], + "description": "CPU architecture." + } + } + }, + "admin-tfpolicy-versions": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "The external ID of the TFPolicy version (e.g. tool-xxxxxxxxxxxxxxxx)." + }, + "type": { + "type": "string", + "enum": [ + "tfpolicy-versions" + ] + }, + "attributes": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "The semantic version string for this TFPolicy release (e.g. \"0.1.0\"). Must be unique among TFPolicy versions.\n" + }, + "url": { + "type": "string", + "format": "uri", + "nullable": true, + "deprecated": true, + "description": "The URL where you can download the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].url` field instead. Null when no linux/amd64 architecture has been registered for this version (e.g. an arm64-only release). On create, either `url` and `sha` or at least one entry in `archs` must be provided. If both are given, the linux/amd64 entry in `archs` (when present) must match `url`/`sha` exactly, or the request is rejected with 422 Unprocessable Content.\n" + }, + "sha": { + "type": "string", + "pattern": "^[a-f0-9]{64}$", + "nullable": true, + "deprecated": true, + "description": "The SHA-256 checksum of the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].sha` field instead. Null under the same conditions as `url`.\n" + }, + "official": { + "type": "boolean", + "description": "Whether this is an official HashiCorp-published release." + }, + "enabled": { + "type": "boolean", + "description": "Whether this version can be selected for use. Attempting to set `enabled` to `false` while the version is in use returns 409 Conflict.\n" + }, + "beta": { + "type": "boolean", + "description": "Whether this version is a beta/pre-release." + }, + "deprecated": { + "type": "boolean", + "description": "Whether this version is deprecated. On update (`PATCH`), when set to `true` without a `deprecated-reason` in the same request, the server fills in a default reason referencing the current version. This default does not apply on create.\n" + }, + "deprecated-reason": { + "type": "string", + "nullable": true, + "description": "Explanation shown to users when `deprecated` is `true`." + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "The timestamp when this version was created." + }, + "archs": { + "type": "array", + "description": "The set of platform/architecture builds available for this version. On create, either at least one entry here or the top-level `url`/`sha` pair must be provided. On update, providing `archs` replaces the full set of architectures for this version; omitting it leaves existing architectures unchanged, while providing an empty array is rejected with 422 Unprocessable Content (a TFPolicy version must always have at least one architecture).\n", + "items": { + "$ref": "#/components/schemas/admin-tfpolicy-version-architecture" + } + }, + "permissions": { + "type": "object", + "readOnly": true, + "description": "The current user's permissions for this TFPolicy version, when included.", + "properties": { + "can-read": { + "type": "boolean" + }, + "can-update": { + "type": "boolean" + } + } + } + } + } + } + }, + "pagination": { + "type": "object", + "properties": { + "current-page": { + "type": "integer" + }, + "page-size": { + "type": "integer" + }, + "prev-page": { + "type": "integer", + "nullable": true + }, + "next-page": { + "type": "integer", + "nullable": true + }, + "total-pages": { + "type": "integer" + }, + "total-count": { + "type": "integer" + } + } + }, + "self-with-pagination": { + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "first": { + "type": "string" + }, + "prev": { + "type": "string", + "nullable": true + }, + "next": { + "type": "string", + "nullable": true + }, + "last": { + "type": "string" + } + } + }, + "admin-tfpolicy-versions-collection-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/admin-tfpolicy-versions" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/pagination" + } + } + }, + "links": { + "$ref": "#/components/schemas/self-with-pagination" + } + } + }, + "admin-tfpolicy-version-create": { + "allOf": [ + { + "$ref": "#/components/schemas/admin-tfpolicy-versions" + }, + { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + } + } + } + } + ] + }, + "admin-tfpolicy-version-create-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/admin-tfpolicy-version-create" + } + } + }, + "admin-tfpolicy-versions-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/admin-tfpolicy-versions" + } + } + }, + "admin-general-settings": { + "type": "object", + "required": [ + "type", + "id", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Always \"general\"." + }, + "type": { + "type": "string", + "enum": [ + "general-settings" + ] + }, + "attributes": { + "type": "object", + "properties": { + "require-two-factor-for-admins": { + "type": "boolean", + "description": "Whether two-factor authentication is required for site administrators." + }, + "limit-user-organization-creation": { + "type": "boolean", + "description": "Whether the creation of new organizations is limited to site administrators." + }, + "api-rate-limiting-enabled": { + "type": "boolean", + "description": "Whether API rate limiting is enabled." + }, + "api-rate-limit": { + "type": "integer", + "description": "The number of API requests allowed per second, per user token or IP address." + }, + "agent-polling-retry-after": { + "type": "integer", + "description": "The number of seconds agents wait before polling for new work." + }, + "agents-enabled": { + "type": "boolean", + "description": "Whether HCP Terraform agents are enabled." + }, + "fair-run-queuing-enabled": { + "type": "boolean", + "readOnly": true, + "description": "Deprecated. Always returns false. Retained for backwards compatibility with the public API contract.\n" + }, + "limit-organizations-per-user": { + "type": "boolean", + "description": "Whether the number of organizations a user may create is limited." + }, + "default-organizations-per-user-ceiling": { + "type": "integer", + "description": "The default maximum number of organizations a single user may create." + }, + "limit-workspaces-per-organization": { + "type": "boolean", + "description": "Whether the number of workspaces per organization is limited." + }, + "default-workspaces-per-organization-ceiling": { + "type": "integer", + "description": "The default maximum number of workspaces per organization." + }, + "terraform-build-worker-apply-timeout": { + "type": "string", + "description": "The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string (for example, \"24h\").\n" + }, + "terraform-build-worker-plan-timeout": { + "type": "string", + "description": "The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string (for example, \"24h\").\n" + }, + "apply-timeout": { + "type": "string", + "description": "Alias of terraform-build-worker-apply-timeout. The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string.\n" + }, + "plan-timeout": { + "type": "string", + "description": "Alias of terraform-build-worker-plan-timeout. The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string.\n" + }, + "send-passing-statuses-for-untriggered-speculative-plans": { + "type": "boolean", + "description": "Whether passing commit statuses are sent for untriggered speculative plans.\n" + }, + "allow-speculative-plans-on-pull-requests-from-forks": { + "type": "boolean", + "description": "Whether speculative plans are allowed on pull requests originating from forked repositories.\n" + }, + "default-remote-state-access": { + "type": "boolean", + "description": "Whether new workspaces allow global remote state access by default.\n" + }, + "automatic-assessment-interval": { + "type": "integer", + "description": "The interval, in hours, at which automatic health assessments run.\n" + }, + "maximum-concurrent-assessments": { + "type": "integer", + "description": "The maximum number of health assessments that may run concurrently." + }, + "stacks-entitled": { + "type": "boolean", + "readOnly": true, + "description": "Whether the instance is licensed to use stacks." + }, + "stacks-enabled": { + "type": "boolean", + "x-vis": [ + "tfe" + ], + "description": "Whether stacks are enabled for use in this instance.\n\nThis attribute is only available in Terraform Enterprise." + }, + "enable-public-registration": { + "type": "boolean", + "x-vis": [ + "tfe" + ], + "description": "Whether public (self-service) user registration is enabled. Available only on Terraform Enterprise; silently ignored on HCP Terraform.\n\n\nThis attribute is only available in Terraform Enterprise." + } + } + } + } + }, + "admin-general-settings-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/admin-general-settings" + } + } + }, "authenticated-resource-identifier": { "type": "object", "required": [ @@ -33175,53 +34192,6 @@ "attributes" ] }, - "self-with-pagination": { - "type": "object", - "properties": { - "self": { - "type": "string" - }, - "first": { - "type": "string" - }, - "prev": { - "type": "string", - "nullable": true - }, - "next": { - "type": "string", - "nullable": true - }, - "last": { - "type": "string" - } - } - }, - "pagination": { - "type": "object", - "properties": { - "current-page": { - "type": "integer" - }, - "page-size": { - "type": "integer" - }, - "prev-page": { - "type": "integer", - "nullable": true - }, - "next-page": { - "type": "integer", - "nullable": true - }, - "total-pages": { - "type": "integer" - }, - "total-count": { - "type": "integer" - } - } - }, "organizations-identifier": { "type": "object", "required": [ @@ -34156,18 +35126,7 @@ } } }, - "stacks-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/stacks" - } - } - }, - "stack-configuration-summaries": { + "projects": { "type": "object", "required": [ "type", @@ -34175,101 +35134,182 @@ ], "properties": { "id": { - "type": "string", - "readOnly": true + "type": "string" }, "type": { "type": "string", - "readOnly": true, "enum": [ - "stack-configuration-summaries" + "projects" ] }, "attributes": { "type": "object", "properties": { - "status": { + "name": { + "type": "string" + }, + "description": { "type": "string", - "enum": [ - "pending", - "queued", - "preparing", - "completed", - "failed" - ], - "readOnly": true + "nullable": true }, - "sequence-number": { - "type": "integer", + "created-at": { + "type": "string", + "format": "date-time", "readOnly": true }, - "stack-deployment-group-status-summary": { + "auto-destroy-activity-duration": { + "type": "string", + "nullable": true + }, + "default-execution-mode": { + "type": "string", + "enum": [ + "remote", + "local", + "agent" + ] + }, + "stacks-default-execution-mode": { + "type": "string", + "enum": [ + "remote", + "agent" + ] + }, + "setting-overwrites": { "type": "object", - "description": "Contains a count of the number of deployment groups in each state.", "properties": { - "pending": { - "type": "integer" - }, - "pre-deploying": { - "type": "integer" - }, - "deploying": { - "type": "integer" + "default-execution-mode": { + "type": "boolean" }, - "succeeded": { - "type": "integer" + "default-agent-pool": { + "type": "boolean" }, - "failed": { - "type": "integer" + "stacks-default-execution-mode": { + "type": "boolean" }, - "abandoned": { - "type": "integer" + "stacks-default-agent-pool": { + "type": "boolean" } } }, - "stack-deployment-run-status-summary": { + "permissions": { "type": "object", - "description": "Contains a count of the number of deployment runs in each state.", + "nullable": true, "properties": { - "pending": { - "type": "integer" + "can-read": { + "type": "boolean" }, - "pending-capacity": { - "type": "integer" + "can-update": { + "type": "boolean" }, - "pre-deploying": { - "type": "integer" + "can-destroy": { + "type": "boolean" }, - "pre-deploying-pending-operator": { - "type": "integer" + "can-create-workspace": { + "type": "boolean" }, - "acquiring-lock": { - "type": "integer" + "can-move-workspace": { + "type": "boolean" }, - "deploying": { - "type": "integer" + "can-move-stack": { + "type": "boolean" }, - "deploying-pending-operator": { - "type": "integer" + "can-manage-stacks": { + "type": "boolean" }, - "succeeded": { - "type": "integer" + "can-view-stacks": { + "type": "boolean" }, - "failed": { - "type": "integer" + "can-update-stacks": { + "type": "boolean" }, - "abandoned": { - "type": "integer" + "can-deploy-no-code-modules": { + "type": "boolean" + }, + "can-read-teams": { + "type": "boolean" + }, + "can-manage-tags": { + "type": "boolean" + }, + "can-manage-teams": { + "type": "boolean" + }, + "can-manage-in-hcp": { + "type": "boolean", + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." + }, + "can-manage-varsets": { + "type": "boolean" + }, + "can-manage-ephemeral-workspace-for-projects": { + "type": "boolean" } } + }, + "workspace-count": { + "type": "integer", + "nullable": true + }, + "team-count": { + "type": "integer", + "nullable": true + }, + "hcp-id": { + "type": "string", + "nullable": true, + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." + }, + "is-unified": { + "type": "boolean", + "nullable": true, + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." } } }, "relationships": { "type": "object", "properties": { - "stack-configuration": { - "$ref": "#/components/schemas/stack-configurations-has-one" + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "tag-bindings": { + "type": "object", + "nullable": true, + "properties": { + "links": { + "type": "object", + "properties": { + "related": { + "type": "string" + } + } + } + } + }, + "default-agent-pool": { + "$ref": "#/components/schemas/agent-pools-has-one" + }, + "stacks-default-agent-pool": { + "$ref": "#/components/schemas/agent-pools-has-one" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" } } } @@ -34507,124 +35547,6 @@ } } }, - "stack-configurations-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/stack-configurations" - } - } - }, - "stack-deployments": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "readOnly": true, - "enum": [ - "stack-deployments" - ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" - }, - "stack-deployment-runs": { - "type": "string" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "stack": { - "$ref": "#/components/schemas/stacks-has-one" - } - } - } - } - }, - "stack-deployment-groups-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "stack-deployment-groups" - ] - } - } - }, - "stack-deployment-groups-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/stack-deployment-groups-identifier" - } - ], - "nullable": true - } - } - }, - "stack-approvals-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "stack-approvals" - ] - } - } - }, - "stack-approvals-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/stack-approvals-identifier" - } - ], - "nullable": true - } - } - }, "stack-deployment-steps-identifier": { "type": "object", "required": [ @@ -34657,40 +35579,7 @@ } } }, - "stack-deployment-runs-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "stack-deployment-runs", - "stack-states" - ] - } - } - }, - "stack-deployment-runs-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/stack-deployment-runs-identifier" - } - ], - "nullable": true - } - } - }, - "stack-deployment-runs": { + "stack-diagnostics": { "type": "object", "required": [ "type", @@ -34705,107 +35594,46 @@ "type": "string", "readOnly": true, "enum": [ - "stack-deployment-runs" + "stack-diagnostics" ] }, "attributes": { "type": "object", "properties": { - "plan-mode": { - "type": "string", - "enum": [ - "normal", - "destroy", - "import" - ], - "readOnly": true - }, - "deployment": { - "type": "string", - "readOnly": true - }, - "status": { + "severity": { "type": "string", "enum": [ - "pending", - "pending-capacity", - "pre-deploying", - "pre-deploying-pending-operator", - "acquiring-lock", - "deploying", - "deploying-pending-operator", - "succeeded", - "failed", - "abandoned" + "warning", + "error" ], "readOnly": true }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "pre-deploying-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "pre-deploying-pending-operator-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "pending-capacity-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "acquiring-lock-at": { + "summary": { "type": "string", - "format": "date-time", - "nullable": true, "readOnly": true }, - "deploying-at": { + "detail": { "type": "string", - "format": "date-time", - "nullable": true, "readOnly": true }, - "deploying-pending-operator-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true + "diags": { + "type": "array", + "readOnly": true, + "nullable": true }, - "succeeded-at": { - "type": "string", - "format": "date-time", - "nullable": true, + "acknowledged": { + "type": "boolean", "readOnly": true }, - "failed-at": { + "acknowledged-at": { "type": "string", "format": "date-time", - "nullable": true, - "readOnly": true + "readOnly": true, + "nullable": true }, - "abandoned-at": { + "created-at": { "type": "string", "format": "date-time", - "nullable": true, - "readOnly": true - }, - "eligible-for-rerun": { - "type": "boolean", "readOnly": true } } @@ -34816,203 +35644,52 @@ "relationships": { "type": "object", "properties": { - "stack-deployment-steps": { - "$ref": "#/components/schemas/links_related" - }, - "stack-deployment-group": { - "$ref": "#/components/schemas/stack-deployment-groups-has-one" - }, "stack-configuration": { "$ref": "#/components/schemas/stack-configurations-has-one" }, - "destroy-stack-configuration": { - "$ref": "#/components/schemas/stack-configurations-has-one" - }, - "stack-approval": { - "$ref": "#/components/schemas/stack-approvals-has-one" - }, - "current-step": { + "stack-deployment-step": { "$ref": "#/components/schemas/stack-deployment-steps-has-one" - }, - "blocked-by-deployment-group": { - "$ref": "#/components/schemas/stack-deployment-groups-has-one" - }, - "latest-deployment-run-for-deployment": { - "$ref": "#/components/schemas/stack-deployment-runs-has-one" - }, - "rollbacked-state": { - "$ref": "#/components/schemas/stack-deployment-runs-has-one" - } - } - } - } - }, - "stack-states": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "readOnly": true, - "enum": [ - "stack-states" - ] - }, - "attributes": { - "type": "object", - "required": [ - "deployment" - ], - "properties": { - "generation": { - "type": "integer", - "nullable": true, - "readOnly": true - }, - "deployment": { - "type": "string" - }, - "status": { - "type": "string", - "readOnly": true, - "enum": [ - "created", - "stored", - "completed", - "discarded" - ] - }, - "components": { - "type": "array", - "nullable": true, - "readOnly": true, - "items": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "component-address": { - "type": "string" - }, - "instance-correlator": { - "type": "string" - }, - "component-correlator": { - "type": "string" - }, - "resource-instance-count": { - "type": "integer" - } - } - } - }, - "is-current": { - "type": "boolean", - "readOnly": true - }, - "resource-instance-count": { - "type": "integer", - "nullable": true, - "readOnly": true - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "stack": { - "$ref": "#/components/schemas/stacks-has-one" - }, - "stack-deployment-run": { - "$ref": "#/components/schemas/stack-deployment-runs-has-one" } } } } }, - "stack-output-consumers": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "readOnly": true, - "enum": [ - "stack-output-consumers" - ] - }, - "attributes": { - "type": "object", - "properties": { - "deployment": { - "type": "string", - "readOnly": true - }, - "upstream-publish-output-address": { - "type": "string", - "readOnly": true - }, - "stack-name": { - "type": "string", - "readOnly": true - }, - "upstream-name": { - "type": "string", - "readOnly": true - } + "stacks-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/stack-configurations" + }, + { + "$ref": "#/components/schemas/stack-diagnostics" } - }, - "relationships": { - "type": "object", - "properties": { - "stack": { - "$ref": "#/components/schemas/stacks-has-one" - }, - "upstream-stack": { - "$ref": "#/components/schemas/stacks-has-one" - } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "stack-configurations": "#/components/schemas/stack-configurations", + "stack-diagnostics": "#/components/schemas/stack-diagnostics" } } } }, - "stack-states-envelope": { + "stacks-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/stack-states" + "$ref": "#/components/schemas/stacks" } } }, - "stack-deployment-group-summaries": { + "stack-configuration-summaries": { "type": "object", "required": [ "type", @@ -35027,54 +35704,40 @@ "type": "string", "readOnly": true, "enum": [ - "stack-deployment-group-summaries" + "stack-configuration-summaries" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string", - "nullable": true, - "readOnly": true - }, "status": { "type": "string", "enum": [ "pending", - "pre-deploying", - "deploying", - "abandoned", - "succeeded", + "queued", + "preparing", + "completed", "failed" ], "readOnly": true }, - "stack-deployment-run-status-summary": { + "sequence-number": { + "type": "integer", + "readOnly": true + }, + "stack-deployment-group-status-summary": { "type": "object", - "description": "Contains a count of the number of deployment runs in each state.", + "description": "Contains a count of the number of deployment groups in each state.", "properties": { "pending": { "type": "integer" }, - "pending-capacity": { - "type": "integer" - }, "pre-deploying": { "type": "integer" }, - "pre-deploying-pending-operator": { - "type": "integer" - }, - "acquiring-lock": { - "type": "integer" - }, "deploying": { "type": "integer" }, - "deploying-pending-operator": { - "type": "integer" - }, "succeeded": { "type": "integer" }, @@ -35086,9 +35749,9 @@ } } }, - "status-counts": { + "stack-deployment-run-status-summary": { "type": "object", - "description": "Deprecated alias for stack-deployment-run-status-summary.", + "description": "Contains a count of the number of deployment runs in each state.", "properties": { "pending": { "type": "integer" @@ -35127,14 +35790,37 @@ "relationships": { "type": "object", "properties": { - "stack-deployment-group": { - "$ref": "#/components/schemas/stack-deployment-groups-has-one" + "stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" } } } } }, - "stack-diagnostics": { + "users-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "users" + ] + } + } + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "ingress-attributes": { "type": "object", "required": [ "type", @@ -35147,69 +35833,81 @@ }, "type": { "type": "string", - "readOnly": true, "enum": [ - "stack-diagnostics" + "ingress-attributes" ] }, "attributes": { "type": "object", "properties": { - "severity": { - "type": "string", - "enum": [ - "warning", - "error" - ], - "readOnly": true + "branch": { + "type": "string" }, - "summary": { - "type": "string", - "readOnly": true + "clone-url": { + "type": "string" }, - "detail": { - "type": "string", - "readOnly": true + "commit-message": { + "type": "string" }, - "diags": { - "type": "array", - "readOnly": true, - "nullable": true + "commit-sha": { + "type": "string" }, - "acknowledged": { - "type": "boolean", - "readOnly": true + "commit-url": { + "type": "string" }, - "acknowledged-at": { + "compare-url": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "is-pull-request": { + "type": "boolean" + }, + "on-default-branch": { + "type": "boolean" + }, + "pull-request-number": { + "type": "integer" + }, + "pull-request-url": { + "type": "string" + }, + "pull-request-title": { + "type": "string" + }, + "pull-request-body": { + "type": "string" + }, + "tag": { "type": "string", - "format": "date-time", - "readOnly": true, "nullable": true }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true + "sender-username": { + "type": "string" + }, + "sender-avatar-url": { + "type": "string" + }, + "sender-html-url": { + "type": "string" } } }, - "links": { - "$ref": "#/components/schemas/self" - }, "relationships": { "type": "object", "properties": { - "stack-configuration": { - "$ref": "#/components/schemas/stack-configurations-has-one" - }, - "stack-deployment-step": { - "$ref": "#/components/schemas/stack-deployment-steps-has-one" + "created-by": { + "$ref": "#/components/schemas/users-has-one" } } + }, + "links": { + "$ref": "#/components/schemas/self" } } }, - "stack-published-outputs": { + "stack-aggregate-outputs": { "type": "object", "required": [ "type", @@ -35224,100 +35922,115 @@ "type": "string", "readOnly": true, "enum": [ - "stack-published-outputs" + "stack-aggregate-outputs" ] }, "attributes": { "type": "object", "properties": { - "name": { + "status": { "type": "string", + "enum": [ + "created", + "queued", + "running", + "completed", + "failed", + "canceled" + ], "readOnly": true }, - "action": { + "published-output-count": { + "type": "integer", + "readOnly": true + }, + "created-at": { "type": "string", - "nullable": true, + "format": "date-time", "readOnly": true }, - "current-value": { + "updated-at": { "type": "string", - "nullable": true, + "format": "date-time", "readOnly": true }, - "previous-value": { + "running-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "queued-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "completed-at": { "type": "string", + "format": "date-time", "nullable": true, "readOnly": true }, - "source-range": { + "failed-at": { "type": "string", + "format": "date-time", + "nullable": true, "readOnly": true } } }, - "links": { + "relationships": { "type": "object", "properties": { - "self": { - "type": "string" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "stack-aggregate-output": { - "$ref": "#/components/schemas/stack-aggregate-outputs-has-one" - }, - "stack-configuration": { - "$ref": "#/components/schemas/stack-configurations-has-one" + "stack-published-outputs": { + "$ref": "#/components/schemas/links_related" + }, + "stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" } } } } }, - "stack-approvals-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/stack-approvals-identifier" + "stack-configurations-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/stack-configuration-summaries" + }, + { + "$ref": "#/components/schemas/stack-diagnostics" + }, + { + "$ref": "#/components/schemas/stack-aggregate-outputs" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ingress-attributes": "#/components/schemas/ingress-attributes", + "stack-configuration-summaries": "#/components/schemas/stack-configuration-summaries", + "stack-diagnostics": "#/components/schemas/stack-diagnostics", + "stack-aggregate-outputs": "#/components/schemas/stack-aggregate-outputs" } } } }, - "stack-deployment-group-summaries-identifier": { + "stack-configurations-envelope": { "type": "object", "required": [ - "id", - "type" + "data" ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "stack-deployment-group-summaries" - ] - } - } - }, - "stack-deployment-group-summaries-has-one": { - "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/stack-deployment-group-summaries-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" + "$ref": "#/components/schemas/stack-configurations" } } }, - "stack-deployment-groups": { + "stack-deployments": { "type": "object", "required": [ "type", @@ -35332,94 +36045,14 @@ "type": "string", "readOnly": true, "enum": [ - "stack-deployment-groups" + "stack-deployments" ] }, "attributes": { "type": "object", "properties": { "name": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "status": { - "type": "string", - "enum": [ - "pending", - "pre-deploying", - "deploying", - "succeeded", - "failed", - "abandoned" - ], - "readOnly": true - }, - "deployment-group-config": { - "type": "object", - "readOnly": true, - "properties": { - "auto-approve-checks": { - "type": "array", - "items": { - "type": "string" - } - }, - "eager-plan": { - "type": "string", - "readOnly": true - }, - "failure-tolerance": { - "type": "integer", - "nullable": true, - "readOnly": true - }, - "custom": { - "type": "boolean", - "nullable": true, - "readOnly": true - } - } - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "pre-deploying-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "deploying-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "succeeded-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "failed-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "abandoned-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true + "type": "string" } } }, @@ -35429,7 +36062,7 @@ "self": { "type": "string" }, - "stack-deployment-group-summaries": { + "stack-deployment-runs": { "type": "string" } } @@ -35437,60 +36070,74 @@ "relationships": { "type": "object", "properties": { - "stack-configuration": { - "$ref": "#/components/schemas/stack-configurations-has-one" - }, - "stack-approvals": { - "$ref": "#/components/schemas/stack-approvals-has-many" - }, - "stack-deployment-runs": { - "$ref": "#/components/schemas/links_related" - }, - "stack-deployment-group-summary": { - "description": "Contains summed status counts for the the deployment runs in this group.", - "$ref": "#/components/schemas/stack-deployment-group-summaries-has-one" - }, - "run-status-summaries": { - "description": "Deprecated alias for stack-deployment-group-summary.", - "$ref": "#/components/schemas/stack-deployment-group-summaries-has-one" + "stack": { + "$ref": "#/components/schemas/stacks-has-one" } } } } }, - "stack-deployment-groups-envelope": { + "stack-deployment-groups-identifier": { "type": "object", "required": [ - "data" + "id", + "type" ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-deployment-groups" + ] + } + } + }, + "stack-deployment-groups-has-one": { + "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/stack-deployment-groups" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/stack-deployment-groups-identifier" + } + ], + "nullable": true } } }, - "action-reason": { + "stack-approvals-identifier": { "type": "object", "properties": { - "reason": { + "id": { + "type": "string" + }, + "type": { "type": "string", - "nullable": true, - "description": "An optional reason for locking the workspace." + "enum": [ + "stack-approvals" + ] } } }, - "stack-deployment-runs-envelope": { + "stack-approvals-has-one": { "type": "object", - "required": [ - "data" - ], "properties": { "data": { - "$ref": "#/components/schemas/stack-deployment-runs" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/stack-approvals-identifier" + } + ], + "nullable": true } } }, - "stack-states-identifier": { + "stack-deployment-runs-identifier": { "type": "object", "required": [ "id", @@ -35503,23 +36150,27 @@ "type": { "type": "string", "enum": [ + "stack-deployment-runs", "stack-states" ] } } }, - "stack-states-has-one": { + "stack-deployment-runs-has-one": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/stack-states-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/stack-deployment-runs-identifier" + } + ], + "nullable": true } } }, - "stack-deployment-steps": { + "stack-deployment-runs": { "type": "object", "required": [ "type", @@ -35534,36 +36185,38 @@ "type": "string", "readOnly": true, "enum": [ - "stack-deployment-steps" + "stack-deployment-runs" ] }, "attributes": { "type": "object", "properties": { - "operation-type": { + "plan-mode": { "type": "string", "enum": [ - "plan", - "apply", - "allow-import", - "import-state" + "normal", + "destroy", + "import" ], "readOnly": true }, - "requires-state-lock": { - "type": "boolean", + "deployment": { + "type": "string", "readOnly": true }, "status": { "type": "string", "enum": [ - "blocked", - "abandoned", - "queued", - "running", - "pending-operator", - "completed", - "failed" + "pending", + "pending-capacity", + "pre-deploying", + "pre-deploying-pending-operator", + "acquiring-lock", + "deploying", + "deploying-pending-operator", + "succeeded", + "failed", + "abandoned" ], "readOnly": true }, @@ -35577,172 +36230,104 @@ "format": "date-time", "readOnly": true }, - "abandoned-at": { + "pre-deploying-at": { "type": "string", "format": "date-time", "nullable": true, "readOnly": true }, - "queued-at": { + "pre-deploying-pending-operator-at": { "type": "string", "format": "date-time", "nullable": true, "readOnly": true }, - "running-at": { + "pending-capacity-at": { "type": "string", "format": "date-time", "nullable": true, "readOnly": true }, - "pending-operator-at": { + "acquiring-lock-at": { "type": "string", "format": "date-time", "nullable": true, "readOnly": true }, - "completed-at": { + "deploying-at": { "type": "string", "format": "date-time", "nullable": true, "readOnly": true }, - "failed-at": { + "deploying-pending-operator-at": { "type": "string", "format": "date-time", "nullable": true, "readOnly": true - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" }, - "plan-description": { - "type": "string" + "succeeded-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true }, - "apply-description": { - "type": "string" + "failed-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true }, - "structured-log": { - "type": "string" + "abandoned-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "eligible-for-rerun": { + "type": "boolean", + "readOnly": true } } }, + "links": { + "$ref": "#/components/schemas/self" + }, "relationships": { "type": "object", "properties": { - "stack-diagnostics": { - "type": "object", - "properties": { - "links": { - "type": "object", - "properties": { - "related": { - "type": "string" - } - } - }, - "meta": { - "type": "object", - "properties": { - "count": { - "type": "integer" - } - } - } - } + "stack-deployment-steps": { + "$ref": "#/components/schemas/links_related" }, - "stack-state": { - "$ref": "#/components/schemas/stack-states-has-one" + "stack-deployment-group": { + "$ref": "#/components/schemas/stack-deployment-groups-has-one" }, - "stack-deployment-run": { - "$ref": "#/components/schemas/stack-deployment-runs-has-one" + "stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" + }, + "destroy-stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" }, "stack-approval": { "$ref": "#/components/schemas/stack-approvals-has-one" + }, + "current-step": { + "$ref": "#/components/schemas/stack-deployment-steps-has-one" + }, + "blocked-by-deployment-group": { + "$ref": "#/components/schemas/stack-deployment-groups-has-one" + }, + "latest-deployment-run-for-deployment": { + "$ref": "#/components/schemas/stack-deployment-runs-has-one" + }, + "rollbacked-state": { + "$ref": "#/components/schemas/stack-deployment-runs-has-one" } } } } }, - "stack-deployment-steps-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/stack-deployment-steps" - } - } - }, - "approved-by-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "users", - "teams", - "organizations" - ] - } - } - }, - "approved-by-has-one": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/approved-by-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "approval-on-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "stack-deployment-steps", - "stack-deployment-runs", - "stack-deployment-groups" - ] - } - } - }, - "approval-on-has-one": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/approval-on-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "stack-approvals": { + "stack-states": { "type": "object", "required": [ "type", @@ -35757,118 +36342,363 @@ "type": "string", "readOnly": true, "enum": [ - "stack-approvals" + "stack-states" ] }, "attributes": { "type": "object", + "required": [ + "deployment" + ], "properties": { - "reason": { + "generation": { + "type": "integer", + "nullable": true, + "readOnly": true + }, + "deployment": { "type": "string" }, - "created-at": { + "status": { "type": "string", - "format": "date-time", + "readOnly": true, + "enum": [ + "created", + "stored", + "completed", + "discarded" + ] + }, + "components": { + "type": "array", + "nullable": true, + "readOnly": true, + "items": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "component-address": { + "type": "string" + }, + "instance-correlator": { + "type": "string" + }, + "component-correlator": { + "type": "string" + }, + "resource-instance-count": { + "type": "integer" + } + } + } + }, + "is-current": { + "type": "boolean", + "readOnly": true + }, + "resource-instance-count": { + "type": "integer", + "nullable": true, "readOnly": true } } }, "links": { - "$ref": "#/components/schemas/self" + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "description": { + "type": "string" + } + } }, "relationships": { "type": "object", "properties": { - "approved-by": { - "$ref": "#/components/schemas/approved-by-has-one" + "stack": { + "$ref": "#/components/schemas/stacks-has-one" }, - "approval-on": { - "$ref": "#/components/schemas/approval-on-has-one" + "stack-deployment-run": { + "$ref": "#/components/schemas/stack-deployment-runs-has-one" } } } } }, - "stack-approvals-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/stack-approvals" - } - } - }, - "data-retention-policy-identifier": { + "stack-output-consumers": { "type": "object", "required": [ - "id", - "type" + "type", + "attributes" ], "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true }, "type": { "type": "string", + "readOnly": true, "enum": [ - "data-retention-policy-delete-olders", - "data-retention-policy-dont-deletes" + "stack-output-consumers" ] + }, + "attributes": { + "type": "object", + "properties": { + "deployment": { + "type": "string", + "readOnly": true + }, + "upstream-publish-output-address": { + "type": "string", + "readOnly": true + }, + "stack-name": { + "type": "string", + "readOnly": true + }, + "upstream-name": { + "type": "string", + "readOnly": true + } + } + }, + "relationships": { + "type": "object", + "properties": { + "stack": { + "$ref": "#/components/schemas/stacks-has-one" + }, + "upstream-stack": { + "$ref": "#/components/schemas/stacks-has-one" + } + } } } }, - "data-retention-policy-has-one": { + "stack-states-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/data-retention-policy-identifier" - } - ], - "nullable": true + "$ref": "#/components/schemas/stack-states" } } }, - "entitlement-sets-identifier": { + "stack-deployment-group-summaries": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true }, "type": { "type": "string", + "readOnly": true, "enum": [ - "entitlement-sets" + "stack-deployment-group-summaries" ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "status": { + "type": "string", + "enum": [ + "pending", + "pre-deploying", + "deploying", + "abandoned", + "succeeded", + "failed" + ], + "readOnly": true + }, + "stack-deployment-run-status-summary": { + "type": "object", + "description": "Contains a count of the number of deployment runs in each state.", + "properties": { + "pending": { + "type": "integer" + }, + "pending-capacity": { + "type": "integer" + }, + "pre-deploying": { + "type": "integer" + }, + "pre-deploying-pending-operator": { + "type": "integer" + }, + "acquiring-lock": { + "type": "integer" + }, + "deploying": { + "type": "integer" + }, + "deploying-pending-operator": { + "type": "integer" + }, + "succeeded": { + "type": "integer" + }, + "failed": { + "type": "integer" + }, + "abandoned": { + "type": "integer" + } + } + }, + "status-counts": { + "type": "object", + "description": "Deprecated alias for stack-deployment-run-status-summary.", + "properties": { + "pending": { + "type": "integer" + }, + "pending-capacity": { + "type": "integer" + }, + "pre-deploying": { + "type": "integer" + }, + "pre-deploying-pending-operator": { + "type": "integer" + }, + "acquiring-lock": { + "type": "integer" + }, + "deploying": { + "type": "integer" + }, + "deploying-pending-operator": { + "type": "integer" + }, + "succeeded": { + "type": "integer" + }, + "failed": { + "type": "integer" + }, + "abandoned": { + "type": "integer" + } + } + } + } + }, + "relationships": { + "type": "object", + "properties": { + "stack-deployment-group": { + "$ref": "#/components/schemas/stack-deployment-groups-has-one" + } + } } } }, - "entitlement-sets-has-one": { + "stack-published-outputs": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { - "data": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-published-outputs" + ] + }, + "attributes": { "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/entitlement-sets-identifier" + "properties": { + "name": { + "type": "string", + "readOnly": true + }, + "action": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "current-value": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "previous-value": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "source-range": { + "type": "string", + "readOnly": true } - ], - "nullable": true + } }, "links": { - "$ref": "#/components/schemas/related" + "type": "object", + "properties": { + "self": { + "type": "string" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "stack-aggregate-output": { + "$ref": "#/components/schemas/stack-aggregate-outputs-has-one" + }, + "stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" + } + } } } }, - "hyok-configurations-identifier": { + "stack-approvals-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/stack-approvals-identifier" + } + } + } + }, + "stack-deployment-group-summaries-identifier": { "type": "object", + "required": [ + "id", + "type" + ], "properties": { "id": { "type": "string" @@ -35876,26 +36706,23 @@ "type": { "type": "string", "enum": [ - "hyok-configurations" + "stack-deployment-group-summaries" ] } } }, - "hyok-configurations-has-one": { + "stack-deployment-group-summaries-has-one": { "type": "object", "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/hyok-configurations-identifier" - } - ], - "nullable": true + "$ref": "#/components/schemas/stack-deployment-group-summaries-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "organizations": { + "stack-deployment-groups": { "type": "object", "required": [ "type", @@ -35908,103 +36735,697 @@ }, "type": { "type": "string", + "readOnly": true, "enum": [ - "organizations" + "stack-deployment-groups" ] }, "attributes": { "type": "object", "properties": { - "external-id": { + "name": { "type": "string", + "nullable": true, "readOnly": true }, - "created-at": { + "status": { "type": "string", - "format": "date-time", + "enum": [ + "pending", + "pre-deploying", + "deploying", + "succeeded", + "failed", + "abandoned" + ], "readOnly": true }, - "email": { - "type": "string" - }, - "session-timeout": { - "type": "integer", - "nullable": true - }, - "session-remember": { - "type": "integer", - "nullable": true + "deployment-group-config": { + "type": "object", + "readOnly": true, + "properties": { + "auto-approve-checks": { + "type": "array", + "items": { + "type": "string" + } + }, + "eager-plan": { + "type": "string", + "readOnly": true + }, + "failure-tolerance": { + "type": "integer", + "nullable": true, + "readOnly": true + }, + "custom": { + "type": "boolean", + "nullable": true, + "readOnly": true + } + } }, - "collaborator-auth-policy": { + "created-at": { "type": "string", - "enum": [ - "password", - "two_factor_mandatory" - ] + "format": "date-time", + "readOnly": true }, - "plan-expired": { - "type": "boolean", + "updated-at": { + "type": "string", + "format": "date-time", "readOnly": true }, - "plan-expires-at": { + "pre-deploying-at": { "type": "string", "format": "date-time", "nullable": true, "readOnly": true }, - "plan-is-trial": { - "type": "boolean", + "deploying-at": { + "type": "string", + "format": "date-time", + "nullable": true, "readOnly": true }, - "plan-is-enterprise": { - "type": "boolean", + "succeeded-at": { + "type": "string", + "format": "date-time", + "nullable": true, "readOnly": true }, - "plan-identifier": { + "failed-at": { "type": "string", + "format": "date-time", + "nullable": true, "readOnly": true }, - "cost-estimation-enabled": { - "type": "boolean" - }, - "send-passing-statuses-for-untriggered-speculative-plans": { - "type": "boolean" + "abandoned-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" }, - "aggregated-commit-status-enabled": { - "type": "boolean" + "stack-deployment-group-summaries": { + "type": "string" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" }, - "speculative-plan-management-enabled": { - "type": "boolean" + "stack-approvals": { + "$ref": "#/components/schemas/stack-approvals-has-many" }, - "allow-force-delete-workspaces": { - "type": "boolean" + "stack-deployment-runs": { + "$ref": "#/components/schemas/links_related" }, - "name": { - "type": "string" + "stack-deployment-group-summary": { + "description": "Contains summed status counts for the the deployment runs in this group.", + "$ref": "#/components/schemas/stack-deployment-group-summaries-has-one" }, - "hcp-id": { + "run-status-summaries": { + "description": "Deprecated alias for stack-deployment-group-summary.", + "$ref": "#/components/schemas/stack-deployment-group-summaries-has-one" + } + } + } + } + }, + "stack-deployment-groups-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-deployment-group-summaries" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-deployment-group-summaries": "#/components/schemas/stack-deployment-group-summaries" + } + } + } + }, + "stack-deployment-groups-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/stack-deployment-groups" + } + } + }, + "action-reason": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "nullable": true, + "description": "An optional reason for locking the workspace." + } + } + }, + "stack-deployment-runs-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/stack-deployment-runs" + } + } + }, + "stack-states-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-states" + ] + } + } + }, + "stack-states-has-one": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/stack-states-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "stack-deployment-steps": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-deployment-steps" + ] + }, + "attributes": { + "type": "object", + "properties": { + "operation-type": { "type": "string", - "readOnly": true, - "x-vis": [ - "hcpt" + "enum": [ + "plan", + "apply", + "allow-import", + "import-state" ], - "description": "This attribute is only available in HCP Terraform." + "readOnly": true }, - "is-unified": { + "requires-state-lock": { "type": "boolean", - "readOnly": true, - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." + "readOnly": true }, - "permissions": { - "type": "object", - "properties": { - "can-update": { - "type": "boolean" - }, - "can-update-authentication-token": { + "status": { + "type": "string", + "enum": [ + "blocked", + "abandoned", + "queued", + "running", + "pending-operator", + "completed", + "failed" + ], + "readOnly": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "abandoned-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "queued-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "running-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "pending-operator-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "completed-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "failed-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "plan-description": { + "type": "string" + }, + "apply-description": { + "type": "string" + }, + "structured-log": { + "type": "string" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "stack-diagnostics": { + "type": "object", + "properties": { + "links": { + "type": "object", + "properties": { + "related": { + "type": "string" + } + } + }, + "meta": { + "type": "object", + "properties": { + "count": { + "type": "integer" + } + } + } + } + }, + "stack-state": { + "$ref": "#/components/schemas/stack-states-has-one" + }, + "stack-deployment-run": { + "$ref": "#/components/schemas/stack-deployment-runs-has-one" + }, + "stack-approval": { + "$ref": "#/components/schemas/stack-approvals-has-one" + } + } + } + } + }, + "stack-deployment-steps-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/stack-deployment-steps" + } + } + }, + "approved-by-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "users", + "teams", + "organizations" + ] + } + } + }, + "approved-by-has-one": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/approved-by-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "approval-on-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-deployment-steps", + "stack-deployment-runs", + "stack-deployment-groups" + ] + } + } + }, + "approval-on-has-one": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/approval-on-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "stack-approvals": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-approvals" + ] + }, + "attributes": { + "type": "object", + "properties": { + "reason": { + "type": "string" + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "links": { + "$ref": "#/components/schemas/self" + }, + "relationships": { + "type": "object", + "properties": { + "approved-by": { + "$ref": "#/components/schemas/approved-by-has-one" + }, + "approval-on": { + "$ref": "#/components/schemas/approval-on-has-one" + } + } + } + } + }, + "stack-approvals-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/stack-approvals" + } + } + }, + "data-retention-policy-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "data-retention-policy-delete-olders", + "data-retention-policy-dont-deletes" + ] + } + } + }, + "data-retention-policy-has-one": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/data-retention-policy-identifier" + } + ], + "nullable": true + } + } + }, + "entitlement-sets-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "entitlement-sets" + ] + } + } + }, + "entitlement-sets-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/entitlement-sets-identifier" + } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "hyok-configurations-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "hyok-configurations" + ] + } + } + }, + "hyok-configurations-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/hyok-configurations-identifier" + } + ], + "nullable": true + } + } + }, + "organizations": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "organizations" + ] + }, + "attributes": { + "type": "object", + "properties": { + "external-id": { + "type": "string", + "readOnly": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "email": { + "type": "string" + }, + "session-timeout": { + "type": "integer", + "nullable": true + }, + "session-remember": { + "type": "integer", + "nullable": true + }, + "collaborator-auth-policy": { + "type": "string", + "enum": [ + "password", + "two_factor_mandatory" + ] + }, + "plan-expired": { + "type": "boolean", + "readOnly": true + }, + "plan-expires-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "plan-is-trial": { + "type": "boolean", + "readOnly": true + }, + "plan-is-enterprise": { + "type": "boolean", + "readOnly": true + }, + "plan-identifier": { + "type": "string", + "readOnly": true + }, + "cost-estimation-enabled": { + "type": "boolean" + }, + "send-passing-statuses-for-untriggered-speculative-plans": { + "type": "boolean" + }, + "aggregated-commit-status-enabled": { + "type": "boolean" + }, + "speculative-plan-management-enabled": { + "type": "boolean" + }, + "allow-force-delete-workspaces": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "hcp-id": { + "type": "string", + "readOnly": true, + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." + }, + "is-unified": { + "type": "boolean", + "readOnly": true, + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." + }, + "permissions": { + "type": "object", + "properties": { + "can-update": { + "type": "boolean" + }, + "can-update-authentication-token": { "type": "boolean" }, "can-view-authentication": { @@ -36325,18 +37746,27 @@ } } }, - "organizations-envelope": { + "entitlement-sets": { "type": "object", - "required": [ - "data" - ], "properties": { - "data": { - "$ref": "#/components/schemas/organizations" + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "entitlement-sets" + ] + }, + "attributes": { + "type": "object" + }, + "links": { + "type": "object" } } }, - "projects": { + "onboarding-task-lists": { "type": "object", "required": [ "type", @@ -36344,146 +37774,26 @@ ], "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true }, "type": { "type": "string", "enum": [ - "projects" + "onboarding-task-lists" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "auto-destroy-activity-duration": { - "type": "string", - "nullable": true - }, - "default-execution-mode": { - "type": "string", - "enum": [ - "remote", - "local", - "agent" - ] + "total-task-count": { + "type": "integer" }, - "stacks-default-execution-mode": { - "type": "string", - "enum": [ - "remote", - "agent" - ] + "incomplete-task-count": { + "type": "integer" }, - "setting-overwrites": { - "type": "object", - "properties": { - "default-execution-mode": { - "type": "boolean" - }, - "default-agent-pool": { - "type": "boolean" - }, - "stacks-default-execution-mode": { - "type": "boolean" - }, - "stacks-default-agent-pool": { - "type": "boolean" - } - } - }, - "permissions": { - "type": "object", - "nullable": true, - "properties": { - "can-read": { - "type": "boolean" - }, - "can-update": { - "type": "boolean" - }, - "can-destroy": { - "type": "boolean" - }, - "can-create-workspace": { - "type": "boolean" - }, - "can-move-workspace": { - "type": "boolean" - }, - "can-move-stack": { - "type": "boolean" - }, - "can-manage-stacks": { - "type": "boolean" - }, - "can-view-stacks": { - "type": "boolean" - }, - "can-update-stacks": { - "type": "boolean" - }, - "can-deploy-no-code-modules": { - "type": "boolean" - }, - "can-read-teams": { - "type": "boolean" - }, - "can-manage-tags": { - "type": "boolean" - }, - "can-manage-teams": { - "type": "boolean" - }, - "can-manage-in-hcp": { - "type": "boolean", - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." - }, - "can-manage-varsets": { - "type": "boolean" - }, - "can-manage-ephemeral-workspace-for-projects": { - "type": "boolean" - } - } - }, - "workspace-count": { - "type": "integer", - "nullable": true - }, - "team-count": { - "type": "integer", - "nullable": true - }, - "hcp-id": { - "type": "string", - "nullable": true, - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." - }, - "is-unified": { - "type": "boolean", - "nullable": true, - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." + "expired": { + "type": "boolean" } } }, @@ -36492,56 +37802,47 @@ "properties": { "organization": { "$ref": "#/components/schemas/organizations-has-one" - }, - "tag-bindings": { - "type": "object", - "nullable": true, - "properties": { - "links": { - "type": "object", - "properties": { - "related": { - "type": "string" - } - } - } - } - }, - "default-agent-pool": { - "$ref": "#/components/schemas/agent-pools-has-one" - }, - "stacks-default-agent-pool": { - "$ref": "#/components/schemas/agent-pools-has-one" } } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" - } + } + } + }, + "organizations-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscriptions" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/entitlement-sets" + }, + { + "$ref": "#/components/schemas/onboarding-task-lists" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "subscriptions": "#/components/schemas/subscriptions", + "projects": "#/components/schemas/projects", + "entitlement-sets": "#/components/schemas/entitlement-sets", + "onboarding-task-lists": "#/components/schemas/onboarding-task-lists" } } } }, - "entitlement-sets": { + "organizations-envelope": { "type": "object", + "required": [ + "data" + ], "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "entitlement-sets" - ] - }, - "attributes": { - "type": "object" - }, - "links": { - "type": "object" + "data": { + "$ref": "#/components/schemas/organizations" } } }, @@ -36582,29 +37883,6 @@ } } }, - "users-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "users" - ] - } - } - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, "scim-identities-identifier": { "type": "object", "required": [ @@ -37200,7 +38478,7 @@ } } }, - "data-retention-target-identifier": { + "ssh-keys-identifier": { "type": "object", "required": [ "id", @@ -37213,634 +38491,234 @@ "type": { "type": "string", "enum": [ - "organizations", - "workspaces" + "ssh-keys" ] } } }, - "data-retention-target-has-one": { + "ssh-keys-has-one": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/data-retention-target-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/ssh-keys-identifier" + } + ], + "nullable": true } } }, - "data-retention-policy": { + "locked-by-identifier": { "type": "object", "required": [ - "type", - "attributes" + "id", + "type" ], "properties": { "id": { - "type": "string", - "readOnly": true + "type": "string" }, "type": { "type": "string", "enum": [ - "data-retention-policy-delete-olders", - "data-retention-policy-dont-deletes" + "users", + "teams", + "runs" ] - }, - "attributes": { - "type": "object", - "properties": { - "delete-older-than-n-days": { - "type": "integer" - }, - "delete-state-versions": { - "type": "boolean" - }, - "delete-configuration-versions": { - "type": "boolean" - }, - "delete-run-data-and-logs": { - "type": "boolean" - }, - "state-versions-delete-after-n-days": { - "type": "integer", - "nullable": true - }, - "configuration-versions-delete-after-n-days": { - "type": "integer", - "nullable": true - }, - "run-data-and-logs-delete-after-n-days": { - "type": "integer", - "nullable": true - }, - "state-versions-keep-latest-count": { - "type": "integer", - "nullable": true - }, - "configuration-versions-keep-latest-count": { - "type": "integer", - "nullable": true - }, - "run-data-keep-latest-count": { - "type": "integer", - "nullable": true - } - } - }, - "links": { - "$ref": "#/components/schemas/self" - }, - "relationships": { + } + } + }, + "locked-by-has-one": { + "type": "object", + "properties": { + "data": { "type": "object", - "properties": { - "target": { - "$ref": "#/components/schemas/data-retention-target-has-one" + "allOf": [ + { + "$ref": "#/components/schemas/locked-by-identifier" } - } + ], + "nullable": true } } }, - "data-retention-policy-envelope": { + "runs-identifier": { "type": "object", - "required": [ - "data" - ], "properties": { - "data": { - "$ref": "#/components/schemas/data-retention-policy" + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "runs" + ] } } }, - "projects-envelope": { + "runs-has-one": { "type": "object", - "required": [ - "data" - ], "properties": { "data": { - "$ref": "#/components/schemas/projects" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/runs-identifier" + } + ], + "nullable": true } } }, - "token-ttl-policy": { + "workspace-outputs-identifier": { "type": "object", "properties": { "id": { - "type": "string", - "readOnly": true, - "description": "The token TTL policy ID" + "type": "string" }, "type": { "type": "string", "enum": [ - "organization-token-ttl-policies" - ] - }, - "attributes": { - "type": "object", - "properties": { - "token-type": { - "type": "string", - "description": "The type of the token TTL policy", - "enum": [ - "organization", - "team", - "user", - "audit_trails", - "metrics" - ], - "example": "organization" - }, - "max-ttl-ms": { - "type": "integer", - "format": "int64", - "description": "The maximum time-to-live for the token in milliseconds", - "example": 3600000 - }, - "created-at": { - "type": "string", - "format": "date-time", - "description": "When the policy was created" - }, - "updated-at": { - "type": "string", - "format": "date-time", - "description": "When the policy was last updated" - } - }, - "required": [ - "token-type", - "max-ttl-ms" + "workspace-outputs" ] } } }, - "token-ttl-policy-entry": { + "workspace-outputs-has-many": { "type": "object", - "required": [ - "token-type", - "max-ttl-ms" - ], + "nullable": true, "properties": { - "token-type": { - "type": "string", - "description": "The type of the token TTL policy", - "enum": [ - "organization", - "team", - "user", - "audit_trails", - "metrics" - ], - "example": "organization" - }, - "max-ttl-ms": { - "type": "integer", - "format": "int64", - "description": "The maximum time-to-live for the token in milliseconds", - "example": 3600000 + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/workspace-outputs-identifier" + } } } }, - "token-ttl-policies": { + "state-versions-identifier": { "type": "object", "required": [ + "id", "type" ], "properties": { + "id": { + "type": "string" + }, "type": { "type": "string", "enum": [ - "organization-token-ttl-policies" + "state-versions" ] - }, - "attributes": { + } + } + }, + "state-versions-has-one": { + "type": "object", + "properties": { + "data": { "type": "object", - "properties": { - "token-ttl-policies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/token-ttl-policy-entry" - } + "allOf": [ + { + "$ref": "#/components/schemas/state-versions-identifier" } - } + ], + "nullable": true } } }, - "token-ttl-policies-envelope": { + "configuration-versions-identifier": { "type": "object", - "required": [ - "data" - ], "properties": { - "data": { - "$ref": "#/components/schemas/token-ttl-policies" + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "configuration-versions" + ] } } }, - "workspaces-identifier-array-document": { + "configuration-versions-has-one": { "type": "object", - "required": [ - "data" - ], "properties": { "data": { - "type": "array", - "items": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "workspaces" - ] - }, - "id": { - "type": "string" - } + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/configuration-versions-identifier" } - } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "tag-bindings": { + "workspace-readme-identifier": { "type": "object", "required": [ - "type", - "attributes" + "id", + "type" ], "properties": { "id": { - "type": "string", - "readOnly": true, - "example": "tb-7AHdkTVXrmxiB8vQ" + "type": "string" }, "type": { "type": "string", "enum": [ - "tag-bindings" + "workspace-readme" ] - }, - "attributes": { + } + } + }, + "workspace-readme-has-one": { + "type": "object", + "properties": { + "data": { "type": "object", - "required": [ - "key" - ], - "properties": { - "created-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "key": { - "type": "string" - }, - "value": { - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/workspace-readme-identifier" } - } + ], + "nullable": true } } }, - "tag-bindings-collection": { + "assessment-results-identifier": { "type": "object", "required": [ - "data" + "id", + "type" ], "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/tag-bindings" - } + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "assessment-results" + ] } } }, - "inherited-from-has-one": { + "assessment-results-has-one": { "type": "object", - "nullable": true, "properties": { "data": { "type": "object", - "nullable": true, - "oneOf": [ + "allOf": [ { - "$ref": "#/components/schemas/projects-identifier" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "projects": "#/components/schemas/projects-identifier" - } - } - } - } - }, - "effective-tag-bindings": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true, - "example": "3JAnx3G4puQcjHu3" - }, - "type": { - "type": "string", - "enum": [ - "effective-tag-bindings" - ] - }, - "attributes": { - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "relationships": { - "type": "object", - "description": "Optional relationship indicating the project this binding was inherited from, if applicable.", - "properties": { - "inherited-from": { - "$ref": "#/components/schemas/inherited-from-has-one" - } - } - } - } - }, - "effective-tag-bindings-envelope-many": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/effective-tag-bindings" - } - } - } - }, - "ssh-keys-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "ssh-keys" - ] - } - } - }, - "ssh-keys-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/ssh-keys-identifier" - } - ], - "nullable": true - } - } - }, - "locked-by-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "users", - "teams", - "runs" - ] - } - } - }, - "locked-by-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/locked-by-identifier" - } - ], - "nullable": true - } - } - }, - "runs-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "runs" - ] - } - } - }, - "runs-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/runs-identifier" - } - ], - "nullable": true - } - } - }, - "workspace-outputs-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "workspace-outputs" - ] - } - } - }, - "workspace-outputs-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/workspace-outputs-identifier" - } - } - } - }, - "state-versions-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "state-versions" - ] - } - } - }, - "state-versions-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/state-versions-identifier" - } - ], - "nullable": true - } - } - }, - "configuration-versions-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "configuration-versions" - ] - } - } - }, - "configuration-versions-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/configuration-versions-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "workspace-readme-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "workspace-readme" - ] - } - } - }, - "workspace-readme-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/workspace-readme-identifier" - } - ], - "nullable": true - } - } - }, - "assessment-results-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "assessment-results" - ] - } - } - }, - "assessment-results-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/assessment-results-identifier" + "$ref": "#/components/schemas/assessment-results-identifier" } ], "nullable": true @@ -38353,42 +39231,35 @@ } } }, - "no-code-modules-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "no-code-modules" - ] - } - } - }, - "no-code-modules-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/no-code-modules-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" + "recoverable-items-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/stacks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "users": "#/components/schemas/users", + "workspaces": "#/components/schemas/workspaces", + "stacks": "#/components/schemas/stacks" + } } } }, - "variable-options-identifier": { + "data-retention-target-identifier": { "type": "object", "required": [ "id", @@ -38401,27 +39272,26 @@ "type": { "type": "string", "enum": [ - "variable-options" + "organizations", + "workspaces" ] } } }, - "variable-options-has-many": { + "data-retention-target-has-one": { "type": "object", - "nullable": true, "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/variable-options-identifier" - } + "$ref": "#/components/schemas/data-retention-target-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "no-code-module-versions": { + "data-retention-policy": { "type": "object", "required": [ - "id", "type", "attributes" ], @@ -38433,232 +39303,380 @@ "type": { "type": "string", "enum": [ - "no-code-module-versions" + "data-retention-policy-delete-olders", + "data-retention-policy-dont-deletes" ] }, "attributes": { "type": "object", "properties": { - "module-version": { - "type": "string", - "readOnly": true, - "description": "Registry module version string this no-code module version pins\n(for example, 1.0.0).\n" + "delete-older-than-n-days": { + "type": "integer" }, - "version-number": { + "delete-state-versions": { + "type": "boolean" + }, + "delete-configuration-versions": { + "type": "boolean" + }, + "delete-run-data-and-logs": { + "type": "boolean" + }, + "state-versions-delete-after-n-days": { "type": "integer", - "readOnly": true, - "description": "Monotonic version number for this no-code module version record.\n" + "nullable": true + }, + "configuration-versions-delete-after-n-days": { + "type": "integer", + "nullable": true + }, + "run-data-and-logs-delete-after-n-days": { + "type": "integer", + "nullable": true + }, + "state-versions-keep-latest-count": { + "type": "integer", + "nullable": true + }, + "configuration-versions-keep-latest-count": { + "type": "integer", + "nullable": true + }, + "run-data-keep-latest-count": { + "type": "integer", + "nullable": true } } }, + "links": { + "$ref": "#/components/schemas/self" + }, "relationships": { "type": "object", "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "no-code-module": { - "$ref": "#/components/schemas/no-code-modules-has-one" - }, - "variable-options": { - "$ref": "#/components/schemas/variable-options-has-many" + "target": { + "$ref": "#/components/schemas/data-retention-target-has-one" } } } } }, - "registry-modules-identifier": { + "data-retention-policy-envelope": { "type": "object", "required": [ - "id", - "type" + "data" ], "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "registry-modules" - ] + "data": { + "$ref": "#/components/schemas/data-retention-policy" } } }, - "registry-modules-has-one": { + "projects-envelope": { "type": "object", + "required": [ + "data" + ], "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/registry-modules-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" + "$ref": "#/components/schemas/projects" } } }, - "no-code-modules": { + "token-ttl-policy": { "type": "object", - "required": [ - "id", - "type", - "attributes" - ], "properties": { "id": { "type": "string", - "readOnly": true + "readOnly": true, + "description": "The token TTL policy ID" }, "type": { "type": "string", "enum": [ - "no-code-modules" + "organization-token-ttl-policies" ] }, "attributes": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Whether this no-code module is enabled for deployment." - }, - "version-pin": { + "token-type": { "type": "string", - "nullable": true, - "description": "Optional pinned module version for no-code deployments." - } - } - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" + "description": "The type of the token TTL policy", + "enum": [ + "organization", + "team", + "user", + "audit_trails", + "metrics" + ], + "example": "organization" }, - "registry-module": { - "$ref": "#/components/schemas/registry-modules-has-one" + "max-ttl-ms": { + "type": "integer", + "format": "int64", + "description": "The maximum time-to-live for the token in milliseconds", + "example": 3600000 }, - "variable-options": { - "$ref": "#/components/schemas/variable-options-has-many" + "created-at": { + "type": "string", + "format": "date-time", + "description": "When the policy was created" }, - "latest-version": { - "$ref": "#/components/schemas/no-code-module-versions-has-one" + "updated-at": { + "type": "string", + "format": "date-time", + "description": "When the policy was last updated" } - } - }, - "links": { - "$ref": "#/components/schemas/self" + }, + "required": [ + "token-type", + "max-ttl-ms" + ] } } }, - "workspace-readme": { + "token-ttl-policy-entry": { + "type": "object", + "required": [ + "token-type", + "max-ttl-ms" + ], + "properties": { + "token-type": { + "type": "string", + "description": "The type of the token TTL policy", + "enum": [ + "organization", + "team", + "user", + "audit_trails", + "metrics" + ], + "example": "organization" + }, + "max-ttl-ms": { + "type": "integer", + "format": "int64", + "description": "The maximum time-to-live for the token in milliseconds", + "example": 3600000 + } + } + }, + "token-ttl-policies": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "organization-token-ttl-policies" + ] + }, + "attributes": { + "type": "object", + "properties": { + "token-ttl-policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/token-ttl-policy-entry" + } + } + } + } + } + }, + "token-ttl-policies-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/token-ttl-policies" + } + } + }, + "workspaces-identifier-array-document": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "workspaces" + ] + }, + "id": { + "type": "string" + } + } + } + } + } + }, + "tag-bindings": { "type": "object", "required": [ - "id", "type", "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true + "readOnly": true, + "example": "tb-7AHdkTVXrmxiB8vQ" }, "type": { "type": "string", "enum": [ - "workspace-readme" + "tag-bindings" ] }, "attributes": { "type": "object", + "required": [ + "key" + ], "properties": { - "raw-markdown": { + "created-at": { "type": "string", - "readOnly": true, - "description": "Raw markdown contents of the workspace README." + "format": "date-time", + "nullable": true + }, + "key": { + "type": "string" + }, + "value": { + "type": "string" } } } } }, - "workspace-outputs": { + "tag-bindings-collection": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tag-bindings" + } + } + } + }, + "inherited-from-has-one": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "object", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/projects-identifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects-identifier" + } + } + } + } + }, + "effective-tag-bindings": { "type": "object", - "description": "Workspace outputs are Terraform output values associated with a workspace.\nThey include the name of the output and a sensitive boolean. There is an\nadditional attribute, \"value\", that can be any JSON type, including null when\nthe output is sensitive; it is intentionally omitted from this schema (same\npattern as state-version-outputs) because OpenAPI cannot express a nullable\nany-type under the project's nullable-type-sibling lint rule.\n", "required": [ - "id", "type", "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true + "readOnly": true, + "example": "3JAnx3G4puQcjHu3" }, "type": { "type": "string", "enum": [ - "workspace-outputs" + "effective-tag-bindings" ] }, "attributes": { "type": "object", + "required": [ + "key" + ], "properties": { - "name": { + "key": { "type": "string" }, - "sensitive": { - "type": "boolean" - }, - "output-type": { - "type": "string", - "description": "The Terraform type of the output value (e.g. string, number, bool,\nlist, map, set, object, tuple).\n" - }, - "detailed-type": { - "description": "A detailed representation of the output type. May be a string for\nsimple types or an array for complex types such as tuples and objects.\n" - }, - "workspace-attributes": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "organization-attributes": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } + "value": { + "type": "string" + } + } + }, + "relationships": { + "type": "object", + "description": "Optional relationship indicating the project this binding was inherited from, if applicable.", + "properties": { + "inherited-from": { + "$ref": "#/components/schemas/inherited-from-has-one" } } } } }, - "workspaces-envelope": { + "effective-tag-bindings-envelope-many": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/workspaces" + "type": "array", + "items": { + "$ref": "#/components/schemas/effective-tag-bindings" + } } } }, - "subscribable-identifier": { + "workspaces-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/workspaces-identifier" + } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "assessment-source-identifier": { "type": "object", "required": [ "id", @@ -38671,128 +39689,240 @@ "type": { "type": "string", "enum": [ - "workspaces", - "projects", - "teams", - "stacks" + "assessments", + "plans" ] } } }, - "subscribable-has-one": { + "assessment-source-has-one": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/subscribable-identifier" + "$ref": "#/components/schemas/assessment-source-identifier" }, "links": { "$ref": "#/components/schemas/related" } } }, - "notification-configurations": { + "assessment-results": { "type": "object", "required": [ + "id", "type", "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true + "example": "asmtres-8F5JFydVYAmtTjET" }, "type": { "type": "string", "enum": [ - "notification-configurations" + "assessment-results" ] }, "attributes": { "type": "object", - "required": [ - "name", - "destination-type", - "enabled" - ], "properties": { - "name": { - "type": "string", - "description": "The name of the notification configuration." + "succeeded": { + "type": "boolean", + "description": "Whether the assessment completed successfully" }, - "destination-type": { + "all-checks-succeeded": { + "type": "boolean", + "description": "Whether all health checks passed" + }, + "checks-errored": { + "type": "integer", + "description": "Number of health checks that errored", + "nullable": true + }, + "checks-failed": { + "type": "integer", + "description": "Number of health checks that failed", + "nullable": true + }, + "checks-passed": { + "type": "integer", + "description": "Number of health checks that passed", + "nullable": true + }, + "checks-unknown": { + "type": "integer", + "description": "Number of health checks with unknown status", + "nullable": true + }, + "created-at": { "type": "string", - "description": "The type of notification destination (e.g., email, slack, generic, microsoft-teams).", - "enum": [ - "email", - "slack", - "generic", - "microsoft-teams" - ] + "format": "date-time", + "description": "Timestamp when the assessment result was created" }, - "enabled": { + "drifted": { "type": "boolean", - "description": "Whether the notification configuration is enabled." - }, - "triggers": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of trigger events for this notification." + "description": "Whether drift was detected" }, - "url": { + "error-message": { "type": "string", "nullable": true, - "description": "The webhook URL for non-email destinations." + "description": "Error message if the assessment failed" }, - "token": { - "type": "string", + "resources-drifted": { + "type": "integer", "nullable": true, - "writeOnly": true, - "description": "The authentication token for the webhook." + "description": "Number of resources that have drifted" }, - "email-addresses": { - "type": "array", - "items": { - "type": "string" - }, + "resources-undrifted": { + "type": "integer", "nullable": true, - "description": "Email addresses for email-type notifications." + "description": "Number of resources that have not drifted" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "workspace": { + "description": "The workspace this assessment result belongs to", + "$ref": "#/components/schemas/workspaces-has-one" }, - "user-email-addresses": { - "type": "array", - "items": { - "type": "string" - }, + "source": { + "description": "The source assessment or plan that produced this result.", + "$ref": "#/components/schemas/assessment-source-has-one" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string", + "description": "API URL for this assessment result" + }, + "json-output": { + "type": "string", "nullable": true, - "readOnly": true, - "description": "Email addresses of users associated with this notification." + "description": "API URL for the JSON formatted assessment output (available when assessment succeeded)" }, - "external-email-addresses": { - "type": "array", - "items": { - "type": "string" - }, + "json-schema": { + "type": "string", "nullable": true, - "readOnly": true, - "description": "External email addresses (not associated with users) for this notification." + "description": "API URL for the JSON schema of this assessment (available when assessment succeeded)" }, - "delivery-responses": { - "type": "array", - "items": { - "type": "object" - }, - "readOnly": true, - "description": "Responses from notification delivery attempts." + "sanitized-plan": { + "type": "string", + "nullable": true, + "description": "API URL for the sanitized plan (available when HYOK is enabled and assessment succeeded)", + "x-vis": [ + "public-beta" + ] }, - "created-at": { + "log-output": { "type": "string", - "format": "date-time", - "readOnly": true + "description": "API URL to read the logs for this assessment" + } + } + } + } + }, + "configuration-versions": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "configuration-versions" + ] + }, + "attributes": { + "type": "object", + "properties": { + "auto-queue-runs": { + "type": "boolean" }, - "updated-at": { + "error": { "type": "string", - "format": "date-time", + "nullable": true + }, + "error-message": { + "type": "string", + "nullable": true + }, + "source": { + "type": "string", + "nullable": true + }, + "speculative": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "fetching", + "uploaded", + "archived", + "errored", + "backing_data_soft_deleted", + "backing_data_permanently_deleted" + ] + }, + "status-timestamps": { + "type": "object", + "properties": { + "fetching-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "uploaded-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "errored-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "archived-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "soft-delete-backing-data-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "restore-backing-data-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "permanently-delete-backing-data-at": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "provisional": { + "type": "boolean" + }, + "upload-url": { + "type": "string", + "nullable": true, "readOnly": true } } @@ -38800,113 +39930,1125 @@ "relationships": { "type": "object", "properties": { - "subscribable": { - "description": "The resource (workspace, project, or team) this notification is configured for.", - "$ref": "#/components/schemas/subscribable-has-one" + "ingress-attributes": { + "$ref": "#/components/schemas/ingress-attributes-has-one" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" }, - "users": { - "description": "Users associated with this notification (for email type).", - "$ref": "#/components/schemas/users-has-many" + "download": { + "type": "string" } } } } }, - "notification-configurations-envelope": { + "applies-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "applies" + ] + } + } + }, + "applies-has-one": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/applies-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "cost-estimates-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "cost-estimates" + ] + } + } + }, + "cost-estimates-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/cost-estimates-identifier" + } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "plans-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "plans" + ] + } + } + }, + "plans-has-one": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/plans-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "run-events-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "run-events" + ] + } + } + }, + "run-events-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/run-events-identifier" + } + } + } + }, + "task-stages-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "task-stages" + ] + } + } + }, + "task-stages-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/task-stages-identifier" + } + } + } + }, + "policy-checks-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "policy-checks" + ] + } + } + }, + "policy-checks-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/policy-checks-identifier" + } + } + } + }, + "workspace-comments-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "workspace-comments" + ] + } + } + }, + "workspace-comments-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/workspace-comments-identifier" + } + } + } + }, + "tf-policy-evaluations-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "tf-policy-evaluations" + ] + } + } + }, + "tf-policy-evaluations-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tf-policy-evaluations-identifier" + } + } + } + }, + "runs": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "runs" + ] + }, + "attributes": { + "type": "object", + "properties": { + "actions": { + "type": "object", + "properties": { + "is-cancelable": { + "type": "boolean" + }, + "is-confirmable": { + "type": "boolean" + }, + "is-discardable": { + "type": "boolean" + }, + "is-force-cancelable": { + "type": "boolean" + } + } + }, + "allow-config-generation": { + "type": "boolean" + }, + "allow-empty-apply": { + "type": "boolean" + }, + "auto-apply": { + "type": "boolean" + }, + "comment": { + "type": "string", + "writeOnly": true + }, + "canceled-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "debugging-mode": { + "type": "boolean" + }, + "has-changes": { + "type": "boolean" + }, + "is-destroy": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "minimal-refresh": { + "type": "boolean" + }, + "plan-only": { + "type": "boolean" + }, + "refresh": { + "type": "boolean" + }, + "refresh-only": { + "type": "boolean" + }, + "replace-addrs": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "save-plan": { + "type": "boolean" + }, + "source": { + "type": "string" + }, + "status-timestamps": { + "type": "object", + "properties": { + "fetching-at": { + "type": "string", + "format": "date-time" + }, + "fetched-at": { + "type": "string", + "format": "date-time" + }, + "pre-plan-running-at": { + "type": "string", + "format": "date-time" + }, + "pre-plan-completed-at": { + "type": "string", + "format": "date-time" + }, + "plan-queued-at": { + "type": "string", + "format": "date-time" + }, + "planning-at": { + "type": "string", + "format": "date-time" + }, + "planned-at": { + "type": "string", + "format": "date-time" + }, + "tf-policy-checked-at": { + "type": "string", + "format": "date-time", + "x-vis": [ + "public-beta" + ], + "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." + }, + "tf-policy-override-at": { + "type": "string", + "format": "date-time", + "x-vis": [ + "public-beta" + ], + "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." + }, + "post-plan-running-at": { + "type": "string", + "format": "date-time" + }, + "post-plan-completed-at": { + "type": "string", + "format": "date-time" + }, + "cost-estimating-at": { + "type": "string", + "format": "date-time" + }, + "cost-estimated-at": { + "type": "string", + "format": "date-time" + }, + "policy-soft-failed-at": { + "type": "string", + "format": "date-time" + }, + "policy-checked-at": { + "type": "string", + "format": "date-time" + }, + "confirmed-at": { + "type": "string", + "format": "date-time" + }, + "planned-and-finished-at": { + "type": "string", + "format": "date-time" + }, + "planned-and-saved-at": { + "type": "string", + "format": "date-time" + }, + "pre-apply-running-at": { + "type": "string", + "format": "date-time" + }, + "pre-apply-completed-at": { + "type": "string", + "format": "date-time" + }, + "apply-queued-at": { + "type": "string", + "format": "date-time" + }, + "applying-at": { + "type": "string", + "format": "date-time" + }, + "post-apply-completed-at": { + "type": "string", + "format": "date-time" + }, + "applied-at": { + "type": "string", + "format": "date-time" + }, + "post-apply-running-at": { + "type": "string", + "format": "date-time" + }, + "discarded-at": { + "type": "string", + "format": "date-time" + }, + "errored-at": { + "type": "string", + "format": "date-time" + }, + "canceled-at": { + "type": "string", + "format": "date-time" + }, + "force-canceled-at": { + "type": "string", + "format": "date-time" + }, + "assessed-at": { + "type": "string", + "format": "date-time" + }, + "queuing-at": { + "type": "string", + "format": "date-time" + }, + "queuing-apply-at": { + "type": "string", + "format": "date-time" + } + } + }, + "status": { + "type": "string", + "description": "The current status of the run.\n\n**Note:** The following status values are in public-beta:\n- `tf_policy_checked` - Terraform Policy evaluation completed at plan stage\n- `tf_policy_override` - Terraform Policy evaluation was overridden at plan stage\n", + "enum": [ + "pending", + "fetching", + "fetching_completed", + "pre_plan_running", + "pre_plan_completed", + "pre_plan_awaiting_decision", + "queuing", + "plan_queued", + "planning", + "planned", + "tf_policy_checked", + "tf_policy_override", + "post_plan_running", + "post_plan_completed", + "cost_estimating", + "cost_estimated", + "policy_checking", + "policy_override", + "policy_soft_failed", + "policy_checked", + "confirmed", + "pre_apply_running", + "pre_apply_completed", + "queuing_apply", + "apply_queued", + "applying", + "post_apply_running", + "post_apply_completed", + "applied", + "discarded", + "errored", + "canceled", + "planned_and_finished", + "planned_and_saved", + "assessing", + "assessed" + ] + }, + "target-addrs": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "trigger-reason": { + "type": "string" + }, + "terraform-version": { + "type": "string" + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "triggering-source-name": { + "type": "string", + "nullable": true + }, + "policy-paths": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "invoke-action-addrs": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "permissions": { + "type": "object", + "properties": { + "can-apply": { + "type": "boolean" + }, + "can-cancel": { + "type": "boolean" + }, + "can-comment": { + "type": "boolean" + }, + "can-discard": { + "type": "boolean" + }, + "can-force-execute": { + "type": "boolean" + }, + "can-force-cancel": { + "type": "boolean" + }, + "can-override-policy-check": { + "type": "boolean" + } + } + }, + "variables": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "force-cancel-available-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "relationships": { + "type": "object", + "properties": { + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "triggering-source": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "triggering-run": { + "$ref": "#/components/schemas/runs-has-one" + }, + "apply": { + "$ref": "#/components/schemas/applies-has-one" + }, + "canceled-by": { + "$ref": "#/components/schemas/users-has-one" + }, + "configuration-version": { + "$ref": "#/components/schemas/configuration-versions-has-one" + }, + "confirmed-by": { + "$ref": "#/components/schemas/users-has-one" + }, + "cost-estimate": { + "$ref": "#/components/schemas/cost-estimates-has-one" + }, + "created-by": { + "$ref": "#/components/schemas/users-has-one" + }, + "plan": { + "$ref": "#/components/schemas/plans-has-one" + }, + "run-events": { + "$ref": "#/components/schemas/run-events-has-many" + }, + "task-stages": { + "$ref": "#/components/schemas/task-stages-has-many" + }, + "policy-checks": { + "$ref": "#/components/schemas/policy-checks-has-many" + }, + "run-trigger-snapshots": { + "$ref": "#/components/schemas/links_related" + }, + "comments": { + "$ref": "#/components/schemas/workspace-comments-has-many" + }, + "tf-policy-evaluations": { + "x-vis": [ + "public-beta" + ], + "$ref": "#/components/schemas/tf-policy-evaluations-has-many", + "description": "This relationship is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." + } + } + } + } + }, + "state-versions-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/state-versions-identifier" + } + } + } + }, + "applies": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "applies" + ] + }, + "attributes": { + "type": "object", + "properties": { + "execution-details": { + "type": "object", + "readOnly": true, + "nullable": true, + "properties": { + "mode": { + "type": "string", + "enum": [ + "agent", + "remote", + "local" + ] + }, + "agent-id": { + "type": "string" + }, + "agent-name": { + "type": "string" + }, + "agent-pool-id": { + "type": "string" + }, + "agent-pool-name": { + "type": "string" + } + } + }, + "status": { + "readOnly": true, + "type": "string", + "enum": [ + "created", + "pending", + "queued", + "agent_queued", + "running", + "errored", + "canceled", + "finished", + "unreachable" + ] + }, + "status-timestamps": { + "readOnly": true, + "type": "object", + "properties": { + "agent-queued-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "started-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "errored-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "canceled-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "force-canceled-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "finished-at": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "log-read-url": { + "readOnly": true, + "type": "string" + }, + "resource-additions": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "resource-changes": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "resource-destructions": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "resource-imports": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "action-invocations": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "action-failures": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "backing-data-state": { + "type": "string", + "readOnly": true, + "x-vis": [ + "tfe" + ], + "description": "Data retention lifecycle state of the apply's backing data.\n\nThis attribute is only available in Terraform Enterprise.", + "enum": [ + "backing_data_initialized", + "backing_data_available", + "backing_data_soft_deleted", + "backing_data_permanently_deleted" + ] + } + } + }, + "relationships": { + "type": "object", + "properties": { + "state-versions": { + "$ref": "#/components/schemas/state-versions-has-many" + } + } + }, + "links": { + "$ref": "#/components/schemas/self" + } + } + }, + "plan-exports-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "plan-exports" + ] + } + } + }, + "plan-exports-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/plan-exports-identifier" + } + } + } + }, + "hyok-encrypted-data-keys-identifier": { "type": "object", "required": [ - "data" + "id", + "type" ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "hyok-encrypted-data-keys" + ] + } + } + }, + "hyok-encrypted-data-keys-has-one": { + "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/notification-configurations" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/hyok-encrypted-data-keys-identifier" + } + ], + "nullable": true } } }, - "email-recipient-statuses": { + "plans": { "type": "object", "required": [ + "id", "type", "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true + "example": "plan-8F5JFydVYAmtTjET" }, "type": { "type": "string", "enum": [ - "email-recipient-statuses" + "plans" ] }, "attributes": { "type": "object", "properties": { - "email": { - "type": "string", - "description": "The email address of the recipient" - }, - "verified-at": { - "type": "string", - "format": "date-time", + "execution-details": { + "type": "object", "nullable": true, - "description": "The timestamp when the email was verified" + "description": "Details about the execution of this plan. Null if plan has not started.", + "properties": { + "mode": { + "type": "string", + "description": "Execution mode of the run", + "enum": [ + "remote", + "agent", + "local" + ] + }, + "agent-id": { + "type": "string", + "example": "agent-S1Y7tcKxXPJDQAvq", + "description": "ID of the agent used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + }, + "agent-name": { + "type": "string", + "example": "agent_01", + "description": "Name of the agent used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + }, + "agent-pool-id": { + "type": "string", + "example": "apool-Zigq2VGreKq7nwph", + "description": "ID of the agent pool used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + }, + "agent-pool-name": { + "type": "string", + "example": "first-pool", + "description": "Name of the agent pool used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + } + } }, - "unsubscribed-at": { - "type": "string", - "format": "date-time", + "generated-configuration": { + "type": "boolean", + "default": false, "nullable": true, - "description": "The timestamp when the email was unsubscribed" + "description": "Whether the plan generated new configuration as part of this run" }, - "delivery-failures-count": { + "has-changes": { + "type": "boolean", + "description": "Whether the plan has any changes" + }, + "resource-additions": { "type": "integer", - "readOnly": true, - "description": "The number of delivery failures for this email" + "description": "Number of resources that will be added", + "nullable": true }, - "created-at": { + "resource-changes": { + "type": "integer", + "description": "Number of resources that will be changed", + "nullable": true + }, + "resource-destructions": { + "type": "integer", + "description": "Number of resources that will be destroyed", + "nullable": true + }, + "resource-imports": { + "type": "integer", + "description": "Number of resources that will be imported", + "nullable": true + }, + "structured-run-output-enabled": { + "type": "boolean", + "nullable": true, + "description": "Whether structured run output is enabled" + }, + "status": { "type": "string", - "format": "date-time", - "readOnly": true + "description": "Current status of the plan", + "enum": [ + "pending", + "managed_queued", + "queued", + "running", + "errored", + "canceled", + "finished", + "unreachable" + ] }, - "updated-at": { + "status-timestamps": { + "type": "object", + "description": "Timestamps for state transitions of the plan", + "properties": { + "queued-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "pending-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "started-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "finished-at": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "log-read-url": { "type": "string", - "format": "date-time", - "readOnly": true + "nullable": true, + "description": "URL to read the logs for this plan" + }, + "actions": { + "type": "object", + "description": "Actions available for this plan", + "properties": { + "is-exportable": { + "type": "boolean", + "description": "Whether the plan can be exported" + } + } + }, + "backing-data-state": { + "type": "string", + "readOnly": true, + "x-vis": [ + "tfe" + ], + "description": "Data retention lifecycle state of the plan's backing data.\n\nThis attribute is only available in Terraform Enterprise.", + "enum": [ + "backing_data_initialized", + "backing_data_available", + "backing_data_soft_deleted", + "backing_data_permanently_deleted" + ] + }, + "permissions": { + "type": "object", + "description": "Permissions for the current user related to this plan", + "nullable": true, + "properties": { + "can-export": { + "type": "boolean", + "description": "Whether the current user can export the plan" + } + } } } - } - } - }, - "email-recipient-statuses-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/email-recipient-statuses" - } - } - }, - "workspaces-has-one": { - "type": "object", - "properties": { - "data": { + }, + "relationships": { "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/workspaces-identifier" + "properties": { + "state-versions": { + "description": "State versions associated with this plan (for TF <= 0.8)", + "$ref": "#/components/schemas/state-versions-has-many" + }, + "exports": { + "description": "Exports associated with this plan", + "$ref": "#/components/schemas/plan-exports-has-many" + }, + "hyok-encrypted-data-key": { + "description": "HYOK encrypted data key associated with this plan\n\nThis relationship is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ], + "$ref": "#/components/schemas/hyok-encrypted-data-keys-has-one" } - ], - "nullable": true + } }, "links": { - "$ref": "#/components/schemas/related" + "type": "object", + "properties": { + "self": { + "type": "string", + "description": "API URL for this plan" + }, + "json-output": { + "type": "string", + "nullable": true, + "description": "API URL for the JSON formatted execution plan (available for Terraform 0.12+)" + }, + "json-output-redacted": { + "type": "string", + "nullable": true, + "description": "API URL for the redacted JSON formatted execution plan (available for Terraform 0.15.2+)" + }, + "json-schema": { + "type": "string", + "nullable": true, + "description": "API URL for the JSON schema of this plan (available for Terraform 0.12+)" + }, + "sanitized-plan": { + "type": "string", + "nullable": true, + "description": "API URL for the sanitized plan (available when HYOK is enabled and with compatible Terraform version)", + "x-vis": [ + "public-beta" + ] + } + } } } }, - "no-code-queries-identifier": { + "state-version-outputs-identifier": { "type": "object", "properties": { "id": { @@ -38915,34 +41057,27 @@ "type": { "type": "string", "enum": [ - "no-code-queries" + "state-version-outputs" ] } } }, - "no-code-queries-has-one": { + "state-version-outputs-has-many": { "type": "object", + "nullable": true, "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/no-code-queries-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" + "type": "array", + "items": { + "$ref": "#/components/schemas/state-version-outputs-identifier" + } } } }, - "queries": { + "state-versions": { "type": "object", "required": [ - "type", - "attributes", - "relationships" + "type" ], "properties": { "id": { @@ -38952,211 +41087,331 @@ "type": { "type": "string", "enum": [ - "queries" + "state-versions" ] }, "attributes": { "type": "object", "properties": { - "actions": { - "type": "object", - "required": [ - "is-cancelable", - "is-force-cancelable" - ], - "properties": { - "is-cancelable": { - "type": "boolean" - }, - "is-force-cancelable": { - "type": "boolean" - } - } - }, - "canceled-at": { + "created-at": { "type": "string", "format": "date-time", + "readOnly": true + }, + "size": { + "type": "integer", "nullable": true, "readOnly": true }, - "updated-at": { + "hosted-state-download-url": { "type": "string", - "format": "date-time", + "nullable": true, "readOnly": true }, - "created-at": { + "hosted-json-state-download-url": { "type": "string", - "format": "date-time", + "nullable": true, "readOnly": true }, - "source": { + "hosted-state-upload-url": { "type": "string", - "enum": [ - "tfe-api", - "tfe-ui", - "tfe-module", - "tfe-no-code-query", - "terraform", - "terraform-mcp" - ] + "nullable": true, + "readOnly": true }, - "generate-config-out": { - "type": "boolean" + "hosted-json-state-upload-url": { + "type": "string", + "nullable": true, + "readOnly": true }, - "policy-evaluation-opt-in": { - "type": "boolean", - "writeOnly": true, - "description": "Opts this query into policy evaluation. When query-policy-opt-in is enabled, omitted input defaults to true only for tfe-ui queries with generate-config-out enabled (which defaults to true); otherwise it defaults to false. Explicit true requires a UI source and generated configuration. Explicit false opts out. Supplied input must be a non-null boolean when the feature is enabled. When the feature is disabled, this input is ignored and false is persisted." + "encrypted-state-download-url": { + "type": "string", + "nullable": true, + "readOnly": true }, - "resources-discovered": { - "type": "integer", + "sanitized-state-download-url": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "sanitized-state-upload-url": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "modules": { + "type": "object", + "nullable": true, "readOnly": true, - "description": "The number of resources discovered by the query run." + "additionalProperties": true }, - "status-timestamps": { + "providers": { "type": "object", - "properties": { - "pending-at": { - "type": "string", - "format": "date-time" - }, - "queued-at": { - "type": "string", - "format": "date-time" - }, - "errored-at": { - "type": "string", - "format": "date-time" - }, - "canceled-at": { - "type": "string", - "format": "date-time" - }, - "running-at": { - "type": "string", - "format": "date-time" - }, - "finished-at": { - "type": "string", - "format": "date-time" + "nullable": true, + "readOnly": true, + "additionalProperties": true + }, + "resources": { + "type": "array", + "nullable": true, + "readOnly": true, + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "count": { + "type": "integer" + }, + "module": { + "type": "string" + }, + "provider": { + "type": "string" + } } } }, + "resources-processed": { + "type": "boolean", + "readOnly": true + }, + "serial": { + "type": "integer" + }, + "md5": { + "type": "string", + "writeOnly": true + }, + "lineage": { + "type": "string", + "writeOnly": true + }, + "state": { + "type": "string", + "writeOnly": true + }, + "json-state": { + "type": "string", + "writeOnly": true + }, + "json-state-outputs": { + "type": "string", + "writeOnly": true + }, + "force": { + "type": "boolean", + "writeOnly": true + }, + "state-version": { + "type": "integer", + "nullable": true, + "readOnly": true + }, "status": { "type": "string", + "readOnly": true, "enum": [ "pending", - "queued", - "running", - "finished", - "canceled", - "errored" + "finalized", + "discarded", + "backing_data_soft_deleted", + "backing_data_permanently_deleted" ] }, - "log-read-url": { - "type": "string", + "terraform-version": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "vcs-commit-url": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "vcs-commit-sha": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "intermediate": { + "type": "boolean", + "readOnly": true + }, + "billable-rum-count": { + "type": "integer", + "nullable": true, "readOnly": true }, "permissions": { "type": "object", + "readOnly": true, "properties": { - "can-cancel": { - "type": "boolean" - }, - "can-force-cancel": { - "type": "boolean" + "can-restore-backing-data": { + "type": "boolean", + "readOnly": true } } - }, - "force-cancel-available-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "policy-paths": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true } } }, "relationships": { "type": "object", - "required": [ - "workspace", - "configuration-version" - ], "properties": { - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" + "run": { + "$ref": "#/components/schemas/runs-has-one" }, - "canceled-by": { - "$ref": "#/components/schemas/users-has-one" + "rollback-state-version": { + "$ref": "#/components/schemas/state-versions-has-one" }, - "configuration-version": { - "$ref": "#/components/schemas/configuration-versions-has-one" + "next-state-version": { + "$ref": "#/components/schemas/state-versions-has-one" + }, + "previous-state-version": { + "$ref": "#/components/schemas/state-versions-has-one" }, "created-by": { "$ref": "#/components/schemas/users-has-one" }, - "no-code-query": { - "$ref": "#/components/schemas/no-code-queries-has-one", - "description": "The no-code query that triggered this query run, if any." + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "hyok-encrypted-data-key": { + "$ref": "#/components/schemas/hyok-encrypted-data-keys-has-one" + }, + "outputs": { + "$ref": "#/components/schemas/state-version-outputs-has-many" } } + }, + "links": { + "$ref": "#/components/schemas/self" } } }, - "queries-envelope": { + "no-code-modules-identifier": { "type": "object", "required": [ - "data" + "id", + "type" ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "no-code-modules" + ] + } + } + }, + "no-code-modules-has-one": { + "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/queries" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/no-code-modules-identifier" + } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "query-completion-summary": { + "variable-options-identifier": { "type": "object", "required": [ - "address", - "resource-type", - "total" + "id", + "type" ], "properties": { - "address": { - "type": "string", - "readOnly": true, - "description": "The resource address as it appeared in the query list completion." + "id": { + "type": "string" }, - "resource-type": { + "type": { "type": "string", - "readOnly": true, - "description": "The Terraform resource type for this list completion." + "enum": [ + "variable-options" + ] + } + } + }, + "variable-options-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/variable-options-identifier" + } + } + } + }, + "no-code-module-versions": { + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true }, - "total": { - "type": "integer", - "readOnly": true, - "description": "The total number of resources discovered for this address." + "type": { + "type": "string", + "enum": [ + "no-code-module-versions" + ] }, - "policies-passed": { - "type": "integer", - "readOnly": true, - "description": "The number of policies that passed for this resource address. Omitted when the query-policy feature is disabled for the organization.\n" + "attributes": { + "type": "object", + "properties": { + "module-version": { + "type": "string", + "readOnly": true, + "description": "Registry module version string this no-code module version pins\n(for example, 1.0.0).\n" + }, + "version-number": { + "type": "integer", + "readOnly": true, + "description": "Monotonic version number for this no-code module version record.\n" + } + } }, - "policies-failed": { - "type": "integer", - "readOnly": true, - "description": "The number of policies that failed for this resource address. Omitted when the query-policy feature is disabled for the organization.\n" + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "no-code-module": { + "$ref": "#/components/schemas/no-code-modules-has-one" + }, + "variable-options": { + "$ref": "#/components/schemas/variable-options-has-many" + } + } } } }, - "queries-identifier": { + "registry-modules-identifier": { "type": "object", + "required": [ + "id", + "type" + ], "properties": { "id": { "type": "string" @@ -39164,19 +41419,19 @@ "type": { "type": "string", "enum": [ - "queries" + "registry-modules" ] } } }, - "queries-has-one": { + "registry-modules-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/queries-identifier" + "$ref": "#/components/schemas/registry-modules-identifier" } ], "nullable": true @@ -39186,12 +41441,12 @@ } } }, - "no-code-query": { + "no-code-modules": { "type": "object", "required": [ + "id", "type", - "attributes", - "relationships" + "attributes" ], "properties": { "id": { @@ -39201,86 +41456,131 @@ "type": { "type": "string", "enum": [ - "no-code-queries" + "no-code-modules" ] }, "attributes": { "type": "object", "properties": { - "source": { + "enabled": { + "type": "boolean", + "description": "Whether this no-code module is enabled for deployment." + }, + "version-pin": { "type": "string", - "enum": [ - "terraform-mcp" - ], - "writeOnly": true, - "description": "The source assigned to the query run triggered on create. Only Terraform MCP may explicitly set this value. When omitted, the query run uses the default No-Code Query source." + "nullable": true, + "description": "Optional pinned module version for no-code deployments." + } + } + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" }, - "generate-config-out": { - "type": "boolean", - "writeOnly": true, - "description": "Whether to generate config output for the query run triggered on create. This is a create-only input and is not returned by the GET endpoint. Defaults to false." + "registry-module": { + "$ref": "#/components/schemas/registry-modules-has-one" }, - "policy-evaluation-opt-in": { - "type": "boolean", - "writeOnly": true, - "description": "Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration and is invalid for Terraform MCP queries. When the feature is inactive, all values resolve to false." + "variable-options": { + "$ref": "#/components/schemas/variable-options-has-many" }, - "no-code-query-providers": { - "type": "array", - "items": { - "type": "object", - "required": [ - "namespace", - "name", - "version", - "no-code-query-resources" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "namespace": { - "type": "string" - }, - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "no-code-query-resources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "body": { - "type": "object", - "additionalProperties": true - } - } - } - } + "latest-version": { + "$ref": "#/components/schemas/no-code-module-versions-has-one" + } + } + }, + "links": { + "$ref": "#/components/schemas/self" + } + } + }, + "workspace-outputs": { + "type": "object", + "description": "Workspace outputs are Terraform output values associated with a workspace.\nThey include the name of the output and a sensitive boolean. There is an\nadditional attribute, \"value\", that can be any JSON type, including null when\nthe output is sensitive; it is intentionally omitted from this schema (same\npattern as state-version-outputs) because OpenAPI cannot express a nullable\nany-type under the project's nullable-type-sibling lint rule.\n", + "required": [ + "id", + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "workspace-outputs" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "sensitive": { + "type": "boolean" + }, + "output-type": { + "type": "string", + "description": "The Terraform type of the output value (e.g. string, number, bool,\nlist, map, set, object, tuple).\n" + }, + "detailed-type": { + "description": "A detailed representation of the output type. May be a string for\nsimple types or an array for complex types such as tuples and objects.\n" + }, + "workspace-attributes": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "organization-attributes": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" } } } } + } + } + }, + "workspace-readme": { + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true }, - "relationships": { + "type": { + "type": "string", + "enum": [ + "workspace-readme" + ] + }, + "attributes": { "type": "object", - "required": [ - "workspace" - ], "properties": { - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" - }, - "latest-query-run": { - "$ref": "#/components/schemas/queries-has-one" + "raw-markdown": { + "type": "string", + "readOnly": true, + "description": "Raw markdown contents of the workspace README." } } } @@ -39366,7 +41666,216 @@ } } }, - "vars": { + "vars": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "vars" + ] + }, + "attributes": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + }, + "sensitive": { + "type": "boolean" + }, + "category": { + "type": "string", + "enum": [ + "terraform", + "env", + "terraform-cloud", + "policy-set" + ] + }, + "hcl": { + "type": "boolean" + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "description": { + "type": "string", + "nullable": true + }, + "version-id": { + "type": "string" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "configurable": { + "$ref": "#/components/schemas/configurable-has-one" + }, + "varset": { + "$ref": "#/components/schemas/varsets-has-one" + }, + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "overwritten": { + "$ref": "#/components/schemas/vars-has-many" + }, + "overwriter": { + "$ref": "#/components/schemas/vars-has-one" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" + } + } + } + } + }, + "workspaces-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/agent-pools" + }, + { + "$ref": "#/components/schemas/assessment-results" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/state-versions" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/no-code-module-versions" + }, + { + "$ref": "#/components/schemas/no-code-modules" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/workspace-outputs" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspace-readme" + }, + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/effective-tag-bindings" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "agent-pools": "#/components/schemas/agent-pools", + "assessment-results": "#/components/schemas/assessment-results", + "configuration-versions": "#/components/schemas/configuration-versions", + "runs": "#/components/schemas/runs", + "applies": "#/components/schemas/applies", + "plans": "#/components/schemas/plans", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "state-versions": "#/components/schemas/state-versions", + "users": "#/components/schemas/users", + "no-code-module-versions": "#/components/schemas/no-code-module-versions", + "no-code-modules": "#/components/schemas/no-code-modules", + "organizations": "#/components/schemas/organizations", + "workspace-outputs": "#/components/schemas/workspace-outputs", + "projects": "#/components/schemas/projects", + "workspace-readme": "#/components/schemas/workspace-readme", + "vars": "#/components/schemas/vars", + "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" + } + } + } + }, + "workspaces-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/workspaces" + } + } + }, + "subscribable-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "workspaces", + "projects", + "teams", + "stacks" + ] + } + } + }, + "subscribable-has-one": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/subscribable-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "notification-configurations": { "type": "object", "required": [ "type", @@ -39380,91 +41889,131 @@ "type": { "type": "string", "enum": [ - "vars" + "notification-configurations" ] }, "attributes": { "type": "object", + "required": [ + "name", + "destination-type", + "enabled" + ], "properties": { - "key": { - "type": "string" - }, - "value": { + "name": { "type": "string", - "nullable": true - }, - "sensitive": { - "type": "boolean" + "description": "The name of the notification configuration." }, - "category": { + "destination-type": { "type": "string", + "description": "The type of notification destination (e.g., email, slack, generic, microsoft-teams).", "enum": [ - "terraform", - "env", - "terraform-cloud", - "policy-set" + "email", + "slack", + "generic", + "microsoft-teams" ] }, - "hcl": { - "type": "boolean" + "enabled": { + "type": "boolean", + "description": "Whether the notification configuration is enabled." }, - "created-at": { + "triggers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of trigger events for this notification." + }, + "url": { "type": "string", - "format": "date-time", - "readOnly": true + "nullable": true, + "description": "The webhook URL for non-email destinations." }, - "description": { + "token": { "type": "string", - "nullable": true + "nullable": true, + "writeOnly": true, + "description": "The authentication token for the webhook." }, - "version-id": { - "type": "string" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "configurable": { - "$ref": "#/components/schemas/configurable-has-one" + "email-addresses": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "description": "Email addresses for email-type notifications." }, - "varset": { - "$ref": "#/components/schemas/varsets-has-one" + "user-email-addresses": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "readOnly": true, + "description": "Email addresses of users associated with this notification." }, - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" + "external-email-addresses": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "readOnly": true, + "description": "External email addresses (not associated with users) for this notification." }, - "overwritten": { - "$ref": "#/components/schemas/vars-has-many" + "delivery-responses": { + "type": "array", + "items": { + "type": "object" + }, + "readOnly": true, + "description": "Responses from notification delivery attempts." }, - "overwriter": { - "$ref": "#/components/schemas/vars-has-one" + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true } } }, - "links": { + "relationships": { "type": "object", "properties": { - "self": { - "type": "string" + "subscribable": { + "description": "The resource (workspace, project, or team) this notification is configured for.", + "$ref": "#/components/schemas/subscribable-has-one" + }, + "users": { + "description": "Users associated with this notification (for email type).", + "$ref": "#/components/schemas/users-has-many" } } } } }, - "vars-envelope": { + "notification-configurations-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/vars" + "$ref": "#/components/schemas/notification-configurations" } } }, - "provider-sets": { + "email-recipient-statuses": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { "type": "string", @@ -39473,121 +42022,60 @@ "type": { "type": "string", "enum": [ - "provider-sets" + "email-recipient-statuses" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { + "email": { "type": "string", - "nullable": true - }, - "global": { - "type": "boolean" + "description": "The email address of the recipient" }, - "updated-at": { + "verified-at": { "type": "string", "format": "date-time", - "readOnly": true + "nullable": true, + "description": "The timestamp when the email was verified" }, - "created-at": { + "unsubscribed-at": { "type": "string", "format": "date-time", - "readOnly": true + "nullable": true, + "description": "The timestamp when the email was unsubscribed" }, - "priority": { - "type": "boolean" + "delivery-failures-count": { + "type": "integer", + "readOnly": true, + "description": "The number of delivery failures for this email" }, - "provider-source": { + "created-at": { "type": "string", - "description": "Accepts either `{namespace}/{provider]` or `{hostname}/{namespace}/{provider}` Values are normalized to the fully qualified form.", - "pattern": "^(?:[A-Za-z0-9.-]+/)?[A-Za-z0-9-]+/[A-Za-z0-9-]+$", - "example": "registry.terraform.io/hashicorp/hcp" + "format": "date-time", + "readOnly": true }, - "configuration-hcl": { + "updated-at": { "type": "string", - "example": "provider \"hcp\" {\n client_id = var.hcp_client_id\n}\n" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "workspaces": { - "$ref": "#/components/schemas/workspaces-has-many" - }, - "projects": { - "$ref": "#/components/schemas/projects-has-many" + "format": "date-time", + "readOnly": true } } } } }, - "provider-sets-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/provider-sets" - } - } - }, - "projects-identifier-array-document": { + "email-recipient-statuses-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "type": "array", - "items": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "projects" - ] - }, - "id": { - "type": "string" - } - } - } - } - } - }, - "stacks-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/stacks-identifier" - } + "$ref": "#/components/schemas/email-recipient-statuses" } } }, - "varset-parent-identifier": { + "no-code-queries-identifier": { "type": "object", - "required": [ - "id", - "type" - ], "properties": { "id": { "type": "string" @@ -39595,28 +42083,35 @@ "type": { "type": "string", "enum": [ - "organizations", - "projects" + "no-code-queries" ] } } }, - "varset-parent-has-one": { + "no-code-queries-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/varset-parent-identifier" + "$ref": "#/components/schemas/no-code-queries-identifier" } ], "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "varsets": { + "queries": { "type": "object", + "required": [ + "type", + "attributes", + "relationships" + ], "properties": { "id": { "type": "string", @@ -39625,317 +42120,451 @@ "type": { "type": "string", "enum": [ - "varsets" + "queries" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string" + "actions": { + "type": "object", + "required": [ + "is-cancelable", + "is-force-cancelable" + ], + "properties": { + "is-cancelable": { + "type": "boolean" + }, + "is-force-cancelable": { + "type": "boolean" + } + } }, - "description": { + "canceled-at": { "type": "string", - "nullable": true - }, - "global": { - "type": "boolean" + "format": "date-time", + "nullable": true, + "readOnly": true }, "updated-at": { "type": "string", "format": "date-time", "readOnly": true }, - "var-count": { - "type": "integer", + "created-at": { + "type": "string", + "format": "date-time", "readOnly": true }, - "workspace-count": { - "type": "integer", - "readOnly": true + "source": { + "type": "string", + "description": "The query source. Requests with the X-Terraform-Integration header set to cloud are stored and returned with source terraform, overriding the submitted source. Terraform CLI 1.14 sends this header with source tfe-api.", + "enum": [ + "tfe-api", + "tfe-ui", + "tfe-module", + "tfe-no-code-query", + "terraform", + "terraform-mcp" + ] }, - "project-count": { - "type": "integer", - "readOnly": true + "generate-config-out": { + "type": "boolean" }, - "stack-count": { + "policy-evaluation-opt-in": { + "type": "boolean", + "writeOnly": true, + "description": "Opts this query into policy evaluation. When query-policy-opt-in is enabled, omitted input defaults to true only for tfe-ui queries with generate-config-out enabled (which defaults to true); otherwise it defaults to false. Explicit true requires a UI, API, or MCP source and generated configuration. Explicit false opts out for those sources. Terraform CLI queries (source terraform) retain workspace policy evaluation regardless of this preference or generate-config-out, subject to the existing query-policy gates. Supplied input must be a non-null boolean when the feature is enabled. When the feature is disabled, this input is ignored and false is persisted; workspace policy evaluation retains its existing query-policy behavior." + }, + "resources-discovered": { "type": "integer", - "readOnly": true + "readOnly": true, + "description": "The number of resources discovered by the query run." }, - "priority": { - "type": "boolean" + "status-timestamps": { + "type": "object", + "properties": { + "pending-at": { + "type": "string", + "format": "date-time" + }, + "queued-at": { + "type": "string", + "format": "date-time" + }, + "errored-at": { + "type": "string", + "format": "date-time" + }, + "canceled-at": { + "type": "string", + "format": "date-time" + }, + "running-at": { + "type": "string", + "format": "date-time" + }, + "finished-at": { + "type": "string", + "format": "date-time" + } + } + }, + "status": { + "type": "string", + "enum": [ + "pending", + "queued", + "running", + "finished", + "canceled", + "errored" + ] + }, + "log-read-url": { + "type": "string", + "readOnly": true }, "permissions": { "type": "object", - "readOnly": true, "properties": { - "can-update": { + "can-cancel": { + "type": "boolean" + }, + "can-force-cancel": { "type": "boolean" } } + }, + "force-cancel-available-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "policy-paths": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true } } }, "relationships": { "type": "object", + "required": [ + "workspace", + "configuration-version" + ], "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "vars": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "vars" - ] - }, - "attributes": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string", - "nullable": true - }, - "category": { - "type": "string", - "enum": [ - "terraform", - "env" - ] - } - } - } - } - } - } - } + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" }, - "workspaces": { - "$ref": "#/components/schemas/workspaces-has-many" + "canceled-by": { + "$ref": "#/components/schemas/users-has-one" }, - "projects": { - "$ref": "#/components/schemas/projects-has-many" + "configuration-version": { + "$ref": "#/components/schemas/configuration-versions-has-one" }, - "stacks": { - "$ref": "#/components/schemas/stacks-has-many" + "created-by": { + "$ref": "#/components/schemas/users-has-one" }, - "parent": { - "$ref": "#/components/schemas/varset-parent-has-one" + "no-code-query": { + "$ref": "#/components/schemas/no-code-queries-has-one", + "description": "The no-code query that triggered this query run, if any." } } } } }, - "varsets-envelope": { + "queries-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/queries" + } + } + }, + "query-completion-summary": { + "type": "object", + "required": [ + "address", + "resource-type", + "total" + ], + "properties": { + "address": { + "type": "string", + "readOnly": true, + "description": "The resource address as it appeared in the query list completion." + }, + "resource-type": { + "type": "string", + "readOnly": true, + "description": "The Terraform resource type for this list completion." + }, + "total": { + "type": "integer", + "readOnly": true, + "description": "The total number of resources discovered for this address." + }, + "policies-passed": { + "type": "integer", + "readOnly": true, + "description": "The number of policies that passed for this resource address. Omitted when the query-policy feature is disabled for the organization.\n" + }, + "policies-failed": { + "type": "integer", + "readOnly": true, + "description": "The number of policies that failed for this resource address. Omitted when the query-policy feature is disabled for the organization.\n" + } + } + }, + "queries-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "queries" + ] + } + } + }, + "queries-has-one": { "type": "object", - "required": [ - "data" - ], "properties": { "data": { - "$ref": "#/components/schemas/varsets" + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/queries-identifier" + } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "jsonapi-resource-identifier": { + "no-code-query": { "type": "object", "required": [ "type", - "id" + "attributes", + "relationships" ], "properties": { + "id": { + "type": "string", + "readOnly": true + }, "type": { - "type": "string" + "type": "string", + "enum": [ + "no-code-queries" + ] }, - "id": { - "type": "string" + "attributes": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "terraform-mcp" + ], + "writeOnly": true, + "description": "The source assigned to the query run triggered on create. Only Terraform MCP may explicitly set this value. When omitted, the query run uses the default No-Code Query source." + }, + "generate-config-out": { + "type": "boolean", + "writeOnly": true, + "description": "Whether to generate config output for the query run triggered on create. This is a create-only input and is not returned by the GET endpoint. Defaults to false." + }, + "policy-evaluation-opt-in": { + "type": "boolean", + "writeOnly": true, + "description": "Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration for both UI and Terraform MCP queries. When the feature is inactive, all values resolve to false and workspace policy evaluation retains its existing query-policy behavior." + }, + "no-code-query-providers": { + "type": "array", + "items": { + "type": "object", + "required": [ + "namespace", + "name", + "version", + "no-code-query-resources" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "namespace": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "no-code-query-resources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "body": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + } + } + }, + "relationships": { + "type": "object", + "required": [ + "workspace" + ], + "properties": { + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "latest-query-run": { + "$ref": "#/components/schemas/queries-has-one" + } + } } } }, - "jsonapi-identifier-array-document": { + "vars-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/jsonapi-resource-identifier" - } + "$ref": "#/components/schemas/vars" } } }, - "workspace-resource": { + "provider-sets": { "type": "object", - "required": [ - "id", - "type", - "attributes" - ], "properties": { "id": { "type": "string", - "readOnly": true, - "description": "The ID of the workspace resource" + "readOnly": true }, "type": { "type": "string", "enum": [ - "resources" + "provider-sets" ] }, "attributes": { "type": "object", "properties": { - "address": { - "type": "string", - "description": "The full address of the resource in Terraform configuration" - }, "name": { - "type": "string", - "description": "The name of the resource" + "type": "string" }, - "created-at": { + "description": { "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true, - "description": "The timestamp when the resource was first created" + "nullable": true + }, + "global": { + "type": "boolean" }, "updated-at": { "type": "string", "format": "date-time", - "nullable": true, - "readOnly": true, - "description": "The timestamp when the resource was last updated" - }, - "module": { - "type": "string", - "nullable": true, - "description": "The module name where the resource is defined (e.g., \"root\" for root module)" + "readOnly": true }, - "provider": { + "created-at": { "type": "string", - "nullable": true, - "description": "The provider name (e.g., \"hashicorp/random\")" + "format": "date-time", + "readOnly": true }, - "provider-type": { - "type": "string", - "nullable": true, - "description": "The resource type from the provider (e.g., \"random_pet\")" + "priority": { + "type": "boolean" }, - "modified-by-state-version-id": { + "provider-source": { "type": "string", - "nullable": true, - "readOnly": true, - "description": "The ID of the state version that last modified this resource" + "description": "Accepts either `{namespace}/{provider]` or `{hostname}/{namespace}/{provider}` Values are normalized to the fully qualified form.", + "pattern": "^(?:[A-Za-z0-9.-]+/)?[A-Za-z0-9-]+/[A-Za-z0-9-]+$", + "example": "registry.terraform.io/hashicorp/hcp" }, - "name-index": { + "configuration-hcl": { "type": "string", - "nullable": true, - "description": "The index of the resource when there are multiple instances with the same name" + "example": "provider \"hcp\" {\n client_id = var.hcp_client_id\n}\n" } } - } - } - }, - "ssh-keys-nullable-identifier-document": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { + }, + "relationships": { "type": "object", - "nullable": true, "properties": { - "type": { - "type": "string", - "enum": [ - "ssh-keys" - ] + "organization": { + "$ref": "#/components/schemas/organizations-has-one" }, - "id": { - "type": "string", - "nullable": true + "workspaces": { + "$ref": "#/components/schemas/workspaces-has-many" + }, + "projects": { + "$ref": "#/components/schemas/projects-has-many" } } } } }, - "workspace-vars-update-document": { + "provider-sets-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "type": "array", - "items": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "vars" - ] - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string", - "nullable": true - }, - "sensitive": { - "type": "boolean" - }, - "category": { - "type": "string", - "enum": [ - "terraform", - "env" - ] - }, - "hcl": { - "type": "boolean" - }, - "description": { - "type": "string", - "nullable": true - } - } - } - } + "$ref": "#/components/schemas/provider-sets" + } + } + }, + "provider-sets-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "workspaces": "#/components/schemas/workspaces" } } } }, - "tags-create-array-document": { + "projects-identifier-array-document": { "type": "object", "required": [ "data" @@ -39946,61 +42575,37 @@ "items": { "type": "object", "required": [ - "type" + "type", + "id" ], "properties": { "type": { "type": "string", "enum": [ - "tags" + "projects" ] }, "id": { "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } } } } } } }, - "tags-remove-array-document": { + "stacks-has-many": { "type": "object", - "required": [ - "data" - ], + "nullable": true, "properties": { "data": { "type": "array", "items": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "tags" - ] - }, - "id": { - "type": "string" - } - } + "$ref": "#/components/schemas/stacks-identifier" } } } }, - "hyok-encrypted-data-keys-identifier": { + "varset-parent-identifier": { "type": "object", "required": [ "id", @@ -40013,56 +42618,28 @@ "type": { "type": "string", "enum": [ - "hyok-encrypted-data-keys" + "organizations", + "projects" ] } } }, - "hyok-encrypted-data-keys-has-one": { + "varset-parent-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/hyok-encrypted-data-keys-identifier" + "$ref": "#/components/schemas/varset-parent-identifier" } ], "nullable": true } } }, - "state-version-outputs-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "state-version-outputs" - ] - } - } - }, - "state-version-outputs-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/state-version-outputs-identifier" - } - } - } - }, - "state-versions": { + "varsets": { "type": "object", - "required": [ - "type" - ], "properties": { "id": { "type": "string", @@ -40071,259 +42648,161 @@ "type": { "type": "string", "enum": [ - "state-versions" + "varsets" ] }, "attributes": { "type": "object", "properties": { - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "size": { - "type": "integer", - "nullable": true, - "readOnly": true + "name": { + "type": "string" }, - "hosted-state-download-url": { + "description": { "type": "string", - "nullable": true, - "readOnly": true + "nullable": true }, - "hosted-json-state-download-url": { - "type": "string", - "nullable": true, - "readOnly": true + "global": { + "type": "boolean" }, - "hosted-state-upload-url": { + "updated-at": { "type": "string", - "nullable": true, + "format": "date-time", "readOnly": true }, - "hosted-json-state-upload-url": { - "type": "string", - "nullable": true, + "var-count": { + "type": "integer", "readOnly": true }, - "encrypted-state-download-url": { - "type": "string", - "nullable": true, + "workspace-count": { + "type": "integer", "readOnly": true }, - "sanitized-state-download-url": { - "type": "string", - "nullable": true, + "project-count": { + "type": "integer", "readOnly": true }, - "sanitized-state-upload-url": { - "type": "string", - "nullable": true, + "stack-count": { + "type": "integer", "readOnly": true }, - "modules": { - "type": "object", - "nullable": true, - "readOnly": true, - "additionalProperties": true + "priority": { + "type": "boolean" }, - "providers": { + "permissions": { "type": "object", - "nullable": true, - "readOnly": true, - "additionalProperties": true - }, - "resources": { - "type": "array", - "nullable": true, "readOnly": true, - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "count": { - "type": "integer" - }, - "module": { - "type": "string" - }, - "provider": { - "type": "string" - } + "properties": { + "can-update": { + "type": "boolean" } } + } + } + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" }, - "resources-processed": { - "type": "boolean", - "readOnly": true - }, - "serial": { - "type": "integer" - }, - "md5": { - "type": "string", - "writeOnly": true - }, - "lineage": { - "type": "string", - "writeOnly": true - }, - "state": { - "type": "string", - "writeOnly": true - }, - "json-state": { - "type": "string", - "writeOnly": true - }, - "json-state-outputs": { - "type": "string", - "writeOnly": true - }, - "force": { - "type": "boolean", - "writeOnly": true - }, - "state-version": { - "type": "integer", - "nullable": true, - "readOnly": true - }, - "status": { - "type": "string", - "readOnly": true, - "enum": [ - "pending", - "finalized", - "discarded", - "backing_data_soft_deleted", - "backing_data_permanently_deleted" - ] - }, - "terraform-version": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "vcs-commit-url": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "vcs-commit-sha": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "intermediate": { - "type": "boolean", - "readOnly": true - }, - "billable-rum-count": { - "type": "integer", - "nullable": true, - "readOnly": true - }, - "permissions": { + "vars": { "type": "object", - "readOnly": true, "properties": { - "can-restore-backing-data": { - "type": "boolean", - "readOnly": true + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "vars" + ] + }, + "attributes": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + }, + "category": { + "type": "string", + "enum": [ + "terraform", + "env" + ] + } + } + } + } + } } } - } - } - }, - "relationships": { - "type": "object", - "properties": { - "run": { - "$ref": "#/components/schemas/runs-has-one" - }, - "rollback-state-version": { - "$ref": "#/components/schemas/state-versions-has-one" - }, - "next-state-version": { - "$ref": "#/components/schemas/state-versions-has-one" - }, - "previous-state-version": { - "$ref": "#/components/schemas/state-versions-has-one" }, - "created-by": { - "$ref": "#/components/schemas/users-has-one" + "workspaces": { + "$ref": "#/components/schemas/workspaces-has-many" }, - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" + "projects": { + "$ref": "#/components/schemas/projects-has-many" }, - "hyok-encrypted-data-key": { - "$ref": "#/components/schemas/hyok-encrypted-data-keys-has-one" + "stacks": { + "$ref": "#/components/schemas/stacks-has-many" }, - "outputs": { - "$ref": "#/components/schemas/state-version-outputs-has-many" + "parent": { + "$ref": "#/components/schemas/varset-parent-has-one" } } - }, - "links": { - "$ref": "#/components/schemas/self" } } }, - "current-state-version-envelope": { + "varsets-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/state-versions" - }, - "included": { - "type": "array", - "items": { - "type": "object" - } + "$ref": "#/components/schemas/varsets" } } }, - "assessment-source-identifier": { + "jsonapi-resource-identifier": { "type": "object", "required": [ - "id", - "type" + "type", + "id" ], "properties": { - "id": { + "type": { "type": "string" }, - "type": { - "type": "string", - "enum": [ - "assessments", - "plans" - ] + "id": { + "type": "string" } } }, - "assessment-source-has-one": { + "jsonapi-identifier-array-document": { "type": "object", + "required": [ + "data" + ], "properties": { "data": { - "$ref": "#/components/schemas/assessment-source-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" + "type": "array", + "items": { + "$ref": "#/components/schemas/jsonapi-resource-identifier" + } } } }, - "assessment-results": { + "workspace-resource": { "type": "object", "required": [ "id", @@ -40333,288 +42812,429 @@ "properties": { "id": { "type": "string", - "example": "asmtres-8F5JFydVYAmtTjET" + "readOnly": true, + "description": "The ID of the workspace resource" }, "type": { "type": "string", "enum": [ - "assessment-results" + "resources" ] }, "attributes": { "type": "object", "properties": { - "succeeded": { - "type": "boolean", - "description": "Whether the assessment completed successfully" - }, - "all-checks-succeeded": { - "type": "boolean", - "description": "Whether all health checks passed" - }, - "checks-errored": { - "type": "integer", - "description": "Number of health checks that errored", - "nullable": true - }, - "checks-failed": { - "type": "integer", - "description": "Number of health checks that failed", - "nullable": true - }, - "checks-passed": { - "type": "integer", - "description": "Number of health checks that passed", - "nullable": true + "address": { + "type": "string", + "description": "The full address of the resource in Terraform configuration" }, - "checks-unknown": { - "type": "integer", - "description": "Number of health checks with unknown status", - "nullable": true + "name": { + "type": "string", + "description": "The name of the resource" }, "created-at": { "type": "string", "format": "date-time", - "description": "Timestamp when the assessment result was created" - }, - "drifted": { - "type": "boolean", - "description": "Whether drift was detected" - }, - "error-message": { - "type": "string", - "nullable": true, - "description": "Error message if the assessment failed" - }, - "resources-drifted": { - "type": "integer", "nullable": true, - "description": "Number of resources that have drifted" + "readOnly": true, + "description": "The timestamp when the resource was first created" }, - "resources-undrifted": { - "type": "integer", + "updated-at": { + "type": "string", + "format": "date-time", "nullable": true, - "description": "Number of resources that have not drifted" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "workspace": { - "description": "The workspace this assessment result belongs to", - "$ref": "#/components/schemas/workspaces-has-one" + "readOnly": true, + "description": "The timestamp when the resource was last updated" }, - "source": { - "description": "The source assessment or plan that produced this result.", - "$ref": "#/components/schemas/assessment-source-has-one" - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { + "module": { "type": "string", - "description": "API URL for this assessment result" + "nullable": true, + "description": "The module name where the resource is defined (e.g., \"root\" for root module)" }, - "json-output": { + "provider": { "type": "string", "nullable": true, - "description": "API URL for the JSON formatted assessment output (available when assessment succeeded)" + "description": "The provider name (e.g., \"hashicorp/random\")" }, - "json-schema": { + "provider-type": { "type": "string", "nullable": true, - "description": "API URL for the JSON schema of this assessment (available when assessment succeeded)" + "description": "The resource type from the provider (e.g., \"random_pet\")" }, - "sanitized-plan": { + "modified-by-state-version-id": { "type": "string", "nullable": true, - "description": "API URL for the sanitized plan (available when HYOK is enabled and assessment succeeded)", - "x-vis": [ - "public-beta" - ] + "readOnly": true, + "description": "The ID of the state version that last modified this resource" }, - "log-output": { + "name-index": { "type": "string", - "description": "API URL to read the logs for this assessment" + "nullable": true, + "description": "The index of the resource when there are multiple instances with the same name" } } } } }, - "assessment-results-envelope": { + "ssh-keys-nullable-identifier-document": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/assessment-results" - } - } - }, - "applies-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "applies" - ] + "type": "object", + "nullable": true, + "properties": { + "type": { + "type": "string", + "enum": [ + "ssh-keys" + ] + }, + "id": { + "type": "string", + "nullable": true + } + } } } }, - "applies-has-one": { + "workspace-vars-update-document": { "type": "object", + "required": [ + "data" + ], "properties": { "data": { - "$ref": "#/components/schemas/applies-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "vars" + ] + }, + "id": { + "type": "string" + }, + "attributes": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + }, + "sensitive": { + "type": "boolean" + }, + "category": { + "type": "string", + "enum": [ + "terraform", + "env" + ] + }, + "hcl": { + "type": "boolean" + }, + "description": { + "type": "string", + "nullable": true + } + } + } + } + } } } }, - "cost-estimates-identifier": { + "tags-create-array-document": { "type": "object", + "required": [ + "data" + ], "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "cost-estimates" - ] + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "tags" + ] + }, + "id": { + "type": "string" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + } + } } } }, - "cost-estimates-has-one": { + "tags-remove-array-document": { "type": "object", + "required": [ + "data" + ], "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/cost-estimates-identifier" + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "tags" + ] + }, + "id": { + "type": "string" + } } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" + } } } }, - "plans-identifier": { + "state-version-outputs": { "type": "object", + "description": "State version outputs are the output values from a Terraform state file for a workspace. They include the name and value of the output, as well as a sensitive boolean if the value should be hidden by default in UIs. There is an additional attribute, \"value\" that can be any type, including null if the value is sensitive and part of a list response.", "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true }, "type": { "type": "string", "enum": [ - "plans" + "state-version-outputs" ] - } - } - }, - "plans-has-one": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/plans-identifier" }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "run-events-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "sensitive": { + "type": "boolean" + }, + "type": { + "type": "string", + "description": "The Terraform type of the output value (e.g. \"string\", \"number\", \"bool\", \"list\", \"map\", \"set\", \"object\", \"tuple\")." + }, + "detailed-type": { + "description": "A detailed representation of the output type. May be a string for simple types or an array for complex types such as tuples and objects." + } + } }, - "type": { - "type": "string", - "enum": [ - "run-events" - ] + "links": { + "$ref": "#/components/schemas/self" } } }, - "run-events-has-many": { + "current-state-version-envelope": { "type": "object", - "nullable": true, + "required": [ + "data" + ], "properties": { "data": { + "$ref": "#/components/schemas/state-versions" + }, + "included": { "type": "array", "items": { - "$ref": "#/components/schemas/run-events-identifier" + "oneOf": [ + { + "$ref": "#/components/schemas/state-version-outputs" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "state-version-outputs": "#/components/schemas/state-version-outputs" + } + } } } } }, - "task-stages-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "task-stages" - ] + "current-state-version-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/state-version-outputs" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "state-version-outputs": "#/components/schemas/state-version-outputs" + } } } }, - "task-stages-has-many": { + "assessment-results-envelope": { "type": "object", - "nullable": true, + "required": [ + "data" + ], "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/task-stages-identifier" - } + "$ref": "#/components/schemas/assessment-results" } } }, - "policy-checks-identifier": { + "cost-estimates": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true }, "type": { "type": "string", "enum": [ - "policy-checks" + "cost-estimates" ] - } - } - }, - "policy-checks-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/policy-checks-identifier" + }, + "attributes": { + "type": "object", + "properties": { + "error-message": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "pending", + "queued", + "finished", + "canceled", + "errored", + "unreachable", + "skipped_due_to_targeting" + ] + }, + "status-timestamps": { + "type": "object", + "properties": { + "pending-at": { + "type": "string", + "format": "date-time" + }, + "queued-at": { + "type": "string", + "format": "date-time" + }, + "finished-at": { + "type": "string", + "format": "date-time" + }, + "canceled-at": { + "type": "string", + "format": "date-time" + }, + "errored-at": { + "type": "string", + "format": "date-time" + }, + "skipped-due-to-targeting-at": { + "type": "string", + "format": "date-time" + } + } + }, + "resources": { + "type": "object", + "nullable": true, + "description": "Low-level cost estimation details, only present when status is \"finished\". The keys or structure of this hash may change over time.", + "properties": { + "matched": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "unmatched": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "resources-count": { + "type": "integer", + "nullable": true, + "description": "Total number of resources. Only present when status is \"finished\"." + }, + "matched-resources-count": { + "type": "integer", + "nullable": true, + "description": "Number of matched resources. Only present when status is \"finished\"." + }, + "unmatched-resources-count": { + "type": "integer", + "nullable": true, + "description": "Number of unmatched resources. Only present when status is \"finished\"." + }, + "prior-monthly-cost": { + "type": "string", + "nullable": true, + "description": "Prior monthly cost as a decimal string. Only present when status is \"finished\"." + }, + "proposed-monthly-cost": { + "type": "string", + "nullable": true, + "description": "Proposed monthly cost as a decimal string. Only present when status is \"finished\"." + }, + "delta-monthly-cost": { + "type": "string", + "nullable": true, + "description": "Delta monthly cost as a decimal string. Only present when status is \"finished\"." + } } } } }, - "workspace-comments-identifier": { + "task-results-identifier": { "type": "object", "properties": { "id": { @@ -40623,24 +43243,24 @@ "type": { "type": "string", "enum": [ - "workspace-comments" + "task-results" ] } } }, - "workspace-comments-has-many": { + "task-results-has-many": { "type": "object", "nullable": true, "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/workspace-comments-identifier" + "$ref": "#/components/schemas/task-results-identifier" } } } }, - "tf-policy-evaluations-identifier": { + "policy-evaluations-identifier": { "type": "object", "properties": { "id": { @@ -40649,29 +43269,25 @@ "type": { "type": "string", "enum": [ - "tf-policy-evaluations" + "policy-evaluations" ] } } }, - "tf-policy-evaluations-has-many": { + "policy-evaluations-has-many": { "type": "object", "nullable": true, "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/tf-policy-evaluations-identifier" + "$ref": "#/components/schemas/policy-evaluations-identifier" } } } }, - "runs": { + "task-stages": { "type": "object", - "required": [ - "type", - "attributes" - ], "properties": { "id": { "type": "string", @@ -40680,428 +43296,125 @@ "type": { "type": "string", "enum": [ - "runs" + "task-stages" ] }, "attributes": { "type": "object", "properties": { - "actions": { - "type": "object", - "properties": { - "is-cancelable": { - "type": "boolean" - }, - "is-confirmable": { - "type": "boolean" - }, - "is-discardable": { - "type": "boolean" - }, - "is-force-cancelable": { - "type": "boolean" - } - } - }, - "allow-config-generation": { - "type": "boolean" - }, - "allow-empty-apply": { - "type": "boolean" - }, - "auto-apply": { - "type": "boolean" - }, - "comment": { - "type": "string", - "writeOnly": true - }, - "canceled-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "debugging-mode": { - "type": "boolean" - }, - "has-changes": { - "type": "boolean" - }, - "is-destroy": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "minimal-refresh": { - "type": "boolean" - }, - "plan-only": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "refresh-only": { - "type": "boolean" - }, - "replace-addrs": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "save-plan": { - "type": "boolean" - }, - "source": { - "type": "string" - }, - "status-timestamps": { - "type": "object", - "properties": { - "fetching-at": { - "type": "string", - "format": "date-time" - }, - "fetched-at": { - "type": "string", - "format": "date-time" - }, - "pre-plan-running-at": { - "type": "string", - "format": "date-time" - }, - "pre-plan-completed-at": { - "type": "string", - "format": "date-time" - }, - "plan-queued-at": { - "type": "string", - "format": "date-time" - }, - "planning-at": { - "type": "string", - "format": "date-time" - }, - "planned-at": { - "type": "string", - "format": "date-time" - }, - "tf-policy-checked-at": { - "type": "string", - "format": "date-time", - "x-vis": [ - "public-beta" - ], - "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." - }, - "tf-policy-override-at": { - "type": "string", - "format": "date-time", - "x-vis": [ - "public-beta" - ], - "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." - }, - "post-plan-running-at": { - "type": "string", - "format": "date-time" - }, - "post-plan-completed-at": { - "type": "string", - "format": "date-time" - }, - "cost-estimating-at": { - "type": "string", - "format": "date-time" - }, - "cost-estimated-at": { - "type": "string", - "format": "date-time" - }, - "policy-soft-failed-at": { - "type": "string", - "format": "date-time" - }, - "policy-checked-at": { - "type": "string", - "format": "date-time" - }, - "confirmed-at": { - "type": "string", - "format": "date-time" - }, - "planned-and-finished-at": { - "type": "string", - "format": "date-time" - }, - "planned-and-saved-at": { - "type": "string", - "format": "date-time" - }, - "pre-apply-running-at": { - "type": "string", - "format": "date-time" - }, - "pre-apply-completed-at": { - "type": "string", - "format": "date-time" - }, - "apply-queued-at": { - "type": "string", - "format": "date-time" - }, - "applying-at": { - "type": "string", - "format": "date-time" - }, - "post-apply-completed-at": { - "type": "string", - "format": "date-time" - }, - "applied-at": { - "type": "string", - "format": "date-time" - }, - "post-apply-running-at": { - "type": "string", - "format": "date-time" - }, - "discarded-at": { - "type": "string", - "format": "date-time" - }, - "errored-at": { - "type": "string", - "format": "date-time" - }, - "canceled-at": { - "type": "string", - "format": "date-time" - }, - "force-canceled-at": { - "type": "string", - "format": "date-time" - }, - "assessed-at": { - "type": "string", - "format": "date-time" - }, - "queuing-at": { - "type": "string", - "format": "date-time" - }, - "queuing-apply-at": { - "type": "string", - "format": "date-time" - } - } - }, "status": { "type": "string", - "description": "The current status of the run.\n\n**Note:** The following status values are in public-beta:\n- `tf_policy_checked` - Terraform Policy evaluation completed at plan stage\n- `tf_policy_override` - Terraform Policy evaluation was overridden at plan stage\n", + "readOnly": true, "enum": [ "pending", - "fetching", - "fetching_completed", - "pre_plan_running", - "pre_plan_completed", - "pre_plan_awaiting_decision", - "queuing", - "plan_queued", - "planning", - "planned", - "tf_policy_checked", - "tf_policy_override", - "post_plan_running", - "post_plan_completed", - "cost_estimating", - "cost_estimated", - "policy_checking", - "policy_override", - "policy_soft_failed", - "policy_checked", - "confirmed", - "pre_apply_running", - "pre_apply_completed", - "queuing_apply", - "apply_queued", - "applying", - "post_apply_running", - "post_apply_completed", - "applied", - "discarded", + "running", + "passed", + "failed", + "awaiting_override", "errored", "canceled", - "planned_and_finished", - "planned_and_saved", - "assessing", - "assessed" + "unreachable" ] }, - "target-addrs": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "trigger-reason": { - "type": "string" + "stage": { + "type": "string", + "readOnly": true, + "description": "The run stage during which this task stage executes (e.g., post_plan, pre_plan, pre_apply, post_apply)." }, - "terraform-version": { - "type": "string" + "status-timestamps": { + "type": "object", + "nullable": true, + "readOnly": true, + "additionalProperties": true, + "description": "A map of status names to timestamps indicating when the task stage entered each status. Keys are formatted as \"{status}-at\"." }, - "updated-at": { + "created-at": { "type": "string", "format": "date-time", "readOnly": true }, - "triggering-source-name": { + "updated-at": { "type": "string", - "nullable": true - }, - "policy-paths": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "invoke-action-addrs": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true + "format": "date-time", + "readOnly": true }, "permissions": { "type": "object", + "readOnly": true, "properties": { - "can-apply": { - "type": "boolean" - }, - "can-cancel": { - "type": "boolean" - }, - "can-comment": { - "type": "boolean" - }, - "can-discard": { - "type": "boolean" - }, - "can-force-execute": { + "can-override-policy": { "type": "boolean" }, - "can-force-cancel": { + "can-override-tasks": { "type": "boolean" }, - "can-override-policy-check": { + "can-override": { "type": "boolean" } } }, - "variables": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } + "actions": { + "type": "object", + "readOnly": true, + "properties": { + "is-overridable": { + "type": "boolean" } } - }, - "force-cancel-available-at": { - "type": "string", - "format": "date-time", - "readOnly": true } } }, "relationships": { "type": "object", "properties": { - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" - }, - "triggering-source": { - "$ref": "#/components/schemas/workspaces-has-one" - }, - "triggering-run": { + "run": { "$ref": "#/components/schemas/runs-has-one" }, - "apply": { - "$ref": "#/components/schemas/applies-has-one" - }, - "canceled-by": { - "$ref": "#/components/schemas/users-has-one" - }, - "configuration-version": { - "$ref": "#/components/schemas/configuration-versions-has-one" - }, - "confirmed-by": { - "$ref": "#/components/schemas/users-has-one" - }, "cost-estimate": { "$ref": "#/components/schemas/cost-estimates-has-one" }, - "created-by": { - "$ref": "#/components/schemas/users-has-one" - }, - "plan": { - "$ref": "#/components/schemas/plans-has-one" - }, - "run-events": { - "$ref": "#/components/schemas/run-events-has-many" - }, - "task-stages": { - "$ref": "#/components/schemas/task-stages-has-many" - }, - "policy-checks": { - "$ref": "#/components/schemas/policy-checks-has-many" - }, - "run-trigger-snapshots": { - "$ref": "#/components/schemas/links_related" - }, - "comments": { - "$ref": "#/components/schemas/workspace-comments-has-many" + "task-results": { + "$ref": "#/components/schemas/task-results-has-many" }, - "tf-policy-evaluations": { - "x-vis": [ - "public-beta" - ], - "$ref": "#/components/schemas/tf-policy-evaluations-has-many", - "description": "This relationship is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." + "policy-evaluations": { + "$ref": "#/components/schemas/policy-evaluations-has-many" } } + }, + "links": { + "$ref": "#/components/schemas/self" } } }, - "runs-envelope": { + "tf-policy-set-outcomes-identifier": { "type": "object", - "required": [ - "data" - ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "tf-policy-set-outcomes" + ] + } + } + }, + "tf-policy-set-outcomes-has-many": { + "type": "object", + "nullable": true, "properties": { "data": { - "$ref": "#/components/schemas/runs" + "type": "array", + "items": { + "$ref": "#/components/schemas/tf-policy-set-outcomes-identifier" + } } } }, - "configuration-versions": { + "tf-policy-evaluation": { "type": "object", + "description": "Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle.", "required": [ "type", "attributes" @@ -41114,97 +43427,194 @@ "type": { "type": "string", "enum": [ - "configuration-versions" + "tf-policy-evaluations" ] }, "attributes": { "type": "object", "properties": { - "auto-queue-runs": { - "type": "boolean" - }, - "error": { - "type": "string", - "nullable": true - }, - "error-message": { - "type": "string", - "nullable": true - }, - "source": { - "type": "string", - "nullable": true - }, - "speculative": { - "type": "boolean" - }, "status": { "type": "string", + "description": "Current status of the Terraform policy evaluation. Status values:\n- `pending`: Initial state, not yet queued for evaluation\n- `queued`: Queued and waiting to be evaluated\n- `running`: Actively being evaluated\n- `awaiting_override`: Failed with overridable policies, awaiting manual override\n- `passed`: All policies passed (final state)\n- `failed`: Failed with mandatory policies (final state)\n- `overridden`: Failed evaluation manually overridden (final state)\n- `errored`: System error during processing (final state)\n- `canceled`: Canceled before completion (final state)\n- `unreachable`: Pseudo-state derived from run state\n", "enum": [ "pending", - "fetching", - "uploaded", - "archived", + "queued", + "running", + "awaiting_override", + "passed", + "failed", + "overridden", "errored", - "backing_data_soft_deleted", - "backing_data_permanently_deleted" + "canceled", + "unreachable" ] }, + "stage-type": { + "type": "string", + "description": "The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init')" + }, "status-timestamps": { "type": "object", + "description": "Timestamps for each status transition during the evaluation lifecycle", "properties": { - "fetching-at": { + "pending-at": { "type": "string", "format": "date-time", - "nullable": true + "nullable": true, + "description": "When the evaluation entered pending status" }, - "uploaded-at": { + "queued-at": { "type": "string", "format": "date-time", - "nullable": true + "nullable": true, + "description": "When the evaluation was queued for processing" }, - "errored-at": { + "running-at": { "type": "string", "format": "date-time", - "nullable": true + "nullable": true, + "description": "When the evaluation started running" }, - "archived-at": { + "awaiting-override-at": { "type": "string", "format": "date-time", - "nullable": true + "nullable": true, + "description": "When the evaluation entered awaiting override status (for failed mandatory policies)" }, - "soft-delete-backing-data-at": { + "passed-at": { "type": "string", "format": "date-time", - "nullable": true + "nullable": true, + "description": "When the evaluation passed successfully" }, - "restore-backing-data-at": { + "failed-at": { "type": "string", "format": "date-time", - "nullable": true + "nullable": true, + "description": "When the evaluation failed" }, - "permanently-delete-backing-data-at": { + "overridden-at": { "type": "string", "format": "date-time", - "nullable": true + "nullable": true, + "description": "When a failed evaluation was overridden" + }, + "errored-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation encountered an error" + }, + "canceled-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation was canceled" } } }, - "provisional": { - "type": "boolean" + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "When the evaluation was created" }, - "upload-url": { + "updated-at": { "type": "string", + "format": "date-time", + "readOnly": true, + "description": "When the evaluation was last updated" + }, + "result-count": { + "type": "object", + "description": "Aggregated counts of policy results across all policy sets in this evaluation", + "properties": { + "advisory-failed": { + "type": "integer", + "description": "Policies with advisory enforcement level that failed" + }, + "mandatory-failed": { + "type": "integer", + "description": "Policies with mandatory enforcement level that failed" + }, + "mandatory-overridable-failed": { + "type": "integer", + "description": "Policies with mandatory-overridable enforcement level that failed" + }, + "passed": { + "type": "integer", + "description": "Policies that passed" + }, + "errored": { + "type": "integer", + "description": "Policies that errored during evaluation" + }, + "unknown": { + "type": "integer", + "description": "Policies with an unknown evaluation result" + } + } + }, + "error": { + "type": "object", "nullable": true, - "readOnly": true + "description": "Error information if the entire evaluation failed (not policy-specific errors)", + "properties": { + "type": { + "type": "string", + "enum": [ + "setup_error", + "incompatible_agent_version" + ], + "description": "Error type identifier indicating the category of failure" + }, + "summary": { + "type": "string", + "description": "Brief error summary for display" + }, + "detail": { + "type": "string", + "description": "Detailed error message with additional context" + } + } + }, + "archivist-supported": { + "type": "boolean", + "readOnly": true, + "description": "Whether this evaluation supports archivist-backed outcome storage. When `true`,\nfull policy results are available via `policy-set-result-url` on each\n`tf-policy-set-outcome`. When `false`, use the `outcomes` array instead.\n" + }, + "permissions": { + "type": "object", + "description": "User permissions for this evaluation", + "properties": { + "can-override": { + "type": "boolean", + "description": "Whether the current user has permission to override failed policies" + } + } + }, + "actions": { + "type": "object", + "description": "Available actions for this evaluation", + "properties": { + "is-overridable": { + "type": "boolean", + "description": "Whether this evaluation can be overridden (based on policy enforcement levels and current status)" + } + } } } }, "relationships": { "type": "object", "properties": { - "ingress-attributes": { - "$ref": "#/components/schemas/ingress-attributes-has-one" + "run": { + "description": "The run that this policy evaluation belongs to", + "$ref": "#/components/schemas/runs-has-one" + }, + "tf-policy-set-outcomes": { + "description": "The Terraform policy set outcomes that are part of this evaluation", + "$ref": "#/components/schemas/tf-policy-set-outcomes-has-many" } } }, @@ -41213,9 +43623,65 @@ "properties": { "self": { "type": "string" - }, - "download": { - "type": "string" + } + } + } + } + }, + "runs-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/runs" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/cost-estimates" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/task-stages" + }, + { + "$ref": "#/components/schemas/tf-policy-evaluation" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "plans": "#/components/schemas/plans", + "applies": "#/components/schemas/applies", + "users": "#/components/schemas/users", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "cost-estimates": "#/components/schemas/cost-estimates", + "workspaces": "#/components/schemas/workspaces", + "task-stages": "#/components/schemas/task-stages", + "tf-policy-evaluations": "#/components/schemas/tf-policy-evaluation" + } } } } @@ -41377,284 +43843,6 @@ } } }, - "state-versions-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/state-versions-identifier" - } - } - } - }, - "plan-exports-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "plan-exports" - ] - } - } - }, - "plan-exports-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/plan-exports-identifier" - } - } - } - }, - "plans": { - "type": "object", - "required": [ - "id", - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "example": "plan-8F5JFydVYAmtTjET" - }, - "type": { - "type": "string", - "enum": [ - "plans" - ] - }, - "attributes": { - "type": "object", - "properties": { - "execution-details": { - "type": "object", - "nullable": true, - "description": "Details about the execution of this plan. Null if plan has not started.", - "properties": { - "mode": { - "type": "string", - "description": "Execution mode of the run", - "enum": [ - "remote", - "agent", - "local" - ] - }, - "agent-id": { - "type": "string", - "example": "agent-S1Y7tcKxXPJDQAvq", - "description": "ID of the agent used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - }, - "agent-name": { - "type": "string", - "example": "agent_01", - "description": "Name of the agent used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - }, - "agent-pool-id": { - "type": "string", - "example": "apool-Zigq2VGreKq7nwph", - "description": "ID of the agent pool used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - }, - "agent-pool-name": { - "type": "string", - "example": "first-pool", - "description": "Name of the agent pool used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - } - } - }, - "generated-configuration": { - "type": "boolean", - "default": false, - "nullable": true, - "description": "Whether the plan generated new configuration as part of this run" - }, - "has-changes": { - "type": "boolean", - "description": "Whether the plan has any changes" - }, - "resource-additions": { - "type": "integer", - "description": "Number of resources that will be added", - "nullable": true - }, - "resource-changes": { - "type": "integer", - "description": "Number of resources that will be changed", - "nullable": true - }, - "resource-destructions": { - "type": "integer", - "description": "Number of resources that will be destroyed", - "nullable": true - }, - "resource-imports": { - "type": "integer", - "description": "Number of resources that will be imported", - "nullable": true - }, - "structured-run-output-enabled": { - "type": "boolean", - "nullable": true, - "description": "Whether structured run output is enabled" - }, - "status": { - "type": "string", - "description": "Current status of the plan", - "enum": [ - "pending", - "managed_queued", - "queued", - "running", - "errored", - "canceled", - "finished", - "unreachable" - ] - }, - "status-timestamps": { - "type": "object", - "description": "Timestamps for state transitions of the plan", - "properties": { - "queued-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "pending-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "started-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "finished-at": { - "type": "string", - "format": "date-time", - "nullable": true - } - } - }, - "log-read-url": { - "type": "string", - "nullable": true, - "description": "URL to read the logs for this plan" - }, - "actions": { - "type": "object", - "description": "Actions available for this plan", - "properties": { - "is-exportable": { - "type": "boolean", - "description": "Whether the plan can be exported" - } - } - }, - "backing-data-state": { - "type": "string", - "readOnly": true, - "x-vis": [ - "tfe" - ], - "description": "Data retention lifecycle state of the plan's backing data.\n\nThis attribute is only available in Terraform Enterprise.", - "enum": [ - "backing_data_initialized", - "backing_data_available", - "backing_data_soft_deleted", - "backing_data_permanently_deleted" - ] - }, - "permissions": { - "type": "object", - "description": "Permissions for the current user related to this plan", - "nullable": true, - "properties": { - "can-export": { - "type": "boolean", - "description": "Whether the current user can export the plan" - } - } - } - } - }, - "relationships": { - "type": "object", - "properties": { - "state-versions": { - "description": "State versions associated with this plan (for TF <= 0.8)", - "$ref": "#/components/schemas/state-versions-has-many" - }, - "exports": { - "description": "Exports associated with this plan", - "$ref": "#/components/schemas/plan-exports-has-many" - }, - "hyok-encrypted-data-key": { - "description": "HYOK encrypted data key associated with this plan\n\nThis relationship is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ], - "$ref": "#/components/schemas/hyok-encrypted-data-keys-has-one" - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string", - "description": "API URL for this plan" - }, - "json-output": { - "type": "string", - "nullable": true, - "description": "API URL for the JSON formatted execution plan (available for Terraform 0.12+)" - }, - "json-output-redacted": { - "type": "string", - "nullable": true, - "description": "API URL for the redacted JSON formatted execution plan (available for Terraform 0.15.2+)" - }, - "json-schema": { - "type": "string", - "nullable": true, - "description": "API URL for the JSON schema of this plan (available for Terraform 0.12+)" - }, - "sanitized-plan": { - "type": "string", - "nullable": true, - "description": "API URL for the sanitized plan (available when HYOK is enabled and with compatible Terraform version)", - "x-vis": [ - "public-beta" - ] - } - } - } - } - }, "plans-envelope": { "type": "object", "required": [ @@ -41984,248 +44172,6 @@ } } }, - "tf-policy-set-outcomes-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "tf-policy-set-outcomes" - ] - } - } - }, - "tf-policy-set-outcomes-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/tf-policy-set-outcomes-identifier" - } - } - } - }, - "tf-policy-evaluation": { - "type": "object", - "description": "Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle.", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "tf-policy-evaluations" - ] - }, - "attributes": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "Current status of the Terraform policy evaluation. Status values:\n- `pending`: Initial state, not yet queued for evaluation\n- `queued`: Queued and waiting to be evaluated\n- `running`: Actively being evaluated\n- `awaiting_override`: Failed with overridable policies, awaiting manual override\n- `passed`: All policies passed (final state)\n- `failed`: Failed with mandatory policies (final state)\n- `overridden`: Failed evaluation manually overridden (final state)\n- `errored`: System error during processing (final state)\n- `canceled`: Canceled before completion (final state)\n- `unreachable`: Pseudo-state derived from run state\n", - "enum": [ - "pending", - "queued", - "running", - "awaiting_override", - "passed", - "failed", - "overridden", - "errored", - "canceled", - "unreachable" - ] - }, - "stage-type": { - "type": "string", - "description": "The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init')" - }, - "status-timestamps": { - "type": "object", - "description": "Timestamps for each status transition during the evaluation lifecycle", - "properties": { - "pending-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation entered pending status" - }, - "queued-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation was queued for processing" - }, - "running-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation started running" - }, - "awaiting-override-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation entered awaiting override status (for failed mandatory policies)" - }, - "passed-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation passed successfully" - }, - "failed-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation failed" - }, - "overridden-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When a failed evaluation was overridden" - }, - "errored-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation encountered an error" - }, - "canceled-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation was canceled" - } - } - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true, - "description": "When the evaluation was created" - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true, - "description": "When the evaluation was last updated" - }, - "result-count": { - "type": "object", - "description": "Aggregated counts of policy results across all policy sets in this evaluation", - "properties": { - "advisory-failed": { - "type": "integer", - "description": "Policies with advisory enforcement level that failed" - }, - "mandatory-failed": { - "type": "integer", - "description": "Policies with mandatory enforcement level that failed" - }, - "mandatory-overridable-failed": { - "type": "integer", - "description": "Policies with mandatory-overridable enforcement level that failed" - }, - "passed": { - "type": "integer", - "description": "Policies that passed" - }, - "errored": { - "type": "integer", - "description": "Policies that errored during evaluation" - }, - "unknown": { - "type": "integer", - "description": "Policies with an unknown evaluation result" - } - } - }, - "error": { - "type": "object", - "nullable": true, - "description": "Error information if the entire evaluation failed (not policy-specific errors)", - "properties": { - "type": { - "type": "string", - "enum": [ - "setup_error", - "incompatible_agent_version" - ], - "description": "Error type identifier indicating the category of failure" - }, - "summary": { - "type": "string", - "description": "Brief error summary for display" - }, - "detail": { - "type": "string", - "description": "Detailed error message with additional context" - } - } - }, - "archivist-supported": { - "type": "boolean", - "readOnly": true, - "description": "Whether this evaluation supports archivist-backed outcome storage. When `true`,\nfull policy results are available via `policy-set-result-url` on each\n`tf-policy-set-outcome`. When `false`, use the `outcomes` array instead.\n" - }, - "permissions": { - "type": "object", - "description": "User permissions for this evaluation", - "properties": { - "can-override": { - "type": "boolean", - "description": "Whether the current user has permission to override failed policies" - } - } - }, - "actions": { - "type": "object", - "description": "Available actions for this evaluation", - "properties": { - "is-overridable": { - "type": "boolean", - "description": "Whether this evaluation can be overridden (based on policy enforcement levels and current status)" - } - } - } - } - }, - "relationships": { - "type": "object", - "properties": { - "run": { - "description": "The run that this policy evaluation belongs to", - "$ref": "#/components/schemas/runs-has-one" - }, - "tf-policy-set-outcomes": { - "description": "The Terraform policy set outcomes that are part of this evaluation", - "$ref": "#/components/schemas/tf-policy-set-outcomes-has-many" - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" - } - } - } - } - }, "tf-policy-evaluations-envelope": { "type": "object", "required": [ @@ -42771,72 +44717,19 @@ "$ref": "#/components/schemas/projects-has-many" }, "workspace-exclusions": { - "$ref": "#/components/schemas/workspaces-has-many" - }, - "project-exclusions": { - "$ref": "#/components/schemas/projects-has-many" - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" - } - } - } - } - }, - "policy-sets-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/policy-sets" - }, - "included": { - "type": "array", - "description": "Sideloaded resources. `?include=policies` sideloads the full policy resources.", - "items": { - "type": "object", - "description": "A sideloaded resource. May be a `policies` resource (type \"policies\"), a `workspaces` resource (type \"workspaces\"), or another allowlisted type." + "$ref": "#/components/schemas/workspaces-has-many" + }, + "project-exclusions": { + "$ref": "#/components/schemas/projects-has-many" + } } - } - } - }, - "policies-identifier-array-document": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "oneOf": [ - { - "description": "Existing local policy reference, by id. Valid for both adding and removing policies from a policy set.", - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "policies" - ] - }, - "id": { - "type": "string" - } - } - } - ] + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" + } } } } @@ -42972,6 +44865,231 @@ } } }, + "ootb-policy-libraries-identifier": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ootb-policy-libraries" + ] + }, + "id": { + "type": "string", + "description": "The slug of the library." + } + } + }, + "ootb-policy-libraries-has-many": { + "type": "object", + "description": "Libraries this policy belongs to. Only present when ?include=ootb-policy-libraries is passed on the list endpoint.", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ootb-policy-libraries-identifier" + } + } + } + }, + "ootb-policies": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The external ID of the OOTB policy.", + "example": "ootbpol-xxxxxxxxxxxxxxxx" + }, + "type": { + "type": "string", + "enum": [ + "ootb-policies" + ] + }, + "attributes": { + "type": "object", + "properties": { + "control-source": { + "type": "string", + "nullable": true, + "description": "Source location (docs/repository URL) for this policy, taken from the latest version's library policy. Null when no active library release is available." + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Catalog record creation time (not policy release/publication time)." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Policy description." + }, + "governed-resources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of Terraform resource types this policy governs." + }, + "kind": { + "type": "string", + "enum": [ + "sentinel", + "tfpolicy" + ], + "description": "The policy engine type." + }, + "name": { + "type": "string", + "description": "The name of the policy." + }, + "provider": { + "type": "string", + "description": "Cloud provider the policy targets, stored lower-cased (e.g. `aws`, `azure`, `gcp`). Use as the value of `filter[provider]` on the list endpoint; matching is case-insensitive. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.providers`." + }, + "service": { + "type": "string", + "description": "Cloud service the policy targets (e.g. `s3`, `iam`, `compute`). Use as the value of `filter[service]` on the list endpoint. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.services`." + }, + "slug": { + "type": "string", + "description": "URL-friendly unique identifier for the policy." + } + } + }, + "relationships": { + "type": "object", + "properties": { + "ootb-policy-libraries": { + "$ref": "#/components/schemas/ootb-policy-libraries-has-many" + } + } + }, + "links": { + "type": "object", + "properties": { + "download": { + "type": "string", + "nullable": true, + "description": "URL to download the latest version of this policy's source content." + } + } + } + } + }, + "ootb-policy-library-references": { + "type": "object", + "description": "A slim reference to an OOTB policy library, returned in the `included` array when ?include=ootb-policy-libraries is passed. Contains only the name attribute.", + "properties": { + "id": { + "type": "string", + "description": "The slug of the OOTB policy library.", + "example": "nist-800-53-aws" + }, + "type": { + "type": "string", + "enum": [ + "ootb-policy-libraries" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Human-readable library name." + } + } + } + } + }, + "policy-sets-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/policy-sets" + }, + "included": { + "type": "array", + "description": "Sideloaded resources. `?include=policies` sideloads the full policy resources.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/policies" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/policy-set-versions" + }, + { + "$ref": "#/components/schemas/ootb-policies" + }, + { + "$ref": "#/components/schemas/ootb-policy-library-references" + }, + { + "$ref": "#/components/schemas/stacks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "policies": "#/components/schemas/policies", + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects", + "policy-set-versions": "#/components/schemas/policy-set-versions", + "ootb-policies": "#/components/schemas/ootb-policies", + "ootb-policy-libraries": "#/components/schemas/ootb-policy-library-references", + "stacks": "#/components/schemas/stacks" + } + } + } + } + } + }, + "policies-identifier-array-document": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "oneOf": [ + { + "description": "Existing local policy reference, by id. Valid for both adding and removing policies from a policy set.", + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "policies" + ] + }, + "id": { + "type": "string" + } + } + } + ] + } + } + } + }, "policy-set-versions-envelope": { "type": "object", "required": [ @@ -43167,20 +45285,6 @@ } } }, - "policy-evaluations-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "policy-evaluations" - ] - } - } - }, "policy-evaluations-has-one": { "type": "object", "properties": { @@ -43418,162 +45522,6 @@ } } }, - "applies": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "applies" - ] - }, - "attributes": { - "type": "object", - "properties": { - "execution-details": { - "type": "object", - "readOnly": true, - "nullable": true, - "properties": { - "mode": { - "type": "string", - "enum": [ - "agent", - "remote", - "local" - ] - }, - "agent-id": { - "type": "string" - }, - "agent-name": { - "type": "string" - }, - "agent-pool-id": { - "type": "string" - }, - "agent-pool-name": { - "type": "string" - } - } - }, - "status": { - "readOnly": true, - "type": "string", - "enum": [ - "created", - "pending", - "queued", - "agent_queued", - "running", - "errored", - "canceled", - "finished", - "unreachable" - ] - }, - "status-timestamps": { - "readOnly": true, - "type": "object", - "properties": { - "agent-queued-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "started-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "errored-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "canceled-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "force-canceled-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "finished-at": { - "type": "string", - "format": "date-time", - "nullable": true - } - } - }, - "log-read-url": { - "readOnly": true, - "type": "string" - }, - "resource-additions": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "resource-changes": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "resource-destructions": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "resource-imports": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "action-invocations": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "action-failures": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "backing-data-state": { - "type": "string", - "readOnly": true, - "x-vis": [ - "tfe" - ], - "description": "Data retention lifecycle state of the apply's backing data.\n\nThis attribute is only available in Terraform Enterprise.", - "enum": [ - "backing_data_initialized", - "backing_data_available", - "backing_data_soft_deleted", - "backing_data_permanently_deleted" - ] - } - } - }, - "relationships": { - "type": "object", - "properties": { - "state-versions": { - "$ref": "#/components/schemas/state-versions-has-many" - } - } - }, - "links": { - "$ref": "#/components/schemas/self" - } - } - }, "applies-envelope": { "type": "object", "required": [ @@ -43585,126 +45533,6 @@ } } }, - "cost-estimates": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "cost-estimates" - ] - }, - "attributes": { - "type": "object", - "properties": { - "error-message": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "enum": [ - "pending", - "queued", - "finished", - "canceled", - "errored", - "unreachable", - "skipped_due_to_targeting" - ] - }, - "status-timestamps": { - "type": "object", - "properties": { - "pending-at": { - "type": "string", - "format": "date-time" - }, - "queued-at": { - "type": "string", - "format": "date-time" - }, - "finished-at": { - "type": "string", - "format": "date-time" - }, - "canceled-at": { - "type": "string", - "format": "date-time" - }, - "errored-at": { - "type": "string", - "format": "date-time" - }, - "skipped-due-to-targeting-at": { - "type": "string", - "format": "date-time" - } - } - }, - "resources": { - "type": "object", - "nullable": true, - "description": "Low-level cost estimation details, only present when status is \"finished\". The keys or structure of this hash may change over time.", - "properties": { - "matched": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "unmatched": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "resources-count": { - "type": "integer", - "nullable": true, - "description": "Total number of resources. Only present when status is \"finished\"." - }, - "matched-resources-count": { - "type": "integer", - "nullable": true, - "description": "Number of matched resources. Only present when status is \"finished\"." - }, - "unmatched-resources-count": { - "type": "integer", - "nullable": true, - "description": "Number of unmatched resources. Only present when status is \"finished\"." - }, - "prior-monthly-cost": { - "type": "string", - "nullable": true, - "description": "Prior monthly cost as a decimal string. Only present when status is \"finished\"." - }, - "proposed-monthly-cost": { - "type": "string", - "nullable": true, - "description": "Proposed monthly cost as a decimal string. Only present when status is \"finished\"." - }, - "delta-monthly-cost": { - "type": "string", - "nullable": true, - "description": "Delta monthly cost as a decimal string. Only present when status is \"finished\"." - } - } - } - } - }, "cost-estimates-envelope": { "type": "object", "required": [ @@ -43727,43 +45555,6 @@ } } }, - "state-version-outputs": { - "type": "object", - "description": "State version outputs are the output values from a Terraform state file for a workspace. They include the name and value of the output, as well as a sensitive boolean if the value should be hidden by default in UIs. There is an additional attribute, \"value\" that can be any type, including null if the value is sensitive and part of a list response.", - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "state-version-outputs" - ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "sensitive": { - "type": "boolean" - }, - "type": { - "type": "string", - "description": "The Terraform type of the output value (e.g. \"string\", \"number\", \"bool\", \"list\", \"map\", \"set\", \"object\", \"tuple\")." - }, - "detailed-type": { - "description": "A detailed representation of the output type. May be a string for simple types or an array for complex types such as tuples and objects." - } - } - }, - "links": { - "$ref": "#/components/schemas/self" - } - } - }, "state-version-outputs-envelope": { "type": "object", "required": [ @@ -43906,6 +45697,10 @@ "multi-region": { "type": "boolean", "description": "Optional for AWS KMS" + }, + "transit-path": { + "type": "string", + "description": "Optional for Vault KMS. The mount path of Vault's Transit Secrets Engine. Defaults to \"transit\"." } } } @@ -44465,6 +46260,26 @@ "properties": { "data": { "$ref": "#/components/schemas/teams" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/organization-memberships" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "users": "#/components/schemas/users", + "organization-memberships": "#/components/schemas/organization-memberships" + } + } + } } } }, @@ -44937,93 +46752,6 @@ "attributes" ] }, - "ingress-attributes": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "ingress-attributes" - ] - }, - "attributes": { - "type": "object", - "properties": { - "branch": { - "type": "string" - }, - "clone-url": { - "type": "string" - }, - "commit-message": { - "type": "string" - }, - "commit-sha": { - "type": "string" - }, - "commit-url": { - "type": "string" - }, - "compare-url": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "is-pull-request": { - "type": "boolean" - }, - "on-default-branch": { - "type": "boolean" - }, - "pull-request-number": { - "type": "integer" - }, - "pull-request-url": { - "type": "string" - }, - "pull-request-title": { - "type": "string" - }, - "pull-request-body": { - "type": "string" - }, - "tag": { - "type": "string", - "nullable": true - }, - "sender-username": { - "type": "string" - }, - "sender-avatar-url": { - "type": "string" - }, - "sender-html-url": { - "type": "string" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "created-by": { - "$ref": "#/components/schemas/users-has-one" - } - } - }, - "links": { - "$ref": "#/components/schemas/self" - } - } - }, "ingress-attributes-envelope": { "type": "object", "required": [ @@ -45151,6 +46879,153 @@ } } }, + "oauth-tokens-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/oauth-tokens-identifier" + } + } + } + }, + "oauth-clients": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "oauth-clients" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "callback-url": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "connect-path": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "service-provider": { + "type": "string" + }, + "service-provider-display-name": { + "type": "string", + "readOnly": true + }, + "http-url": { + "type": "string", + "nullable": true + }, + "api-url": { + "type": "string", + "nullable": true + }, + "key": { + "type": "string", + "nullable": true + }, + "ado-entra-tenant-id": { + "type": "string", + "nullable": true + }, + "ado-org-name": { + "type": "string", + "nullable": true, + "description": "The Azure DevOps organization name for connections using an org-scoped Personal Access Token (PAT). Must start and end with a letter or number and may contain only letters, numbers, and hyphens (e.g. \"my-company\"). Required when using an org-scoped PAT; omit or set to null when using a globally-scoped PAT.\n" + }, + "secret": { + "type": "string", + "nullable": true + }, + "rsa-public-key": { + "type": "string", + "nullable": true + }, + "uuid": { + "type": "string", + "readOnly": true + }, + "organization-scoped": { + "type": "boolean" + }, + "affected-workspaces": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "affected-workspaces-count": { + "type": "integer", + "nullable": true + } + } + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "agent-pool": { + "$ref": "#/components/schemas/agent-pools-has-one" + }, + "projects": { + "$ref": "#/components/schemas/projects-has-many" + }, + "oauth-tokens": { + "$ref": "#/components/schemas/oauth-tokens-has-many" + } + } + } + } + }, + "vcs-events-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/oauth-clients" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "oauth-clients": "#/components/schemas/oauth-clients" + } + } + } + }, "vcs-repo-check": { "type": "object", "properties": { @@ -45702,137 +47577,6 @@ } } }, - "oauth-tokens-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/oauth-tokens-identifier" - } - } - } - }, - "oauth-clients": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "oauth-clients" - ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "callback-url": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "connect-path": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "service-provider": { - "type": "string" - }, - "service-provider-display-name": { - "type": "string", - "readOnly": true - }, - "http-url": { - "type": "string", - "nullable": true - }, - "api-url": { - "type": "string", - "nullable": true - }, - "key": { - "type": "string", - "nullable": true - }, - "ado-entra-tenant-id": { - "type": "string", - "nullable": true - }, - "ado-org-name": { - "type": "string", - "nullable": true, - "description": "The Azure DevOps organization name for connections using an org-scoped Personal Access Token (PAT). Must start and end with a letter or number and may contain only letters, numbers, and hyphens (e.g. \"my-company\"). Required when using an org-scoped PAT; omit or set to null when using a globally-scoped PAT.\n" - }, - "secret": { - "type": "string", - "nullable": true - }, - "rsa-public-key": { - "type": "string", - "nullable": true - }, - "uuid": { - "type": "string", - "readOnly": true - }, - "organization-scoped": { - "type": "boolean" - }, - "affected-workspaces": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - }, - "affected-workspaces-count": { - "type": "integer", - "nullable": true - } - } - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "agent-pool": { - "$ref": "#/components/schemas/agent-pools-has-one" - }, - "projects": { - "$ref": "#/components/schemas/projects-has-many" - }, - "oauth-tokens": { - "$ref": "#/components/schemas/oauth-tokens-has-many" - } - } - } - } - }, "oauth-clients-envelope": { "type": "object", "required": [ @@ -46343,6 +48087,26 @@ } } }, + "tasks-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspace-tasks" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspace-tasks": "#/components/schemas/workspace-tasks", + "workspaces": "#/components/schemas/workspaces" + } + } + } + }, "task-config-owner-has-one": { "type": "object", "properties": { @@ -46445,6 +48209,34 @@ } } }, + "task-configs-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/tasks" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "tasks": "#/components/schemas/tasks", + "organizations": "#/components/schemas/organizations", + "workspaces": "#/components/schemas/workspaces" + } + } + } + }, "workspace-tasks-envelope": { "type": "object", "required": [ @@ -46456,144 +48248,6 @@ } } }, - "task-results-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "task-results" - ] - } - } - }, - "task-results-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/task-results-identifier" - } - } - } - }, - "policy-evaluations-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/policy-evaluations-identifier" - } - } - } - }, - "task-stages": { - "type": "object", - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "task-stages" - ] - }, - "attributes": { - "type": "object", - "properties": { - "status": { - "type": "string", - "readOnly": true, - "enum": [ - "pending", - "running", - "passed", - "failed", - "awaiting_override", - "errored", - "canceled", - "unreachable" - ] - }, - "stage": { - "type": "string", - "readOnly": true, - "description": "The run stage during which this task stage executes (e.g., post_plan, pre_plan, pre_apply, post_apply)." - }, - "status-timestamps": { - "type": "object", - "nullable": true, - "readOnly": true, - "additionalProperties": true, - "description": "A map of status names to timestamps indicating when the task stage entered each status. Keys are formatted as \"{status}-at\"." - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "permissions": { - "type": "object", - "readOnly": true, - "properties": { - "can-override-policy": { - "type": "boolean" - }, - "can-override-tasks": { - "type": "boolean" - }, - "can-override": { - "type": "boolean" - } - } - }, - "actions": { - "type": "object", - "readOnly": true, - "properties": { - "is-overridable": { - "type": "boolean" - } - } - } - } - }, - "relationships": { - "type": "object", - "properties": { - "run": { - "$ref": "#/components/schemas/runs-has-one" - }, - "cost-estimate": { - "$ref": "#/components/schemas/cost-estimates-has-one" - }, - "task-results": { - "$ref": "#/components/schemas/task-results-has-many" - }, - "policy-evaluations": { - "$ref": "#/components/schemas/policy-evaluations-has-many" - } - } - }, - "links": { - "$ref": "#/components/schemas/self" - } - } - }, "task-stages-envelope": { "type": "object", "required": [ @@ -46788,6 +48442,38 @@ } } }, + "task-stages-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/task-results" + }, + { + "$ref": "#/components/schemas/policy-evaluations" + }, + { + "$ref": "#/components/schemas/cost-estimates" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runs": "#/components/schemas/runs", + "workspaces": "#/components/schemas/workspaces", + "task-results": "#/components/schemas/task-results", + "policy-evaluations": "#/components/schemas/policy-evaluations", + "cost-estimates": "#/components/schemas/cost-estimates" + } + } + } + }, "task-results-envelope": { "type": "object", "required": [ @@ -47071,6 +48757,78 @@ } } }, + "workspace-transfer-events": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "workspace-transfer-events" + ] + }, + "attributes": { + "type": "object", + "properties": { + "event-type": { + "type": "string", + "enum": [ + "created", + "started", + "completed", + "failed", + "paused", + "resumed", + "canceled" + ], + "readOnly": true + }, + "operation-name": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "message": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "user-id": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + } + } + }, + "workspace-transfers-included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspace-transfer-events" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspace-transfer-events": "#/components/schemas/workspace-transfer-events" + } + } + } + }, "tdp-addons-has-many": { "type": "object", "properties": { From c5c20489031ea8dd340db0bb714b4221a666fcf7 Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Mon, 28 Sep 2026 14:45:31 -0600 Subject: [PATCH 2/6] uses automated 'included' schemas --- v2/api/kiota-lock.json | 2 +- ...f8f58cae16b528f31bb826ec71dc8b1e73f25f1.go | 112 + .../models/current_state_version_envelope.go | 41 - v2/api/models/organizations_envelope.go | 16 +- v2/api/models/policy_sets_envelope.go | 245 - v2/api/models/provider_sets_envelope.go | 16 +- v2/api/models/runs_envelope.go | 289 - .../models/stack_configurations_envelope.go | 16 +- v2/api/models/stacks_envelope.go | 16 +- v2/api/models/tasks_envelope.go | 16 +- v2/api/models/teams_envelope.go | 135 - v2/api/models/tf_policy_evaluations.go | 195 + .../models/tf_policy_evaluations_envelope.go | 16 +- ...f_policy_evaluations_escaped_attributes.go | 328 + ...ions_escaped_attributes_escaped_actions.go | 84 + ...ations_escaped_attributes_escaped_error.go | 143 + ...d_attributes_escaped_error_escaped_type.go | 37 + ..._escaped_attributes_escaped_permissions.go | 84 + ...escaped_attributes_escaped_result_count.go | 229 + ...tions_escaped_attributes_escaped_status.go | 61 + ...ed_attributes_escaped_status_timestamps.go | 317 + .../tf_policy_evaluations_escaped_links.go | 83 + ...olicy_evaluations_escaped_relationships.go | 112 + .../tf_policy_evaluations_escaped_type.go | 33 + v2/api/models/tf_policy_set_outcomes.go | 166 + .../models/tf_policy_set_outcomes_envelope.go | 16 +- ..._policy_set_outcomes_escaped_attributes.go | 237 + ...mes_escaped_attributes_escaped_outcomes.go | 283 + ...es_escaped_outcomes_escaped_diagnostics.go | 240 + ...s_escaped_diagnostics_escaped_resources.go | 269 + ...comes_escaped_enforcement_escaped_level.go | 40 + ...tcomes_escaped_passed_escaped_resources.go | 118 + ...ributes_escaped_outcomes_escaped_status.go | 43 + ...escaped_attributes_escaped_result_count.go | 228 + ...licy_set_outcomes_escaped_relationships.go | 83 + .../tf_policy_set_outcomes_escaped_type.go | 33 + v2/api/models/workspaces_envelope.go | 16 +- .../organization_memberships_get_response.go | 22 +- ...rganization_memberships_request_builder.go | 2 +- ...membership_escaped_item_request_builder.go | 10 +- ...m_organization_memberships_get_response.go | 30 +- ...rganization_memberships_request_builder.go | 2 +- .../item_provider_sets_get_response.go | 84 +- .../item_provider_sets_request_builder.go | 2 +- ...d_set_escaped_name_item_request_builder.go | 10 +- .../item_recoverable_items_get_response.go | 108 +- .../item_recoverable_items_request_builder.go | 2 +- ...s_data_retention_policy_request_builder.go | 8 +- ...tionships_module_producers_get_response.go | 18 +- .../organizations/item_stacks_get_response.go | 134 +- .../item_stacks_request_builder.go | 2 +- .../organizations/item_tasks_get_response.go | 84 +- .../item_tasks_request_builder.go | 2 +- .../item_teams_request_builder.go | 2 +- .../item_vcs_events_request_builder.go | 2 +- .../item_workspaces_get_response.go | 144 +- .../item_workspaces_request_builder.go | 2 +- ...space_escaped_name_item_request_builder.go | 10 +- .../organizations_get_response.go | 174 +- .../organizations_request_builder.go | 2 +- ...ation_escaped_name_item_request_builder.go | 42 +- .../item/get_include_query_parameter_type.go | 57 + ...scaped_set_escaped_item_request_builder.go | 5 +- .../item_provider_sets_get_response.go | 18 +- ...scaped_set_escaped_item_request_builder.go | 10 +- ...with_query_escaped_item_request_builder.go | 8 +- .../runs/get_include_query_parameter_type.go | 57 + v2/api/runs/item_request_builder.go | 2 +- ...item_tf_policy_evaluations_get_response.go | 18 +- v2/api/runs/runs_get_response.go | 54 +- v2/api/runs/runs_request_builder.go | 4 +- ...stack_deployment_groups_request_builder.go | 2 +- ...figuration_escaped_item_request_builder.go | 10 +- ...aped_group_escaped_item_request_builder.go | 10 +- .../item_stack_configurations_get_response.go | 112 +- ...em_stack_configurations_request_builder.go | 2 +- ...ut_consumers_downstream_request_builder.go | 6 +- ...tput_consumers_upstream_request_builder.go | 6 +- ...h_external_escaped_item_request_builder.go | 10 +- v2/api/tasks/tasks_item_request_builder.go | 10 +- ...aped_stage_escaped_item_request_builder.go | 10 +- v2/api/teams/item_get_response.go | 245 +- v2/api/teams/item_request_builder.go | 2 +- .../item_request_builder.go | 10 +- ...tem_tf_policy_set_outcomes_get_response.go | 18 +- ...m_current_state_version_request_builder.go | 10 +- .../item_provider_sets_get_response.go | 18 +- ...ips_remote_state_consumers_get_response.go | 18 +- ..._workspace_escaped_item_request_builder.go | 10 +- ...d_transfer_escaped_item_request_builder.go | 10 +- v2/openapi/spec.json | 16386 ++++++++-------- 91 files changed, 12507 insertions(+), 9927 deletions(-) create mode 100644 v2/api/models/c4240cd5c3b14a4d9f4ab4788f8f58cae16b528f31bb826ec71dc8b1e73f25f1.go create mode 100644 v2/api/models/tf_policy_evaluations.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_attributes.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_actions.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_permissions.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_result_count.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_status.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_status_timestamps.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_links.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_relationships.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_type.go create mode 100644 v2/api/models/tf_policy_set_outcomes.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_attributes.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_diagnostics.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_diagnostics_escaped_resources.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_enforcement_escaped_level.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_passed_escaped_resources.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_status.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_result_count.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_relationships.go create mode 100644 v2/api/models/tf_policy_set_outcomes_escaped_type.go create mode 100644 v2/api/policysets/item/get_include_query_parameter_type.go create mode 100644 v2/api/runs/get_include_query_parameter_type.go diff --git a/v2/api/kiota-lock.json b/v2/api/kiota-lock.json index efe69ea45..2e9086718 100644 --- a/v2/api/kiota-lock.json +++ b/v2/api/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "86D5D2994A1351A9293C0CADE345CF91608CEB4607EAE285E28290A66E896CF03B92254126FBB60A1C62CA9402A42A52F1A483815392428B46FC1D7656B90353", + "descriptionHash": "10D00B80088BCC559D5369EF82800FF673DD0A8249B7BC7D5CDF3ACE71F757E130177BE51481820AC99E00D70A209724D6E2927E107CA7858DC7788A0306340C", "descriptionLocation": "../openapi/spec.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.31.1", diff --git a/v2/api/models/c4240cd5c3b14a4d9f4ab4788f8f58cae16b528f31bb826ec71dc8b1e73f25f1.go b/v2/api/models/c4240cd5c3b14a4d9f4ab4788f8f58cae16b528f31bb826ec71dc8b1e73f25f1.go new file mode 100644 index 000000000..707fb1ca8 --- /dev/null +++ b/v2/api/models/c4240cd5c3b14a4d9f4ab4788f8f58cae16b528f31bb826ec71dc8b1e73f25f1.go @@ -0,0 +1,112 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The actual value of the attribute that was evaluated + statement *string + // The attribute path that was evaluated + traversal *string +} +// NewTfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values instantiates a new TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values and sets the default values. +func NewTfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values()(*TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values) { + m := &TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["statement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatement(val) + } + return nil + } + res["traversal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTraversal(val) + } + return nil + } + return res +} +// GetStatement gets the statement property value. The actual value of the attribute that was evaluated +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values) GetStatement()(*string) { + return m.statement +} +// GetTraversal gets the traversal property value. The attribute path that was evaluated +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values) GetTraversal()(*string) { + return m.traversal +} +// Serialize serializes information the current object +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("statement", m.GetStatement()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("traversal", m.GetTraversal()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatement sets the statement property value. The actual value of the attribute that was evaluated +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values) SetStatement(value *string)() { + m.statement = value +} +// SetTraversal sets the traversal property value. The attribute path that was evaluated +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_values) SetTraversal(value *string)() { + m.traversal = value +} +type TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatement()(*string) + GetTraversal()(*string) + SetStatement(value *string)() + SetTraversal(value *string)() +} diff --git a/v2/api/models/current_state_version_envelope.go b/v2/api/models/current_state_version_envelope.go index 44470e03c..4bcbf0bd5 100644 --- a/v2/api/models/current_state_version_envelope.go +++ b/v2/api/models/current_state_version_envelope.go @@ -12,8 +12,6 @@ type CurrentStateVersionEnvelope struct { additionalData map[string]any // The data property data StateVersionsable - // The included property - included []StateVersionOutputsable } // NewCurrentStateVersionEnvelope instantiates a new CurrentStateVersionEnvelope and sets the default values. func NewCurrentStateVersionEnvelope()(*CurrentStateVersionEnvelope) { @@ -51,29 +49,8 @@ func (m *CurrentStateVersionEnvelope) GetFieldDeserializers()(map[string]func(i8 } return nil } - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateStateVersionOutputsFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]StateVersionOutputsable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(StateVersionOutputsable) - } - } - m.SetIncluded(res) - } - return nil - } return res } -// GetIncluded gets the included property value. The included property -// returns a []StateVersionOutputsable when successful -func (m *CurrentStateVersionEnvelope) GetIncluded()([]StateVersionOutputsable) { - return m.included -} // Serialize serializes information the current object func (m *CurrentStateVersionEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -82,18 +59,6 @@ func (m *CurrentStateVersionEnvelope) Serialize(writer i878a80d2330e89d26896388a return err } } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err := writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -110,15 +75,9 @@ func (m *CurrentStateVersionEnvelope) SetAdditionalData(value map[string]any)() func (m *CurrentStateVersionEnvelope) SetData(value StateVersionsable)() { m.data = value } -// SetIncluded sets the included property value. The included property -func (m *CurrentStateVersionEnvelope) SetIncluded(value []StateVersionOutputsable)() { - m.included = value -} type CurrentStateVersionEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(StateVersionsable) - GetIncluded()([]StateVersionOutputsable) SetData(value StateVersionsable)() - SetIncluded(value []StateVersionOutputsable)() } diff --git a/v2/api/models/organizations_envelope.go b/v2/api/models/organizations_envelope.go index 03bfed793..ff1046687 100644 --- a/v2/api/models/organizations_envelope.go +++ b/v2/api/models/organizations_envelope.go @@ -11,7 +11,7 @@ type OrganizationsEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data OrganizationsGetResponse_Organizationsable + data Organizationsable } // NewOrganizationsEnvelope instantiates a new OrganizationsEnvelope and sets the default values. func NewOrganizationsEnvelope()(*OrganizationsEnvelope) { @@ -31,8 +31,8 @@ func (m *OrganizationsEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a OrganizationsGetResponse_Organizationsable when successful -func (m *OrganizationsEnvelope) GetData()(OrganizationsGetResponse_Organizationsable) { +// returns a Organizationsable when successful +func (m *OrganizationsEnvelope) GetData()(Organizationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *OrganizationsEnvelope) GetData()(OrganizationsGetResponse_Organizations func (m *OrganizationsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateOrganizationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(OrganizationsGetResponse_Organizationsable)) + m.SetData(val.(Organizationsable)) } return nil } @@ -72,12 +72,12 @@ func (m *OrganizationsEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *OrganizationsEnvelope) SetData(value OrganizationsGetResponse_Organizationsable)() { +func (m *OrganizationsEnvelope) SetData(value Organizationsable)() { m.data = value } type OrganizationsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(OrganizationsGetResponse_Organizationsable) - SetData(value OrganizationsGetResponse_Organizationsable)() + GetData()(Organizationsable) + SetData(value Organizationsable)() } diff --git a/v2/api/models/policy_sets_envelope.go b/v2/api/models/policy_sets_envelope.go index 1cf14eb11..1d30c3176 100644 --- a/v2/api/models/policy_sets_envelope.go +++ b/v2/api/models/policy_sets_envelope.go @@ -4,7 +4,6 @@ package models import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -13,211 +12,6 @@ type PolicySetsEnvelope struct { additionalData map[string]any // The data property data PolicySetsable - // Sideloaded resources. `?include=policies` sideloads the full policy resources. - included []PolicySetsEnvelope_PolicySetsEnvelope_includedable -} -// PolicySetsEnvelope_PolicySetsEnvelope_included composed type wrapper for classes ItemStacksGetResponse_Stacksable, ItemWorkspacesGetResponse_Workspacesable, OotbPoliciesable, OotbPolicyLibraryReferencesable, Policiesable, PolicySetVersionsable, Projectsable -type PolicySetsEnvelope_PolicySetsEnvelope_included struct { - // Composed type representation for type OotbPoliciesable - ootbPolicies OotbPoliciesable - // Composed type representation for type OotbPolicyLibraryReferencesable - ootbPolicyLibraryReferences OotbPolicyLibraryReferencesable - // Composed type representation for type Policiesable - policies Policiesable - // Composed type representation for type PolicySetVersionsable - policySetVersions PolicySetVersionsable - // Composed type representation for type Projectsable - projects Projectsable - // Composed type representation for type ItemStacksGetResponse_Stacksable - stacks ItemStacksGetResponse_Stacksable - // Composed type representation for type ItemWorkspacesGetResponse_Workspacesable - workspaces ItemWorkspacesGetResponse_Workspacesable -} -// NewPolicySetsEnvelope_PolicySetsEnvelope_included instantiates a new PolicySetsEnvelope_PolicySetsEnvelope_included and sets the default values. -func NewPolicySetsEnvelope_PolicySetsEnvelope_included()(*PolicySetsEnvelope_PolicySetsEnvelope_included) { - m := &PolicySetsEnvelope_PolicySetsEnvelope_included{ - } - return m -} -// CreatePolicySetsEnvelope_PolicySetsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePolicySetsEnvelope_PolicySetsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewPolicySetsEnvelope_PolicySetsEnvelope_included() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ootb-policies") { - result.SetOotbPolicies(NewOotbPolicies()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ootb-policy-libraries") { - result.SetOotbPolicyLibraryReferences(NewOotbPolicyLibraryReferences()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policies") { - result.SetPolicies(NewPolicies()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policy-set-versions") { - result.SetPolicySetVersions(NewPolicySetVersions()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { - result.SetProjects(NewProjects()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { - result.SetStacks(NewItemStacksGetResponse_Stacks()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(NewItemWorkspacesGetResponse_Workspaces()) - } - } - } - } - return result, nil -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetOotbPolicies() != nil { - return m.GetOotbPolicies().GetFieldDeserializers() - } else if m.GetOotbPolicyLibraryReferences() != nil { - return m.GetOotbPolicyLibraryReferences().GetFieldDeserializers() - } else if m.GetPolicies() != nil { - return m.GetPolicies().GetFieldDeserializers() - } else if m.GetPolicySetVersions() != nil { - return m.GetPolicySetVersions().GetFieldDeserializers() - } else if m.GetProjects() != nil { - return m.GetProjects().GetFieldDeserializers() - } else if m.GetStacks() != nil { - return m.GetStacks().GetFieldDeserializers() - } else if m.GetWorkspaces() != nil { - return m.GetWorkspaces().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) -} -// GetIsComposedType determines if the current object is a wrapper around a composed type -// returns a bool when successful -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetIsComposedType()(bool) { - return true -} -// GetOotbPolicies gets the ootbPolicies property value. Composed type representation for type OotbPoliciesable -// returns a OotbPoliciesable when successful -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetOotbPolicies()(OotbPoliciesable) { - return m.ootbPolicies -} -// GetOotbPolicyLibraryReferences gets the ootbPolicyLibraryReferences property value. Composed type representation for type OotbPolicyLibraryReferencesable -// returns a OotbPolicyLibraryReferencesable when successful -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetOotbPolicyLibraryReferences()(OotbPolicyLibraryReferencesable) { - return m.ootbPolicyLibraryReferences -} -// GetPolicies gets the policies property value. Composed type representation for type Policiesable -// returns a Policiesable when successful -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetPolicies()(Policiesable) { - return m.policies -} -// GetPolicySetVersions gets the policySetVersions property value. Composed type representation for type PolicySetVersionsable -// returns a PolicySetVersionsable when successful -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetPolicySetVersions()(PolicySetVersionsable) { - return m.policySetVersions -} -// GetProjects gets the projects property value. Composed type representation for type Projectsable -// returns a Projectsable when successful -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetProjects()(Projectsable) { - return m.projects -} -// GetStacks gets the stacks property value. Composed type representation for type ItemStacksGetResponse_Stacksable -// returns a ItemStacksGetResponse_Stacksable when successful -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetStacks()(ItemStacksGetResponse_Stacksable) { - return m.stacks -} -// GetWorkspaces gets the workspaces property value. Composed type representation for type ItemWorkspacesGetResponse_Workspacesable -// returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetWorkspaces()(ItemWorkspacesGetResponse_Workspacesable) { - return m.workspaces -} -// Serialize serializes information the current object -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetOotbPolicies() != nil { - err := writer.WriteObjectValue("", m.GetOotbPolicies()) - if err != nil { - return err - } - } else if m.GetOotbPolicyLibraryReferences() != nil { - err := writer.WriteObjectValue("", m.GetOotbPolicyLibraryReferences()) - if err != nil { - return err - } - } else if m.GetPolicies() != nil { - err := writer.WriteObjectValue("", m.GetPolicies()) - if err != nil { - return err - } - } else if m.GetPolicySetVersions() != nil { - err := writer.WriteObjectValue("", m.GetPolicySetVersions()) - if err != nil { - return err - } - } else if m.GetProjects() != nil { - err := writer.WriteObjectValue("", m.GetProjects()) - if err != nil { - return err - } - } else if m.GetStacks() != nil { - err := writer.WriteObjectValue("", m.GetStacks()) - if err != nil { - return err - } - } else if m.GetWorkspaces() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaces()) - if err != nil { - return err - } - } - return nil -} -// SetOotbPolicies sets the ootbPolicies property value. Composed type representation for type OotbPoliciesable -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetOotbPolicies(value OotbPoliciesable)() { - m.ootbPolicies = value -} -// SetOotbPolicyLibraryReferences sets the ootbPolicyLibraryReferences property value. Composed type representation for type OotbPolicyLibraryReferencesable -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetOotbPolicyLibraryReferences(value OotbPolicyLibraryReferencesable)() { - m.ootbPolicyLibraryReferences = value -} -// SetPolicies sets the policies property value. Composed type representation for type Policiesable -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetPolicies(value Policiesable)() { - m.policies = value -} -// SetPolicySetVersions sets the policySetVersions property value. Composed type representation for type PolicySetVersionsable -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetPolicySetVersions(value PolicySetVersionsable)() { - m.policySetVersions = value -} -// SetProjects sets the projects property value. Composed type representation for type Projectsable -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetProjects(value Projectsable)() { - m.projects = value -} -// SetStacks sets the stacks property value. Composed type representation for type ItemStacksGetResponse_Stacksable -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetStacks(value ItemStacksGetResponse_Stacksable)() { - m.stacks = value -} -// SetWorkspaces sets the workspaces property value. Composed type representation for type ItemWorkspacesGetResponse_Workspacesable -func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetWorkspaces(value ItemWorkspacesGetResponse_Workspacesable)() { - m.workspaces = value -} -type PolicySetsEnvelope_PolicySetsEnvelope_includedable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetOotbPolicies()(OotbPoliciesable) - GetOotbPolicyLibraryReferences()(OotbPolicyLibraryReferencesable) - GetPolicies()(Policiesable) - GetPolicySetVersions()(PolicySetVersionsable) - GetProjects()(Projectsable) - GetStacks()(ItemStacksGetResponse_Stacksable) - GetWorkspaces()(ItemWorkspacesGetResponse_Workspacesable) - SetOotbPolicies(value OotbPoliciesable)() - SetOotbPolicyLibraryReferences(value OotbPolicyLibraryReferencesable)() - SetPolicies(value Policiesable)() - SetPolicySetVersions(value PolicySetVersionsable)() - SetProjects(value Projectsable)() - SetStacks(value ItemStacksGetResponse_Stacksable)() - SetWorkspaces(value ItemWorkspacesGetResponse_Workspacesable)() } // NewPolicySetsEnvelope instantiates a new PolicySetsEnvelope and sets the default values. func NewPolicySetsEnvelope()(*PolicySetsEnvelope) { @@ -255,29 +49,8 @@ func (m *PolicySetsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreatePolicySetsEnvelope_PolicySetsEnvelope_includedFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]PolicySetsEnvelope_PolicySetsEnvelope_includedable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(PolicySetsEnvelope_PolicySetsEnvelope_includedable) - } - } - m.SetIncluded(res) - } - return nil - } return res } -// GetIncluded gets the included property value. Sideloaded resources. `?include=policies` sideloads the full policy resources. -// returns a []PolicySetsEnvelope_PolicySetsEnvelope_includedable when successful -func (m *PolicySetsEnvelope) GetIncluded()([]PolicySetsEnvelope_PolicySetsEnvelope_includedable) { - return m.included -} // Serialize serializes information the current object func (m *PolicySetsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -286,18 +59,6 @@ func (m *PolicySetsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err := writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -314,15 +75,9 @@ func (m *PolicySetsEnvelope) SetAdditionalData(value map[string]any)() { func (m *PolicySetsEnvelope) SetData(value PolicySetsable)() { m.data = value } -// SetIncluded sets the included property value. Sideloaded resources. `?include=policies` sideloads the full policy resources. -func (m *PolicySetsEnvelope) SetIncluded(value []PolicySetsEnvelope_PolicySetsEnvelope_includedable)() { - m.included = value -} type PolicySetsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(PolicySetsable) - GetIncluded()([]PolicySetsEnvelope_PolicySetsEnvelope_includedable) SetData(value PolicySetsable)() - SetIncluded(value []PolicySetsEnvelope_PolicySetsEnvelope_includedable)() } diff --git a/v2/api/models/provider_sets_envelope.go b/v2/api/models/provider_sets_envelope.go index 4455f91dc..f18f32687 100644 --- a/v2/api/models/provider_sets_envelope.go +++ b/v2/api/models/provider_sets_envelope.go @@ -11,7 +11,7 @@ type ProviderSetsEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data ItemProviderSetsGetResponse_ProviderSetsable + data ProviderSetsable } // NewProviderSetsEnvelope instantiates a new ProviderSetsEnvelope and sets the default values. func NewProviderSetsEnvelope()(*ProviderSetsEnvelope) { @@ -31,8 +31,8 @@ func (m *ProviderSetsEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a ItemProviderSetsGetResponse_ProviderSetsable when successful -func (m *ProviderSetsEnvelope) GetData()(ItemProviderSetsGetResponse_ProviderSetsable) { +// returns a ProviderSetsable when successful +func (m *ProviderSetsEnvelope) GetData()(ProviderSetsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *ProviderSetsEnvelope) GetData()(ItemProviderSetsGetResponse_ProviderSet func (m *ProviderSetsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateProviderSetsFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(ItemProviderSetsGetResponse_ProviderSetsable)) + m.SetData(val.(ProviderSetsable)) } return nil } @@ -72,12 +72,12 @@ func (m *ProviderSetsEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *ProviderSetsEnvelope) SetData(value ItemProviderSetsGetResponse_ProviderSetsable)() { +func (m *ProviderSetsEnvelope) SetData(value ProviderSetsable)() { m.data = value } type ProviderSetsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(ItemProviderSetsGetResponse_ProviderSetsable) - SetData(value ItemProviderSetsGetResponse_ProviderSetsable)() + GetData()(ProviderSetsable) + SetData(value ProviderSetsable)() } diff --git a/v2/api/models/runs_envelope.go b/v2/api/models/runs_envelope.go index d272b9af4..7b4085768 100644 --- a/v2/api/models/runs_envelope.go +++ b/v2/api/models/runs_envelope.go @@ -4,7 +4,6 @@ package models import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -13,255 +12,6 @@ type RunsEnvelope struct { additionalData map[string]any // The data property data Runsable - // The included property - included []RunsEnvelope_RunsEnvelope_includedable -} -// RunsEnvelope_RunsEnvelope_included composed type wrapper for classes Appliesable, ConfigurationVersionsable, CostEstimatesable, IngressAttributesable, ItemWorkspacesGetResponse_Workspacesable, Plansable, TaskStagesable, TfPolicyEvaluationable, Usersable -type RunsEnvelope_RunsEnvelope_included struct { - // Composed type representation for type Appliesable - applies Appliesable - // Composed type representation for type ConfigurationVersionsable - configurationVersions ConfigurationVersionsable - // Composed type representation for type CostEstimatesable - costEstimates CostEstimatesable - // Composed type representation for type IngressAttributesable - ingressAttributes IngressAttributesable - // Composed type representation for type Plansable - plans Plansable - // Composed type representation for type TaskStagesable - taskStages TaskStagesable - // Composed type representation for type TfPolicyEvaluationable - tfPolicyEvaluation TfPolicyEvaluationable - // Composed type representation for type Usersable - users Usersable - // Composed type representation for type ItemWorkspacesGetResponse_Workspacesable - workspaces ItemWorkspacesGetResponse_Workspacesable -} -// NewRunsEnvelope_RunsEnvelope_included instantiates a new RunsEnvelope_RunsEnvelope_included and sets the default values. -func NewRunsEnvelope_RunsEnvelope_included()(*RunsEnvelope_RunsEnvelope_included) { - m := &RunsEnvelope_RunsEnvelope_included{ - } - return m -} -// CreateRunsEnvelope_RunsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateRunsEnvelope_RunsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewRunsEnvelope_RunsEnvelope_included() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { - result.SetApplies(NewApplies()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { - result.SetConfigurationVersions(NewConfigurationVersions()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { - result.SetCostEstimates(NewCostEstimates()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { - result.SetIngressAttributes(NewIngressAttributes()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { - result.SetPlans(NewPlans()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-stages") { - result.SetTaskStages(NewTaskStages()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tf-policy-evaluations") { - result.SetTfPolicyEvaluation(NewTfPolicyEvaluation()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { - result.SetUsers(NewUsers()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(NewItemWorkspacesGetResponse_Workspaces()) - } - } - } - } - return result, nil -} -// GetApplies gets the applies property value. Composed type representation for type Appliesable -// returns a Appliesable when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetApplies()(Appliesable) { - return m.applies -} -// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable -// returns a ConfigurationVersionsable when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetConfigurationVersions()(ConfigurationVersionsable) { - return m.configurationVersions -} -// GetCostEstimates gets the costEstimates property value. Composed type representation for type CostEstimatesable -// returns a CostEstimatesable when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetCostEstimates()(CostEstimatesable) { - return m.costEstimates -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetApplies() != nil { - return m.GetApplies().GetFieldDeserializers() - } else if m.GetConfigurationVersions() != nil { - return m.GetConfigurationVersions().GetFieldDeserializers() - } else if m.GetCostEstimates() != nil { - return m.GetCostEstimates().GetFieldDeserializers() - } else if m.GetIngressAttributes() != nil { - return m.GetIngressAttributes().GetFieldDeserializers() - } else if m.GetPlans() != nil { - return m.GetPlans().GetFieldDeserializers() - } else if m.GetTaskStages() != nil { - return m.GetTaskStages().GetFieldDeserializers() - } else if m.GetTfPolicyEvaluation() != nil { - return m.GetTfPolicyEvaluation().GetFieldDeserializers() - } else if m.GetUsers() != nil { - return m.GetUsers().GetFieldDeserializers() - } else if m.GetWorkspaces() != nil { - return m.GetWorkspaces().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) -} -// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type IngressAttributesable -// returns a IngressAttributesable when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetIngressAttributes()(IngressAttributesable) { - return m.ingressAttributes -} -// GetIsComposedType determines if the current object is a wrapper around a composed type -// returns a bool when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetIsComposedType()(bool) { - return true -} -// GetPlans gets the plans property value. Composed type representation for type Plansable -// returns a Plansable when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetPlans()(Plansable) { - return m.plans -} -// GetTaskStages gets the taskStages property value. Composed type representation for type TaskStagesable -// returns a TaskStagesable when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetTaskStages()(TaskStagesable) { - return m.taskStages -} -// GetTfPolicyEvaluation gets the tfPolicyEvaluation property value. Composed type representation for type TfPolicyEvaluationable -// returns a TfPolicyEvaluationable when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetTfPolicyEvaluation()(TfPolicyEvaluationable) { - return m.tfPolicyEvaluation -} -// GetUsers gets the users property value. Composed type representation for type Usersable -// returns a Usersable when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetUsers()(Usersable) { - return m.users -} -// GetWorkspaces gets the workspaces property value. Composed type representation for type ItemWorkspacesGetResponse_Workspacesable -// returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *RunsEnvelope_RunsEnvelope_included) GetWorkspaces()(ItemWorkspacesGetResponse_Workspacesable) { - return m.workspaces -} -// Serialize serializes information the current object -func (m *RunsEnvelope_RunsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetApplies() != nil { - err := writer.WriteObjectValue("", m.GetApplies()) - if err != nil { - return err - } - } else if m.GetConfigurationVersions() != nil { - err := writer.WriteObjectValue("", m.GetConfigurationVersions()) - if err != nil { - return err - } - } else if m.GetCostEstimates() != nil { - err := writer.WriteObjectValue("", m.GetCostEstimates()) - if err != nil { - return err - } - } else if m.GetIngressAttributes() != nil { - err := writer.WriteObjectValue("", m.GetIngressAttributes()) - if err != nil { - return err - } - } else if m.GetPlans() != nil { - err := writer.WriteObjectValue("", m.GetPlans()) - if err != nil { - return err - } - } else if m.GetTaskStages() != nil { - err := writer.WriteObjectValue("", m.GetTaskStages()) - if err != nil { - return err - } - } else if m.GetTfPolicyEvaluation() != nil { - err := writer.WriteObjectValue("", m.GetTfPolicyEvaluation()) - if err != nil { - return err - } - } else if m.GetUsers() != nil { - err := writer.WriteObjectValue("", m.GetUsers()) - if err != nil { - return err - } - } else if m.GetWorkspaces() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaces()) - if err != nil { - return err - } - } - return nil -} -// SetApplies sets the applies property value. Composed type representation for type Appliesable -func (m *RunsEnvelope_RunsEnvelope_included) SetApplies(value Appliesable)() { - m.applies = value -} -// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable -func (m *RunsEnvelope_RunsEnvelope_included) SetConfigurationVersions(value ConfigurationVersionsable)() { - m.configurationVersions = value -} -// SetCostEstimates sets the costEstimates property value. Composed type representation for type CostEstimatesable -func (m *RunsEnvelope_RunsEnvelope_included) SetCostEstimates(value CostEstimatesable)() { - m.costEstimates = value -} -// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type IngressAttributesable -func (m *RunsEnvelope_RunsEnvelope_included) SetIngressAttributes(value IngressAttributesable)() { - m.ingressAttributes = value -} -// SetPlans sets the plans property value. Composed type representation for type Plansable -func (m *RunsEnvelope_RunsEnvelope_included) SetPlans(value Plansable)() { - m.plans = value -} -// SetTaskStages sets the taskStages property value. Composed type representation for type TaskStagesable -func (m *RunsEnvelope_RunsEnvelope_included) SetTaskStages(value TaskStagesable)() { - m.taskStages = value -} -// SetTfPolicyEvaluation sets the tfPolicyEvaluation property value. Composed type representation for type TfPolicyEvaluationable -func (m *RunsEnvelope_RunsEnvelope_included) SetTfPolicyEvaluation(value TfPolicyEvaluationable)() { - m.tfPolicyEvaluation = value -} -// SetUsers sets the users property value. Composed type representation for type Usersable -func (m *RunsEnvelope_RunsEnvelope_included) SetUsers(value Usersable)() { - m.users = value -} -// SetWorkspaces sets the workspaces property value. Composed type representation for type ItemWorkspacesGetResponse_Workspacesable -func (m *RunsEnvelope_RunsEnvelope_included) SetWorkspaces(value ItemWorkspacesGetResponse_Workspacesable)() { - m.workspaces = value -} -type RunsEnvelope_RunsEnvelope_includedable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetApplies()(Appliesable) - GetConfigurationVersions()(ConfigurationVersionsable) - GetCostEstimates()(CostEstimatesable) - GetIngressAttributes()(IngressAttributesable) - GetPlans()(Plansable) - GetTaskStages()(TaskStagesable) - GetTfPolicyEvaluation()(TfPolicyEvaluationable) - GetUsers()(Usersable) - GetWorkspaces()(ItemWorkspacesGetResponse_Workspacesable) - SetApplies(value Appliesable)() - SetConfigurationVersions(value ConfigurationVersionsable)() - SetCostEstimates(value CostEstimatesable)() - SetIngressAttributes(value IngressAttributesable)() - SetPlans(value Plansable)() - SetTaskStages(value TaskStagesable)() - SetTfPolicyEvaluation(value TfPolicyEvaluationable)() - SetUsers(value Usersable)() - SetWorkspaces(value ItemWorkspacesGetResponse_Workspacesable)() } // NewRunsEnvelope instantiates a new RunsEnvelope and sets the default values. func NewRunsEnvelope()(*RunsEnvelope) { @@ -299,29 +49,8 @@ func (m *RunsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return nil } - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateRunsEnvelope_RunsEnvelope_includedFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]RunsEnvelope_RunsEnvelope_includedable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(RunsEnvelope_RunsEnvelope_includedable) - } - } - m.SetIncluded(res) - } - return nil - } return res } -// GetIncluded gets the included property value. The included property -// returns a []RunsEnvelope_RunsEnvelope_includedable when successful -func (m *RunsEnvelope) GetIncluded()([]RunsEnvelope_RunsEnvelope_includedable) { - return m.included -} // Serialize serializes information the current object func (m *RunsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -330,18 +59,6 @@ func (m *RunsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e return err } } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err := writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -358,15 +75,9 @@ func (m *RunsEnvelope) SetAdditionalData(value map[string]any)() { func (m *RunsEnvelope) SetData(value Runsable)() { m.data = value } -// SetIncluded sets the included property value. The included property -func (m *RunsEnvelope) SetIncluded(value []RunsEnvelope_RunsEnvelope_includedable)() { - m.included = value -} type RunsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Runsable) - GetIncluded()([]RunsEnvelope_RunsEnvelope_includedable) SetData(value Runsable)() - SetIncluded(value []RunsEnvelope_RunsEnvelope_includedable)() } diff --git a/v2/api/models/stack_configurations_envelope.go b/v2/api/models/stack_configurations_envelope.go index 7df556ce7..f93fa8ad9 100644 --- a/v2/api/models/stack_configurations_envelope.go +++ b/v2/api/models/stack_configurations_envelope.go @@ -11,7 +11,7 @@ type StackConfigurationsEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data ItemStackConfigurationsGetResponse_StackConfigurationsable + data StackConfigurationsable } // NewStackConfigurationsEnvelope instantiates a new StackConfigurationsEnvelope and sets the default values. func NewStackConfigurationsEnvelope()(*StackConfigurationsEnvelope) { @@ -31,8 +31,8 @@ func (m *StackConfigurationsEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a ItemStackConfigurationsGetResponse_StackConfigurationsable when successful -func (m *StackConfigurationsEnvelope) GetData()(ItemStackConfigurationsGetResponse_StackConfigurationsable) { +// returns a StackConfigurationsable when successful +func (m *StackConfigurationsEnvelope) GetData()(StackConfigurationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *StackConfigurationsEnvelope) GetData()(ItemStackConfigurationsGetRespon func (m *StackConfigurationsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateStackConfigurationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(ItemStackConfigurationsGetResponse_StackConfigurationsable)) + m.SetData(val.(StackConfigurationsable)) } return nil } @@ -72,12 +72,12 @@ func (m *StackConfigurationsEnvelope) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. The data property -func (m *StackConfigurationsEnvelope) SetData(value ItemStackConfigurationsGetResponse_StackConfigurationsable)() { +func (m *StackConfigurationsEnvelope) SetData(value StackConfigurationsable)() { m.data = value } type StackConfigurationsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(ItemStackConfigurationsGetResponse_StackConfigurationsable) - SetData(value ItemStackConfigurationsGetResponse_StackConfigurationsable)() + GetData()(StackConfigurationsable) + SetData(value StackConfigurationsable)() } diff --git a/v2/api/models/stacks_envelope.go b/v2/api/models/stacks_envelope.go index b65cca550..d46c44137 100644 --- a/v2/api/models/stacks_envelope.go +++ b/v2/api/models/stacks_envelope.go @@ -11,7 +11,7 @@ type StacksEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data ItemStacksGetResponse_Stacksable + data Stacksable } // NewStacksEnvelope instantiates a new StacksEnvelope and sets the default values. func NewStacksEnvelope()(*StacksEnvelope) { @@ -31,8 +31,8 @@ func (m *StacksEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a ItemStacksGetResponse_Stacksable when successful -func (m *StacksEnvelope) GetData()(ItemStacksGetResponse_Stacksable) { +// returns a Stacksable when successful +func (m *StacksEnvelope) GetData()(Stacksable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *StacksEnvelope) GetData()(ItemStacksGetResponse_Stacksable) { func (m *StacksEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateItemStacksGetResponse_StacksFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateStacksFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(ItemStacksGetResponse_Stacksable)) + m.SetData(val.(Stacksable)) } return nil } @@ -72,12 +72,12 @@ func (m *StacksEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *StacksEnvelope) SetData(value ItemStacksGetResponse_Stacksable)() { +func (m *StacksEnvelope) SetData(value Stacksable)() { m.data = value } type StacksEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(ItemStacksGetResponse_Stacksable) - SetData(value ItemStacksGetResponse_Stacksable)() + GetData()(Stacksable) + SetData(value Stacksable)() } diff --git a/v2/api/models/tasks_envelope.go b/v2/api/models/tasks_envelope.go index eed467220..a2ae59696 100644 --- a/v2/api/models/tasks_envelope.go +++ b/v2/api/models/tasks_envelope.go @@ -11,7 +11,7 @@ type TasksEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data ItemTasksGetResponse_Tasksable + data Tasksable } // NewTasksEnvelope instantiates a new TasksEnvelope and sets the default values. func NewTasksEnvelope()(*TasksEnvelope) { @@ -31,8 +31,8 @@ func (m *TasksEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a ItemTasksGetResponse_Tasksable when successful -func (m *TasksEnvelope) GetData()(ItemTasksGetResponse_Tasksable) { +// returns a Tasksable when successful +func (m *TasksEnvelope) GetData()(Tasksable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *TasksEnvelope) GetData()(ItemTasksGetResponse_Tasksable) { func (m *TasksEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateItemTasksGetResponse_TasksFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateTasksFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(ItemTasksGetResponse_Tasksable)) + m.SetData(val.(Tasksable)) } return nil } @@ -72,12 +72,12 @@ func (m *TasksEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *TasksEnvelope) SetData(value ItemTasksGetResponse_Tasksable)() { +func (m *TasksEnvelope) SetData(value Tasksable)() { m.data = value } type TasksEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(ItemTasksGetResponse_Tasksable) - SetData(value ItemTasksGetResponse_Tasksable)() + GetData()(Tasksable) + SetData(value Tasksable)() } diff --git a/v2/api/models/teams_envelope.go b/v2/api/models/teams_envelope.go index afabd268d..d87f9b687 100644 --- a/v2/api/models/teams_envelope.go +++ b/v2/api/models/teams_envelope.go @@ -4,7 +4,6 @@ package models import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -13,101 +12,6 @@ type TeamsEnvelope struct { additionalData map[string]any // The data property data Teamsable - // The included property - included []TeamsEnvelope_TeamsEnvelope_includedable -} -// TeamsEnvelope_TeamsEnvelope_included composed type wrapper for classes OrganizationMembershipsable, Usersable -type TeamsEnvelope_TeamsEnvelope_included struct { - // Composed type representation for type OrganizationMembershipsable - organizationMemberships OrganizationMembershipsable - // Composed type representation for type Usersable - users Usersable -} -// NewTeamsEnvelope_TeamsEnvelope_included instantiates a new TeamsEnvelope_TeamsEnvelope_included and sets the default values. -func NewTeamsEnvelope_TeamsEnvelope_included()(*TeamsEnvelope_TeamsEnvelope_included) { - m := &TeamsEnvelope_TeamsEnvelope_included{ - } - return m -} -// CreateTeamsEnvelope_TeamsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateTeamsEnvelope_TeamsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewTeamsEnvelope_TeamsEnvelope_included() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organization-memberships") { - result.SetOrganizationMemberships(NewOrganizationMemberships()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { - result.SetUsers(NewUsers()) - } - } - } - } - return result, nil -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *TeamsEnvelope_TeamsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetOrganizationMemberships() != nil { - return m.GetOrganizationMemberships().GetFieldDeserializers() - } else if m.GetUsers() != nil { - return m.GetUsers().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) -} -// GetIsComposedType determines if the current object is a wrapper around a composed type -// returns a bool when successful -func (m *TeamsEnvelope_TeamsEnvelope_included) GetIsComposedType()(bool) { - return true -} -// GetOrganizationMemberships gets the organizationMemberships property value. Composed type representation for type OrganizationMembershipsable -// returns a OrganizationMembershipsable when successful -func (m *TeamsEnvelope_TeamsEnvelope_included) GetOrganizationMemberships()(OrganizationMembershipsable) { - return m.organizationMemberships -} -// GetUsers gets the users property value. Composed type representation for type Usersable -// returns a Usersable when successful -func (m *TeamsEnvelope_TeamsEnvelope_included) GetUsers()(Usersable) { - return m.users -} -// Serialize serializes information the current object -func (m *TeamsEnvelope_TeamsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetOrganizationMemberships() != nil { - err := writer.WriteObjectValue("", m.GetOrganizationMemberships()) - if err != nil { - return err - } - } else if m.GetUsers() != nil { - err := writer.WriteObjectValue("", m.GetUsers()) - if err != nil { - return err - } - } - return nil -} -// SetOrganizationMemberships sets the organizationMemberships property value. Composed type representation for type OrganizationMembershipsable -func (m *TeamsEnvelope_TeamsEnvelope_included) SetOrganizationMemberships(value OrganizationMembershipsable)() { - m.organizationMemberships = value -} -// SetUsers sets the users property value. Composed type representation for type Usersable -func (m *TeamsEnvelope_TeamsEnvelope_included) SetUsers(value Usersable)() { - m.users = value -} -type TeamsEnvelope_TeamsEnvelope_includedable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetOrganizationMemberships()(OrganizationMembershipsable) - GetUsers()(Usersable) - SetOrganizationMemberships(value OrganizationMembershipsable)() - SetUsers(value Usersable)() } // NewTeamsEnvelope instantiates a new TeamsEnvelope and sets the default values. func NewTeamsEnvelope()(*TeamsEnvelope) { @@ -145,29 +49,8 @@ func (m *TeamsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return nil } - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateTeamsEnvelope_TeamsEnvelope_includedFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]TeamsEnvelope_TeamsEnvelope_includedable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(TeamsEnvelope_TeamsEnvelope_includedable) - } - } - m.SetIncluded(res) - } - return nil - } return res } -// GetIncluded gets the included property value. The included property -// returns a []TeamsEnvelope_TeamsEnvelope_includedable when successful -func (m *TeamsEnvelope) GetIncluded()([]TeamsEnvelope_TeamsEnvelope_includedable) { - return m.included -} // Serialize serializes information the current object func (m *TeamsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -176,18 +59,6 @@ func (m *TeamsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 return err } } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err := writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -204,15 +75,9 @@ func (m *TeamsEnvelope) SetAdditionalData(value map[string]any)() { func (m *TeamsEnvelope) SetData(value Teamsable)() { m.data = value } -// SetIncluded sets the included property value. The included property -func (m *TeamsEnvelope) SetIncluded(value []TeamsEnvelope_TeamsEnvelope_includedable)() { - m.included = value -} type TeamsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Teamsable) - GetIncluded()([]TeamsEnvelope_TeamsEnvelope_includedable) SetData(value Teamsable)() - SetIncluded(value []TeamsEnvelope_TeamsEnvelope_includedable)() } diff --git a/v2/api/models/tf_policy_evaluations.go b/v2/api/models/tf_policy_evaluations.go new file mode 100644 index 000000000..e5f7c762b --- /dev/null +++ b/v2/api/models/tf_policy_evaluations.go @@ -0,0 +1,195 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TfPolicyEvaluations represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle. +type TfPolicyEvaluations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes TfPolicyEvaluations_attributesable + // The id property + id *string + // The links property + links TfPolicyEvaluations_linksable + // The relationships property + relationships TfPolicyEvaluations_relationshipsable + // The type property + typeEscaped *TfPolicyEvaluations_type +} +// NewTfPolicyEvaluations instantiates a new TfPolicyEvaluations and sets the default values. +func NewTfPolicyEvaluations()(*TfPolicyEvaluations) { + m := &TfPolicyEvaluations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicyEvaluationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicyEvaluationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicyEvaluations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicyEvaluations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a TfPolicyEvaluations_attributesable when successful +func (m *TfPolicyEvaluations) GetAttributes()(TfPolicyEvaluations_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicyEvaluations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicyEvaluations_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(TfPolicyEvaluations_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicyEvaluations_linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(TfPolicyEvaluations_linksable)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicyEvaluations_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(TfPolicyEvaluations_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTfPolicyEvaluations_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*TfPolicyEvaluations_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *TfPolicyEvaluations) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a TfPolicyEvaluations_linksable when successful +func (m *TfPolicyEvaluations) GetLinks()(TfPolicyEvaluations_linksable) { + return m.links +} +// GetRelationships gets the relationships property value. The relationships property +// returns a TfPolicyEvaluations_relationshipsable when successful +func (m *TfPolicyEvaluations) GetRelationships()(TfPolicyEvaluations_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *TfPolicyEvaluations_type when successful +func (m *TfPolicyEvaluations) GetTypeEscaped()(*TfPolicyEvaluations_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *TfPolicyEvaluations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicyEvaluations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *TfPolicyEvaluations) SetAttributes(value TfPolicyEvaluations_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *TfPolicyEvaluations) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *TfPolicyEvaluations) SetLinks(value TfPolicyEvaluations_linksable)() { + m.links = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *TfPolicyEvaluations) SetRelationships(value TfPolicyEvaluations_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *TfPolicyEvaluations) SetTypeEscaped(value *TfPolicyEvaluations_type)() { + m.typeEscaped = value +} +type TfPolicyEvaluationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(TfPolicyEvaluations_attributesable) + GetId()(*string) + GetLinks()(TfPolicyEvaluations_linksable) + GetRelationships()(TfPolicyEvaluations_relationshipsable) + GetTypeEscaped()(*TfPolicyEvaluations_type) + SetAttributes(value TfPolicyEvaluations_attributesable)() + SetId(value *string)() + SetLinks(value TfPolicyEvaluations_linksable)() + SetRelationships(value TfPolicyEvaluations_relationshipsable)() + SetTypeEscaped(value *TfPolicyEvaluations_type)() +} diff --git a/v2/api/models/tf_policy_evaluations_envelope.go b/v2/api/models/tf_policy_evaluations_envelope.go index a06072df5..c7b51aae3 100644 --- a/v2/api/models/tf_policy_evaluations_envelope.go +++ b/v2/api/models/tf_policy_evaluations_envelope.go @@ -11,7 +11,7 @@ type TfPolicyEvaluationsEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle. - data TfPolicyEvaluationable + data TfPolicyEvaluationsable } // NewTfPolicyEvaluationsEnvelope instantiates a new TfPolicyEvaluationsEnvelope and sets the default values. func NewTfPolicyEvaluationsEnvelope()(*TfPolicyEvaluationsEnvelope) { @@ -31,8 +31,8 @@ func (m *TfPolicyEvaluationsEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle. -// returns a TfPolicyEvaluationable when successful -func (m *TfPolicyEvaluationsEnvelope) GetData()(TfPolicyEvaluationable) { +// returns a TfPolicyEvaluationsable when successful +func (m *TfPolicyEvaluationsEnvelope) GetData()(TfPolicyEvaluationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *TfPolicyEvaluationsEnvelope) GetData()(TfPolicyEvaluationable) { func (m *TfPolicyEvaluationsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateTfPolicyEvaluationFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateTfPolicyEvaluationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(TfPolicyEvaluationable)) + m.SetData(val.(TfPolicyEvaluationsable)) } return nil } @@ -72,12 +72,12 @@ func (m *TfPolicyEvaluationsEnvelope) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle. -func (m *TfPolicyEvaluationsEnvelope) SetData(value TfPolicyEvaluationable)() { +func (m *TfPolicyEvaluationsEnvelope) SetData(value TfPolicyEvaluationsable)() { m.data = value } type TfPolicyEvaluationsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(TfPolicyEvaluationable) - SetData(value TfPolicyEvaluationable)() + GetData()(TfPolicyEvaluationsable) + SetData(value TfPolicyEvaluationsable)() } diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes.go b/v2/api/models/tf_policy_evaluations_escaped_attributes.go new file mode 100644 index 000000000..fb214d7c2 --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes.go @@ -0,0 +1,328 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicyEvaluations_attributes struct { + // Available actions for this evaluation + actions TfPolicyEvaluations_attributes_actionsable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether this evaluation supports archivist-backed outcome storage. When `true`,full policy results are available via `policy-set-result-url` on each`tf-policy-set-outcome`. When `false`, use the `outcomes` array instead. + archivistSupported *bool + // When the evaluation was created + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Error information if the entire evaluation failed (not policy-specific errors) + error TfPolicyEvaluations_attributes_errorable + // User permissions for this evaluation + permissions TfPolicyEvaluations_attributes_permissionsable + // Aggregated counts of policy results across all policy sets in this evaluation + resultCount TfPolicyEvaluations_attributes_resultCountable + // The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init') + stageType *string + // Current status of the Terraform policy evaluation. Status values:- `pending`: Initial state, not yet queued for evaluation- `queued`: Queued and waiting to be evaluated- `running`: Actively being evaluated- `awaiting_override`: Failed with overridable policies, awaiting manual override- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `overridden`: Failed evaluation manually overridden (final state)- `errored`: System error during processing (final state)- `canceled`: Canceled before completion (final state)- `unreachable`: Pseudo-state derived from run state + status *TfPolicyEvaluations_attributes_status + // Timestamps for each status transition during the evaluation lifecycle + statusTimestamps TfPolicyEvaluations_attributes_statusTimestampsable + // When the evaluation was last updated + updatedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewTfPolicyEvaluations_attributes instantiates a new TfPolicyEvaluations_attributes and sets the default values. +func NewTfPolicyEvaluations_attributes()(*TfPolicyEvaluations_attributes) { + m := &TfPolicyEvaluations_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicyEvaluations_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicyEvaluations_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicyEvaluations_attributes(), nil +} +// GetActions gets the actions property value. Available actions for this evaluation +// returns a TfPolicyEvaluations_attributes_actionsable when successful +func (m *TfPolicyEvaluations_attributes) GetActions()(TfPolicyEvaluations_attributes_actionsable) { + return m.actions +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicyEvaluations_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchivistSupported gets the archivist-supported property value. Whether this evaluation supports archivist-backed outcome storage. When `true`,full policy results are available via `policy-set-result-url` on each`tf-policy-set-outcome`. When `false`, use the `outcomes` array instead. +// returns a *bool when successful +func (m *TfPolicyEvaluations_attributes) GetArchivistSupported()(*bool) { + return m.archivistSupported +} +// GetCreatedAt gets the created-at property value. When the evaluation was created +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetError gets the error property value. Error information if the entire evaluation failed (not policy-specific errors) +// returns a TfPolicyEvaluations_attributes_errorable when successful +func (m *TfPolicyEvaluations_attributes) GetError()(TfPolicyEvaluations_attributes_errorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicyEvaluations_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicyEvaluations_attributes_actionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActions(val.(TfPolicyEvaluations_attributes_actionsable)) + } + return nil + } + res["archivist-supported"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchivistSupported(val) + } + return nil + } + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicyEvaluations_attributes_errorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(TfPolicyEvaluations_attributes_errorable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicyEvaluations_attributes_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(TfPolicyEvaluations_attributes_permissionsable)) + } + return nil + } + res["result-count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicyEvaluations_attributes_resultCountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResultCount(val.(TfPolicyEvaluations_attributes_resultCountable)) + } + return nil + } + res["stage-type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStageType(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTfPolicyEvaluations_attributes_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*TfPolicyEvaluations_attributes_status)) + } + return nil + } + res["status-timestamps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicyEvaluations_attributes_statusTimestampsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatusTimestamps(val.(TfPolicyEvaluations_attributes_statusTimestampsable)) + } + return nil + } + res["updated-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetPermissions gets the permissions property value. User permissions for this evaluation +// returns a TfPolicyEvaluations_attributes_permissionsable when successful +func (m *TfPolicyEvaluations_attributes) GetPermissions()(TfPolicyEvaluations_attributes_permissionsable) { + return m.permissions +} +// GetResultCount gets the result-count property value. Aggregated counts of policy results across all policy sets in this evaluation +// returns a TfPolicyEvaluations_attributes_resultCountable when successful +func (m *TfPolicyEvaluations_attributes) GetResultCount()(TfPolicyEvaluations_attributes_resultCountable) { + return m.resultCount +} +// GetStageType gets the stage-type property value. The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init') +// returns a *string when successful +func (m *TfPolicyEvaluations_attributes) GetStageType()(*string) { + return m.stageType +} +// GetStatus gets the status property value. Current status of the Terraform policy evaluation. Status values:- `pending`: Initial state, not yet queued for evaluation- `queued`: Queued and waiting to be evaluated- `running`: Actively being evaluated- `awaiting_override`: Failed with overridable policies, awaiting manual override- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `overridden`: Failed evaluation manually overridden (final state)- `errored`: System error during processing (final state)- `canceled`: Canceled before completion (final state)- `unreachable`: Pseudo-state derived from run state +// returns a *TfPolicyEvaluations_attributes_status when successful +func (m *TfPolicyEvaluations_attributes) GetStatus()(*TfPolicyEvaluations_attributes_status) { + return m.status +} +// GetStatusTimestamps gets the status-timestamps property value. Timestamps for each status transition during the evaluation lifecycle +// returns a TfPolicyEvaluations_attributes_statusTimestampsable when successful +func (m *TfPolicyEvaluations_attributes) GetStatusTimestamps()(TfPolicyEvaluations_attributes_statusTimestampsable) { + return m.statusTimestamps +} +// GetUpdatedAt gets the updated-at property value. When the evaluation was last updated +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedAt +} +// Serialize serializes information the current object +func (m *TfPolicyEvaluations_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actions", m.GetActions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("result-count", m.GetResultCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stage-type", m.GetStageType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("status-timestamps", m.GetStatusTimestamps()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. Available actions for this evaluation +func (m *TfPolicyEvaluations_attributes) SetActions(value TfPolicyEvaluations_attributes_actionsable)() { + m.actions = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicyEvaluations_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchivistSupported sets the archivist-supported property value. Whether this evaluation supports archivist-backed outcome storage. When `true`,full policy results are available via `policy-set-result-url` on each`tf-policy-set-outcome`. When `false`, use the `outcomes` array instead. +func (m *TfPolicyEvaluations_attributes) SetArchivistSupported(value *bool)() { + m.archivistSupported = value +} +// SetCreatedAt sets the created-at property value. When the evaluation was created +func (m *TfPolicyEvaluations_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetError sets the error property value. Error information if the entire evaluation failed (not policy-specific errors) +func (m *TfPolicyEvaluations_attributes) SetError(value TfPolicyEvaluations_attributes_errorable)() { + m.error = value +} +// SetPermissions sets the permissions property value. User permissions for this evaluation +func (m *TfPolicyEvaluations_attributes) SetPermissions(value TfPolicyEvaluations_attributes_permissionsable)() { + m.permissions = value +} +// SetResultCount sets the result-count property value. Aggregated counts of policy results across all policy sets in this evaluation +func (m *TfPolicyEvaluations_attributes) SetResultCount(value TfPolicyEvaluations_attributes_resultCountable)() { + m.resultCount = value +} +// SetStageType sets the stage-type property value. The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init') +func (m *TfPolicyEvaluations_attributes) SetStageType(value *string)() { + m.stageType = value +} +// SetStatus sets the status property value. Current status of the Terraform policy evaluation. Status values:- `pending`: Initial state, not yet queued for evaluation- `queued`: Queued and waiting to be evaluated- `running`: Actively being evaluated- `awaiting_override`: Failed with overridable policies, awaiting manual override- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `overridden`: Failed evaluation manually overridden (final state)- `errored`: System error during processing (final state)- `canceled`: Canceled before completion (final state)- `unreachable`: Pseudo-state derived from run state +func (m *TfPolicyEvaluations_attributes) SetStatus(value *TfPolicyEvaluations_attributes_status)() { + m.status = value +} +// SetStatusTimestamps sets the status-timestamps property value. Timestamps for each status transition during the evaluation lifecycle +func (m *TfPolicyEvaluations_attributes) SetStatusTimestamps(value TfPolicyEvaluations_attributes_statusTimestampsable)() { + m.statusTimestamps = value +} +// SetUpdatedAt sets the updated-at property value. When the evaluation was last updated +func (m *TfPolicyEvaluations_attributes) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedAt = value +} +type TfPolicyEvaluations_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()(TfPolicyEvaluations_attributes_actionsable) + GetArchivistSupported()(*bool) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetError()(TfPolicyEvaluations_attributes_errorable) + GetPermissions()(TfPolicyEvaluations_attributes_permissionsable) + GetResultCount()(TfPolicyEvaluations_attributes_resultCountable) + GetStageType()(*string) + GetStatus()(*TfPolicyEvaluations_attributes_status) + GetStatusTimestamps()(TfPolicyEvaluations_attributes_statusTimestampsable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetActions(value TfPolicyEvaluations_attributes_actionsable)() + SetArchivistSupported(value *bool)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetError(value TfPolicyEvaluations_attributes_errorable)() + SetPermissions(value TfPolicyEvaluations_attributes_permissionsable)() + SetResultCount(value TfPolicyEvaluations_attributes_resultCountable)() + SetStageType(value *string)() + SetStatus(value *TfPolicyEvaluations_attributes_status)() + SetStatusTimestamps(value TfPolicyEvaluations_attributes_statusTimestampsable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_actions.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_actions.go new file mode 100644 index 000000000..6ce86c120 --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_actions.go @@ -0,0 +1,84 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TfPolicyEvaluations_attributes_actions available actions for this evaluation +type TfPolicyEvaluations_attributes_actions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether this evaluation can be overridden (based on policy enforcement levels and current status) + isOverridable *bool +} +// NewTfPolicyEvaluations_attributes_actions instantiates a new TfPolicyEvaluations_attributes_actions and sets the default values. +func NewTfPolicyEvaluations_attributes_actions()(*TfPolicyEvaluations_attributes_actions) { + m := &TfPolicyEvaluations_attributes_actions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicyEvaluations_attributes_actionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicyEvaluations_attributes_actionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicyEvaluations_attributes_actions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicyEvaluations_attributes_actions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicyEvaluations_attributes_actions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["is-overridable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOverridable(val) + } + return nil + } + return res +} +// GetIsOverridable gets the is-overridable property value. Whether this evaluation can be overridden (based on policy enforcement levels and current status) +// returns a *bool when successful +func (m *TfPolicyEvaluations_attributes_actions) GetIsOverridable()(*bool) { + return m.isOverridable +} +// Serialize serializes information the current object +func (m *TfPolicyEvaluations_attributes_actions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("is-overridable", m.GetIsOverridable()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicyEvaluations_attributes_actions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIsOverridable sets the is-overridable property value. Whether this evaluation can be overridden (based on policy enforcement levels and current status) +func (m *TfPolicyEvaluations_attributes_actions) SetIsOverridable(value *bool)() { + m.isOverridable = value +} +type TfPolicyEvaluations_attributes_actionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsOverridable()(*bool) + SetIsOverridable(value *bool)() +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error.go new file mode 100644 index 000000000..e0d58a147 --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error.go @@ -0,0 +1,143 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TfPolicyEvaluations_attributes_error error information if the entire evaluation failed (not policy-specific errors) +type TfPolicyEvaluations_attributes_error struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Detailed error message with additional context + detail *string + // Brief error summary for display + summary *string + // Error type identifier indicating the category of failure + typeEscaped *TfPolicyEvaluations_attributes_error_type +} +// NewTfPolicyEvaluations_attributes_error instantiates a new TfPolicyEvaluations_attributes_error and sets the default values. +func NewTfPolicyEvaluations_attributes_error()(*TfPolicyEvaluations_attributes_error) { + m := &TfPolicyEvaluations_attributes_error{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicyEvaluations_attributes_errorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicyEvaluations_attributes_errorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicyEvaluations_attributes_error(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicyEvaluations_attributes_error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDetail gets the detail property value. Detailed error message with additional context +// returns a *string when successful +func (m *TfPolicyEvaluations_attributes_error) GetDetail()(*string) { + return m.detail +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicyEvaluations_attributes_error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetail(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTfPolicyEvaluations_attributes_error_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*TfPolicyEvaluations_attributes_error_type)) + } + return nil + } + return res +} +// GetSummary gets the summary property value. Brief error summary for display +// returns a *string when successful +func (m *TfPolicyEvaluations_attributes_error) GetSummary()(*string) { + return m.summary +} +// GetTypeEscaped gets the type property value. Error type identifier indicating the category of failure +// returns a *TfPolicyEvaluations_attributes_error_type when successful +func (m *TfPolicyEvaluations_attributes_error) GetTypeEscaped()(*TfPolicyEvaluations_attributes_error_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *TfPolicyEvaluations_attributes_error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicyEvaluations_attributes_error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDetail sets the detail property value. Detailed error message with additional context +func (m *TfPolicyEvaluations_attributes_error) SetDetail(value *string)() { + m.detail = value +} +// SetSummary sets the summary property value. Brief error summary for display +func (m *TfPolicyEvaluations_attributes_error) SetSummary(value *string)() { + m.summary = value +} +// SetTypeEscaped sets the type property value. Error type identifier indicating the category of failure +func (m *TfPolicyEvaluations_attributes_error) SetTypeEscaped(value *TfPolicyEvaluations_attributes_error_type)() { + m.typeEscaped = value +} +type TfPolicyEvaluations_attributes_errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(*string) + GetSummary()(*string) + GetTypeEscaped()(*TfPolicyEvaluations_attributes_error_type) + SetDetail(value *string)() + SetSummary(value *string)() + SetTypeEscaped(value *TfPolicyEvaluations_attributes_error_type)() +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go new file mode 100644 index 000000000..fb0320e2e --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go @@ -0,0 +1,37 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// Error type identifier indicating the category of failure +type TfPolicyEvaluations_attributes_error_type int + +const ( + SETUP_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE TfPolicyEvaluations_attributes_error_type = iota + INCOMPATIBLE_AGENT_VERSION_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE +) + +func (i TfPolicyEvaluations_attributes_error_type) String() string { + return []string{"setup_error", "incompatible_agent_version"}[i] +} +func ParseTfPolicyEvaluations_attributes_error_type(v string) (any, error) { + result := SETUP_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + switch v { + case "setup_error": + result = SETUP_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + case "incompatible_agent_version": + result = INCOMPATIBLE_AGENT_VERSION_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeTfPolicyEvaluations_attributes_error_type(values []TfPolicyEvaluations_attributes_error_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TfPolicyEvaluations_attributes_error_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_permissions.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_permissions.go new file mode 100644 index 000000000..47205f212 --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_permissions.go @@ -0,0 +1,84 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TfPolicyEvaluations_attributes_permissions user permissions for this evaluation +type TfPolicyEvaluations_attributes_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether the current user has permission to override failed policies + canOverride *bool +} +// NewTfPolicyEvaluations_attributes_permissions instantiates a new TfPolicyEvaluations_attributes_permissions and sets the default values. +func NewTfPolicyEvaluations_attributes_permissions()(*TfPolicyEvaluations_attributes_permissions) { + m := &TfPolicyEvaluations_attributes_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicyEvaluations_attributes_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicyEvaluations_attributes_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicyEvaluations_attributes_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicyEvaluations_attributes_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCanOverride gets the can-override property value. Whether the current user has permission to override failed policies +// returns a *bool when successful +func (m *TfPolicyEvaluations_attributes_permissions) GetCanOverride()(*bool) { + return m.canOverride +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicyEvaluations_attributes_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["can-override"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanOverride(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *TfPolicyEvaluations_attributes_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("can-override", m.GetCanOverride()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicyEvaluations_attributes_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCanOverride sets the can-override property value. Whether the current user has permission to override failed policies +func (m *TfPolicyEvaluations_attributes_permissions) SetCanOverride(value *bool)() { + m.canOverride = value +} +type TfPolicyEvaluations_attributes_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanOverride()(*bool) + SetCanOverride(value *bool)() +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_result_count.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_result_count.go new file mode 100644 index 000000000..1ed58ea81 --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_result_count.go @@ -0,0 +1,229 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TfPolicyEvaluations_attributes_resultCount aggregated counts of policy results across all policy sets in this evaluation +type TfPolicyEvaluations_attributes_resultCount struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Policies with advisory enforcement level that failed + advisoryFailed *int32 + // Policies that errored during evaluation + errored *int32 + // Policies with mandatory enforcement level that failed + mandatoryFailed *int32 + // Policies with mandatory-overridable enforcement level that failed + mandatoryOverridableFailed *int32 + // Policies that passed + passed *int32 + // Policies with an unknown evaluation result + unknown *int32 +} +// NewTfPolicyEvaluations_attributes_resultCount instantiates a new TfPolicyEvaluations_attributes_resultCount and sets the default values. +func NewTfPolicyEvaluations_attributes_resultCount()(*TfPolicyEvaluations_attributes_resultCount) { + m := &TfPolicyEvaluations_attributes_resultCount{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicyEvaluations_attributes_resultCountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicyEvaluations_attributes_resultCountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicyEvaluations_attributes_resultCount(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicyEvaluations_attributes_resultCount) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvisoryFailed gets the advisory-failed property value. Policies with advisory enforcement level that failed +// returns a *int32 when successful +func (m *TfPolicyEvaluations_attributes_resultCount) GetAdvisoryFailed()(*int32) { + return m.advisoryFailed +} +// GetErrored gets the errored property value. Policies that errored during evaluation +// returns a *int32 when successful +func (m *TfPolicyEvaluations_attributes_resultCount) GetErrored()(*int32) { + return m.errored +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicyEvaluations_attributes_resultCount) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advisory-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdvisoryFailed(val) + } + return nil + } + res["errored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrored(val) + } + return nil + } + res["mandatory-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMandatoryFailed(val) + } + return nil + } + res["mandatory-overridable-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMandatoryOverridableFailed(val) + } + return nil + } + res["passed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPassed(val) + } + return nil + } + res["unknown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknown(val) + } + return nil + } + return res +} +// GetMandatoryFailed gets the mandatory-failed property value. Policies with mandatory enforcement level that failed +// returns a *int32 when successful +func (m *TfPolicyEvaluations_attributes_resultCount) GetMandatoryFailed()(*int32) { + return m.mandatoryFailed +} +// GetMandatoryOverridableFailed gets the mandatory-overridable-failed property value. Policies with mandatory-overridable enforcement level that failed +// returns a *int32 when successful +func (m *TfPolicyEvaluations_attributes_resultCount) GetMandatoryOverridableFailed()(*int32) { + return m.mandatoryOverridableFailed +} +// GetPassed gets the passed property value. Policies that passed +// returns a *int32 when successful +func (m *TfPolicyEvaluations_attributes_resultCount) GetPassed()(*int32) { + return m.passed +} +// GetUnknown gets the unknown property value. Policies with an unknown evaluation result +// returns a *int32 when successful +func (m *TfPolicyEvaluations_attributes_resultCount) GetUnknown()(*int32) { + return m.unknown +} +// Serialize serializes information the current object +func (m *TfPolicyEvaluations_attributes_resultCount) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("advisory-failed", m.GetAdvisoryFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("errored", m.GetErrored()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mandatory-failed", m.GetMandatoryFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mandatory-overridable-failed", m.GetMandatoryOverridableFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("passed", m.GetPassed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unknown", m.GetUnknown()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicyEvaluations_attributes_resultCount) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvisoryFailed sets the advisory-failed property value. Policies with advisory enforcement level that failed +func (m *TfPolicyEvaluations_attributes_resultCount) SetAdvisoryFailed(value *int32)() { + m.advisoryFailed = value +} +// SetErrored sets the errored property value. Policies that errored during evaluation +func (m *TfPolicyEvaluations_attributes_resultCount) SetErrored(value *int32)() { + m.errored = value +} +// SetMandatoryFailed sets the mandatory-failed property value. Policies with mandatory enforcement level that failed +func (m *TfPolicyEvaluations_attributes_resultCount) SetMandatoryFailed(value *int32)() { + m.mandatoryFailed = value +} +// SetMandatoryOverridableFailed sets the mandatory-overridable-failed property value. Policies with mandatory-overridable enforcement level that failed +func (m *TfPolicyEvaluations_attributes_resultCount) SetMandatoryOverridableFailed(value *int32)() { + m.mandatoryOverridableFailed = value +} +// SetPassed sets the passed property value. Policies that passed +func (m *TfPolicyEvaluations_attributes_resultCount) SetPassed(value *int32)() { + m.passed = value +} +// SetUnknown sets the unknown property value. Policies with an unknown evaluation result +func (m *TfPolicyEvaluations_attributes_resultCount) SetUnknown(value *int32)() { + m.unknown = value +} +type TfPolicyEvaluations_attributes_resultCountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvisoryFailed()(*int32) + GetErrored()(*int32) + GetMandatoryFailed()(*int32) + GetMandatoryOverridableFailed()(*int32) + GetPassed()(*int32) + GetUnknown()(*int32) + SetAdvisoryFailed(value *int32)() + SetErrored(value *int32)() + SetMandatoryFailed(value *int32)() + SetMandatoryOverridableFailed(value *int32)() + SetPassed(value *int32)() + SetUnknown(value *int32)() +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_status.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_status.go new file mode 100644 index 000000000..9ad772358 --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_status.go @@ -0,0 +1,61 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// Current status of the Terraform policy evaluation. Status values:- `pending`: Initial state, not yet queued for evaluation- `queued`: Queued and waiting to be evaluated- `running`: Actively being evaluated- `awaiting_override`: Failed with overridable policies, awaiting manual override- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `overridden`: Failed evaluation manually overridden (final state)- `errored`: System error during processing (final state)- `canceled`: Canceled before completion (final state)- `unreachable`: Pseudo-state derived from run state +type TfPolicyEvaluations_attributes_status int + +const ( + PENDING_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS TfPolicyEvaluations_attributes_status = iota + QUEUED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + RUNNING_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + AWAITING_OVERRIDE_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + PASSED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + FAILED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + OVERRIDDEN_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + ERRORED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + CANCELED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + UNREACHABLE_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS +) + +func (i TfPolicyEvaluations_attributes_status) String() string { + return []string{"pending", "queued", "running", "awaiting_override", "passed", "failed", "overridden", "errored", "canceled", "unreachable"}[i] +} +func ParseTfPolicyEvaluations_attributes_status(v string) (any, error) { + result := PENDING_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + switch v { + case "pending": + result = PENDING_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "queued": + result = QUEUED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "running": + result = RUNNING_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "awaiting_override": + result = AWAITING_OVERRIDE_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "passed": + result = PASSED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "failed": + result = FAILED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "overridden": + result = OVERRIDDEN_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "errored": + result = ERRORED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "canceled": + result = CANCELED_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "unreachable": + result = UNREACHABLE_TFPOLICYEVALUATIONS_ATTRIBUTES_STATUS + default: + return nil, nil + } + return &result, nil +} +func SerializeTfPolicyEvaluations_attributes_status(values []TfPolicyEvaluations_attributes_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TfPolicyEvaluations_attributes_status) isMultiValue() bool { + return false +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_status_timestamps.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_status_timestamps.go new file mode 100644 index 000000000..a1293bf57 --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_status_timestamps.go @@ -0,0 +1,317 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TfPolicyEvaluations_attributes_statusTimestamps timestamps for each status transition during the evaluation lifecycle +type TfPolicyEvaluations_attributes_statusTimestamps struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // When the evaluation entered awaiting override status (for failed mandatory policies) + awaitingOverrideAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the evaluation was canceled + canceledAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the evaluation encountered an error + erroredAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the evaluation failed + failedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When a failed evaluation was overridden + overriddenAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the evaluation passed successfully + passedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the evaluation entered pending status + pendingAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the evaluation was queued for processing + queuedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the evaluation started running + runningAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewTfPolicyEvaluations_attributes_statusTimestamps instantiates a new TfPolicyEvaluations_attributes_statusTimestamps and sets the default values. +func NewTfPolicyEvaluations_attributes_statusTimestamps()(*TfPolicyEvaluations_attributes_statusTimestamps) { + m := &TfPolicyEvaluations_attributes_statusTimestamps{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicyEvaluations_attributes_statusTimestampsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicyEvaluations_attributes_statusTimestampsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicyEvaluations_attributes_statusTimestamps(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAwaitingOverrideAt gets the awaiting-override-at property value. When the evaluation entered awaiting override status (for failed mandatory policies) +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetAwaitingOverrideAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.awaitingOverrideAt +} +// GetCanceledAt gets the canceled-at property value. When the evaluation was canceled +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetCanceledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.canceledAt +} +// GetErroredAt gets the errored-at property value. When the evaluation encountered an error +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetErroredAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.erroredAt +} +// GetFailedAt gets the failed-at property value. When the evaluation failed +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetFailedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.failedAt +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["awaiting-override-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAwaitingOverrideAt(val) + } + return nil + } + res["canceled-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCanceledAt(val) + } + return nil + } + res["errored-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetErroredAt(val) + } + return nil + } + res["failed-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFailedAt(val) + } + return nil + } + res["overridden-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOverriddenAt(val) + } + return nil + } + res["passed-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPassedAt(val) + } + return nil + } + res["pending-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPendingAt(val) + } + return nil + } + res["queued-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetQueuedAt(val) + } + return nil + } + res["running-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRunningAt(val) + } + return nil + } + return res +} +// GetOverriddenAt gets the overridden-at property value. When a failed evaluation was overridden +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetOverriddenAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.overriddenAt +} +// GetPassedAt gets the passed-at property value. When the evaluation passed successfully +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetPassedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.passedAt +} +// GetPendingAt gets the pending-at property value. When the evaluation entered pending status +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetPendingAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pendingAt +} +// GetQueuedAt gets the queued-at property value. When the evaluation was queued for processing +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetQueuedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.queuedAt +} +// GetRunningAt gets the running-at property value. When the evaluation started running +// returns a *Time when successful +func (m *TfPolicyEvaluations_attributes_statusTimestamps) GetRunningAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.runningAt +} +// Serialize serializes information the current object +func (m *TfPolicyEvaluations_attributes_statusTimestamps) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("awaiting-override-at", m.GetAwaitingOverrideAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("canceled-at", m.GetCanceledAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("errored-at", m.GetErroredAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("failed-at", m.GetFailedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("overridden-at", m.GetOverriddenAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("passed-at", m.GetPassedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pending-at", m.GetPendingAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("queued-at", m.GetQueuedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("running-at", m.GetRunningAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAwaitingOverrideAt sets the awaiting-override-at property value. When the evaluation entered awaiting override status (for failed mandatory policies) +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetAwaitingOverrideAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.awaitingOverrideAt = value +} +// SetCanceledAt sets the canceled-at property value. When the evaluation was canceled +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetCanceledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.canceledAt = value +} +// SetErroredAt sets the errored-at property value. When the evaluation encountered an error +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetErroredAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.erroredAt = value +} +// SetFailedAt sets the failed-at property value. When the evaluation failed +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetFailedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.failedAt = value +} +// SetOverriddenAt sets the overridden-at property value. When a failed evaluation was overridden +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetOverriddenAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.overriddenAt = value +} +// SetPassedAt sets the passed-at property value. When the evaluation passed successfully +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetPassedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.passedAt = value +} +// SetPendingAt sets the pending-at property value. When the evaluation entered pending status +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetPendingAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pendingAt = value +} +// SetQueuedAt sets the queued-at property value. When the evaluation was queued for processing +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetQueuedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.queuedAt = value +} +// SetRunningAt sets the running-at property value. When the evaluation started running +func (m *TfPolicyEvaluations_attributes_statusTimestamps) SetRunningAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.runningAt = value +} +type TfPolicyEvaluations_attributes_statusTimestampsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAwaitingOverrideAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCanceledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetErroredAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOverriddenAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPassedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPendingAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetQueuedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRunningAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAwaitingOverrideAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCanceledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetErroredAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOverriddenAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPassedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPendingAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetQueuedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRunningAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_links.go b/v2/api/models/tf_policy_evaluations_escaped_links.go new file mode 100644 index 000000000..9acb9d6f1 --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_links.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicyEvaluations_links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The self property + self *string +} +// NewTfPolicyEvaluations_links instantiates a new TfPolicyEvaluations_links and sets the default values. +func NewTfPolicyEvaluations_links()(*TfPolicyEvaluations_links) { + m := &TfPolicyEvaluations_links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicyEvaluations_linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicyEvaluations_linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicyEvaluations_links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicyEvaluations_links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicyEvaluations_links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + return res +} +// GetSelf gets the self property value. The self property +// returns a *string when successful +func (m *TfPolicyEvaluations_links) GetSelf()(*string) { + return m.self +} +// Serialize serializes information the current object +func (m *TfPolicyEvaluations_links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("self", m.GetSelf()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicyEvaluations_links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelf sets the self property value. The self property +func (m *TfPolicyEvaluations_links) SetSelf(value *string)() { + m.self = value +} +type TfPolicyEvaluations_linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelf()(*string) + SetSelf(value *string)() +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_relationships.go b/v2/api/models/tf_policy_evaluations_escaped_relationships.go new file mode 100644 index 000000000..31e36bbbd --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_relationships.go @@ -0,0 +1,112 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicyEvaluations_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The run property + run RunsHasOneable + // The tfPolicySetOutcomes property + tfPolicySetOutcomes TfPolicySetOutcomesHasManyable +} +// NewTfPolicyEvaluations_relationships instantiates a new TfPolicyEvaluations_relationships and sets the default values. +func NewTfPolicyEvaluations_relationships()(*TfPolicyEvaluations_relationships) { + m := &TfPolicyEvaluations_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicyEvaluations_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicyEvaluations_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicyEvaluations_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicyEvaluations_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicyEvaluations_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["run"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRunsHasOneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRun(val.(RunsHasOneable)) + } + return nil + } + res["tf-policy-set-outcomes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicySetOutcomesHasManyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTfPolicySetOutcomes(val.(TfPolicySetOutcomesHasManyable)) + } + return nil + } + return res +} +// GetRun gets the run property value. The run property +// returns a RunsHasOneable when successful +func (m *TfPolicyEvaluations_relationships) GetRun()(RunsHasOneable) { + return m.run +} +// GetTfPolicySetOutcomes gets the tf-policy-set-outcomes property value. The tfPolicySetOutcomes property +// returns a TfPolicySetOutcomesHasManyable when successful +func (m *TfPolicyEvaluations_relationships) GetTfPolicySetOutcomes()(TfPolicySetOutcomesHasManyable) { + return m.tfPolicySetOutcomes +} +// Serialize serializes information the current object +func (m *TfPolicyEvaluations_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("run", m.GetRun()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tf-policy-set-outcomes", m.GetTfPolicySetOutcomes()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicyEvaluations_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRun sets the run property value. The run property +func (m *TfPolicyEvaluations_relationships) SetRun(value RunsHasOneable)() { + m.run = value +} +// SetTfPolicySetOutcomes sets the tf-policy-set-outcomes property value. The tfPolicySetOutcomes property +func (m *TfPolicyEvaluations_relationships) SetTfPolicySetOutcomes(value TfPolicySetOutcomesHasManyable)() { + m.tfPolicySetOutcomes = value +} +type TfPolicyEvaluations_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRun()(RunsHasOneable) + GetTfPolicySetOutcomes()(TfPolicySetOutcomesHasManyable) + SetRun(value RunsHasOneable)() + SetTfPolicySetOutcomes(value TfPolicySetOutcomesHasManyable)() +} diff --git a/v2/api/models/tf_policy_evaluations_escaped_type.go b/v2/api/models/tf_policy_evaluations_escaped_type.go new file mode 100644 index 000000000..d6f20d34b --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type TfPolicyEvaluations_type int + +const ( + TFPOLICYEVALUATIONS_TFPOLICYEVALUATIONS_TYPE TfPolicyEvaluations_type = iota +) + +func (i TfPolicyEvaluations_type) String() string { + return []string{"tf-policy-evaluations"}[i] +} +func ParseTfPolicyEvaluations_type(v string) (any, error) { + result := TFPOLICYEVALUATIONS_TFPOLICYEVALUATIONS_TYPE + switch v { + case "tf-policy-evaluations": + result = TFPOLICYEVALUATIONS_TFPOLICYEVALUATIONS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeTfPolicyEvaluations_type(values []TfPolicyEvaluations_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TfPolicyEvaluations_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/tf_policy_set_outcomes.go b/v2/api/models/tf_policy_set_outcomes.go new file mode 100644 index 000000000..aef36b52b --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes.go @@ -0,0 +1,166 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TfPolicySetOutcomes represents the outcome of evaluating a Terraform Policy set against resources in a run. Contains detailed diagnostics organized by policy and enforce block, including information about resources that passed or failed policy evaluation. +type TfPolicySetOutcomes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes TfPolicySetOutcomes_attributesable + // The id property + id *string + // The relationships property + relationships TfPolicySetOutcomes_relationshipsable + // The type property + typeEscaped *TfPolicySetOutcomes_type +} +// NewTfPolicySetOutcomes instantiates a new TfPolicySetOutcomes and sets the default values. +func NewTfPolicySetOutcomes()(*TfPolicySetOutcomes) { + m := &TfPolicySetOutcomes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicySetOutcomesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicySetOutcomesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicySetOutcomes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicySetOutcomes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a TfPolicySetOutcomes_attributesable when successful +func (m *TfPolicySetOutcomes) GetAttributes()(TfPolicySetOutcomes_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicySetOutcomes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicySetOutcomes_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(TfPolicySetOutcomes_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicySetOutcomes_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(TfPolicySetOutcomes_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTfPolicySetOutcomes_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*TfPolicySetOutcomes_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *TfPolicySetOutcomes) GetId()(*string) { + return m.id +} +// GetRelationships gets the relationships property value. The relationships property +// returns a TfPolicySetOutcomes_relationshipsable when successful +func (m *TfPolicySetOutcomes) GetRelationships()(TfPolicySetOutcomes_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *TfPolicySetOutcomes_type when successful +func (m *TfPolicySetOutcomes) GetTypeEscaped()(*TfPolicySetOutcomes_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *TfPolicySetOutcomes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicySetOutcomes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *TfPolicySetOutcomes) SetAttributes(value TfPolicySetOutcomes_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *TfPolicySetOutcomes) SetId(value *string)() { + m.id = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *TfPolicySetOutcomes) SetRelationships(value TfPolicySetOutcomes_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *TfPolicySetOutcomes) SetTypeEscaped(value *TfPolicySetOutcomes_type)() { + m.typeEscaped = value +} +type TfPolicySetOutcomesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(TfPolicySetOutcomes_attributesable) + GetId()(*string) + GetRelationships()(TfPolicySetOutcomes_relationshipsable) + GetTypeEscaped()(*TfPolicySetOutcomes_type) + SetAttributes(value TfPolicySetOutcomes_attributesable)() + SetId(value *string)() + SetRelationships(value TfPolicySetOutcomes_relationshipsable)() + SetTypeEscaped(value *TfPolicySetOutcomes_type)() +} diff --git a/v2/api/models/tf_policy_set_outcomes_envelope.go b/v2/api/models/tf_policy_set_outcomes_envelope.go index 4a6f63051..e665f0f31 100644 --- a/v2/api/models/tf_policy_set_outcomes_envelope.go +++ b/v2/api/models/tf_policy_set_outcomes_envelope.go @@ -11,7 +11,7 @@ type TfPolicySetOutcomesEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // Represents the outcome of evaluating a Terraform Policy set against resources in a run. Contains detailed diagnostics organized by policy and enforce block, including information about resources that passed or failed policy evaluation. - data TfPolicySetOutcomeable + data TfPolicySetOutcomesable } // NewTfPolicySetOutcomesEnvelope instantiates a new TfPolicySetOutcomesEnvelope and sets the default values. func NewTfPolicySetOutcomesEnvelope()(*TfPolicySetOutcomesEnvelope) { @@ -31,8 +31,8 @@ func (m *TfPolicySetOutcomesEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. Represents the outcome of evaluating a Terraform Policy set against resources in a run. Contains detailed diagnostics organized by policy and enforce block, including information about resources that passed or failed policy evaluation. -// returns a TfPolicySetOutcomeable when successful -func (m *TfPolicySetOutcomesEnvelope) GetData()(TfPolicySetOutcomeable) { +// returns a TfPolicySetOutcomesable when successful +func (m *TfPolicySetOutcomesEnvelope) GetData()(TfPolicySetOutcomesable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *TfPolicySetOutcomesEnvelope) GetData()(TfPolicySetOutcomeable) { func (m *TfPolicySetOutcomesEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateTfPolicySetOutcomeFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateTfPolicySetOutcomesFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(TfPolicySetOutcomeable)) + m.SetData(val.(TfPolicySetOutcomesable)) } return nil } @@ -72,12 +72,12 @@ func (m *TfPolicySetOutcomesEnvelope) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. Represents the outcome of evaluating a Terraform Policy set against resources in a run. Contains detailed diagnostics organized by policy and enforce block, including information about resources that passed or failed policy evaluation. -func (m *TfPolicySetOutcomesEnvelope) SetData(value TfPolicySetOutcomeable)() { +func (m *TfPolicySetOutcomesEnvelope) SetData(value TfPolicySetOutcomesable)() { m.data = value } type TfPolicySetOutcomesEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(TfPolicySetOutcomeable) - SetData(value TfPolicySetOutcomeable)() + GetData()(TfPolicySetOutcomesable) + SetData(value TfPolicySetOutcomesable)() } diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes.go new file mode 100644 index 000000000..c5d0ace9e --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes.go @@ -0,0 +1,237 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicySetOutcomes_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Deprecated. Populated for runs that did not support archivist-backed storage.Use `policy-set-result-url` to retrieve full policy results for new runs. + // Deprecated: + outcomes []TfPolicySetOutcomes_attributes_outcomesable + // Indicates if the policy set outcome can be overridden when policies fail + overridable *bool + // Optional description of the policy set + policySetDescription *string + // Name of the policy set that was evaluated + policySetName *string + // URL to download the full policy result blob from Archivist.Present only when `archivist-supported` is `true` on the parent `tf-policy-evaluation`.When `null`, fall back to the `outcomes` array. + policySetResultUrl *string + // The resultCount property + resultCount TfPolicySetOutcomes_attributes_resultCountable +} +// NewTfPolicySetOutcomes_attributes instantiates a new TfPolicySetOutcomes_attributes and sets the default values. +func NewTfPolicySetOutcomes_attributes()(*TfPolicySetOutcomes_attributes) { + m := &TfPolicySetOutcomes_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicySetOutcomes_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicySetOutcomes_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicySetOutcomes_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicySetOutcomes_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicySetOutcomes_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["outcomes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTfPolicySetOutcomes_attributes_outcomesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TfPolicySetOutcomes_attributes_outcomesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TfPolicySetOutcomes_attributes_outcomesable) + } + } + m.SetOutcomes(res) + } + return nil + } + res["overridable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOverridable(val) + } + return nil + } + res["policy-set-description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicySetDescription(val) + } + return nil + } + res["policy-set-name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicySetName(val) + } + return nil + } + res["policy-set-result-url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicySetResultUrl(val) + } + return nil + } + res["result-count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicySetOutcomes_attributes_resultCountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResultCount(val.(TfPolicySetOutcomes_attributes_resultCountable)) + } + return nil + } + return res +} +// GetOutcomes gets the outcomes property value. Deprecated. Populated for runs that did not support archivist-backed storage.Use `policy-set-result-url` to retrieve full policy results for new runs. +// Deprecated: +// returns a []TfPolicySetOutcomes_attributes_outcomesable when successful +func (m *TfPolicySetOutcomes_attributes) GetOutcomes()([]TfPolicySetOutcomes_attributes_outcomesable) { + return m.outcomes +} +// GetOverridable gets the overridable property value. Indicates if the policy set outcome can be overridden when policies fail +// returns a *bool when successful +func (m *TfPolicySetOutcomes_attributes) GetOverridable()(*bool) { + return m.overridable +} +// GetPolicySetDescription gets the policy-set-description property value. Optional description of the policy set +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes) GetPolicySetDescription()(*string) { + return m.policySetDescription +} +// GetPolicySetName gets the policy-set-name property value. Name of the policy set that was evaluated +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes) GetPolicySetName()(*string) { + return m.policySetName +} +// GetPolicySetResultUrl gets the policy-set-result-url property value. URL to download the full policy result blob from Archivist.Present only when `archivist-supported` is `true` on the parent `tf-policy-evaluation`.When `null`, fall back to the `outcomes` array. +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes) GetPolicySetResultUrl()(*string) { + return m.policySetResultUrl +} +// GetResultCount gets the result-count property value. The resultCount property +// returns a TfPolicySetOutcomes_attributes_resultCountable when successful +func (m *TfPolicySetOutcomes_attributes) GetResultCount()(TfPolicySetOutcomes_attributes_resultCountable) { + return m.resultCount +} +// Serialize serializes information the current object +func (m *TfPolicySetOutcomes_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOutcomes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOutcomes())) + for i, v := range m.GetOutcomes() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("outcomes", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("overridable", m.GetOverridable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policy-set-description", m.GetPolicySetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policy-set-name", m.GetPolicySetName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("result-count", m.GetResultCount()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicySetOutcomes_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOutcomes sets the outcomes property value. Deprecated. Populated for runs that did not support archivist-backed storage.Use `policy-set-result-url` to retrieve full policy results for new runs. +// Deprecated: +func (m *TfPolicySetOutcomes_attributes) SetOutcomes(value []TfPolicySetOutcomes_attributes_outcomesable)() { + m.outcomes = value +} +// SetOverridable sets the overridable property value. Indicates if the policy set outcome can be overridden when policies fail +func (m *TfPolicySetOutcomes_attributes) SetOverridable(value *bool)() { + m.overridable = value +} +// SetPolicySetDescription sets the policy-set-description property value. Optional description of the policy set +func (m *TfPolicySetOutcomes_attributes) SetPolicySetDescription(value *string)() { + m.policySetDescription = value +} +// SetPolicySetName sets the policy-set-name property value. Name of the policy set that was evaluated +func (m *TfPolicySetOutcomes_attributes) SetPolicySetName(value *string)() { + m.policySetName = value +} +// SetPolicySetResultUrl sets the policy-set-result-url property value. URL to download the full policy result blob from Archivist.Present only when `archivist-supported` is `true` on the parent `tf-policy-evaluation`.When `null`, fall back to the `outcomes` array. +func (m *TfPolicySetOutcomes_attributes) SetPolicySetResultUrl(value *string)() { + m.policySetResultUrl = value +} +// SetResultCount sets the result-count property value. The resultCount property +func (m *TfPolicySetOutcomes_attributes) SetResultCount(value TfPolicySetOutcomes_attributes_resultCountable)() { + m.resultCount = value +} +type TfPolicySetOutcomes_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOutcomes()([]TfPolicySetOutcomes_attributes_outcomesable) + GetOverridable()(*bool) + GetPolicySetDescription()(*string) + GetPolicySetName()(*string) + GetPolicySetResultUrl()(*string) + GetResultCount()(TfPolicySetOutcomes_attributes_resultCountable) + SetOutcomes(value []TfPolicySetOutcomes_attributes_outcomesable)() + SetOverridable(value *bool)() + SetPolicySetDescription(value *string)() + SetPolicySetName(value *string)() + SetPolicySetResultUrl(value *string)() + SetResultCount(value TfPolicySetOutcomes_attributes_resultCountable)() +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes.go new file mode 100644 index 000000000..6d16f1c0c --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes.go @@ -0,0 +1,283 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicySetOutcomes_attributes_outcomes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description of the policy + description *string + // List of diagnostic entries grouped by enforce block + diagnostics []TfPolicySetOutcomes_attributes_outcomes_diagnosticsable + // The enforcement level of the policy + enforcement_level *TfPolicySetOutcomes_attributes_outcomes_enforcement_level + // The filename of the policy + file_name *string + // List of Terraform resources that passed all enforce blocks in this policy + passed_resources []TfPolicySetOutcomes_attributes_outcomes_passed_resourcesable + // The name of the policy + policy_name *string + // The evaluation status of the policy + status *TfPolicySetOutcomes_attributes_outcomes_status +} +// NewTfPolicySetOutcomes_attributes_outcomes instantiates a new TfPolicySetOutcomes_attributes_outcomes and sets the default values. +func NewTfPolicySetOutcomes_attributes_outcomes()(*TfPolicySetOutcomes_attributes_outcomes) { + m := &TfPolicySetOutcomes_attributes_outcomes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicySetOutcomes_attributes_outcomesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicySetOutcomes_attributes_outcomesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicySetOutcomes_attributes_outcomes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicySetOutcomes_attributes_outcomes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description of the policy +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes) GetDescription()(*string) { + return m.description +} +// GetDiagnostics gets the diagnostics property value. List of diagnostic entries grouped by enforce block +// returns a []TfPolicySetOutcomes_attributes_outcomes_diagnosticsable when successful +func (m *TfPolicySetOutcomes_attributes_outcomes) GetDiagnostics()([]TfPolicySetOutcomes_attributes_outcomes_diagnosticsable) { + return m.diagnostics +} +// GetEnforcementLevel gets the enforcement_level property value. The enforcement level of the policy +// returns a *TfPolicySetOutcomes_attributes_outcomes_enforcement_level when successful +func (m *TfPolicySetOutcomes_attributes_outcomes) GetEnforcementLevel()(*TfPolicySetOutcomes_attributes_outcomes_enforcement_level) { + return m.enforcement_level +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicySetOutcomes_attributes_outcomes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["diagnostics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTfPolicySetOutcomes_attributes_outcomes_diagnosticsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TfPolicySetOutcomes_attributes_outcomes_diagnosticsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TfPolicySetOutcomes_attributes_outcomes_diagnosticsable) + } + } + m.SetDiagnostics(res) + } + return nil + } + res["enforcement_level"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTfPolicySetOutcomes_attributes_outcomes_enforcement_level) + if err != nil { + return err + } + if val != nil { + m.SetEnforcementLevel(val.(*TfPolicySetOutcomes_attributes_outcomes_enforcement_level)) + } + return nil + } + res["file_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["passed_resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTfPolicySetOutcomes_attributes_outcomes_passed_resourcesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TfPolicySetOutcomes_attributes_outcomes_passed_resourcesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TfPolicySetOutcomes_attributes_outcomes_passed_resourcesable) + } + } + m.SetPassedResources(res) + } + return nil + } + res["policy_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTfPolicySetOutcomes_attributes_outcomes_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*TfPolicySetOutcomes_attributes_outcomes_status)) + } + return nil + } + return res +} +// GetFileName gets the file_name property value. The filename of the policy +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes) GetFileName()(*string) { + return m.file_name +} +// GetPassedResources gets the passed_resources property value. List of Terraform resources that passed all enforce blocks in this policy +// returns a []TfPolicySetOutcomes_attributes_outcomes_passed_resourcesable when successful +func (m *TfPolicySetOutcomes_attributes_outcomes) GetPassedResources()([]TfPolicySetOutcomes_attributes_outcomes_passed_resourcesable) { + return m.passed_resources +} +// GetPolicyName gets the policy_name property value. The name of the policy +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes) GetPolicyName()(*string) { + return m.policy_name +} +// GetStatus gets the status property value. The evaluation status of the policy +// returns a *TfPolicySetOutcomes_attributes_outcomes_status when successful +func (m *TfPolicySetOutcomes_attributes_outcomes) GetStatus()(*TfPolicySetOutcomes_attributes_outcomes_status) { + return m.status +} +// Serialize serializes information the current object +func (m *TfPolicySetOutcomes_attributes_outcomes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDiagnostics() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDiagnostics())) + for i, v := range m.GetDiagnostics() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("diagnostics", cast) + if err != nil { + return err + } + } + if m.GetEnforcementLevel() != nil { + cast := (*m.GetEnforcementLevel()).String() + err := writer.WriteStringValue("enforcement_level", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("file_name", m.GetFileName()) + if err != nil { + return err + } + } + if m.GetPassedResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPassedResources())) + for i, v := range m.GetPassedResources() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("passed_resources", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policy_name", m.GetPolicyName()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicySetOutcomes_attributes_outcomes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description of the policy +func (m *TfPolicySetOutcomes_attributes_outcomes) SetDescription(value *string)() { + m.description = value +} +// SetDiagnostics sets the diagnostics property value. List of diagnostic entries grouped by enforce block +func (m *TfPolicySetOutcomes_attributes_outcomes) SetDiagnostics(value []TfPolicySetOutcomes_attributes_outcomes_diagnosticsable)() { + m.diagnostics = value +} +// SetEnforcementLevel sets the enforcement_level property value. The enforcement level of the policy +func (m *TfPolicySetOutcomes_attributes_outcomes) SetEnforcementLevel(value *TfPolicySetOutcomes_attributes_outcomes_enforcement_level)() { + m.enforcement_level = value +} +// SetFileName sets the file_name property value. The filename of the policy +func (m *TfPolicySetOutcomes_attributes_outcomes) SetFileName(value *string)() { + m.file_name = value +} +// SetPassedResources sets the passed_resources property value. List of Terraform resources that passed all enforce blocks in this policy +func (m *TfPolicySetOutcomes_attributes_outcomes) SetPassedResources(value []TfPolicySetOutcomes_attributes_outcomes_passed_resourcesable)() { + m.passed_resources = value +} +// SetPolicyName sets the policy_name property value. The name of the policy +func (m *TfPolicySetOutcomes_attributes_outcomes) SetPolicyName(value *string)() { + m.policy_name = value +} +// SetStatus sets the status property value. The evaluation status of the policy +func (m *TfPolicySetOutcomes_attributes_outcomes) SetStatus(value *TfPolicySetOutcomes_attributes_outcomes_status)() { + m.status = value +} +type TfPolicySetOutcomes_attributes_outcomesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDiagnostics()([]TfPolicySetOutcomes_attributes_outcomes_diagnosticsable) + GetEnforcementLevel()(*TfPolicySetOutcomes_attributes_outcomes_enforcement_level) + GetFileName()(*string) + GetPassedResources()([]TfPolicySetOutcomes_attributes_outcomes_passed_resourcesable) + GetPolicyName()(*string) + GetStatus()(*TfPolicySetOutcomes_attributes_outcomes_status) + SetDescription(value *string)() + SetDiagnostics(value []TfPolicySetOutcomes_attributes_outcomes_diagnosticsable)() + SetEnforcementLevel(value *TfPolicySetOutcomes_attributes_outcomes_enforcement_level)() + SetFileName(value *string)() + SetPassedResources(value []TfPolicySetOutcomes_attributes_outcomes_passed_resourcesable)() + SetPolicyName(value *string)() + SetStatus(value *TfPolicySetOutcomes_attributes_outcomes_status)() +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_diagnostics.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_diagnostics.go new file mode 100644 index 000000000..3df89ba2b --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_diagnostics.go @@ -0,0 +1,240 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicySetOutcomes_attributes_outcomes_diagnostics struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Code snippet from the policy file showing the enforce block that was evaluated + code *string + // The policy declaration context (e.g., 'resource_policy "aws_s3_bucket" "test"') + context *string + // Error message for the enforce block when not specific to a resource + error_message *string + // List of Terraform resources that failed this enforce block's condition + resources []TfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesable + // Line number where the enforce block starts in the policy file + start_line *int32 + // Human-readable summary of the diagnostic, typically the policy declaration + summary *string +} +// NewTfPolicySetOutcomes_attributes_outcomes_diagnostics instantiates a new TfPolicySetOutcomes_attributes_outcomes_diagnostics and sets the default values. +func NewTfPolicySetOutcomes_attributes_outcomes_diagnostics()(*TfPolicySetOutcomes_attributes_outcomes_diagnostics) { + m := &TfPolicySetOutcomes_attributes_outcomes_diagnostics{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicySetOutcomes_attributes_outcomes_diagnosticsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicySetOutcomes_attributes_outcomes_diagnosticsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicySetOutcomes_attributes_outcomes_diagnostics(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. Code snippet from the policy file showing the enforce block that was evaluated +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) GetCode()(*string) { + return m.code +} +// GetContext gets the context property value. The policy declaration context (e.g., 'resource_policy "aws_s3_bucket" "test"') +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) GetContext()(*string) { + return m.context +} +// GetErrorMessage gets the error_message property value. Error message for the enforce block when not specific to a resource +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) GetErrorMessage()(*string) { + return m.error_message +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + res["error_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorMessage(val) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesable) + } + } + m.SetResources(res) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + return res +} +// GetResources gets the resources property value. List of Terraform resources that failed this enforce block's condition +// returns a []TfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesable when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) GetResources()([]TfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesable) { + return m.resources +} +// GetStartLine gets the start_line property value. Line number where the enforce block starts in the policy file +// returns a *int32 when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) GetStartLine()(*int32) { + return m.start_line +} +// GetSummary gets the summary property value. Human-readable summary of the diagnostic, typically the policy declaration +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) GetSummary()(*string) { + return m.summary +} +// Serialize serializes information the current object +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("context", m.GetContext()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("error_message", m.GetErrorMessage()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("resources", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_line", m.GetStartLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. Code snippet from the policy file showing the enforce block that was evaluated +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) SetCode(value *string)() { + m.code = value +} +// SetContext sets the context property value. The policy declaration context (e.g., 'resource_policy "aws_s3_bucket" "test"') +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) SetContext(value *string)() { + m.context = value +} +// SetErrorMessage sets the error_message property value. Error message for the enforce block when not specific to a resource +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) SetErrorMessage(value *string)() { + m.error_message = value +} +// SetResources sets the resources property value. List of Terraform resources that failed this enforce block's condition +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) SetResources(value []TfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesable)() { + m.resources = value +} +// SetStartLine sets the start_line property value. Line number where the enforce block starts in the policy file +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) SetStartLine(value *int32)() { + m.start_line = value +} +// SetSummary sets the summary property value. Human-readable summary of the diagnostic, typically the policy declaration +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics) SetSummary(value *string)() { + m.summary = value +} +type TfPolicySetOutcomes_attributes_outcomes_diagnosticsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetContext()(*string) + GetErrorMessage()(*string) + GetResources()([]TfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesable) + GetStartLine()(*int32) + GetSummary()(*string) + SetCode(value *string)() + SetContext(value *string)() + SetErrorMessage(value *string)() + SetResources(value []TfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesable)() + SetStartLine(value *int32)() + SetSummary(value *string)() +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_diagnostics_escaped_resources.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_diagnostics_escaped_resources.go new file mode 100644 index 000000000..a62b8700a --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_diagnostics_escaped_resources.go @@ -0,0 +1,269 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Code snippet from the Terraform configuration showing the resource declaration + code *string + // Specific error message explaining why this resource failed the policy check + error_message *string + // Terraform configuration file containing this resource (e.g., 'main.tf') + file_name *string + // Policy-provided informational log message for debugging about this resource's evaluation + info_message *string + // The Terraform resource address (e.g., 'aws_s3_bucket.example') + resource_name *string + // Line number where the resource is defined in the Terraform configuration file + start_line *int32 + // List of attribute evaluations showing the actual values that caused the policy failure + values []TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesable +} +// NewTfPolicySetOutcomes_attributes_outcomes_diagnostics_resources instantiates a new TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources and sets the default values. +func NewTfPolicySetOutcomes_attributes_outcomes_diagnostics_resources()(*TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) { + m := &TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicySetOutcomes_attributes_outcomes_diagnostics_resources(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. Code snippet from the Terraform configuration showing the resource declaration +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) GetCode()(*string) { + return m.code +} +// GetErrorMessage gets the error_message property value. Specific error message explaining why this resource failed the policy check +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) GetErrorMessage()(*string) { + return m.error_message +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["error_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorMessage(val) + } + return nil + } + res["file_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["info_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInfoMessage(val) + } + return nil + } + res["resource_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceName(val) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + res["values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesable) + } + } + m.SetValues(res) + } + return nil + } + return res +} +// GetFileName gets the file_name property value. Terraform configuration file containing this resource (e.g., 'main.tf') +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) GetFileName()(*string) { + return m.file_name +} +// GetInfoMessage gets the info_message property value. Policy-provided informational log message for debugging about this resource's evaluation +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) GetInfoMessage()(*string) { + return m.info_message +} +// GetResourceName gets the resource_name property value. The Terraform resource address (e.g., 'aws_s3_bucket.example') +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) GetResourceName()(*string) { + return m.resource_name +} +// GetStartLine gets the start_line property value. Line number where the resource is defined in the Terraform configuration file +// returns a *int32 when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) GetStartLine()(*int32) { + return m.start_line +} +// GetValues gets the values property value. List of attribute evaluations showing the actual values that caused the policy failure +// returns a []TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesable when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) GetValues()([]TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesable) { + return m.values +} +// Serialize serializes information the current object +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("error_message", m.GetErrorMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("file_name", m.GetFileName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("info_message", m.GetInfoMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resource_name", m.GetResourceName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_line", m.GetStartLine()) + if err != nil { + return err + } + } + if m.GetValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValues())) + for i, v := range m.GetValues() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("values", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. Code snippet from the Terraform configuration showing the resource declaration +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) SetCode(value *string)() { + m.code = value +} +// SetErrorMessage sets the error_message property value. Specific error message explaining why this resource failed the policy check +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) SetErrorMessage(value *string)() { + m.error_message = value +} +// SetFileName sets the file_name property value. Terraform configuration file containing this resource (e.g., 'main.tf') +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) SetFileName(value *string)() { + m.file_name = value +} +// SetInfoMessage sets the info_message property value. Policy-provided informational log message for debugging about this resource's evaluation +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) SetInfoMessage(value *string)() { + m.info_message = value +} +// SetResourceName sets the resource_name property value. The Terraform resource address (e.g., 'aws_s3_bucket.example') +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) SetResourceName(value *string)() { + m.resource_name = value +} +// SetStartLine sets the start_line property value. Line number where the resource is defined in the Terraform configuration file +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) SetStartLine(value *int32)() { + m.start_line = value +} +// SetValues sets the values property value. List of attribute evaluations showing the actual values that caused the policy failure +func (m *TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources) SetValues(value []TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesable)() { + m.values = value +} +type TfPolicySetOutcomes_attributes_outcomes_diagnostics_resourcesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetErrorMessage()(*string) + GetFileName()(*string) + GetInfoMessage()(*string) + GetResourceName()(*string) + GetStartLine()(*int32) + GetValues()([]TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesable) + SetCode(value *string)() + SetErrorMessage(value *string)() + SetFileName(value *string)() + SetInfoMessage(value *string)() + SetResourceName(value *string)() + SetStartLine(value *int32)() + SetValues(value []TfPolicySetOutcomes_attributes_outcomes_diagnostics_resources_valuesable)() +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_enforcement_escaped_level.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_enforcement_escaped_level.go new file mode 100644 index 000000000..eca224061 --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_enforcement_escaped_level.go @@ -0,0 +1,40 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// The enforcement level of the policy +type TfPolicySetOutcomes_attributes_outcomes_enforcement_level int + +const ( + ADVISORY_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_ENFORCEMENT_LEVEL TfPolicySetOutcomes_attributes_outcomes_enforcement_level = iota + MANDATORY_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_ENFORCEMENT_LEVEL + MANDATORY_OVERRIDABLE_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_ENFORCEMENT_LEVEL +) + +func (i TfPolicySetOutcomes_attributes_outcomes_enforcement_level) String() string { + return []string{"advisory", "mandatory", "mandatory_overridable"}[i] +} +func ParseTfPolicySetOutcomes_attributes_outcomes_enforcement_level(v string) (any, error) { + result := ADVISORY_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_ENFORCEMENT_LEVEL + switch v { + case "advisory": + result = ADVISORY_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_ENFORCEMENT_LEVEL + case "mandatory": + result = MANDATORY_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_ENFORCEMENT_LEVEL + case "mandatory_overridable": + result = MANDATORY_OVERRIDABLE_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_ENFORCEMENT_LEVEL + default: + return nil, nil + } + return &result, nil +} +func SerializeTfPolicySetOutcomes_attributes_outcomes_enforcement_level(values []TfPolicySetOutcomes_attributes_outcomes_enforcement_level) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TfPolicySetOutcomes_attributes_outcomes_enforcement_level) isMultiValue() bool { + return false +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_passed_escaped_resources.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_passed_escaped_resources.go new file mode 100644 index 000000000..f9136fa9b --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_passed_escaped_resources.go @@ -0,0 +1,118 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicySetOutcomes_attributes_outcomes_passed_resources struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of informational messages from enforce blocks that this resource passed + info_messages []string + // The Terraform resource address (e.g., 'aws_s3_bucket.compliant') + resource_name *string +} +// NewTfPolicySetOutcomes_attributes_outcomes_passed_resources instantiates a new TfPolicySetOutcomes_attributes_outcomes_passed_resources and sets the default values. +func NewTfPolicySetOutcomes_attributes_outcomes_passed_resources()(*TfPolicySetOutcomes_attributes_outcomes_passed_resources) { + m := &TfPolicySetOutcomes_attributes_outcomes_passed_resources{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicySetOutcomes_attributes_outcomes_passed_resourcesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicySetOutcomes_attributes_outcomes_passed_resourcesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicySetOutcomes_attributes_outcomes_passed_resources(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_passed_resources) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_passed_resources) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["info_messages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetInfoMessages(res) + } + return nil + } + res["resource_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceName(val) + } + return nil + } + return res +} +// GetInfoMessages gets the info_messages property value. List of informational messages from enforce blocks that this resource passed +// returns a []string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_passed_resources) GetInfoMessages()([]string) { + return m.info_messages +} +// GetResourceName gets the resource_name property value. The Terraform resource address (e.g., 'aws_s3_bucket.compliant') +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes_outcomes_passed_resources) GetResourceName()(*string) { + return m.resource_name +} +// Serialize serializes information the current object +func (m *TfPolicySetOutcomes_attributes_outcomes_passed_resources) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInfoMessages() != nil { + err := writer.WriteCollectionOfStringValues("info_messages", m.GetInfoMessages()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resource_name", m.GetResourceName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicySetOutcomes_attributes_outcomes_passed_resources) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetInfoMessages sets the info_messages property value. List of informational messages from enforce blocks that this resource passed +func (m *TfPolicySetOutcomes_attributes_outcomes_passed_resources) SetInfoMessages(value []string)() { + m.info_messages = value +} +// SetResourceName sets the resource_name property value. The Terraform resource address (e.g., 'aws_s3_bucket.compliant') +func (m *TfPolicySetOutcomes_attributes_outcomes_passed_resources) SetResourceName(value *string)() { + m.resource_name = value +} +type TfPolicySetOutcomes_attributes_outcomes_passed_resourcesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInfoMessages()([]string) + GetResourceName()(*string) + SetInfoMessages(value []string)() + SetResourceName(value *string)() +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_status.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_status.go new file mode 100644 index 000000000..77f39978c --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_outcomes_escaped_status.go @@ -0,0 +1,43 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// The evaluation status of the policy +type TfPolicySetOutcomes_attributes_outcomes_status int + +const ( + PASSED_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_STATUS TfPolicySetOutcomes_attributes_outcomes_status = iota + FAILED_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_STATUS + ERRORED_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_STATUS + UNKNOWN_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_STATUS +) + +func (i TfPolicySetOutcomes_attributes_outcomes_status) String() string { + return []string{"passed", "failed", "errored", "unknown"}[i] +} +func ParseTfPolicySetOutcomes_attributes_outcomes_status(v string) (any, error) { + result := PASSED_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_STATUS + switch v { + case "passed": + result = PASSED_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_STATUS + case "failed": + result = FAILED_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_STATUS + case "errored": + result = ERRORED_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_STATUS + case "unknown": + result = UNKNOWN_TFPOLICYSETOUTCOMES_ATTRIBUTES_OUTCOMES_STATUS + default: + return nil, nil + } + return &result, nil +} +func SerializeTfPolicySetOutcomes_attributes_outcomes_status(values []TfPolicySetOutcomes_attributes_outcomes_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TfPolicySetOutcomes_attributes_outcomes_status) isMultiValue() bool { + return false +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_result_count.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_result_count.go new file mode 100644 index 000000000..bd23bad1a --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_result_count.go @@ -0,0 +1,228 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicySetOutcomes_attributes_resultCount struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Policies with advisory enforcement level that failed + advisoryFailed *int32 + // Policies that errored during evaluation + errored *int32 + // Policies with mandatory enforcement level that failed + mandatoryFailed *int32 + // Policies with mandatory-overridable enforcement level that failed + mandatoryOverridableFailed *int32 + // Policies that passed + passed *int32 + // Policies with an unknown evaluation result + unknown *int32 +} +// NewTfPolicySetOutcomes_attributes_resultCount instantiates a new TfPolicySetOutcomes_attributes_resultCount and sets the default values. +func NewTfPolicySetOutcomes_attributes_resultCount()(*TfPolicySetOutcomes_attributes_resultCount) { + m := &TfPolicySetOutcomes_attributes_resultCount{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicySetOutcomes_attributes_resultCountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicySetOutcomes_attributes_resultCountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicySetOutcomes_attributes_resultCount(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicySetOutcomes_attributes_resultCount) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvisoryFailed gets the advisory-failed property value. Policies with advisory enforcement level that failed +// returns a *int32 when successful +func (m *TfPolicySetOutcomes_attributes_resultCount) GetAdvisoryFailed()(*int32) { + return m.advisoryFailed +} +// GetErrored gets the errored property value. Policies that errored during evaluation +// returns a *int32 when successful +func (m *TfPolicySetOutcomes_attributes_resultCount) GetErrored()(*int32) { + return m.errored +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicySetOutcomes_attributes_resultCount) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advisory-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdvisoryFailed(val) + } + return nil + } + res["errored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrored(val) + } + return nil + } + res["mandatory-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMandatoryFailed(val) + } + return nil + } + res["mandatory-overridable-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMandatoryOverridableFailed(val) + } + return nil + } + res["passed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPassed(val) + } + return nil + } + res["unknown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknown(val) + } + return nil + } + return res +} +// GetMandatoryFailed gets the mandatory-failed property value. Policies with mandatory enforcement level that failed +// returns a *int32 when successful +func (m *TfPolicySetOutcomes_attributes_resultCount) GetMandatoryFailed()(*int32) { + return m.mandatoryFailed +} +// GetMandatoryOverridableFailed gets the mandatory-overridable-failed property value. Policies with mandatory-overridable enforcement level that failed +// returns a *int32 when successful +func (m *TfPolicySetOutcomes_attributes_resultCount) GetMandatoryOverridableFailed()(*int32) { + return m.mandatoryOverridableFailed +} +// GetPassed gets the passed property value. Policies that passed +// returns a *int32 when successful +func (m *TfPolicySetOutcomes_attributes_resultCount) GetPassed()(*int32) { + return m.passed +} +// GetUnknown gets the unknown property value. Policies with an unknown evaluation result +// returns a *int32 when successful +func (m *TfPolicySetOutcomes_attributes_resultCount) GetUnknown()(*int32) { + return m.unknown +} +// Serialize serializes information the current object +func (m *TfPolicySetOutcomes_attributes_resultCount) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("advisory-failed", m.GetAdvisoryFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("errored", m.GetErrored()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mandatory-failed", m.GetMandatoryFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mandatory-overridable-failed", m.GetMandatoryOverridableFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("passed", m.GetPassed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unknown", m.GetUnknown()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicySetOutcomes_attributes_resultCount) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvisoryFailed sets the advisory-failed property value. Policies with advisory enforcement level that failed +func (m *TfPolicySetOutcomes_attributes_resultCount) SetAdvisoryFailed(value *int32)() { + m.advisoryFailed = value +} +// SetErrored sets the errored property value. Policies that errored during evaluation +func (m *TfPolicySetOutcomes_attributes_resultCount) SetErrored(value *int32)() { + m.errored = value +} +// SetMandatoryFailed sets the mandatory-failed property value. Policies with mandatory enforcement level that failed +func (m *TfPolicySetOutcomes_attributes_resultCount) SetMandatoryFailed(value *int32)() { + m.mandatoryFailed = value +} +// SetMandatoryOverridableFailed sets the mandatory-overridable-failed property value. Policies with mandatory-overridable enforcement level that failed +func (m *TfPolicySetOutcomes_attributes_resultCount) SetMandatoryOverridableFailed(value *int32)() { + m.mandatoryOverridableFailed = value +} +// SetPassed sets the passed property value. Policies that passed +func (m *TfPolicySetOutcomes_attributes_resultCount) SetPassed(value *int32)() { + m.passed = value +} +// SetUnknown sets the unknown property value. Policies with an unknown evaluation result +func (m *TfPolicySetOutcomes_attributes_resultCount) SetUnknown(value *int32)() { + m.unknown = value +} +type TfPolicySetOutcomes_attributes_resultCountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvisoryFailed()(*int32) + GetErrored()(*int32) + GetMandatoryFailed()(*int32) + GetMandatoryOverridableFailed()(*int32) + GetPassed()(*int32) + GetUnknown()(*int32) + SetAdvisoryFailed(value *int32)() + SetErrored(value *int32)() + SetMandatoryFailed(value *int32)() + SetMandatoryOverridableFailed(value *int32)() + SetPassed(value *int32)() + SetUnknown(value *int32)() +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_relationships.go b/v2/api/models/tf_policy_set_outcomes_escaped_relationships.go new file mode 100644 index 000000000..cd2052a58 --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_relationships.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TfPolicySetOutcomes_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The tfPolicyEvaluation property + tfPolicyEvaluation TfPolicyEvaluationsHasOneable +} +// NewTfPolicySetOutcomes_relationships instantiates a new TfPolicySetOutcomes_relationships and sets the default values. +func NewTfPolicySetOutcomes_relationships()(*TfPolicySetOutcomes_relationships) { + m := &TfPolicySetOutcomes_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTfPolicySetOutcomes_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTfPolicySetOutcomes_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTfPolicySetOutcomes_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TfPolicySetOutcomes_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TfPolicySetOutcomes_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["tf-policy-evaluation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTfPolicyEvaluationsHasOneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTfPolicyEvaluation(val.(TfPolicyEvaluationsHasOneable)) + } + return nil + } + return res +} +// GetTfPolicyEvaluation gets the tf-policy-evaluation property value. The tfPolicyEvaluation property +// returns a TfPolicyEvaluationsHasOneable when successful +func (m *TfPolicySetOutcomes_relationships) GetTfPolicyEvaluation()(TfPolicyEvaluationsHasOneable) { + return m.tfPolicyEvaluation +} +// Serialize serializes information the current object +func (m *TfPolicySetOutcomes_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("tf-policy-evaluation", m.GetTfPolicyEvaluation()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TfPolicySetOutcomes_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTfPolicyEvaluation sets the tf-policy-evaluation property value. The tfPolicyEvaluation property +func (m *TfPolicySetOutcomes_relationships) SetTfPolicyEvaluation(value TfPolicyEvaluationsHasOneable)() { + m.tfPolicyEvaluation = value +} +type TfPolicySetOutcomes_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTfPolicyEvaluation()(TfPolicyEvaluationsHasOneable) + SetTfPolicyEvaluation(value TfPolicyEvaluationsHasOneable)() +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_type.go b/v2/api/models/tf_policy_set_outcomes_escaped_type.go new file mode 100644 index 000000000..05bd1dcc4 --- /dev/null +++ b/v2/api/models/tf_policy_set_outcomes_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type TfPolicySetOutcomes_type int + +const ( + TFPOLICYSETOUTCOMES_TFPOLICYSETOUTCOMES_TYPE TfPolicySetOutcomes_type = iota +) + +func (i TfPolicySetOutcomes_type) String() string { + return []string{"tf-policy-set-outcomes"}[i] +} +func ParseTfPolicySetOutcomes_type(v string) (any, error) { + result := TFPOLICYSETOUTCOMES_TFPOLICYSETOUTCOMES_TYPE + switch v { + case "tf-policy-set-outcomes": + result = TFPOLICYSETOUTCOMES_TFPOLICYSETOUTCOMES_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeTfPolicySetOutcomes_type(values []TfPolicySetOutcomes_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TfPolicySetOutcomes_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/workspaces_envelope.go b/v2/api/models/workspaces_envelope.go index f4e76f460..4b8584573 100644 --- a/v2/api/models/workspaces_envelope.go +++ b/v2/api/models/workspaces_envelope.go @@ -11,7 +11,7 @@ type WorkspacesEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data ItemWorkspacesGetResponse_Workspacesable + data Workspacesable } // NewWorkspacesEnvelope instantiates a new WorkspacesEnvelope and sets the default values. func NewWorkspacesEnvelope()(*WorkspacesEnvelope) { @@ -31,8 +31,8 @@ func (m *WorkspacesEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *WorkspacesEnvelope) GetData()(ItemWorkspacesGetResponse_Workspacesable) { +// returns a Workspacesable when successful +func (m *WorkspacesEnvelope) GetData()(Workspacesable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -40,12 +40,12 @@ func (m *WorkspacesEnvelope) GetData()(ItemWorkspacesGetResponse_Workspacesable) func (m *WorkspacesEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateWorkspacesFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetData(val.(ItemWorkspacesGetResponse_Workspacesable)) + m.SetData(val.(Workspacesable)) } return nil } @@ -72,12 +72,12 @@ func (m *WorkspacesEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *WorkspacesEnvelope) SetData(value ItemWorkspacesGetResponse_Workspacesable)() { +func (m *WorkspacesEnvelope) SetData(value Workspacesable)() { m.data = value } type WorkspacesEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()(ItemWorkspacesGetResponse_Workspacesable) - SetData(value ItemWorkspacesGetResponse_Workspacesable)() + GetData()(Workspacesable) + SetData(value Workspacesable)() } diff --git a/v2/api/organizationmemberships/organization_memberships_get_response.go b/v2/api/organizationmemberships/organization_memberships_get_response.go index 56c5cd0bd..f99eebd7a 100644 --- a/v2/api/organizationmemberships/organization_memberships_get_response.go +++ b/v2/api/organizationmemberships/organization_memberships_get_response.go @@ -21,10 +21,10 @@ type OrganizationMembershipsGetResponse struct { // The meta property meta OrganizationMembershipsGetResponse_metaable } -// OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable type OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable - organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable teams i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable @@ -52,7 +52,7 @@ func CreateOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse } if mappingValue != nil { if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { - result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizations()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "teams") { result.SetTeams(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTeams()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { @@ -80,9 +80,9 @@ func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_i func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetIsComposedType()(bool) { return true } -// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable -// returns a OrganizationsGetResponse_Organizationsable when successful -func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable +// returns a Organizationsable when successful +func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { return m.organizations } // GetTeams gets the teams property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable @@ -115,8 +115,8 @@ func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_i } return nil } -// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable -func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable +func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { m.organizations = value } // SetTeams sets the teams property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable @@ -129,10 +129,10 @@ func (m *OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_i } type OrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) GetTeams()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() SetTeams(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() } diff --git a/v2/api/organizationmemberships/organization_memberships_request_builder.go b/v2/api/organizationmemberships/organization_memberships_request_builder.go index 1b54763b8..e632a9aef 100644 --- a/v2/api/organizationmemberships/organization_memberships_request_builder.go +++ b/v2/api/organizationmemberships/organization_memberships_request_builder.go @@ -17,7 +17,7 @@ type OrganizationMembershipsRequestBuilder struct { type OrganizationMembershipsRequestBuilderGetQueryParameters struct { // Return only the specified fields for organization-memberships resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsorganizationMemberships []string "uriparametername:\"fields%5Borganization%2Dmemberships%5D\"" - // Optionally side-load relationships. Can include "user", "teams", or "organization". + // Optionally side-load the specified relationships. Include []GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizationmemberships/with_organization_escaped_membership_escaped_item_request_builder.go b/v2/api/organizationmemberships/with_organization_escaped_membership_escaped_item_request_builder.go index 105eda3b5..fd538107a 100644 --- a/v2/api/organizationmemberships/with_organization_escaped_membership_escaped_item_request_builder.go +++ b/v2/api/organizationmemberships/with_organization_escaped_membership_escaped_item_request_builder.go @@ -18,7 +18,7 @@ type WithOrganization_membership_ItemRequestBuilder struct { type WithOrganization_membership_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for organization-memberships resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsorganizationMemberships []string "uriparametername:\"fields%5Borganization%2Dmemberships%5D\"" - // Optionally side-load relationships. Can include "user" or "teams". + // Optionally side-load the specified relationships. Include []ia94e955f3587e0e4f9abea0db3f19401ed3f606a0c7b14d310b670499708ecd2.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithOrganization_membership_ItemRequestBuilderInternal instantiates a new WithOrganization_membership_ItemRequestBuilder and sets the default values. @@ -55,10 +55,10 @@ func (m *WithOrganization_membership_ItemRequestBuilder) Delete(ctx context.Cont return nil } // Get get details about a specific organization membership. -// returns a ItemWithOrganization_membership_GetResponseable when successful +// returns a OrganizationMembershipsEnvelopeable when successful // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithOrganization_membership_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithOrganization_membership_ItemRequestBuilderGetQueryParameters])(ItemWithOrganization_membership_GetResponseable, error) { +func (m *WithOrganization_membership_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithOrganization_membership_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -67,14 +67,14 @@ func (m *WithOrganization_membership_ItemRequestBuilder) Get(ctx context.Context "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithOrganization_membership_GetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationMembershipsEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithOrganization_membership_GetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsEnvelopeable), nil } // ToDeleteRequestInformation remove a user from an organization. You cannot remove yourself from organizations which you own. // returns a *RequestInformation when successful diff --git a/v2/api/organizations/item_organization_memberships_get_response.go b/v2/api/organizations/item_organization_memberships_get_response.go index 706140824..1311432c6 100644 --- a/v2/api/organizations/item_organization_memberships_get_response.go +++ b/v2/api/organizations/item_organization_memberships_get_response.go @@ -21,10 +21,8 @@ type ItemOrganizationMembershipsGetResponse struct { // The meta property meta ItemOrganizationMembershipsGetResponse_metaable } -// ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable type ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable - organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable scimIdentities i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable @@ -53,9 +51,7 @@ func CreateItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResp return nil, err } if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { - result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "scim-identities") { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "scim-identities") { result.SetScimIdentities(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewScimIdentities()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "teams") { result.SetTeams(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTeams()) @@ -70,9 +66,7 @@ func CreateItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResp // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetOrganizations() != nil { - return m.GetOrganizations().GetFieldDeserializers() - } else if m.GetScimIdentities() != nil { + if m.GetScimIdentities() != nil { return m.GetScimIdentities().GetFieldDeserializers() } else if m.GetTeams() != nil { return m.GetTeams().GetFieldDeserializers() @@ -86,11 +80,6 @@ func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetRespon func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetIsComposedType()(bool) { return true } -// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable -// returns a OrganizationsGetResponse_Organizationsable when successful -func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { - return m.organizations -} // GetScimIdentities gets the scimIdentities property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable // returns a ScimIdentitiesable when successful func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) GetScimIdentities()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable) { @@ -108,12 +97,7 @@ func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetRespon } // Serialize serializes information the current object func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetOrganizations() != nil { - err := writer.WriteObjectValue("", m.GetOrganizations()) - if err != nil { - return err - } - } else if m.GetScimIdentities() != nil { + if m.GetScimIdentities() != nil { err := writer.WriteObjectValue("", m.GetScimIdentities()) if err != nil { return err @@ -131,10 +115,6 @@ func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetRespon } return nil } -// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable -func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { - m.organizations = value -} // SetScimIdentities sets the scimIdentities property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_included) SetScimIdentities(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable)() { m.scimIdentities = value @@ -149,11 +129,9 @@ func (m *ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetRespon } type ItemOrganizationMembershipsGetResponse_OrganizationMembershipsGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) GetScimIdentities()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable) GetTeams()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() SetScimIdentities(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ScimIdentitiesable)() SetTeams(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() diff --git a/v2/api/organizations/item_organization_memberships_request_builder.go b/v2/api/organizations/item_organization_memberships_request_builder.go index f57320e32..8f1f5b4b9 100644 --- a/v2/api/organizations/item_organization_memberships_request_builder.go +++ b/v2/api/organizations/item_organization_memberships_request_builder.go @@ -22,7 +22,7 @@ type ItemOrganizationMembershipsRequestBuilderGetQueryParameters struct { Filteremail *string "uriparametername:\"filter%5Bemail%5D\"" // Filter memberships by status. Can be "active", "invited", or "inactive". Filterstatus *i8bffbca85e6a5b12ecb6d06db85c222d6bdb3c5d01c5fbc7c5f9252d485f425d.GetFilterStatusQueryParameterType "uriparametername:\"filter%5Bstatus%5D\"" - // Optionally side-load relationships. Can include "user", "teams", or "scim-identity".Note: "scim-identity" is only available on HCP Terraform. + // Optionally side-load the specified relationships. Include []i8bffbca85e6a5b12ecb6d06db85c222d6bdb3c5d01c5fbc7c5f9252d485f425d.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/item_provider_sets_get_response.go b/v2/api/organizations/item_provider_sets_get_response.go index 56d6f1bc7..c07be5d60 100644 --- a/v2/api/organizations/item_provider_sets_get_response.go +++ b/v2/api/organizations/item_provider_sets_get_response.go @@ -13,31 +13,31 @@ type ItemProviderSetsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable // The included property - included []ItemProviderSetsGetResponse_ProviderSetsable + included []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemProviderSetsGetResponse_metaable } -// ItemProviderSetsGetResponse_ProviderSets composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -type ItemProviderSetsGetResponse_ProviderSets struct { +// ItemProviderSetsGetResponse_ProviderSetsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemProviderSetsGetResponse_ProviderSetsGetResponse_included struct { // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable } -// NewItemProviderSetsGetResponse_ProviderSets instantiates a new ItemProviderSetsGetResponse_ProviderSets and sets the default values. -func NewItemProviderSetsGetResponse_ProviderSets()(*ItemProviderSetsGetResponse_ProviderSets) { - m := &ItemProviderSetsGetResponse_ProviderSets{ +// NewItemProviderSetsGetResponse_ProviderSetsGetResponse_included instantiates a new ItemProviderSetsGetResponse_ProviderSetsGetResponse_included and sets the default values. +func NewItemProviderSetsGetResponse_ProviderSetsGetResponse_included()(*ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) { + m := &ItemProviderSetsGetResponse_ProviderSetsGetResponse_included{ } return m } -// CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemProviderSetsGetResponse_ProviderSetsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemProviderSetsGetResponse_ProviderSets() +func CreateItemProviderSetsGetResponse_ProviderSetsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemProviderSetsGetResponse_ProviderSetsGetResponse_included() if parseNode != nil { mappingValueNode, err := parseNode.GetChildNode("type") if err != nil { @@ -52,7 +52,7 @@ func CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue(parseN if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) } } } @@ -61,7 +61,7 @@ func CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue(parseN } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemProviderSetsGetResponse_ProviderSets) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { if m.GetProjects() != nil { return m.GetProjects().GetFieldDeserializers() } else if m.GetWorkspaces() != nil { @@ -71,21 +71,21 @@ func (m *ItemProviderSetsGetResponse_ProviderSets) GetFieldDeserializers()(map[s } // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemProviderSetsGetResponse_ProviderSets) GetIsComposedType()(bool) { +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetIsComposedType()(bool) { return true } // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemProviderSetsGetResponse_ProviderSets) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { return m.projects } -// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -// returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemProviderSetsGetResponse_ProviderSets) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { return m.workspaces } // Serialize serializes information the current object -func (m *ItemProviderSetsGetResponse_ProviderSets) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetProjects() != nil { err := writer.WriteObjectValue("", m.GetProjects()) if err != nil { @@ -100,19 +100,19 @@ func (m *ItemProviderSetsGetResponse_ProviderSets) Serialize(writer i878a80d2330 return nil } // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemProviderSetsGetResponse_ProviderSets) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { m.projects = value } -// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -func (m *ItemProviderSetsGetResponse_ProviderSets) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { m.workspaces = value } -type ItemProviderSetsGetResponse_ProviderSetsable interface { +type ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() } // NewItemProviderSetsGetResponse instantiates a new ItemProviderSetsGetResponse and sets the default values. func NewItemProviderSetsGetResponse()(*ItemProviderSetsGetResponse) { @@ -132,8 +132,8 @@ func (m *ItemProviderSetsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ItemProviderSetsGetResponse_ProviderSetsable when successful -func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) { +// returns a []ProviderSetsable when successful +func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -141,15 +141,15 @@ func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7 func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) } } m.SetData(res) @@ -157,15 +157,15 @@ func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i8 return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateItemProviderSetsGetResponse_ProviderSetsGetResponse_includedFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]ItemProviderSetsGetResponse_ProviderSetsable, len(val)) + res := make([]ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(ItemProviderSetsGetResponse_ProviderSetsable) + res[i] = v.(ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable) } } m.SetIncluded(res) @@ -195,8 +195,8 @@ func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i8 return res } // GetIncluded gets the included property value. The included property -// returns a []ItemProviderSetsGetResponse_ProviderSetsable when successful -func (m *ItemProviderSetsGetResponse) GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsable) { +// returns a []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable when successful +func (m *ItemProviderSetsGetResponse) GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable) { return m.included } // GetLinks gets the links property value. The links property @@ -260,11 +260,11 @@ func (m *ItemProviderSetsGetResponse) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() { +func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *ItemProviderSetsGetResponse) SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsable)() { +func (m *ItemProviderSetsGetResponse) SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -278,12 +278,12 @@ func (m *ItemProviderSetsGetResponse) SetMeta(value ItemProviderSetsGetResponse_ type ItemProviderSetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) - GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) + GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemProviderSetsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() - SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() + SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemProviderSetsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_provider_sets_request_builder.go b/v2/api/organizations/item_provider_sets_request_builder.go index c2c230d30..d816b5d08 100644 --- a/v2/api/organizations/item_provider_sets_request_builder.go +++ b/v2/api/organizations/item_provider_sets_request_builder.go @@ -18,7 +18,7 @@ type ItemProviderSetsRequestBuilder struct { type ItemProviderSetsRequestBuilderGetQueryParameters struct { // Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsproviderSets []string "uriparametername:\"fields%5Bprovider%2Dsets%5D\"" - // Comma-separated list of related resources to include. + // Optionally side-load the specified relationships. Include []i4d2258e86a88b1e2d87bab80c93f231487cbf97938134a31c2d84dd287aca2cb.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/item_provider_sets_with_provider_escaped_set_escaped_name_item_request_builder.go b/v2/api/organizations/item_provider_sets_with_provider_escaped_set_escaped_name_item_request_builder.go index c16fa3583..6bf975828 100644 --- a/v2/api/organizations/item_provider_sets_with_provider_escaped_set_escaped_name_item_request_builder.go +++ b/v2/api/organizations/item_provider_sets_with_provider_escaped_set_escaped_name_item_request_builder.go @@ -18,7 +18,7 @@ type ItemProviderSetsWithProvider_set_nameItemRequestBuilder struct { type ItemProviderSetsWithProvider_set_nameItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsproviderSets []string "uriparametername:\"fields%5Bprovider%2Dsets%5D\"" - // Comma-separated list of related resources to include. + // Optionally side-load the specified relationships. Include []ie5bf1a07a4aed9c1b7f92edc407a7e27e2c292d7939e34eaadad1916c2f40c95.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewItemProviderSetsWithProvider_set_nameItemRequestBuilderInternal instantiates a new ItemProviderSetsWithProvider_set_nameItemRequestBuilder and sets the default values. @@ -35,9 +35,9 @@ func NewItemProviderSetsWithProvider_set_nameItemRequestBuilder(rawUrl string, r return NewItemProviderSetsWithProvider_set_nameItemRequestBuilderInternal(urlParams, requestAdapter) } // Get fetch details about the specified provider set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. -// returns a ItemProviderSetsItemWithProvider_set_nameGetResponseable when successful +// returns a ProviderSetsEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *ItemProviderSetsWithProvider_set_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProviderSetsWithProvider_set_nameItemRequestBuilderGetQueryParameters])(ItemProviderSetsItemWithProvider_set_nameGetResponseable, error) { +func (m *ItemProviderSetsWithProvider_set_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProviderSetsWithProvider_set_nameItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -45,14 +45,14 @@ func (m *ItemProviderSetsWithProvider_set_nameItemRequestBuilder) Get(ctx contex errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemProviderSetsItemWithProvider_set_nameGetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemProviderSetsItemWithProvider_set_nameGetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable), nil } // ToGetRequestInformation fetch details about the specified provider set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. // returns a *RequestInformation when successful diff --git a/v2/api/organizations/item_recoverable_items_get_response.go b/v2/api/organizations/item_recoverable_items_get_response.go index 7d261a998..f510de519 100644 --- a/v2/api/organizations/item_recoverable_items_get_response.go +++ b/v2/api/organizations/item_recoverable_items_get_response.go @@ -13,35 +13,35 @@ type ItemRecoverableItemsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable // The included property - included []ItemRecoverableItemsGetResponse_RecoverableItemsable + included []ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemRecoverableItemsGetResponse_metaable } -// ItemRecoverableItemsGetResponse_RecoverableItems composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable -type ItemRecoverableItemsGetResponse_RecoverableItems struct { +// ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included struct { // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable - stacks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + stacks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable } -// NewItemRecoverableItemsGetResponse_RecoverableItems instantiates a new ItemRecoverableItemsGetResponse_RecoverableItems and sets the default values. -func NewItemRecoverableItemsGetResponse_RecoverableItems()(*ItemRecoverableItemsGetResponse_RecoverableItems) { - m := &ItemRecoverableItemsGetResponse_RecoverableItems{ +// NewItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included instantiates a new ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included and sets the default values. +func NewItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included()(*ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) { + m := &ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included{ } return m } -// CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemRecoverableItemsGetResponse_RecoverableItems() +func CreateItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included() if parseNode != nil { mappingValueNode, err := parseNode.GetChildNode("type") if err != nil { @@ -56,11 +56,11 @@ func CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValu if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { - result.SetStacks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemStacksGetResponse_Stacks()) + result.SetStacks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStacks()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) } } } @@ -69,7 +69,7 @@ func CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValu } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { if m.GetProjects() != nil { return m.GetProjects().GetFieldDeserializers() } else if m.GetStacks() != nil { @@ -83,31 +83,31 @@ func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetFieldDeserializers } // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetIsComposedType()(bool) { +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) GetIsComposedType()(bool) { return true } // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { return m.projects } -// GetStacks gets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable -// returns a ItemStacksGetResponse_Stacksable when successful -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) { +// GetStacks gets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +// returns a Stacksable when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) { return m.stacks } // GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable // returns a Usersable when successful -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { return m.users } -// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -// returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { return m.workspaces } // Serialize serializes information the current object -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetProjects() != nil { err := writer.WriteObjectValue("", m.GetProjects()) if err != nil { @@ -132,31 +132,31 @@ func (m *ItemRecoverableItemsGetResponse_RecoverableItems) Serialize(writer i878 return nil } // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { m.projects = value } -// SetStacks sets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable)() { +// SetStacks sets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() { m.stacks = value } // SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { m.users = value } -// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -func (m *ItemRecoverableItemsGetResponse_RecoverableItems) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { m.workspaces = value } -type ItemRecoverableItemsGetResponse_RecoverableItemsable interface { +type ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) + GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable)() + SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() - SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() } // NewItemRecoverableItemsGetResponse instantiates a new ItemRecoverableItemsGetResponse and sets the default values. func NewItemRecoverableItemsGetResponse()(*ItemRecoverableItemsGetResponse) { @@ -176,8 +176,8 @@ func (m *ItemRecoverableItemsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ItemRecoverableItemsGetResponse_RecoverableItemsable when successful -func (m *ItemRecoverableItemsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable) { +// returns a []RecoverableItemsable when successful +func (m *ItemRecoverableItemsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -185,15 +185,15 @@ func (m *ItemRecoverableItemsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c9 func (m *ItemRecoverableItemsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateRecoverableItemsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable) } } m.SetData(res) @@ -201,15 +201,15 @@ func (m *ItemRecoverableItemsGetResponse) GetFieldDeserializers()(map[string]fun return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemRecoverableItemsGetResponse_RecoverableItemsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]ItemRecoverableItemsGetResponse_RecoverableItemsable, len(val)) + res := make([]ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(ItemRecoverableItemsGetResponse_RecoverableItemsable) + res[i] = v.(ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedable) } } m.SetIncluded(res) @@ -239,8 +239,8 @@ func (m *ItemRecoverableItemsGetResponse) GetFieldDeserializers()(map[string]fun return res } // GetIncluded gets the included property value. The included property -// returns a []ItemRecoverableItemsGetResponse_RecoverableItemsable when successful -func (m *ItemRecoverableItemsGetResponse) GetIncluded()([]ItemRecoverableItemsGetResponse_RecoverableItemsable) { +// returns a []ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedable when successful +func (m *ItemRecoverableItemsGetResponse) GetIncluded()([]ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedable) { return m.included } // GetLinks gets the links property value. The links property @@ -304,11 +304,11 @@ func (m *ItemRecoverableItemsGetResponse) SetAdditionalData(value map[string]any m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemRecoverableItemsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable)() { +func (m *ItemRecoverableItemsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *ItemRecoverableItemsGetResponse) SetIncluded(value []ItemRecoverableItemsGetResponse_RecoverableItemsable)() { +func (m *ItemRecoverableItemsGetResponse) SetIncluded(value []ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -322,12 +322,12 @@ func (m *ItemRecoverableItemsGetResponse) SetMeta(value ItemRecoverableItemsGetR type ItemRecoverableItemsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable) - GetIncluded()([]ItemRecoverableItemsGetResponse_RecoverableItemsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable) + GetIncluded()([]ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRecoverableItemsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemRecoverableItemsGetResponse_RecoverableItemsable)() - SetIncluded(value []ItemRecoverableItemsGetResponse_RecoverableItemsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RecoverableItemsable)() + SetIncluded(value []ItemRecoverableItemsGetResponse_RecoverableItemsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRecoverableItemsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_recoverable_items_request_builder.go b/v2/api/organizations/item_recoverable_items_request_builder.go index 1fc96c406..769b93143 100644 --- a/v2/api/organizations/item_recoverable_items_request_builder.go +++ b/v2/api/organizations/item_recoverable_items_request_builder.go @@ -27,7 +27,7 @@ type ItemRecoverableItemsRequestBuilderGetQueryParameters struct { Filterrecoverable_type *i6fd48713f53268cd7f7a50d20b1d386c92eb74cfa1526ea44f74b0006c8a5657.GetFilterRecoverable_typeQueryParameterType "uriparametername:\"filter%5Brecoverable_type%5D\"" // Search term to filter recoverable items by name or project name. Filtersearch *string "uriparametername:\"filter%5Bsearch%5D\"" - // Optionally side-load relationships of the specified name. Multiple values can be comma-separated. + // Optionally side-load the specified relationships. Include []i6fd48713f53268cd7f7a50d20b1d386c92eb74cfa1526ea44f74b0006c8a5657.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/item_relationships_data_retention_policy_request_builder.go b/v2/api/organizations/item_relationships_data_retention_policy_request_builder.go index 9b8434e5e..83350f3e3 100644 --- a/v2/api/organizations/item_relationships_data_retention_policy_request_builder.go +++ b/v2/api/organizations/item_relationships_data_retention_policy_request_builder.go @@ -69,7 +69,7 @@ func (m *ItemRelationshipsDataRetentionPolicyRequestBuilder) Get(ctx context.Con } return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.DataRetentionPolicyEnvelopeable), nil } -// Patch create a data retention policy for an organization or update the existing policy.This operation is only available in Terraform Enterprise. +// Patch update the data retention policy for an organization.This operation is only available in Terraform Enterprise. // returns a Errors error when the service returns a 4XX or 5XX status code func (m *ItemRelationshipsDataRetentionPolicyRequestBuilder) Patch(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.DataRetentionPolicyEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); @@ -85,7 +85,7 @@ func (m *ItemRelationshipsDataRetentionPolicyRequestBuilder) Patch(ctx context.C } return nil } -// Post create a data retention policy for an organization or update the existing policy.This operation is only available in Terraform Enterprise. +// Post create a data retention policy for an organization.This operation is only available in Terraform Enterprise. // returns a Errors error when the service returns a 4XX or 5XX status code func (m *ItemRelationshipsDataRetentionPolicyRequestBuilder) Post(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.DataRetentionPolicyEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); @@ -117,7 +117,7 @@ func (m *ItemRelationshipsDataRetentionPolicyRequestBuilder) ToGetRequestInforma requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") return requestInfo, nil } -// ToPatchRequestInformation create a data retention policy for an organization or update the existing policy.This operation is only available in Terraform Enterprise. +// ToPatchRequestInformation update the data retention policy for an organization.This operation is only available in Terraform Enterprise. // returns a *RequestInformation when successful func (m *ItemRelationshipsDataRetentionPolicyRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.DataRetentionPolicyEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -129,7 +129,7 @@ func (m *ItemRelationshipsDataRetentionPolicyRequestBuilder) ToPatchRequestInfor } return requestInfo, nil } -// ToPostRequestInformation create a data retention policy for an organization or update the existing policy.This operation is only available in Terraform Enterprise. +// ToPostRequestInformation create a data retention policy for an organization.This operation is only available in Terraform Enterprise. // returns a *RequestInformation when successful func (m *ItemRelationshipsDataRetentionPolicyRequestBuilder) ToPostRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.DataRetentionPolicyEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/v2/api/organizations/item_relationships_module_producers_get_response.go b/v2/api/organizations/item_relationships_module_producers_get_response.go index d24f3b091..9466ff4ea 100644 --- a/v2/api/organizations/item_relationships_module_producers_get_response.go +++ b/v2/api/organizations/item_relationships_module_producers_get_response.go @@ -12,7 +12,7 @@ type ItemRelationshipsModuleProducersGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemRelationshipsModuleProducersGetResponse) GetAdditionalData()(map[st return m.additionalData } // GetData gets the data property value. The data property -// returns a []OrganizationsGetResponse_Organizationsable when successful -func (m *ItemRelationshipsModuleProducersGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { +// returns a []Organizationsable when successful +func (m *ItemRelationshipsModuleProducersGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemRelationshipsModuleProducersGetResponse) GetData()([]i05d5aa6b14db2 func (m *ItemRelationshipsModuleProducersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemRelationshipsModuleProducersGetResponse) SetAdditionalData(value ma m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemRelationshipsModuleProducersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { +func (m *ItemRelationshipsModuleProducersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemRelationshipsModuleProducersGetResponse) SetMeta(value ItemRelation type ItemRelationshipsModuleProducersGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRelationshipsModuleProducersGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRelationshipsModuleProducersGetResponse_metaable)() } diff --git a/v2/api/organizations/item_stacks_get_response.go b/v2/api/organizations/item_stacks_get_response.go index 0ac12ed6e..5628ff6cc 100644 --- a/v2/api/organizations/item_stacks_get_response.go +++ b/v2/api/organizations/item_stacks_get_response.go @@ -13,33 +13,33 @@ type ItemStacksGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable // The included property - included []ItemStacksGetResponse_Stacksable + included []ItemStacksGetResponse_StacksGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemStacksGetResponse_metaable } -// ItemStacksGetResponse_Stacks composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable -type ItemStacksGetResponse_Stacks struct { +// ItemStacksGetResponse_StacksGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +type ItemStacksGetResponse_StacksGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable - stackConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable - stackDiagnostics i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + stackConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable } -// NewItemStacksGetResponse_Stacks instantiates a new ItemStacksGetResponse_Stacks and sets the default values. -func NewItemStacksGetResponse_Stacks()(*ItemStacksGetResponse_Stacks) { - m := &ItemStacksGetResponse_Stacks{ +// NewItemStacksGetResponse_StacksGetResponse_included instantiates a new ItemStacksGetResponse_StacksGetResponse_included and sets the default values. +func NewItemStacksGetResponse_StacksGetResponse_included()(*ItemStacksGetResponse_StacksGetResponse_included) { + m := &ItemStacksGetResponse_StacksGetResponse_included{ } return m } -// CreateItemStacksGetResponse_StacksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemStacksGetResponse_StacksGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemStacksGetResponse_StacksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemStacksGetResponse_Stacks() +func CreateItemStacksGetResponse_StacksGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemStacksGetResponse_StacksGetResponse_included() if parseNode != nil { mappingValueNode, err := parseNode.GetChildNode("type") if err != nil { @@ -51,12 +51,12 @@ func CreateItemStacksGetResponse_StacksFromDiscriminatorValue(parseNode i878a80d return nil, err } if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configurations") { - result.SetStackConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemStackConfigurationsGetResponse_StackConfigurations()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-diagnostics") { - result.SetStackDiagnostics(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDiagnostics()) + result.SetStackConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurations()) } } } @@ -65,76 +65,76 @@ func CreateItemStacksGetResponse_StacksFromDiscriminatorValue(parseNode i878a80d } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemStacksGetResponse_Stacks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetProjects() != nil { +func (m *ItemStacksGetResponse_StacksGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetProjects() != nil { return m.GetProjects().GetFieldDeserializers() } else if m.GetStackConfigurations() != nil { return m.GetStackConfigurations().GetFieldDeserializers() - } else if m.GetStackDiagnostics() != nil { - return m.GetStackDiagnostics().GetFieldDeserializers() } return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemStacksGetResponse_Stacks) GetIsComposedType()(bool) { +func (m *ItemStacksGetResponse_StacksGetResponse_included) GetIsComposedType()(bool) { return true } +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable +// returns a Organizationsable when successful +func (m *ItemStacksGetResponse_StacksGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { + return m.organizations +} // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemStacksGetResponse_Stacks) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { +func (m *ItemStacksGetResponse_StacksGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { return m.projects } -// GetStackConfigurations gets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable -// returns a ItemStackConfigurationsGetResponse_StackConfigurationsable when successful -func (m *ItemStacksGetResponse_Stacks) GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) { +// GetStackConfigurations gets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +// returns a StackConfigurationsable when successful +func (m *ItemStacksGetResponse_StacksGetResponse_included) GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) { return m.stackConfigurations } -// GetStackDiagnostics gets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable -// returns a StackDiagnosticsable when successful -func (m *ItemStacksGetResponse_Stacks) GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) { - return m.stackDiagnostics -} // Serialize serializes information the current object -func (m *ItemStacksGetResponse_Stacks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetProjects() != nil { - err := writer.WriteObjectValue("", m.GetProjects()) +func (m *ItemStacksGetResponse_StacksGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) if err != nil { return err } - } else if m.GetStackConfigurations() != nil { - err := writer.WriteObjectValue("", m.GetStackConfigurations()) + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) if err != nil { return err } - } else if m.GetStackDiagnostics() != nil { - err := writer.WriteObjectValue("", m.GetStackDiagnostics()) + } else if m.GetStackConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurations()) if err != nil { return err } } return nil } +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable +func (m *ItemStacksGetResponse_StacksGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { + m.organizations = value +} // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemStacksGetResponse_Stacks) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { +func (m *ItemStacksGetResponse_StacksGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { m.projects = value } -// SetStackConfigurations sets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable -func (m *ItemStacksGetResponse_Stacks) SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable)() { +// SetStackConfigurations sets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +func (m *ItemStacksGetResponse_StacksGetResponse_included) SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() { m.stackConfigurations = value } -// SetStackDiagnostics sets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable -func (m *ItemStacksGetResponse_Stacks) SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() { - m.stackDiagnostics = value -} -type ItemStacksGetResponse_Stacksable interface { +type ItemStacksGetResponse_StacksGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) - GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) + GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable)() - SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() + SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() } // NewItemStacksGetResponse instantiates a new ItemStacksGetResponse and sets the default values. func NewItemStacksGetResponse()(*ItemStacksGetResponse) { @@ -154,8 +154,8 @@ func (m *ItemStacksGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ItemStacksGetResponse_Stacksable when successful -func (m *ItemStacksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) { +// returns a []Stacksable when successful +func (m *ItemStacksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -163,15 +163,15 @@ func (m *ItemStacksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b func (m *ItemStacksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemStacksGetResponse_StacksFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStacksFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) } } m.SetData(res) @@ -179,15 +179,15 @@ func (m *ItemStacksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemStacksGetResponse_StacksFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateItemStacksGetResponse_StacksGetResponse_includedFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]ItemStacksGetResponse_Stacksable, len(val)) + res := make([]ItemStacksGetResponse_StacksGetResponse_includedable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(ItemStacksGetResponse_Stacksable) + res[i] = v.(ItemStacksGetResponse_StacksGetResponse_includedable) } } m.SetIncluded(res) @@ -217,8 +217,8 @@ func (m *ItemStacksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d return res } // GetIncluded gets the included property value. The included property -// returns a []ItemStacksGetResponse_Stacksable when successful -func (m *ItemStacksGetResponse) GetIncluded()([]ItemStacksGetResponse_Stacksable) { +// returns a []ItemStacksGetResponse_StacksGetResponse_includedable when successful +func (m *ItemStacksGetResponse) GetIncluded()([]ItemStacksGetResponse_StacksGetResponse_includedable) { return m.included } // GetLinks gets the links property value. The links property @@ -282,11 +282,11 @@ func (m *ItemStacksGetResponse) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemStacksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable)() { +func (m *ItemStacksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *ItemStacksGetResponse) SetIncluded(value []ItemStacksGetResponse_Stacksable)() { +func (m *ItemStacksGetResponse) SetIncluded(value []ItemStacksGetResponse_StacksGetResponse_includedable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -300,12 +300,12 @@ func (m *ItemStacksGetResponse) SetMeta(value ItemStacksGetResponse_metaable)() type ItemStacksGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable) - GetIncluded()([]ItemStacksGetResponse_Stacksable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) + GetIncluded()([]ItemStacksGetResponse_StacksGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStacksGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStacksGetResponse_Stacksable)() - SetIncluded(value []ItemStacksGetResponse_Stacksable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() + SetIncluded(value []ItemStacksGetResponse_StacksGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStacksGetResponse_metaable)() } diff --git a/v2/api/organizations/item_stacks_request_builder.go b/v2/api/organizations/item_stacks_request_builder.go index 1d04d1354..a7ed63695 100644 --- a/v2/api/organizations/item_stacks_request_builder.go +++ b/v2/api/organizations/item_stacks_request_builder.go @@ -18,7 +18,7 @@ type ItemStacksRequestBuilder struct { type ItemStacksRequestBuilderGetQueryParameters struct { // Return only the specified fields for stacks resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsstacks []string "uriparametername:\"fields%5Bstacks%5D\"" - // Optionally side-load relationships of the specified name + // Optionally side-load the specified relationships. Include []i70875ccd1b2bd0f77e8cd882fe31b81388ce6bbf5b12d7e55438120a9c0d3adc.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/item_tasks_get_response.go b/v2/api/organizations/item_tasks_get_response.go index 93225aced..e892b3309 100644 --- a/v2/api/organizations/item_tasks_get_response.go +++ b/v2/api/organizations/item_tasks_get_response.go @@ -13,31 +13,31 @@ type ItemTasksGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable // The included property - included []ItemTasksGetResponse_Tasksable + included []ItemTasksGetResponse_TasksGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemTasksGetResponse_metaable } -// ItemTasksGetResponse_Tasks composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable -type ItemTasksGetResponse_Tasks struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable +// ItemTasksGetResponse_TasksGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable +type ItemTasksGetResponse_TasksGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable workspaceTasks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable } -// NewItemTasksGetResponse_Tasks instantiates a new ItemTasksGetResponse_Tasks and sets the default values. -func NewItemTasksGetResponse_Tasks()(*ItemTasksGetResponse_Tasks) { - m := &ItemTasksGetResponse_Tasks{ +// NewItemTasksGetResponse_TasksGetResponse_included instantiates a new ItemTasksGetResponse_TasksGetResponse_included and sets the default values. +func NewItemTasksGetResponse_TasksGetResponse_included()(*ItemTasksGetResponse_TasksGetResponse_included) { + m := &ItemTasksGetResponse_TasksGetResponse_included{ } return m } -// CreateItemTasksGetResponse_TasksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemTasksGetResponse_TasksGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemTasksGetResponse_TasksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemTasksGetResponse_Tasks() +func CreateItemTasksGetResponse_TasksGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemTasksGetResponse_TasksGetResponse_included() if parseNode != nil { mappingValueNode, err := parseNode.GetChildNode("type") if err != nil { @@ -50,7 +50,7 @@ func CreateItemTasksGetResponse_TasksFromDiscriminatorValue(parseNode i878a80d23 } if mappingValue != nil { if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-tasks") { result.SetWorkspaceTasks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceTasks()) } @@ -61,7 +61,7 @@ func CreateItemTasksGetResponse_TasksFromDiscriminatorValue(parseNode i878a80d23 } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemTasksGetResponse_Tasks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemTasksGetResponse_TasksGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { if m.GetWorkspaces() != nil { return m.GetWorkspaces().GetFieldDeserializers() } else if m.GetWorkspaceTasks() != nil { @@ -71,21 +71,21 @@ func (m *ItemTasksGetResponse_Tasks) GetFieldDeserializers()(map[string]func(i87 } // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemTasksGetResponse_Tasks) GetIsComposedType()(bool) { +func (m *ItemTasksGetResponse_TasksGetResponse_included) GetIsComposedType()(bool) { return true } -// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -// returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemTasksGetResponse_Tasks) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemTasksGetResponse_TasksGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { return m.workspaces } // GetWorkspaceTasks gets the workspaceTasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable // returns a WorkspaceTasksable when successful -func (m *ItemTasksGetResponse_Tasks) GetWorkspaceTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) { +func (m *ItemTasksGetResponse_TasksGetResponse_included) GetWorkspaceTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) { return m.workspaceTasks } // Serialize serializes information the current object -func (m *ItemTasksGetResponse_Tasks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemTasksGetResponse_TasksGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetWorkspaces() != nil { err := writer.WriteObjectValue("", m.GetWorkspaces()) if err != nil { @@ -99,19 +99,19 @@ func (m *ItemTasksGetResponse_Tasks) Serialize(writer i878a80d2330e89d26896388a3 } return nil } -// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -func (m *ItemTasksGetResponse_Tasks) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemTasksGetResponse_TasksGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { m.workspaces = value } // SetWorkspaceTasks sets the workspaceTasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable -func (m *ItemTasksGetResponse_Tasks) SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() { +func (m *ItemTasksGetResponse_TasksGetResponse_included) SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() { m.workspaceTasks = value } -type ItemTasksGetResponse_Tasksable interface { +type ItemTasksGetResponse_TasksGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) GetWorkspaceTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) - SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() } // NewItemTasksGetResponse instantiates a new ItemTasksGetResponse and sets the default values. @@ -132,8 +132,8 @@ func (m *ItemTasksGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ItemTasksGetResponse_Tasksable when successful -func (m *ItemTasksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) { +// returns a []Tasksable when successful +func (m *ItemTasksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -141,15 +141,15 @@ func (m *ItemTasksGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b7 func (m *ItemTasksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemTasksGetResponse_TasksFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTasksFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable) } } m.SetData(res) @@ -157,15 +157,15 @@ func (m *ItemTasksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2 return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemTasksGetResponse_TasksFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateItemTasksGetResponse_TasksGetResponse_includedFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]ItemTasksGetResponse_Tasksable, len(val)) + res := make([]ItemTasksGetResponse_TasksGetResponse_includedable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(ItemTasksGetResponse_Tasksable) + res[i] = v.(ItemTasksGetResponse_TasksGetResponse_includedable) } } m.SetIncluded(res) @@ -195,8 +195,8 @@ func (m *ItemTasksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2 return res } // GetIncluded gets the included property value. The included property -// returns a []ItemTasksGetResponse_Tasksable when successful -func (m *ItemTasksGetResponse) GetIncluded()([]ItemTasksGetResponse_Tasksable) { +// returns a []ItemTasksGetResponse_TasksGetResponse_includedable when successful +func (m *ItemTasksGetResponse) GetIncluded()([]ItemTasksGetResponse_TasksGetResponse_includedable) { return m.included } // GetLinks gets the links property value. The links property @@ -260,11 +260,11 @@ func (m *ItemTasksGetResponse) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemTasksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable)() { +func (m *ItemTasksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *ItemTasksGetResponse) SetIncluded(value []ItemTasksGetResponse_Tasksable)() { +func (m *ItemTasksGetResponse) SetIncluded(value []ItemTasksGetResponse_TasksGetResponse_includedable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -278,12 +278,12 @@ func (m *ItemTasksGetResponse) SetMeta(value ItemTasksGetResponse_metaable)() { type ItemTasksGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) - GetIncluded()([]ItemTasksGetResponse_Tasksable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable) + GetIncluded()([]ItemTasksGetResponse_TasksGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemTasksGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable)() - SetIncluded(value []ItemTasksGetResponse_Tasksable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable)() + SetIncluded(value []ItemTasksGetResponse_TasksGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemTasksGetResponse_metaable)() } diff --git a/v2/api/organizations/item_tasks_request_builder.go b/v2/api/organizations/item_tasks_request_builder.go index 3984880cc..296d20e82 100644 --- a/v2/api/organizations/item_tasks_request_builder.go +++ b/v2/api/organizations/item_tasks_request_builder.go @@ -18,7 +18,7 @@ type ItemTasksRequestBuilder struct { type ItemTasksRequestBuilderGetQueryParameters struct { // Return only the specified fields for tasks resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldstasks []string "uriparametername:\"fields%5Btasks%5D\"" - // Allows including related resource data. + // Optionally side-load the specified relationships. Include []id9db6e1e278b291e17b54ca19afa8f7736669f87912b14a7310a3a39d8e10e3c.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/item_teams_request_builder.go b/v2/api/organizations/item_teams_request_builder.go index b269ca643..be50cbea0 100644 --- a/v2/api/organizations/item_teams_request_builder.go +++ b/v2/api/organizations/item_teams_request_builder.go @@ -20,7 +20,7 @@ type ItemTeamsRequestBuilderGetQueryParameters struct { Fieldsteams []string "uriparametername:\"fields%5Bteams%5D\"" // If specified, restricts results to a team with a matching name. If multiple comma separated values are specified, teams matching any of the names are returned. Filternames *string "uriparametername:\"filter%5Bnames%5D\"" - // Optionally side-load relationships. Can include "users" or "organization-memberships". + // Optionally side-load the specified relationships. Include []i68c7b1754f3d859dd95c09b410930e44dcfd5c211141c27437c039782e7cf6df.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/item_vcs_events_request_builder.go b/v2/api/organizations/item_vcs_events_request_builder.go index 81d86ae0d..fbd838897 100644 --- a/v2/api/organizations/item_vcs_events_request_builder.go +++ b/v2/api/organizations/item_vcs_events_request_builder.go @@ -27,7 +27,7 @@ type ItemVcsEventsRequestBuilderGetQueryParameters struct { Filteroauth_client_external_ids *string "uriparametername:\"filter%5Boauth_client_external_ids%5D\"" // RFC3339 formatted UTC timestamp. If omitted, defaults to now. Filterto *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time "uriparametername:\"filter%5Bto%5D\"" - // Allows including related resource data. + // Optionally side-load the specified relationships. Include []ia2e0e0ba84fc4705fe0aff525404b2a3c155d5e7ab94c4ceeaaa6d038a242b7e.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/item_workspaces_get_response.go b/v2/api/organizations/item_workspaces_get_response.go index 55e4d40ce..a00b575f5 100644 --- a/v2/api/organizations/item_workspaces_get_response.go +++ b/v2/api/organizations/item_workspaces_get_response.go @@ -13,16 +13,16 @@ type ItemWorkspacesGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable // The included property - included []ItemWorkspacesGetResponse_Workspacesable + included []ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemWorkspacesGetResponse_metaable } -// ItemWorkspacesGetResponse_Workspaces composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable -type ItemWorkspacesGetResponse_Workspaces struct { +// ItemWorkspacesGetResponse_WorkspacesGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable +type ItemWorkspacesGetResponse_WorkspacesGetResponse_included struct { // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable @@ -39,8 +39,8 @@ type ItemWorkspacesGetResponse_Workspaces struct { noCodeModules i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable noCodeModuleVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable - organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable @@ -58,16 +58,16 @@ type ItemWorkspacesGetResponse_Workspaces struct { // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable workspaceReadme i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable } -// NewItemWorkspacesGetResponse_Workspaces instantiates a new ItemWorkspacesGetResponse_Workspaces and sets the default values. -func NewItemWorkspacesGetResponse_Workspaces()(*ItemWorkspacesGetResponse_Workspaces) { - m := &ItemWorkspacesGetResponse_Workspaces{ +// NewItemWorkspacesGetResponse_WorkspacesGetResponse_included instantiates a new ItemWorkspacesGetResponse_WorkspacesGetResponse_included and sets the default values. +func NewItemWorkspacesGetResponse_WorkspacesGetResponse_included()(*ItemWorkspacesGetResponse_WorkspacesGetResponse_included) { + m := &ItemWorkspacesGetResponse_WorkspacesGetResponse_included{ } return m } -// CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemWorkspacesGetResponse_WorkspacesGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWorkspacesGetResponse_Workspaces() +func CreateItemWorkspacesGetResponse_WorkspacesGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWorkspacesGetResponse_WorkspacesGetResponse_included() if parseNode != nil { mappingValueNode, err := parseNode.GetChildNode("type") if err != nil { @@ -96,7 +96,7 @@ func CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue(parseNode } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-module-versions") { result.SetNoCodeModuleVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModuleVersions()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { - result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizations()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { @@ -121,32 +121,32 @@ func CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue(parseNode } // GetAgentPools gets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable // returns a AgentPoolsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { return m.agentPools } // GetApplies gets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable // returns a Appliesable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { return m.applies } // GetAssessmentResults gets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable // returns a AssessmentResultsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) { return m.assessmentResults } // GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable // returns a ConfigurationVersionsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { return m.configurationVersions } // GetEffectiveTagBindings gets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable // returns a EffectiveTagBindingsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { return m.effectiveTagBindings } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { if m.GetAgentPools() != nil { return m.GetAgentPools().GetFieldDeserializers() } else if m.GetApplies() != nil { @@ -186,71 +186,71 @@ func (m *ItemWorkspacesGetResponse_Workspaces) GetFieldDeserializers()(map[strin } // GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable // returns a IngressAttributesable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { return m.ingressAttributes } // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetIsComposedType()(bool) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetIsComposedType()(bool) { return true } // GetNoCodeModules gets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable // returns a NoCodeModulesable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { return m.noCodeModules } // GetNoCodeModuleVersions gets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable // returns a NoCodeModuleVersionsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { return m.noCodeModuleVersions } -// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable -// returns a OrganizationsGetResponse_Organizationsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable +// returns a Organizationsable when successful +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { return m.organizations } // GetPlans gets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable // returns a Plansable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { return m.plans } // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { return m.projects } // GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable // returns a Runsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { return m.runs } // GetStateVersions gets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable // returns a StateVersionsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) { return m.stateVersions } // GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable // returns a Usersable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { return m.users } // GetVars gets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable // returns a Varsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { return m.vars } // GetWorkspaceOutputs gets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable // returns a WorkspaceOutputsable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { return m.workspaceOutputs } // GetWorkspaceReadme gets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable // returns a WorkspaceReadmeable when successful -func (m *ItemWorkspacesGetResponse_Workspaces) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { return m.workspaceReadme } // Serialize serializes information the current object -func (m *ItemWorkspacesGetResponse_Workspaces) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetAgentPools() != nil { err := writer.WriteObjectValue("", m.GetAgentPools()) if err != nil { @@ -340,74 +340,74 @@ func (m *ItemWorkspacesGetResponse_Workspaces) Serialize(writer i878a80d2330e89d return nil } // SetAgentPools sets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { m.agentPools = value } // SetApplies sets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable -func (m *ItemWorkspacesGetResponse_Workspaces) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() { m.applies = value } // SetAssessmentResults sets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() { m.assessmentResults = value } // SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { m.configurationVersions = value } // SetEffectiveTagBindings sets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() { m.effectiveTagBindings = value } // SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable -func (m *ItemWorkspacesGetResponse_Workspaces) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { m.ingressAttributes = value } // SetNoCodeModules sets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable -func (m *ItemWorkspacesGetResponse_Workspaces) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() { m.noCodeModules = value } // SetNoCodeModuleVersions sets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() { m.noCodeModuleVersions = value } -// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { m.organizations = value } // SetPlans sets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable -func (m *ItemWorkspacesGetResponse_Workspaces) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() { m.plans = value } // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { m.projects = value } // SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { m.runs = value } // SetStateVersions sets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() { m.stateVersions = value } // SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable -func (m *ItemWorkspacesGetResponse_Workspaces) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { m.users = value } // SetVars sets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { m.vars = value } // SetWorkspaceOutputs sets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable -func (m *ItemWorkspacesGetResponse_Workspaces) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() { m.workspaceOutputs = value } // SetWorkspaceReadme sets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable -func (m *ItemWorkspacesGetResponse_Workspaces) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() { +func (m *ItemWorkspacesGetResponse_WorkspacesGetResponse_included) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() { m.workspaceReadme = value } -type ItemWorkspacesGetResponse_Workspacesable interface { +type ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) @@ -417,7 +417,7 @@ type ItemWorkspacesGetResponse_Workspacesable interface { GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) - GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) @@ -434,7 +434,7 @@ type ItemWorkspacesGetResponse_Workspacesable interface { SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() - SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() @@ -462,8 +462,8 @@ func (m *ItemWorkspacesGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemWorkspacesGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { +// returns a []Workspacesable when successful +func (m *ItemWorkspacesGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -471,15 +471,15 @@ func (m *ItemWorkspacesGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7 func (m *ItemWorkspacesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspacesFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) } } m.SetData(res) @@ -487,15 +487,15 @@ func (m *ItemWorkspacesGetResponse) GetFieldDeserializers()(map[string]func(i878 return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateItemWorkspacesGetResponse_WorkspacesGetResponse_includedFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]ItemWorkspacesGetResponse_Workspacesable, len(val)) + res := make([]ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(ItemWorkspacesGetResponse_Workspacesable) + res[i] = v.(ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable) } } m.SetIncluded(res) @@ -525,8 +525,8 @@ func (m *ItemWorkspacesGetResponse) GetFieldDeserializers()(map[string]func(i878 return res } // GetIncluded gets the included property value. The included property -// returns a []ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemWorkspacesGetResponse) GetIncluded()([]ItemWorkspacesGetResponse_Workspacesable) { +// returns a []ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable when successful +func (m *ItemWorkspacesGetResponse) GetIncluded()([]ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable) { return m.included } // GetLinks gets the links property value. The links property @@ -590,11 +590,11 @@ func (m *ItemWorkspacesGetResponse) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemWorkspacesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { +func (m *ItemWorkspacesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *ItemWorkspacesGetResponse) SetIncluded(value []ItemWorkspacesGetResponse_Workspacesable)() { +func (m *ItemWorkspacesGetResponse) SetIncluded(value []ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -608,12 +608,12 @@ func (m *ItemWorkspacesGetResponse) SetMeta(value ItemWorkspacesGetResponse_meta type ItemWorkspacesGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) - GetIncluded()([]ItemWorkspacesGetResponse_Workspacesable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + GetIncluded()([]ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemWorkspacesGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() - SetIncluded(value []ItemWorkspacesGetResponse_Workspacesable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() + SetIncluded(value []ItemWorkspacesGetResponse_WorkspacesGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemWorkspacesGetResponse_metaable)() } diff --git a/v2/api/organizations/item_workspaces_request_builder.go b/v2/api/organizations/item_workspaces_request_builder.go index 521dcb9a2..d1e6db37c 100644 --- a/v2/api/organizations/item_workspaces_request_builder.go +++ b/v2/api/organizations/item_workspaces_request_builder.go @@ -28,7 +28,7 @@ type ItemWorkspacesRequestBuilderGetQueryParameters struct { FiltertagUnion *bool "uriparametername:\"filter%5Btag%2Dunion%5D\"" // Treat omitted filter[tagged][value] fields as NULL for effective tag bindings. FiltertagValueDefaultNull *bool "uriparametername:\"filter%5Btag%2Dvalue%2Ddefault%2Dnull%5D\"" - // Comma-separated list of relationship names to side-load. + // Optionally side-load the specified relationships. Include []ib221dccd3c79fe396924505f7690d5263c9d3d6438d3a888a0e019c0a8f12f06.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/item_workspaces_with_workspace_escaped_name_item_request_builder.go b/v2/api/organizations/item_workspaces_with_workspace_escaped_name_item_request_builder.go index 074ff20d1..6728dfcc8 100644 --- a/v2/api/organizations/item_workspaces_with_workspace_escaped_name_item_request_builder.go +++ b/v2/api/organizations/item_workspaces_with_workspace_escaped_name_item_request_builder.go @@ -18,7 +18,7 @@ type ItemWorkspacesWithWorkspace_nameItemRequestBuilder struct { type ItemWorkspacesWithWorkspace_nameItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for workspaces resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsworkspaces []string "uriparametername:\"fields%5Bworkspaces%5D\"" - // Optionally side-load relationships. + // Optionally side-load the specified relationships. Include []ia60cd24b348b303e1b7a2d108acb7afd0314eabcdb551a1d763d372fb22b5f05.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property @@ -58,10 +58,10 @@ func (m *ItemWorkspacesWithWorkspace_nameItemRequestBuilder) Delete(ctx context. return nil } // Get get details of a workspace by organization name and workspace name. -// returns a ItemWorkspacesItemWithWorkspace_nameGetResponseable when successful +// returns a WorkspacesEnvelopeable when successful // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *ItemWorkspacesWithWorkspace_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemWorkspacesWithWorkspace_nameItemRequestBuilderGetQueryParameters])(ItemWorkspacesItemWithWorkspace_nameGetResponseable, error) { +func (m *ItemWorkspacesWithWorkspace_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemWorkspacesWithWorkspace_nameItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -70,14 +70,14 @@ func (m *ItemWorkspacesWithWorkspace_nameItemRequestBuilder) Get(ctx context.Con "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWorkspacesItemWithWorkspace_nameGetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspacesEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWorkspacesItemWithWorkspace_nameGetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelopeable), nil } // Patch update settings of an existing workspace by organization name and workspace name. // returns a WorkspacesEnvelopeable when successful diff --git a/v2/api/organizations/organizations_get_response.go b/v2/api/organizations/organizations_get_response.go index 83044fd46..5684fe078 100644 --- a/v2/api/organizations/organizations_get_response.go +++ b/v2/api/organizations/organizations_get_response.go @@ -4,7 +4,6 @@ package organizations import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,151 +12,14 @@ type OrganizationsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable // The included property - included []OrganizationsGetResponse_Organizationsable + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta OrganizationsGetResponse_metaable } -// OrganizationsGetResponse_Organizations composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable -type OrganizationsGetResponse_Organizations struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable - entitlementSets i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable - onboardingTaskLists i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable - subscriptions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable -} -// NewOrganizationsGetResponse_Organizations instantiates a new OrganizationsGetResponse_Organizations and sets the default values. -func NewOrganizationsGetResponse_Organizations()(*OrganizationsGetResponse_Organizations) { - m := &OrganizationsGetResponse_Organizations{ - } - return m -} -// CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewOrganizationsGetResponse_Organizations() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "entitlement-sets") { - result.SetEntitlementSets(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEntitlementSets()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "onboarding-task-lists") { - result.SetOnboardingTaskLists(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOnboardingTaskLists()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { - result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "subscriptions") { - result.SetSubscriptions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewSubscriptions()) - } - } - } - } - return result, nil -} -// GetEntitlementSets gets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable -// returns a EntitlementSetsable when successful -func (m *OrganizationsGetResponse_Organizations) GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) { - return m.entitlementSets -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *OrganizationsGetResponse_Organizations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetEntitlementSets() != nil { - return m.GetEntitlementSets().GetFieldDeserializers() - } else if m.GetOnboardingTaskLists() != nil { - return m.GetOnboardingTaskLists().GetFieldDeserializers() - } else if m.GetProjects() != nil { - return m.GetProjects().GetFieldDeserializers() - } else if m.GetSubscriptions() != nil { - return m.GetSubscriptions().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) -} -// GetIsComposedType determines if the current object is a wrapper around a composed type -// returns a bool when successful -func (m *OrganizationsGetResponse_Organizations) GetIsComposedType()(bool) { - return true -} -// GetOnboardingTaskLists gets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable -// returns a OnboardingTaskListsable when successful -func (m *OrganizationsGetResponse_Organizations) GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) { - return m.onboardingTaskLists -} -// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -// returns a Projectsable when successful -func (m *OrganizationsGetResponse_Organizations) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { - return m.projects -} -// GetSubscriptions gets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable -// returns a Subscriptionsable when successful -func (m *OrganizationsGetResponse_Organizations) GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { - return m.subscriptions -} -// Serialize serializes information the current object -func (m *OrganizationsGetResponse_Organizations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetEntitlementSets() != nil { - err := writer.WriteObjectValue("", m.GetEntitlementSets()) - if err != nil { - return err - } - } else if m.GetOnboardingTaskLists() != nil { - err := writer.WriteObjectValue("", m.GetOnboardingTaskLists()) - if err != nil { - return err - } - } else if m.GetProjects() != nil { - err := writer.WriteObjectValue("", m.GetProjects()) - if err != nil { - return err - } - } else if m.GetSubscriptions() != nil { - err := writer.WriteObjectValue("", m.GetSubscriptions()) - if err != nil { - return err - } - } - return nil -} -// SetEntitlementSets sets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable -func (m *OrganizationsGetResponse_Organizations) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() { - m.entitlementSets = value -} -// SetOnboardingTaskLists sets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable -func (m *OrganizationsGetResponse_Organizations) SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() { - m.onboardingTaskLists = value -} -// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *OrganizationsGetResponse_Organizations) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { - m.projects = value -} -// SetSubscriptions sets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable -func (m *OrganizationsGetResponse_Organizations) SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() { - m.subscriptions = value -} -type OrganizationsGetResponse_Organizationsable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) - GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) - GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) - SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() - SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() - SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() -} // NewOrganizationsGetResponse instantiates a new OrganizationsGetResponse and sets the default values. func NewOrganizationsGetResponse()(*OrganizationsGetResponse) { m := &OrganizationsGetResponse{ @@ -176,8 +38,8 @@ func (m *OrganizationsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []OrganizationsGetResponse_Organizationsable when successful -func (m *OrganizationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { +// returns a []Organizationsable when successful +func (m *OrganizationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -185,15 +47,15 @@ func (m *OrganizationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a70 func (m *OrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) } } m.SetData(res) @@ -201,15 +63,15 @@ func (m *OrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateOrganizationsGetResponse_OrganizationsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSubscriptionsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]OrganizationsGetResponse_Organizationsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(OrganizationsGetResponse_Organizationsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) } } m.SetIncluded(res) @@ -239,8 +101,8 @@ func (m *OrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a return res } // GetIncluded gets the included property value. The included property -// returns a []OrganizationsGetResponse_Organizationsable when successful -func (m *OrganizationsGetResponse) GetIncluded()([]OrganizationsGetResponse_Organizationsable) { +// returns a []Subscriptionsable when successful +func (m *OrganizationsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { return m.included } // GetLinks gets the links property value. The links property @@ -304,11 +166,11 @@ func (m *OrganizationsGetResponse) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetData sets the data property value. The data property -func (m *OrganizationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { +func (m *OrganizationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *OrganizationsGetResponse) SetIncluded(value []OrganizationsGetResponse_Organizationsable)() { +func (m *OrganizationsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -322,12 +184,12 @@ func (m *OrganizationsGetResponse) SetMeta(value OrganizationsGetResponse_metaab type OrganizationsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) - GetIncluded()([]OrganizationsGetResponse_Organizationsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(OrganizationsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() - SetIncluded(value []OrganizationsGetResponse_Organizationsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value OrganizationsGetResponse_metaable)() } diff --git a/v2/api/organizations/organizations_request_builder.go b/v2/api/organizations/organizations_request_builder.go index 03568e36a..3a7fc2fb6 100644 --- a/v2/api/organizations/organizations_request_builder.go +++ b/v2/api/organizations/organizations_request_builder.go @@ -17,7 +17,7 @@ type OrganizationsRequestBuilder struct { type OrganizationsRequestBuilderGetQueryParameters struct { // Return only the specified fields for organizations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsorganizations []string "uriparametername:\"fields%5Borganizations%5D\"" - // Optionally side-load relationships of the specified name + // Optionally side-load the specified relationships. Include []GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/organizations/with_organization_escaped_name_item_request_builder.go b/v2/api/organizations/with_organization_escaped_name_item_request_builder.go index 6ff0b9788..da14f802e 100644 --- a/v2/api/organizations/with_organization_escaped_name_item_request_builder.go +++ b/v2/api/organizations/with_organization_escaped_name_item_request_builder.go @@ -18,7 +18,7 @@ type WithOrganization_nameItemRequestBuilder struct { type WithOrganization_nameItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for organizations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsorganizations []string "uriparametername:\"fields%5Borganizations%5D\"" - // Optionally side-load relationships of the specified name + // Optionally side-load the specified relationships. Include []ie2df6f8ca632983851e9b70ae51c492c03f10856a92344a23745af367f86e679.GetIncludeQueryParameterType "uriparametername:\"include\"" } // AgentPools the agentPools property @@ -71,9 +71,9 @@ func (m *WithOrganization_nameItemRequestBuilder) FeatureSets()(*ItemFeatureSets return NewItemFeatureSetsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Get get details about an organization. -// returns a ItemWithOrganization_nameGetResponseable when successful +// returns a OrganizationsEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithOrganization_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithOrganization_nameItemRequestBuilderGetQueryParameters])(ItemWithOrganization_nameGetResponseable, error) { +func (m *WithOrganization_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithOrganization_nameItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -81,14 +81,14 @@ func (m *WithOrganization_nameItemRequestBuilder) Get(ctx context.Context, reque errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithOrganization_nameGetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithOrganization_nameGetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelopeable), nil } // GithubAppInstallations the githubAppInstallations property // returns a *ItemGithubAppInstallationsRequestBuilder when successful @@ -165,26 +165,6 @@ func (m *WithOrganization_nameItemRequestBuilder) Projects()(*ItemProjectsReques func (m *WithOrganization_nameItemRequestBuilder) ProviderSets()(*ItemProviderSetsRequestBuilder) { return NewItemProviderSetsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Put update an organization. -// returns a OrganizationsEnvelopeable when successful -// returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithOrganization_nameItemRequestBuilder) Put(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelopeable, error) { - requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationsEnvelopeFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelopeable), nil -} // RecoverableItems the recoverableItems property // returns a *ItemRecoverableItemsRequestBuilder when successful func (m *WithOrganization_nameItemRequestBuilder) RecoverableItems()(*ItemRecoverableItemsRequestBuilder) { @@ -278,18 +258,6 @@ func (m *WithOrganization_nameItemRequestBuilder) ToPatchRequestInformation(ctx } return requestInfo, nil } -// ToPutRequestInformation update an organization. -// returns a *RequestInformation when successful -func (m *WithOrganization_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) - requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/vnd.api+json", body) - if err != nil { - return nil, err - } - return requestInfo, nil -} // Varsets the varsets property // returns a *ItemVarsetsRequestBuilder when successful func (m *WithOrganization_nameItemRequestBuilder) Varsets()(*ItemVarsetsRequestBuilder) { diff --git a/v2/api/policysets/item/get_include_query_parameter_type.go b/v2/api/policysets/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..6c27c0535 --- /dev/null +++ b/v2/api/policysets/item/get_include_query_parameter_type.go @@ -0,0 +1,57 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + POLICIES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + CURRENTVERSION_GETINCLUDEQUERYPARAMETERTYPE + NEWESTVERSION_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACEEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + PROJECTEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + STACKS_GETINCLUDEQUERYPARAMETERTYPE + STACKEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"policies", "workspaces", "projects", "current-version", "newest-version", "workspace-exclusions", "project-exclusions", "stacks", "stack-exclusions"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := POLICIES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "policies": + result = POLICIES_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "current-version": + result = CURRENTVERSION_GETINCLUDEQUERYPARAMETERTYPE + case "newest-version": + result = NEWESTVERSION_GETINCLUDEQUERYPARAMETERTYPE + case "workspace-exclusions": + result = WORKSPACEEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "project-exclusions": + result = PROJECTEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "stacks": + result = STACKS_GETINCLUDEQUERYPARAMETERTYPE + case "stack-exclusions": + result = STACKEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/policysets/with_policy_escaped_set_escaped_item_request_builder.go b/v2/api/policysets/with_policy_escaped_set_escaped_item_request_builder.go index 0431b4f8a..301a12be3 100644 --- a/v2/api/policysets/with_policy_escaped_set_escaped_item_request_builder.go +++ b/v2/api/policysets/with_policy_escaped_set_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ib4032290f0e3b2e810de95e092424c16936fad4fe1b1b4fe84f7b7ac59592fb4 "github.com/hashicorp/go-tfe/v2/api/policysets/item" ) // WithPolicy_set_ItemRequestBuilder builds and executes requests for operations under \policy-sets\{policy_set_id} @@ -17,11 +18,13 @@ type WithPolicy_set_ItemRequestBuilder struct { type WithPolicy_set_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for policy-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldspolicySets []string "uriparametername:\"fields%5Bpolicy%2Dsets%5D\"" + // Optionally side-load the specified relationships. + Include []ib4032290f0e3b2e810de95e092424c16936fad4fe1b1b4fe84f7b7ac59592fb4.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithPolicy_set_ItemRequestBuilderInternal instantiates a new WithPolicy_set_ItemRequestBuilder and sets the default values. func NewWithPolicy_set_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithPolicy_set_ItemRequestBuilder) { m := &WithPolicy_set_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-sets/{policy_set_id}{?fields%5Bpolicy%2Dsets%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-sets/{policy_set_id}{?fields%5Bpolicy%2Dsets%5D,include}", pathParameters), } return m } diff --git a/v2/api/projects/item_provider_sets_get_response.go b/v2/api/projects/item_provider_sets_get_response.go index 9ed2544c5..8da7e664b 100644 --- a/v2/api/projects/item_provider_sets_get_response.go +++ b/v2/api/projects/item_provider_sets_get_response.go @@ -12,7 +12,7 @@ type ItemProviderSetsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemProviderSetsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ItemProviderSetsGetResponse_ProviderSetsable when successful -func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) { +// returns a []ProviderSetsable when successful +func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7 func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemProviderSetsGetResponse) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() { +func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemProviderSetsGetResponse) SetMeta(value ItemProviderSetsGetResponse_ type ItemProviderSetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemProviderSetsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemProviderSetsGetResponse_metaable)() } diff --git a/v2/api/providersets/with_provider_escaped_set_escaped_item_request_builder.go b/v2/api/providersets/with_provider_escaped_set_escaped_item_request_builder.go index a0adde4ab..ead3cfb89 100644 --- a/v2/api/providersets/with_provider_escaped_set_escaped_item_request_builder.go +++ b/v2/api/providersets/with_provider_escaped_set_escaped_item_request_builder.go @@ -18,7 +18,7 @@ type WithProvider_set_ItemRequestBuilder struct { type WithProvider_set_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsproviderSets []string "uriparametername:\"fields%5Bprovider%2Dsets%5D\"" - // Comma-separated list of related resources to include. + // Optionally side-load the specified relationships. Include []i5c8ba1c3eef4913cb538ecee85883454e5b337265617e2a1235fce55b26b1be5.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithProvider_set_ItemRequestBuilderInternal instantiates a new WithProvider_set_ItemRequestBuilder and sets the default values. @@ -51,9 +51,9 @@ func (m *WithProvider_set_ItemRequestBuilder) Delete(ctx context.Context, reques return nil } // Get fetch details about the specified provider set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. -// returns a ItemWithProvider_set_GetResponseable when successful +// returns a ProviderSetsEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithProvider_set_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithProvider_set_ItemRequestBuilderGetQueryParameters])(ItemWithProvider_set_GetResponseable, error) { +func (m *WithProvider_set_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithProvider_set_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -61,14 +61,14 @@ func (m *WithProvider_set_ItemRequestBuilder) Get(ctx context.Context, requestCo errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithProvider_set_GetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithProvider_set_GetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable), nil } // Patch update attributes of an existing provider set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. // returns a ProviderSetsEnvelopeable when successful diff --git a/v2/api/queries/with_query_escaped_item_request_builder.go b/v2/api/queries/with_query_escaped_item_request_builder.go index f0d7cc54a..f58fdf85d 100644 --- a/v2/api/queries/with_query_escaped_item_request_builder.go +++ b/v2/api/queries/with_query_escaped_item_request_builder.go @@ -37,9 +37,9 @@ func NewWithQuery_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7dae return NewWithQuery_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details of a specific query. -// returns a ItemWithQuery_GetResponseable when successful +// returns a QueriesEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithQuery_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithQuery_ItemRequestBuilderGetQueryParameters])(ItemWithQuery_GetResponseable, error) { +func (m *WithQuery_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithQuery_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.QueriesEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -47,14 +47,14 @@ func (m *WithQuery_ItemRequestBuilder) Get(ctx context.Context, requestConfigura errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithQuery_GetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateQueriesEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithQuery_GetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.QueriesEnvelopeable), nil } // ToGetRequestInformation get details of a specific query. // returns a *RequestInformation when successful diff --git a/v2/api/runs/get_include_query_parameter_type.go b/v2/api/runs/get_include_query_parameter_type.go new file mode 100644 index 000000000..15445adef --- /dev/null +++ b/v2/api/runs/get_include_query_parameter_type.go @@ -0,0 +1,57 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package runs +type GetIncludeQueryParameterType int + +const ( + PLAN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + APPLY_GETINCLUDEQUERYPARAMETERTYPE + CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + COST_ESTIMATE_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + TASK_STAGES_GETINCLUDEQUERYPARAMETERTYPE + TF_POLICY_EVALUATIONS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"plan", "apply", "created_by", "configuration_version", "configuration_version.ingress_attributes", "cost_estimate", "workspace", "task_stages", "tf_policy_evaluations"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := PLAN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "plan": + result = PLAN_GETINCLUDEQUERYPARAMETERTYPE + case "apply": + result = APPLY_GETINCLUDEQUERYPARAMETERTYPE + case "created_by": + result = CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + case "configuration_version": + result = CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "configuration_version.ingress_attributes": + result = CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + case "cost_estimate": + result = COST_ESTIMATE_GETINCLUDEQUERYPARAMETERTYPE + case "workspace": + result = WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + case "task_stages": + result = TASK_STAGES_GETINCLUDEQUERYPARAMETERTYPE + case "tf_policy_evaluations": + result = TF_POLICY_EVALUATIONS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/runs/item_request_builder.go b/v2/api/runs/item_request_builder.go index 271170046..181ac109f 100644 --- a/v2/api/runs/item_request_builder.go +++ b/v2/api/runs/item_request_builder.go @@ -18,7 +18,7 @@ type ItemRequestBuilder struct { type ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for runs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsruns []string "uriparametername:\"fields%5Bruns%5D\"" - // Available side-load related resources. Multiple values can be comma-separated.Available includes:- `plan` - The plan for this run- `apply` - The apply for this run- `created_by` - The user who created this run- `configuration_version` - The configuration version used- `configuration_version.ingress_attributes` - VCS ingress details- `cost_estimate` - Cost estimation for this run- `workspace` - The workspace this run belongs to- `task_stages` - Run task stages- `tf_policy_evaluations` - Terraform Policy evaluations *(public-beta)* + // Optionally side-load the specified relationships. Include []icc0ca48df140a853150a5d96ec2689643da46b686f730d4d65f29d007e31ed03.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property diff --git a/v2/api/runs/item_tf_policy_evaluations_get_response.go b/v2/api/runs/item_tf_policy_evaluations_get_response.go index 588df8740..682c8c226 100644 --- a/v2/api/runs/item_tf_policy_evaluations_get_response.go +++ b/v2/api/runs/item_tf_policy_evaluations_get_response.go @@ -12,7 +12,7 @@ type ItemTfPolicyEvaluationsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemTfPolicyEvaluationsGetResponse) GetAdditionalData()(map[string]any) return m.additionalData } // GetData gets the data property value. The data property -// returns a []TfPolicyEvaluationable when successful -func (m *ItemTfPolicyEvaluationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable) { +// returns a []TfPolicyEvaluationsable when successful +func (m *ItemTfPolicyEvaluationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemTfPolicyEvaluationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df4 func (m *ItemTfPolicyEvaluationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTfPolicyEvaluationFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTfPolicyEvaluationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemTfPolicyEvaluationsGetResponse) SetAdditionalData(value map[string] m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemTfPolicyEvaluationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable)() { +func (m *ItemTfPolicyEvaluationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemTfPolicyEvaluationsGetResponse) SetMeta(value ItemTfPolicyEvaluatio type ItemTfPolicyEvaluationsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemTfPolicyEvaluationsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemTfPolicyEvaluationsGetResponse_metaable)() } diff --git a/v2/api/runs/runs_get_response.go b/v2/api/runs/runs_get_response.go index af606e3b6..815785a07 100644 --- a/v2/api/runs/runs_get_response.go +++ b/v2/api/runs/runs_get_response.go @@ -21,7 +21,7 @@ type RunsGetResponse struct { // The meta property meta RunsGetResponse_metaable } -// RunsGetResponse_RunsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// RunsGetResponse_RunsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable type RunsGetResponse_RunsGetResponse_included struct { // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable @@ -35,12 +35,12 @@ type RunsGetResponse_RunsGetResponse_included struct { plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable taskStages i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable - tfPolicyEvaluation i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable + tfPolicyEvaluations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable } // NewRunsGetResponse_RunsGetResponse_included instantiates a new RunsGetResponse_RunsGetResponse_included and sets the default values. func NewRunsGetResponse_RunsGetResponse_included()(*RunsGetResponse_RunsGetResponse_included) { @@ -76,11 +76,11 @@ func CreateRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue(parseN } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-stages") { result.SetTaskStages(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskStages()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tf-policy-evaluations") { - result.SetTfPolicyEvaluation(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTfPolicyEvaluation()) + result.SetTfPolicyEvaluations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTfPolicyEvaluations()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) } } } @@ -117,8 +117,8 @@ func (m *RunsGetResponse_RunsGetResponse_included) GetFieldDeserializers()(map[s return m.GetPlans().GetFieldDeserializers() } else if m.GetTaskStages() != nil { return m.GetTaskStages().GetFieldDeserializers() - } else if m.GetTfPolicyEvaluation() != nil { - return m.GetTfPolicyEvaluation().GetFieldDeserializers() + } else if m.GetTfPolicyEvaluations() != nil { + return m.GetTfPolicyEvaluations().GetFieldDeserializers() } else if m.GetUsers() != nil { return m.GetUsers().GetFieldDeserializers() } else if m.GetWorkspaces() != nil { @@ -146,19 +146,19 @@ func (m *RunsGetResponse_RunsGetResponse_included) GetPlans()(i05d5aa6b14db285c2 func (m *RunsGetResponse_RunsGetResponse_included) GetTaskStages()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable) { return m.taskStages } -// GetTfPolicyEvaluation gets the tfPolicyEvaluation property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable -// returns a TfPolicyEvaluationable when successful -func (m *RunsGetResponse_RunsGetResponse_included) GetTfPolicyEvaluation()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable) { - return m.tfPolicyEvaluation +// GetTfPolicyEvaluations gets the tfPolicyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable +// returns a TfPolicyEvaluationsable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetTfPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable) { + return m.tfPolicyEvaluations } // GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable // returns a Usersable when successful func (m *RunsGetResponse_RunsGetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { return m.users } -// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -// returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *RunsGetResponse_RunsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *RunsGetResponse_RunsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { return m.workspaces } // Serialize serializes information the current object @@ -193,8 +193,8 @@ func (m *RunsGetResponse_RunsGetResponse_included) Serialize(writer i878a80d2330 if err != nil { return err } - } else if m.GetTfPolicyEvaluation() != nil { - err := writer.WriteObjectValue("", m.GetTfPolicyEvaluation()) + } else if m.GetTfPolicyEvaluations() != nil { + err := writer.WriteObjectValue("", m.GetTfPolicyEvaluations()) if err != nil { return err } @@ -235,16 +235,16 @@ func (m *RunsGetResponse_RunsGetResponse_included) SetPlans(value i05d5aa6b14db2 func (m *RunsGetResponse_RunsGetResponse_included) SetTaskStages(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable)() { m.taskStages = value } -// SetTfPolicyEvaluation sets the tfPolicyEvaluation property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable -func (m *RunsGetResponse_RunsGetResponse_included) SetTfPolicyEvaluation(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable)() { - m.tfPolicyEvaluation = value +// SetTfPolicyEvaluations sets the tfPolicyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable +func (m *RunsGetResponse_RunsGetResponse_included) SetTfPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable)() { + m.tfPolicyEvaluations = value } // SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable func (m *RunsGetResponse_RunsGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { m.users = value } -// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -func (m *RunsGetResponse_RunsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *RunsGetResponse_RunsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { m.workspaces = value } type RunsGetResponse_RunsGetResponse_includedable interface { @@ -255,18 +255,18 @@ type RunsGetResponse_RunsGetResponse_includedable interface { GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) GetTaskStages()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable) - GetTfPolicyEvaluation()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable) + GetTfPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() SetTaskStages(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable)() - SetTfPolicyEvaluation(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationable)() + SetTfPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable)() SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() - SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() } // NewRunsGetResponse instantiates a new RunsGetResponse and sets the default values. func NewRunsGetResponse()(*RunsGetResponse) { diff --git a/v2/api/runs/runs_request_builder.go b/v2/api/runs/runs_request_builder.go index 9e1d0eb86..19a8974ca 100644 --- a/v2/api/runs/runs_request_builder.go +++ b/v2/api/runs/runs_request_builder.go @@ -21,6 +21,8 @@ type RunsRequestBuilderGetQueryParameters struct { Filteroperation *string "uriparametername:\"filter%5Boperation%5D\"" // Filter by run status. Filterstatus *string "uriparametername:\"filter%5Bstatus%5D\"" + // Optionally side-load the specified relationships. + Include []GetIncludeQueryParameterType "uriparametername:\"include\"" // Organization Name Organization_name *string "uriparametername:\"organization_name\"" // The page number to retrieve. @@ -45,7 +47,7 @@ func (m *RunsRequestBuilder) ById(id string)(*ItemRequestBuilder) { // NewRunsRequestBuilderInternal instantiates a new RunsRequestBuilder and sets the default values. func NewRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RunsRequestBuilder) { m := &RunsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/runs?organization_name={organization_name}&workspace_id={workspace_id}{&fields%5Bruns%5D,filter%5Boperation%5D*,filter%5Bstatus%5D*,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/runs?organization_name={organization_name}&workspace_id={workspace_id}{&fields%5Bruns%5D,filter%5Boperation%5D*,filter%5Bstatus%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/stackconfigurations/item_stack_deployment_groups_request_builder.go b/v2/api/stackconfigurations/item_stack_deployment_groups_request_builder.go index d5aecaaa5..5e3323adc 100644 --- a/v2/api/stackconfigurations/item_stack_deployment_groups_request_builder.go +++ b/v2/api/stackconfigurations/item_stack_deployment_groups_request_builder.go @@ -20,7 +20,7 @@ type ItemStackDeploymentGroupsRequestBuilderGetQueryParameters struct { FieldsstackDeploymentGroups []string "uriparametername:\"fields%5Bstack%2Ddeployment%2Dgroups%5D\"" // Filter by deployment group status. Accepts a comma-separated list of statuses: pending, pre-deploying, deploying, succeeded, failed, abandoned. Filterstatus *string "uriparametername:\"filter%5Bstatus%5D\"" - // Optionally side-load relationships. Accepts a comma-separated list of the enumerated values. + // Optionally side-load the specified relationships. Include []iee3c498b349041bd4f26762e50da64ff08201e91815126a54739635e15678a76.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/stackconfigurations/with_stack_escaped_configuration_escaped_item_request_builder.go b/v2/api/stackconfigurations/with_stack_escaped_configuration_escaped_item_request_builder.go index 91d455181..82c2e90a1 100644 --- a/v2/api/stackconfigurations/with_stack_escaped_configuration_escaped_item_request_builder.go +++ b/v2/api/stackconfigurations/with_stack_escaped_configuration_escaped_item_request_builder.go @@ -18,7 +18,7 @@ type WithStack_configuration_ItemRequestBuilder struct { type WithStack_configuration_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-configurations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackConfigurations []string "uriparametername:\"fields%5Bstack%2Dconfigurations%5D\"" - // Optionally side-load relationships. Accepts a comma-separated list of the enumerated values. + // Optionally side-load the specified relationships. Include []i5c4f6483e4ec9e17a26ac535cbfaebd36b3d473576eaa39fff9a542842e0e855.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithStack_configuration_ItemRequestBuilderInternal instantiates a new WithStack_configuration_ItemRequestBuilder and sets the default values. @@ -35,9 +35,9 @@ func NewWithStack_configuration_ItemRequestBuilder(rawUrl string, requestAdapter return NewWithStack_configuration_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a stack configuration -// returns a ItemWithStack_configuration_GetResponseable when successful +// returns a StackConfigurationsEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithStack_configuration_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithStack_configuration_ItemRequestBuilderGetQueryParameters])(ItemWithStack_configuration_GetResponseable, error) { +func (m *WithStack_configuration_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithStack_configuration_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -45,14 +45,14 @@ func (m *WithStack_configuration_ItemRequestBuilder) Get(ctx context.Context, re errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithStack_configuration_GetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackConfigurationsEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithStack_configuration_GetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelopeable), nil } // StackDeploymentGroups the stackDeploymentGroups property // returns a *ItemStackDeploymentGroupsRequestBuilder when successful diff --git a/v2/api/stackdeploymentgroups/with_stack_escaped_deployment_escaped_group_escaped_item_request_builder.go b/v2/api/stackdeploymentgroups/with_stack_escaped_deployment_escaped_group_escaped_item_request_builder.go index 771218923..3764c0cef 100644 --- a/v2/api/stackdeploymentgroups/with_stack_escaped_deployment_escaped_group_escaped_item_request_builder.go +++ b/v2/api/stackdeploymentgroups/with_stack_escaped_deployment_escaped_group_escaped_item_request_builder.go @@ -18,7 +18,7 @@ type WithStack_deployment_group_ItemRequestBuilder struct { type WithStack_deployment_group_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-deployment-groups resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackDeploymentGroups []string "uriparametername:\"fields%5Bstack%2Ddeployment%2Dgroups%5D\"" - // Optionally side-load relationships. Accepts a comma-separated list of the enumerated values. + // Optionally side-load the specified relationships. Include []i168e8b5818149f916e1d4279c1f66330e436d123653daacab7ce187ca22b329b.GetIncludeQueryParameterType "uriparametername:\"include\"" } // ApproveAllPlans the approveAllPlans property @@ -40,9 +40,9 @@ func NewWithStack_deployment_group_ItemRequestBuilder(rawUrl string, requestAdap return NewWithStack_deployment_group_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a stack deployment group. -// returns a ItemWithStack_deployment_group_GetResponseable when successful +// returns a StackDeploymentGroupsEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithStack_deployment_group_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithStack_deployment_group_ItemRequestBuilderGetQueryParameters])(ItemWithStack_deployment_group_GetResponseable, error) { +func (m *WithStack_deployment_group_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithStack_deployment_group_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -50,14 +50,14 @@ func (m *WithStack_deployment_group_ItemRequestBuilder) Get(ctx context.Context, errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithStack_deployment_group_GetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackDeploymentGroupsEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithStack_deployment_group_GetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsEnvelopeable), nil } // Rerun the rerun property // returns a *ItemRerunRequestBuilder when successful diff --git a/v2/api/stacks/item_stack_configurations_get_response.go b/v2/api/stacks/item_stack_configurations_get_response.go index 8329d3ba5..10e114c4c 100644 --- a/v2/api/stacks/item_stack_configurations_get_response.go +++ b/v2/api/stacks/item_stack_configurations_get_response.go @@ -13,35 +13,31 @@ type ItemStackConfigurationsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable // The included property - included []ItemStackConfigurationsGetResponse_StackConfigurationsable + included []ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemStackConfigurationsGetResponse_metaable } -// ItemStackConfigurationsGetResponse_StackConfigurations composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable -type ItemStackConfigurationsGetResponse_StackConfigurations struct { +// ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable +type ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included struct { // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable - stackAggregateOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable stackConfigurationSummaries i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable - stackDiagnostics i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable } -// NewItemStackConfigurationsGetResponse_StackConfigurations instantiates a new ItemStackConfigurationsGetResponse_StackConfigurations and sets the default values. -func NewItemStackConfigurationsGetResponse_StackConfigurations()(*ItemStackConfigurationsGetResponse_StackConfigurations) { - m := &ItemStackConfigurationsGetResponse_StackConfigurations{ +// NewItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included instantiates a new ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included and sets the default values. +func NewItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included()(*ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included) { + m := &ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included{ } return m } -// CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemStackConfigurationsGetResponse_StackConfigurations() +func CreateItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included() if parseNode != nil { mappingValueNode, err := parseNode.GetChildNode("type") if err != nil { @@ -55,12 +51,8 @@ func CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminat if mappingValue != nil { if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-aggregate-outputs") { - result.SetStackAggregateOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackAggregateOutputs()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configuration-summaries") { result.SetStackConfigurationSummaries(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurationSummaries()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-diagnostics") { - result.SetStackDiagnostics(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDiagnostics()) } } } @@ -69,94 +61,58 @@ func CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminat } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { if m.GetIngressAttributes() != nil { return m.GetIngressAttributes().GetFieldDeserializers() - } else if m.GetStackAggregateOutputs() != nil { - return m.GetStackAggregateOutputs().GetFieldDeserializers() } else if m.GetStackConfigurationSummaries() != nil { return m.GetStackConfigurationSummaries().GetFieldDeserializers() - } else if m.GetStackDiagnostics() != nil { - return m.GetStackDiagnostics().GetFieldDeserializers() } return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } // GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable // returns a IngressAttributesable when successful -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { +func (m *ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { return m.ingressAttributes } // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetIsComposedType()(bool) { +func (m *ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included) GetIsComposedType()(bool) { return true } -// GetStackAggregateOutputs gets the stackAggregateOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable -// returns a StackAggregateOutputsable when successful -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetStackAggregateOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) { - return m.stackAggregateOutputs -} // GetStackConfigurationSummaries gets the stackConfigurationSummaries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable // returns a StackConfigurationSummariesable when successful -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetStackConfigurationSummaries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) { +func (m *ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included) GetStackConfigurationSummaries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) { return m.stackConfigurationSummaries } -// GetStackDiagnostics gets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable -// returns a StackDiagnosticsable when successful -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) { - return m.stackDiagnostics -} // Serialize serializes information the current object -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetIngressAttributes() != nil { err := writer.WriteObjectValue("", m.GetIngressAttributes()) if err != nil { return err } - } else if m.GetStackAggregateOutputs() != nil { - err := writer.WriteObjectValue("", m.GetStackAggregateOutputs()) - if err != nil { - return err - } } else if m.GetStackConfigurationSummaries() != nil { err := writer.WriteObjectValue("", m.GetStackConfigurationSummaries()) if err != nil { return err } - } else if m.GetStackDiagnostics() != nil { - err := writer.WriteObjectValue("", m.GetStackDiagnostics()) - if err != nil { - return err - } } return nil } // SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { +func (m *ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { m.ingressAttributes = value } -// SetStackAggregateOutputs sets the stackAggregateOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable)() { - m.stackAggregateOutputs = value -} // SetStackConfigurationSummaries sets the stackConfigurationSummaries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() { +func (m *ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_included) SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() { m.stackConfigurationSummaries = value } -// SetStackDiagnostics sets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable -func (m *ItemStackConfigurationsGetResponse_StackConfigurations) SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() { - m.stackDiagnostics = value -} -type ItemStackConfigurationsGetResponse_StackConfigurationsable interface { +type ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) - GetStackAggregateOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) GetStackConfigurationSummaries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) - GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() - SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable)() SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() - SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() } // NewItemStackConfigurationsGetResponse instantiates a new ItemStackConfigurationsGetResponse and sets the default values. func NewItemStackConfigurationsGetResponse()(*ItemStackConfigurationsGetResponse) { @@ -176,8 +132,8 @@ func (m *ItemStackConfigurationsGetResponse) GetAdditionalData()(map[string]any) return m.additionalData } // GetData gets the data property value. The data property -// returns a []ItemStackConfigurationsGetResponse_StackConfigurationsable when successful -func (m *ItemStackConfigurationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) { +// returns a []StackConfigurationsable when successful +func (m *ItemStackConfigurationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -185,15 +141,15 @@ func (m *ItemStackConfigurationsGetResponse) GetData()([]i05d5aa6b14db285c2e8df4 func (m *ItemStackConfigurationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackConfigurationsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) } } m.SetData(res) @@ -201,15 +157,15 @@ func (m *ItemStackConfigurationsGetResponse) GetFieldDeserializers()(map[string] return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemStackConfigurationsGetResponse_StackConfigurationsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]ItemStackConfigurationsGetResponse_StackConfigurationsable, len(val)) + res := make([]ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(ItemStackConfigurationsGetResponse_StackConfigurationsable) + res[i] = v.(ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedable) } } m.SetIncluded(res) @@ -239,8 +195,8 @@ func (m *ItemStackConfigurationsGetResponse) GetFieldDeserializers()(map[string] return res } // GetIncluded gets the included property value. The included property -// returns a []ItemStackConfigurationsGetResponse_StackConfigurationsable when successful -func (m *ItemStackConfigurationsGetResponse) GetIncluded()([]ItemStackConfigurationsGetResponse_StackConfigurationsable) { +// returns a []ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedable when successful +func (m *ItemStackConfigurationsGetResponse) GetIncluded()([]ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedable) { return m.included } // GetLinks gets the links property value. The links property @@ -304,11 +260,11 @@ func (m *ItemStackConfigurationsGetResponse) SetAdditionalData(value map[string] m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemStackConfigurationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable)() { +func (m *ItemStackConfigurationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() { m.data = value } // SetIncluded sets the included property value. The included property -func (m *ItemStackConfigurationsGetResponse) SetIncluded(value []ItemStackConfigurationsGetResponse_StackConfigurationsable)() { +func (m *ItemStackConfigurationsGetResponse) SetIncluded(value []ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -322,12 +278,12 @@ func (m *ItemStackConfigurationsGetResponse) SetMeta(value ItemStackConfiguratio type ItemStackConfigurationsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable) - GetIncluded()([]ItemStackConfigurationsGetResponse_StackConfigurationsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + GetIncluded()([]ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStackConfigurationsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemStackConfigurationsGetResponse_StackConfigurationsable)() - SetIncluded(value []ItemStackConfigurationsGetResponse_StackConfigurationsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() + SetIncluded(value []ItemStackConfigurationsGetResponse_StackConfigurationsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStackConfigurationsGetResponse_metaable)() } diff --git a/v2/api/stacks/item_stack_configurations_request_builder.go b/v2/api/stacks/item_stack_configurations_request_builder.go index 7db1f9a3b..91463ea25 100644 --- a/v2/api/stacks/item_stack_configurations_request_builder.go +++ b/v2/api/stacks/item_stack_configurations_request_builder.go @@ -18,7 +18,7 @@ type ItemStackConfigurationsRequestBuilder struct { type ItemStackConfigurationsRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-configurations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackConfigurations []string "uriparametername:\"fields%5Bstack%2Dconfigurations%5D\"" - // Optionally side-load relationships. Accepts a comma-separated list of the enumerated values. + // Optionally side-load the specified relationships. Include []i7d313464c19387042159ed878778983443002789ff55ded1d0066f956b25c5bf.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" diff --git a/v2/api/stacks/item_stack_output_consumers_downstream_request_builder.go b/v2/api/stacks/item_stack_output_consumers_downstream_request_builder.go index 1139bdabf..10d03685f 100644 --- a/v2/api/stacks/item_stack_output_consumers_downstream_request_builder.go +++ b/v2/api/stacks/item_stack_output_consumers_downstream_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemStackOutputConsumersDownstreamRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemStackOutputConsumersDownstreamRequestBuilderGetQueryParameters list output consumers for a stack(upstream or downstream). +// ItemStackOutputConsumersDownstreamRequestBuilderGetQueryParameters list downstream output consumers for a stack. type ItemStackOutputConsumersDownstreamRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-output-consumers resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackOutputConsumers []string "uriparametername:\"fields%5Bstack%2Doutput%2Dconsumers%5D\"" @@ -40,7 +40,7 @@ func NewItemStackOutputConsumersDownstreamRequestBuilder(rawUrl string, requestA urlParams["request-raw-url"] = rawUrl return NewItemStackOutputConsumersDownstreamRequestBuilderInternal(urlParams, requestAdapter) } -// Get list output consumers for a stack(upstream or downstream). +// Get list downstream output consumers for a stack. // returns a ItemStackOutputConsumersDownstreamGetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code func (m *ItemStackOutputConsumersDownstreamRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemStackOutputConsumersDownstreamRequestBuilderGetQueryParameters])(ItemStackOutputConsumersDownstreamGetResponseable, error) { @@ -60,7 +60,7 @@ func (m *ItemStackOutputConsumersDownstreamRequestBuilder) Get(ctx context.Conte } return res.(ItemStackOutputConsumersDownstreamGetResponseable), nil } -// ToGetRequestInformation list output consumers for a stack(upstream or downstream). +// ToGetRequestInformation list downstream output consumers for a stack. // returns a *RequestInformation when successful func (m *ItemStackOutputConsumersDownstreamRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemStackOutputConsumersDownstreamRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/v2/api/stacks/item_stack_output_consumers_upstream_request_builder.go b/v2/api/stacks/item_stack_output_consumers_upstream_request_builder.go index 45b9958e6..373ab6ff8 100644 --- a/v2/api/stacks/item_stack_output_consumers_upstream_request_builder.go +++ b/v2/api/stacks/item_stack_output_consumers_upstream_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemStackOutputConsumersUpstreamRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemStackOutputConsumersUpstreamRequestBuilderGetQueryParameters list output consumers for a stack(upstream or downstream). +// ItemStackOutputConsumersUpstreamRequestBuilderGetQueryParameters list upstream output consumers for a stack. type ItemStackOutputConsumersUpstreamRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-output-consumers resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackOutputConsumers []string "uriparametername:\"fields%5Bstack%2Doutput%2Dconsumers%5D\"" @@ -40,7 +40,7 @@ func NewItemStackOutputConsumersUpstreamRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewItemStackOutputConsumersUpstreamRequestBuilderInternal(urlParams, requestAdapter) } -// Get list output consumers for a stack(upstream or downstream). +// Get list upstream output consumers for a stack. // returns a ItemStackOutputConsumersUpstreamGetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code func (m *ItemStackOutputConsumersUpstreamRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemStackOutputConsumersUpstreamRequestBuilderGetQueryParameters])(ItemStackOutputConsumersUpstreamGetResponseable, error) { @@ -60,7 +60,7 @@ func (m *ItemStackOutputConsumersUpstreamRequestBuilder) Get(ctx context.Context } return res.(ItemStackOutputConsumersUpstreamGetResponseable), nil } -// ToGetRequestInformation list output consumers for a stack(upstream or downstream). +// ToGetRequestInformation list upstream output consumers for a stack. // returns a *RequestInformation when successful func (m *ItemStackOutputConsumersUpstreamRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemStackOutputConsumersUpstreamRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/v2/api/taskconfigs/with_external_escaped_item_request_builder.go b/v2/api/taskconfigs/with_external_escaped_item_request_builder.go index 8f841b1e7..d1bcc9b55 100644 --- a/v2/api/taskconfigs/with_external_escaped_item_request_builder.go +++ b/v2/api/taskconfigs/with_external_escaped_item_request_builder.go @@ -18,7 +18,7 @@ type WithExternal_ItemRequestBuilder struct { type WithExternal_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for task-configs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldstaskConfigs []string "uriparametername:\"fields%5Btask%2Dconfigs%5D\"" - // Allows including related resource data. Value must be a comma-separated list containing one or more of `projects`, `task`, `owner`, or `organization`. + // Optionally side-load the specified relationships. Include []i42462dc6584d5465d4564f70e24254d294ef50e2cbf66cf71340733a7ea71be0.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithExternal_ItemRequestBuilderInternal instantiates a new WithExternal_ItemRequestBuilder and sets the default values. @@ -35,9 +35,9 @@ func NewWithExternal_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7 return NewWithExternal_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a task configuration. -// returns a ItemWithExternal_GetResponseable when successful +// returns a TaskConfigsEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithExternal_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithExternal_ItemRequestBuilderGetQueryParameters])(ItemWithExternal_GetResponseable, error) { +func (m *WithExternal_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithExternal_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -45,14 +45,14 @@ func (m *WithExternal_ItemRequestBuilder) Get(ctx context.Context, requestConfig errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithExternal_GetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTaskConfigsEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithExternal_GetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelopeable), nil } // Patch update a task configuration. // returns a TaskConfigsEnvelopeable when successful diff --git a/v2/api/tasks/tasks_item_request_builder.go b/v2/api/tasks/tasks_item_request_builder.go index da81a7005..b64fd875b 100644 --- a/v2/api/tasks/tasks_item_request_builder.go +++ b/v2/api/tasks/tasks_item_request_builder.go @@ -18,7 +18,7 @@ type TasksItemRequestBuilder struct { type TasksItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for tasks resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldstasks []string "uriparametername:\"fields%5Btasks%5D\"" - // Allows including related resource data. + // Optionally side-load the specified relationships. Include []iaad17ee58633d1bcb69c36c294867edc7605bc892a131b243a6107cfc310349e.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewTasksItemRequestBuilderInternal instantiates a new TasksItemRequestBuilder and sets the default values. @@ -51,9 +51,9 @@ func (m *TasksItemRequestBuilder) Delete(ctx context.Context, requestConfigurati return nil } // Get get details about a run task. -// returns a ItemTasksGetResponseable when successful +// returns a TasksEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *TasksItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TasksItemRequestBuilderGetQueryParameters])(ItemTasksGetResponseable, error) { +func (m *TasksItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TasksItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -61,14 +61,14 @@ func (m *TasksItemRequestBuilder) Get(ctx context.Context, requestConfiguration errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemTasksGetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTasksEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemTasksGetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelopeable), nil } // Patch update a run task. // returns a TasksEnvelopeable when successful diff --git a/v2/api/taskstages/with_task_escaped_stage_escaped_item_request_builder.go b/v2/api/taskstages/with_task_escaped_stage_escaped_item_request_builder.go index 90b535652..6b61cfa92 100644 --- a/v2/api/taskstages/with_task_escaped_stage_escaped_item_request_builder.go +++ b/v2/api/taskstages/with_task_escaped_stage_escaped_item_request_builder.go @@ -18,7 +18,7 @@ type WithTask_stage_ItemRequestBuilder struct { type WithTask_stage_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for task-stages resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldstaskStages []string "uriparametername:\"fields%5Btask%2Dstages%5D\"" - // A comma-separated list of related resources to include. + // Optionally side-load the specified relationships. Include []i283000583e96756a18675aaa45aa11e952f0b89c4a527082daf59c813896d028.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property @@ -40,9 +40,9 @@ func NewWithTask_stage_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187 return NewWithTask_stage_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a specific run task stage. -// returns a ItemWithTask_stage_GetResponseable when successful +// returns a TaskStagesEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithTask_stage_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithTask_stage_ItemRequestBuilderGetQueryParameters])(ItemWithTask_stage_GetResponseable, error) { +func (m *WithTask_stage_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithTask_stage_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -50,14 +50,14 @@ func (m *WithTask_stage_ItemRequestBuilder) Get(ctx context.Context, requestConf errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithTask_stage_GetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTaskStagesEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithTask_stage_GetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelopeable), nil } // PolicyEvaluations the policyEvaluations property // returns a *ItemPolicyEvaluationsRequestBuilder when successful diff --git a/v2/api/teams/item_get_response.go b/v2/api/teams/item_get_response.go index bd5c04f6a..c26a8f887 100644 --- a/v2/api/teams/item_get_response.go +++ b/v2/api/teams/item_get_response.go @@ -4,167 +4,182 @@ package teams import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemGetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamsEnvelope - // The included property - included []ItemGetResponse_GetResponse_includedable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamsEnvelope + // The included property + included []ItemGetResponse_GetResponse_includedable } + // ItemGetResponse_GetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable type ItemGetResponse_GetResponse_included struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable - organizationMemberships i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable - users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable + organizationMemberships i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable } + // NewItemGetResponse_GetResponse_included instantiates a new ItemGetResponse_GetResponse_included and sets the default values. -func NewItemGetResponse_GetResponse_included()(*ItemGetResponse_GetResponse_included) { - m := &ItemGetResponse_GetResponse_included{ - } - return m +func NewItemGetResponse_GetResponse_included() *ItemGetResponse_GetResponse_included { + m := &ItemGetResponse_GetResponse_included{} + return m } + // CreateItemGetResponse_GetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemGetResponse_GetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemGetResponse_GetResponse_included() - if parseNode != nil { - if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationMembershipsFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable); ok { - result.SetOrganizationMemberships(cast) - } - } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateUsersFromDiscriminatorValue); val != nil { - if err != nil { - return nil, err - } - if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable); ok { - result.SetUsers(cast) - } - } - } - return result, nil +func CreateItemGetResponse_GetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemGetResponse_GetResponse_included() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateOrganizationMembershipsFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable); ok { + result.SetOrganizationMemberships(cast) + } + } else if val, err := parseNode.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateUsersFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable); ok { + result.SetUsers(cast) + } + } + } + return result, nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemGetResponse_GetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemGetResponse_GetResponse_included) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemGetResponse_GetResponse_included) GetIsComposedType()(bool) { - return true +func (m *ItemGetResponse_GetResponse_included) GetIsComposedType() bool { + return true } + // GetOrganizationMemberships gets the organizationMemberships property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable // returns a OrganizationMembershipsable when successful -func (m *ItemGetResponse_GetResponse_included) GetOrganizationMemberships()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable) { - return m.organizationMemberships +func (m *ItemGetResponse_GetResponse_included) GetOrganizationMemberships() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable { + return m.organizationMemberships } + // GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable // returns a Usersable when successful -func (m *ItemGetResponse_GetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { - return m.users +func (m *ItemGetResponse_GetResponse_included) GetUsers() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable { + return m.users } + // Serialize serializes information the current object -func (m *ItemGetResponse_GetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetOrganizationMemberships() != nil { - err := writer.WriteObjectValue("", m.GetOrganizationMemberships()) - if err != nil { - return err - } - } else if m.GetUsers() != nil { - err := writer.WriteObjectValue("", m.GetUsers()) - if err != nil { - return err - } - } - return nil +func (m *ItemGetResponse_GetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetOrganizationMemberships() != nil { + err := writer.WriteObjectValue("", m.GetOrganizationMemberships()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil } + // SetOrganizationMemberships sets the organizationMemberships property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable -func (m *ItemGetResponse_GetResponse_included) SetOrganizationMemberships(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable)() { - m.organizationMemberships = value +func (m *ItemGetResponse_GetResponse_included) SetOrganizationMemberships(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable) { + m.organizationMemberships = value } + // SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable -func (m *ItemGetResponse_GetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { - m.users = value +func (m *ItemGetResponse_GetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + m.users = value } + type ItemGetResponse_GetResponse_includedable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetOrganizationMemberships()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable) - GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - SetOrganizationMemberships(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable)() - SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizationMemberships() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable + GetUsers() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + SetOrganizationMemberships(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsable) + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) } + // NewItemGetResponse instantiates a new ItemGetResponse and sets the default values. -func NewItemGetResponse()(*ItemGetResponse) { - m := &ItemGetResponse{ - TeamsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTeamsEnvelope(), - } - return m +func NewItemGetResponse() *ItemGetResponse { + m := &ItemGetResponse{ + TeamsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTeamsEnvelope(), + } + return m } + // CreateItemGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemGetResponse(), nil +func CreateItemGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemGetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.TeamsEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemGetResponse_GetResponse_includedFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemGetResponse_GetResponse_includedable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemGetResponse_GetResponse_includedable) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemGetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.TeamsEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemGetResponse_GetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemGetResponse_GetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemGetResponse_GetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemGetResponse_GetResponse_includedable when successful -func (m *ItemGetResponse) GetIncluded()([]ItemGetResponse_GetResponse_includedable) { - return m.included +func (m *ItemGetResponse) GetIncluded() []ItemGetResponse_GetResponse_includedable { + return m.included } + // Serialize serializes information the current object -func (m *ItemGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.TeamsEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.TeamsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemGetResponse) SetIncluded(value []ItemGetResponse_GetResponse_includedable)() { - m.included = value +func (m *ItemGetResponse) SetIncluded(value []ItemGetResponse_GetResponse_includedable) { + m.included = value } + type ItemGetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamsEnvelopeable - GetIncluded()([]ItemGetResponse_GetResponse_includedable) - SetIncluded(value []ItemGetResponse_GetResponse_includedable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamsEnvelopeable } diff --git a/v2/api/teams/item_request_builder.go b/v2/api/teams/item_request_builder.go index 62561433f..6fe9e37be 100644 --- a/v2/api/teams/item_request_builder.go +++ b/v2/api/teams/item_request_builder.go @@ -18,7 +18,7 @@ type ItemRequestBuilder struct { type ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for teams resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsteams []string "uriparametername:\"fields%5Bteams%5D\"" - // Optionally side-load relationships. Can include "users" or "organization-memberships". + // Optionally side-load the specified relationships. Include []ie10571cf190b80b6fd30ffeea982800a2ed15e926bb667f8977c9950586c059a.GetIncludeQueryParameterType "uriparametername:\"include\"" } // AuthenticationToken the authenticationToken property diff --git a/v2/api/tfpolicyevaluations/item_request_builder.go b/v2/api/tfpolicyevaluations/item_request_builder.go index 23ecd6afa..143fbf964 100644 --- a/v2/api/tfpolicyevaluations/item_request_builder.go +++ b/v2/api/tfpolicyevaluations/item_request_builder.go @@ -18,7 +18,7 @@ type ItemRequestBuilder struct { type ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for tf-policy-evaluations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldstfPolicyEvaluations []string "uriparametername:\"fields%5Btf%2Dpolicy%2Devaluations%5D\"" - // Comma-separated list of related resources to include. + // Optionally side-load the specified relationships. Include []id3df30ae4d569a0a0ef1010203e79e5c07c3c2b84bdcd283f9451661f5f59551.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property @@ -40,9 +40,9 @@ func NewItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1 return NewItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a specific Terraform Policy evaluation.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. -// returns a ItemGetResponseable when successful +// returns a TfPolicyEvaluationsEnvelopeable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRequestBuilderGetQueryParameters])(ItemGetResponseable, error) { +func (m *ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -50,14 +50,14 @@ func (m *ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemGetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTfPolicyEvaluationsEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemGetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsEnvelopeable), nil } // TfPolicySetOutcomes the tfPolicySetOutcomes property // returns a *ItemTfPolicySetOutcomesRequestBuilder when successful diff --git a/v2/api/tfpolicyevaluations/item_tf_policy_set_outcomes_get_response.go b/v2/api/tfpolicyevaluations/item_tf_policy_set_outcomes_get_response.go index fef8f34b4..f06c8c449 100644 --- a/v2/api/tfpolicyevaluations/item_tf_policy_set_outcomes_get_response.go +++ b/v2/api/tfpolicyevaluations/item_tf_policy_set_outcomes_get_response.go @@ -12,7 +12,7 @@ type ItemTfPolicySetOutcomesGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomesable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemTfPolicySetOutcomesGetResponse) GetAdditionalData()(map[string]any) return m.additionalData } // GetData gets the data property value. The data property -// returns a []TfPolicySetOutcomeable when successful -func (m *ItemTfPolicySetOutcomesGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable) { +// returns a []TfPolicySetOutcomesable when successful +func (m *ItemTfPolicySetOutcomesGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomesable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemTfPolicySetOutcomesGetResponse) GetData()([]i05d5aa6b14db285c2e8df4 func (m *ItemTfPolicySetOutcomesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTfPolicySetOutcomeFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTfPolicySetOutcomesFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomesable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomesable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemTfPolicySetOutcomesGetResponse) SetAdditionalData(value map[string] m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemTfPolicySetOutcomesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable)() { +func (m *ItemTfPolicySetOutcomesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomesable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemTfPolicySetOutcomesGetResponse) SetMeta(value ItemTfPolicySetOutcom type ItemTfPolicySetOutcomesGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomesable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemTfPolicySetOutcomesGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomesable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemTfPolicySetOutcomesGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_current_state_version_request_builder.go b/v2/api/workspaces/item_current_state_version_request_builder.go index 91ad93bbc..88bc53819 100644 --- a/v2/api/workspaces/item_current_state_version_request_builder.go +++ b/v2/api/workspaces/item_current_state_version_request_builder.go @@ -18,7 +18,7 @@ type ItemCurrentStateVersionRequestBuilder struct { type ItemCurrentStateVersionRequestBuilderGetQueryParameters struct { // Return only the specified fields for state-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstateVersions []string "uriparametername:\"fields%5Bstate%2Dversions%5D\"" - // Optionally side-load relationships. + // Optionally side-load the specified relationships. Include []i6f2dce141547a574e4aebc99f4b2789ac2217377facfcd9ad98ebed289c76582.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewItemCurrentStateVersionRequestBuilderInternal instantiates a new ItemCurrentStateVersionRequestBuilder and sets the default values. @@ -35,10 +35,10 @@ func NewItemCurrentStateVersionRequestBuilder(rawUrl string, requestAdapter i2ae return NewItemCurrentStateVersionRequestBuilderInternal(urlParams, requestAdapter) } // Get get the current state version for a workspace. -// returns a ItemCurrentStateVersionGetResponseable when successful +// returns a CurrentStateVersionEnvelopeable when successful // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *ItemCurrentStateVersionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCurrentStateVersionRequestBuilderGetQueryParameters])(ItemCurrentStateVersionGetResponseable, error) { +func (m *ItemCurrentStateVersionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCurrentStateVersionRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CurrentStateVersionEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -47,14 +47,14 @@ func (m *ItemCurrentStateVersionRequestBuilder) Get(ctx context.Context, request "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCurrentStateVersionGetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateCurrentStateVersionEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemCurrentStateVersionGetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CurrentStateVersionEnvelopeable), nil } // ToGetRequestInformation get the current state version for a workspace. // returns a *RequestInformation when successful diff --git a/v2/api/workspaces/item_provider_sets_get_response.go b/v2/api/workspaces/item_provider_sets_get_response.go index 4198bac85..e05649fcc 100644 --- a/v2/api/workspaces/item_provider_sets_get_response.go +++ b/v2/api/workspaces/item_provider_sets_get_response.go @@ -12,7 +12,7 @@ type ItemProviderSetsGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemProviderSetsGetResponse) GetAdditionalData()(map[string]any) { return m.additionalData } // GetData gets the data property value. The data property -// returns a []ItemProviderSetsGetResponse_ProviderSetsable when successful -func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) { +// returns a []ProviderSetsable when successful +func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemProviderSetsGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7 func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemProviderSetsGetResponse_ProviderSetsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateProviderSetsFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemProviderSetsGetResponse) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() { +func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemProviderSetsGetResponse) SetMeta(value ItemProviderSetsGetResponse_ type ItemProviderSetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemProviderSetsGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemProviderSetsGetResponse_ProviderSetsable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemProviderSetsGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_relationships_remote_state_consumers_get_response.go b/v2/api/workspaces/item_relationships_remote_state_consumers_get_response.go index c1bfb5c49..a222fefdf 100644 --- a/v2/api/workspaces/item_relationships_remote_state_consumers_get_response.go +++ b/v2/api/workspaces/item_relationships_remote_state_consumers_get_response.go @@ -12,7 +12,7 @@ type ItemRelationshipsRemoteStateConsumersGetResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The data property - data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -36,8 +36,8 @@ func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetAdditionalData()(m return m.additionalData } // GetData gets the data property value. The data property -// returns a []ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { +// returns a []Workspacesable when successful +func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { return m.data } // GetFieldDeserializers the deserialization information for the current model @@ -45,15 +45,15 @@ func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetData()([]i05d5aa6b func (m *ItemRelationshipsRemoteStateConsumersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateItemWorkspacesGetResponse_WorkspacesFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspacesFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, len(val)) + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) } } m.SetData(res) @@ -131,7 +131,7 @@ func (m *ItemRelationshipsRemoteStateConsumersGetResponse) SetAdditionalData(val m.additionalData = value } // SetData sets the data property value. The data property -func (m *ItemRelationshipsRemoteStateConsumersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { +func (m *ItemRelationshipsRemoteStateConsumersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { m.data = value } // SetLinks sets the links property value. The links property @@ -145,10 +145,10 @@ func (m *ItemRelationshipsRemoteStateConsumersGetResponse) SetMeta(value ItemRel type ItemRelationshipsRemoteStateConsumersGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRelationshipsRemoteStateConsumersGetResponse_metaable) - SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRelationshipsRemoteStateConsumersGetResponse_metaable)() } diff --git a/v2/api/workspaces/with_workspace_escaped_item_request_builder.go b/v2/api/workspaces/with_workspace_escaped_item_request_builder.go index 1d035e9f1..d74e0e8ad 100644 --- a/v2/api/workspaces/with_workspace_escaped_item_request_builder.go +++ b/v2/api/workspaces/with_workspace_escaped_item_request_builder.go @@ -18,7 +18,7 @@ type WithWorkspace_ItemRequestBuilder struct { type WithWorkspace_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for workspaces resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsworkspaces []string "uriparametername:\"fields%5Bworkspaces%5D\"" - // Optionally side-load relationships. + // Optionally side-load the specified relationships. Include []ie528eac21284f8672aaa47fa355616c8ce1cd05239efef6f9ab3d7a226aefe49.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property @@ -103,10 +103,10 @@ func (m *WithWorkspace_ItemRequestBuilder) EffectiveTagBindings()(*ItemEffective return NewItemEffectiveTagBindingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Get get details of a specific workspace by its external ID. -// returns a ItemWithWorkspace_GetResponseable when successful +// returns a WorkspacesEnvelopeable when successful // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithWorkspace_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithWorkspace_ItemRequestBuilderGetQueryParameters])(ItemWithWorkspace_GetResponseable, error) { +func (m *WithWorkspace_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithWorkspace_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -115,14 +115,14 @@ func (m *WithWorkspace_ItemRequestBuilder) Get(ctx context.Context, requestConfi "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithWorkspace_GetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspacesEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithWorkspace_GetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelopeable), nil } // NotificationConfigurations the notificationConfigurations property // returns a *ItemNotificationConfigurationsRequestBuilder when successful diff --git a/v2/api/workspacetransfers/with_workspace_escaped_transfer_escaped_item_request_builder.go b/v2/api/workspacetransfers/with_workspace_escaped_transfer_escaped_item_request_builder.go index d42c00fbc..11688668c 100644 --- a/v2/api/workspacetransfers/with_workspace_escaped_transfer_escaped_item_request_builder.go +++ b/v2/api/workspacetransfers/with_workspace_escaped_transfer_escaped_item_request_builder.go @@ -18,7 +18,7 @@ type WithWorkspace_transfer_ItemRequestBuilder struct { type WithWorkspace_transfer_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for workspace-transfers resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsworkspaceTransfers []string "uriparametername:\"fields%5Bworkspace%2Dtransfers%5D\"" - // Allows including related resource data. + // Optionally side-load the specified relationships. Include []i815f93c8ea51613f4e4111c574d4de5e520b0c9c063ada61dbdc7b008ab9e3e7.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property @@ -40,10 +40,10 @@ func NewWithWorkspace_transfer_ItemRequestBuilder(rawUrl string, requestAdapter return NewWithWorkspace_transfer_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details about a workspace transfer. -// returns a ItemWithWorkspace_transfer_GetResponseable when successful +// returns a WorkspaceTransfersEnvelopeable when successful // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithWorkspace_transfer_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithWorkspace_transfer_ItemRequestBuilderGetQueryParameters])(ItemWithWorkspace_transfer_GetResponseable, error) { +func (m *WithWorkspace_transfer_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithWorkspace_transfer_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersEnvelopeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -52,14 +52,14 @@ func (m *WithWorkspace_transfer_ItemRequestBuilder) Get(ctx context.Context, req "404": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithWorkspace_transfer_GetResponseFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceTransfersEnvelopeFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(ItemWithWorkspace_transfer_GetResponseable), nil + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersEnvelopeable), nil } // ToGetRequestInformation get details about a workspace transfer. // returns a *RequestInformation when successful diff --git a/v2/openapi/spec.json b/v2/openapi/spec.json index 8e87ed0e2..4c719366e 100644 --- a/v2/openapi/spec.json +++ b/v2/openapi/spec.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "c6179f4d", + "version": "development", "title": "HCP Terraform/Terraform Enterprise API v2-Beta", "description": "OpenAPI Specification for the HCP Terraform/Terraform Enterprise API V2 Public Beta.", "license": { @@ -2104,14 +2104,9 @@ } }, "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/users-envelope" - }, - { - "description": "User resource representing the account details of the authenticated user.\nFor internal reasons, HCP Terraform associates team and organization tokens\nwith a synthetic user account called service user.\n" - } - ] + "properties": {}, + "$ref": "#/components/schemas/users-envelope", + "description": "User resource representing the account details of the authenticated user.\nFor internal reasons, HCP Terraform associates team and organization tokens\nwith a synthetic user account called service user.\n" } } } @@ -3908,25 +3903,6 @@ "required": false, "description": "Allows sorting the returned stacks. Valid values are \"name\" and \"created-at\". Prepending a hyphen to the sort parameter will reverse the order (e.g. \"-name\")." }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "organization", - "project", - "latest-stack-configuration" - ] - } - }, - "required": false, - "description": "Optionally side-load relationships of the specified name" - }, { "$ref": "#/components/parameters/page_number" }, @@ -3945,6 +3921,25 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "organization", + "project", + "latest-stack-configuration" + ] + } + } } ], "responses": { @@ -3964,9 +3959,6 @@ "$ref": "#/components/schemas/stacks" } }, - "included": { - "$ref": "#/components/schemas/stacks-included" - }, "meta": { "type": "object", "properties": { @@ -3977,6 +3969,30 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/stack-configurations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "organizations": "#/components/schemas/organizations", + "projects": "#/components/schemas/projects", + "stack-configurations": "#/components/schemas/stack-configurations" + } + } + } } } } @@ -4445,24 +4461,6 @@ "required": true, "description": "ID of the stack" }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ingress-attributes", - "stack-configuration-summary" - ] - } - }, - "required": false, - "description": "Optionally side-load relationships. Accepts a comma-separated list of the enumerated values." - }, { "$ref": "#/components/parameters/page_number" }, @@ -4481,6 +4479,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ingress-attributes", + "stack-configuration-summary" + ] + } + } } ], "responses": { @@ -4500,9 +4516,6 @@ "$ref": "#/components/schemas/stack-configurations" } }, - "included": { - "$ref": "#/components/schemas/stack-configurations-included" - }, "links": { "$ref": "#/components/schemas/self-with-pagination" }, @@ -4513,6 +4526,26 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/stack-configuration-summaries" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ingress-attributes": "#/components/schemas/ingress-attributes", + "stack-configuration-summaries": "#/components/schemas/stack-configuration-summaries" + } + } + } } } } @@ -4552,34 +4585,34 @@ }, { "in": "query", - "name": "include", + "name": "fields[stack-configurations]", + "description": "Return only the specified fields for stack-configurations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "ingress-attributes", - "stack-configuration-summary", - "stack-diagnostics", - "stack-aggregate-outputs" - ] + "type": "string" } - }, - "required": false, - "description": "Optionally side-load relationships. Accepts a comma-separated list of the enumerated values." + } }, { "in": "query", - "name": "fields[stack-configurations]", - "description": "Return only the specified fields for stack-configurations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "ingress-attributes", + "stack-configuration-summary", + "stack-diagnostics", + "stack-aggregate-outputs" + ] } } } @@ -4590,19 +4623,37 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/stack-configurations-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/stack-configurations-included" + "$ref": "#/components/schemas/stack-configurations-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/stack-configuration-summaries" + }, + { + "$ref": "#/components/schemas/stack-diagnostics" + }, + { + "$ref": "#/components/schemas/stack-aggregate-outputs" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ingress-attributes": "#/components/schemas/ingress-attributes", + "stack-configuration-summaries": "#/components/schemas/stack-configuration-summaries", + "stack-diagnostics": "#/components/schemas/stack-diagnostics", + "stack-aggregate-outputs": "#/components/schemas/stack-aggregate-outputs" + } } } } - ] + } } } } @@ -4905,9 +4956,9 @@ }, "/stacks/{stack_id}/stack-output-consumers/upstream": { "get": { - "operationId": "listStackOutputConsumers", - "summary": "List stack output consumers", - "description": "List output consumers for a stack(upstream or downstream).", + "operationId": "listStackOutputConsumersUpstream", + "summary": "List upstream stack output consumers", + "description": "List upstream output consumers for a stack.", "tags": [ "stacks" ], @@ -5017,9 +5068,9 @@ }, "/stacks/{stack_id}/stack-output-consumers/downstream": { "get": { - "operationId": "listStackOutputConsumers", - "summary": "List stack output consumers", - "description": "List output consumers for a stack(upstream or downstream).", + "operationId": "listStackOutputConsumersDownstream", + "summary": "List downstream stack output consumers", + "description": "List downstream output consumers for a stack.", "tags": [ "stacks" ], @@ -5784,23 +5835,6 @@ ] } }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "stack-deployment-group-summary" - ] - } - }, - "required": false, - "description": "Optionally side-load relationships. Accepts a comma-separated list of the enumerated values." - }, { "$ref": "#/components/parameters/page_number" }, @@ -5819,6 +5853,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack-deployment-group-summary" + ] + } + } } ], "responses": { @@ -5838,9 +5889,6 @@ "$ref": "#/components/schemas/stack-deployment-groups" } }, - "included": { - "$ref": "#/components/schemas/stack-deployment-groups-included" - }, "meta": { "type": "object", "properties": { @@ -5851,6 +5899,22 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-deployment-group-summaries" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-deployment-group-summaries": "#/components/schemas/stack-deployment-group-summaries" + } + } + } } } } @@ -5955,31 +6019,31 @@ }, { "in": "query", - "name": "include", + "name": "fields[stack-deployment-groups]", + "description": "Return only the specified fields for stack-deployment-groups resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "stack-deployment-group-summary" - ] + "type": "string" } - }, - "required": false, - "description": "Optionally side-load relationships. Accepts a comma-separated list of the enumerated values." + } }, { "in": "query", - "name": "fields[stack-deployment-groups]", - "description": "Return only the specified fields for stack-deployment-groups resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "stack-deployment-group-summary" + ] } } } @@ -5990,19 +6054,25 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/stack-deployment-groups-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/stack-deployment-groups-included" + "$ref": "#/components/schemas/stack-deployment-groups-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-deployment-group-summaries" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-deployment-group-summaries": "#/components/schemas/stack-deployment-group-summaries" + } } } } - ] + } } } } @@ -6891,23 +6961,6 @@ "organizations" ], "parameters": [ - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "subscription" - ] - } - }, - "required": false, - "description": "Optionally side-load relationships of the specified name" - }, { "in": "query", "name": "q", @@ -6953,6 +7006,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "subscription" + ] + } + } } ], "responses": { @@ -6984,7 +7054,20 @@ "$ref": "#/components/schemas/self-with-pagination" }, "included": { - "$ref": "#/components/schemas/organizations-included" + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscriptions" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "subscriptions": "#/components/schemas/subscriptions" + } + } + } } } } @@ -7064,33 +7147,33 @@ }, { "in": "query", - "name": "include", + "name": "fields[organizations]", + "description": "Return only the specified fields for organizations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "subscription", - "entitlement_set", - "default-project" - ] + "type": "string" } - }, - "required": false, - "description": "Optionally side-load relationships of the specified name" + } }, { "in": "query", - "name": "fields[organizations]", - "description": "Return only the specified fields for organizations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "subscription", + "entitlement_set", + "default-project" + ] } } } @@ -7101,70 +7184,33 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/organizations-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/organizations-included" + "$ref": "#/components/schemas/organizations-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscriptions" + }, + { + "$ref": "#/components/schemas/entitlement-sets" + }, + { + "$ref": "#/components/schemas/projects" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "subscriptions": "#/components/schemas/subscriptions", + "entitlement-sets": "#/components/schemas/entitlement-sets", + "projects": "#/components/schemas/projects" + } } } } - ] - } - } - } - }, - "default": { - "description": "Error details", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errors" - } - } - } - } - } - }, - "put": { - "tags": [ - "organizations" - ], - "operationId": "updateOrganization", - "summary": "Update Organization", - "description": "Update an organization.", - "parameters": [ - { - "in": "path", - "name": "organization_name", - "schema": { - "type": "string" - }, - "required": true, - "description": "Organization Name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/organizations-envelope" - } - } - } - }, - "responses": { - "200": { - "description": "Organization updated", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/organizations-envelope" + } } } } @@ -7453,25 +7499,6 @@ "required": false, "description": "Filter memberships by exact email address match." }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "user", - "teams", - "scim-identity" - ] - } - }, - "required": false, - "description": "Optionally side-load relationships. Can include \"user\", \"teams\", or \"scim-identity\".\nNote: \"scim-identity\" is only available on HCP Terraform.\n" - }, { "$ref": "#/components/parameters/page_number" }, @@ -7490,6 +7517,25 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "teams", + "scim-identity" + ] + } + } } ], "responses": { @@ -7530,9 +7576,6 @@ { "$ref": "#/components/schemas/teams" }, - { - "$ref": "#/components/schemas/organizations" - }, { "$ref": "#/components/schemas/scim-identities" } @@ -7542,7 +7585,6 @@ "mapping": { "users": "#/components/schemas/users", "teams": "#/components/schemas/teams", - "organizations": "#/components/schemas/organizations", "scim-identities": "#/components/schemas/scim-identities" } } @@ -7703,25 +7745,6 @@ "organization-memberships" ], "parameters": [ - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "user", - "teams", - "organization" - ] - } - }, - "required": false, - "description": "Optionally side-load relationships. Can include \"user\", \"teams\", or \"organization\"." - }, { "$ref": "#/components/parameters/page_number" }, @@ -7740,6 +7763,25 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "teams", + "organization" + ] + } + } } ], "responses": { @@ -7832,32 +7874,32 @@ }, { "in": "query", - "name": "include", + "name": "fields[organization-memberships]", + "description": "Return only the specified fields for organization-memberships resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "user", - "teams" - ] + "type": "string" } - }, - "required": false, - "description": "Optionally side-load relationships. Can include \"user\" or \"teams\"." + } }, { "in": "query", - "name": "fields[organization-memberships]", - "description": "Return only the specified fields for organization-memberships resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "teams" + ] } } } @@ -7868,36 +7910,29 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/organization-memberships-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/teams" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "users": "#/components/schemas/users", - "teams": "#/components/schemas/teams" - } - } + "$ref": "#/components/schemas/organization-memberships-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/teams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "users": "#/components/schemas/users", + "teams": "#/components/schemas/teams" } } } } - ] + } } } } @@ -7997,25 +8032,6 @@ "required": true, "description": "The name of the organization." }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "recoverable", - "deleted_by", - "project" - ] - } - }, - "required": false, - "description": "Optionally side-load relationships of the specified name. Multiple values can be comma-separated." - }, { "in": "query", "name": "filter[search]", @@ -8092,6 +8108,25 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "recoverable", + "deleted_by", + "project" + ] + } + } } ], "responses": { @@ -8108,9 +8143,6 @@ "$ref": "#/components/schemas/recoverable-items" } }, - "included": { - "$ref": "#/components/schemas/recoverable-items-included" - }, "links": { "$ref": "#/components/schemas/self-with-pagination" }, @@ -8121,6 +8153,34 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/stacks" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/projects" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspaces": "#/components/schemas/workspaces", + "stacks": "#/components/schemas/stacks", + "users": "#/components/schemas/users", + "projects": "#/components/schemas/projects" + } + } + } } } } @@ -8494,9 +8554,9 @@ "organizations", "data-retention-policies" ], - "operationId": "createOrUpdateDataRetentionPolicy", - "summary": "Create or Update Data Retention Policy", - "description": "Create a data retention policy for an organization or update the existing policy.\n\nThis operation is only available in Terraform Enterprise.", + "operationId": "createDataRetentionPolicy", + "summary": "Create Data Retention Policy", + "description": "Create a data retention policy for an organization.\n\nThis operation is only available in Terraform Enterprise.", "parameters": [ { "in": "path", @@ -8505,7 +8565,7 @@ "type": "string" }, "required": true, - "description": "The name of the organization to update the data retention policy for." + "description": "The name of the organization to create the data retention policy for." } ], "requestBody": { @@ -8520,7 +8580,7 @@ }, "responses": { "204": { - "description": "Data retention policy created or updated" + "description": "Data retention policy created" }, "default": { "description": "Error details", @@ -8539,9 +8599,9 @@ "organizations", "data-retention-policies" ], - "operationId": "createOrUpdateDataRetentionPolicy", - "summary": "Create or Update Data Retention Policy", - "description": "Create a data retention policy for an organization or update the existing policy.\n\nThis operation is only available in Terraform Enterprise.", + "operationId": "updateDataRetentionPolicy", + "summary": "Update Data Retention Policy", + "description": "Update the data retention policy for an organization.\n\nThis operation is only available in Terraform Enterprise.", "parameters": [ { "in": "path", @@ -8565,7 +8625,7 @@ }, "responses": { "204": { - "description": "Data retention policy created or updated" + "description": "Data retention policy updated" }, "default": { "description": "Error details", @@ -9537,47 +9597,6 @@ "required": false, "description": "Sort workspaces. Valid values include name, current-run.created-at. Prefix with a hyphen (e.g., -name) to sort in descending order.\n" }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "agent_pool", - "current_assessment_result", - "current_configuration_version", - "current_configuration_version.ingress_attributes", - "current_run", - "current_run.apply", - "current_run.plan", - "current_run.configuration_version", - "current_run.configuration_version.ingress_attributes", - "current_state_version", - "current_state_version.resources_processed", - "latest_run", - "latest_run.plan", - "latest_run.configuration_version", - "latest_run.configuration_version.ingress_attributes", - "locked_by", - "no_code_module_version", - "no_code_module_version.no_code_module", - "no_code_module_version.no_code_module.latest_version", - "organization", - "outputs", - "project", - "readme", - "vars", - "effective_tag_bindings" - ] - } - }, - "required": false, - "description": "Comma-separated list of relationship names to side-load.\n" - }, { "$ref": "#/components/parameters/page_number" }, @@ -9596,176 +9615,14 @@ "type": "string" } } - } - ], - "responses": { - "200": { - "description": "List of workspaces", - "content": { - "application/vnd.api+json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/workspaces" - } - }, - "meta": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/pagination" - }, - "status-counts": { - "type": "object", - "additionalProperties": { - "type": "integer" - } - } - } - }, - "links": { - "$ref": "#/components/schemas/self-with-pagination" - }, - "included": { - "$ref": "#/components/schemas/workspaces-included" - } - } - } - } - } - }, - "404": { - "description": "Organization not found or user unauthorized to view workspaces", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errors" - } - } - } - }, - "default": { - "description": "Error details", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errors" - } - } - } - } - } - }, - "post": { - "operationId": "createWorkspace", - "summary": "Create a Workspace", - "description": "Create a new workspace in an organization.", - "tags": [ - "workspaces" - ], - "parameters": [ - { - "in": "path", - "name": "organization_name", - "schema": { - "type": "string" - }, - "required": true, - "description": "The name of the organization." - } - ], - "requestBody": { - "required": true, - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/workspaces-envelope" - } - } - } - }, - "responses": { - "201": { - "description": "Workspace created", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/workspaces-envelope" - } - } - } - }, - "404": { - "description": "Organization not found or user unauthorized to create workspaces", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errors" - } - } - } - }, - "422": { - "description": "Malformed request body or validation error", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errors" - } - } - } - }, - "default": { - "description": "Error details", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errors" - } - } - } - } - } - } - }, - "/organizations/{organization_name}/workspaces/{workspace_name}": { - "get": { - "operationId": "getWorkspaceByName", - "summary": "Get a Workspace by Name", - "description": "Get details of a workspace by organization name and workspace name.", - "tags": [ - "workspaces" - ], - "parameters": [ - { - "in": "path", - "name": "organization_name", - "schema": { - "type": "string" - }, - "required": true, - "description": "The name of the organization." - }, - { - "in": "path", - "name": "workspace_name", - "schema": { - "type": "string" - }, - "required": true, - "description": "The name of the workspace." }, { "in": "query", "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { @@ -9798,9 +9655,248 @@ "effective_tag_bindings" ] } + } + } + ], + "responses": { + "200": { + "description": "List of workspaces", + "content": { + "application/vnd.api+json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/workspaces" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/pagination" + }, + "status-counts": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + } + } + }, + "links": { + "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/agent-pools" + }, + { + "$ref": "#/components/schemas/assessment-results" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/state-versions" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/no-code-module-versions" + }, + { + "$ref": "#/components/schemas/no-code-modules" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/workspace-outputs" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspace-readme" + }, + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/effective-tag-bindings" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "agent-pools": "#/components/schemas/agent-pools", + "assessment-results": "#/components/schemas/assessment-results", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "runs": "#/components/schemas/runs", + "applies": "#/components/schemas/applies", + "plans": "#/components/schemas/plans", + "state-versions": "#/components/schemas/state-versions", + "users": "#/components/schemas/users", + "no-code-module-versions": "#/components/schemas/no-code-module-versions", + "no-code-modules": "#/components/schemas/no-code-modules", + "organizations": "#/components/schemas/organizations", + "workspace-outputs": "#/components/schemas/workspace-outputs", + "projects": "#/components/schemas/projects", + "workspace-readme": "#/components/schemas/workspace-readme", + "vars": "#/components/schemas/vars", + "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Organization not found or user unauthorized to view workspaces", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + }, + "post": { + "operationId": "createWorkspace", + "summary": "Create a Workspace", + "description": "Create a new workspace in an organization.", + "tags": [ + "workspaces" + ], + "parameters": [ + { + "in": "path", + "name": "organization_name", + "schema": { + "type": "string" }, - "required": false, - "description": "Optionally side-load relationships.\n" + "required": true, + "description": "The name of the organization." + } + ], + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/workspaces-envelope" + } + } + } + }, + "responses": { + "201": { + "description": "Workspace created", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/workspaces-envelope" + } + } + } + }, + "404": { + "description": "Organization not found or user unauthorized to create workspaces", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "422": { + "description": "Malformed request body or validation error", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + } + }, + "/organizations/{organization_name}/workspaces/{workspace_name}": { + "get": { + "operationId": "getWorkspaceByName", + "summary": "Get a Workspace by Name", + "description": "Get details of a workspace by organization name and workspace name.", + "tags": [ + "workspaces" + ], + "parameters": [ + { + "in": "path", + "name": "organization_name", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the organization." + }, + { + "in": "path", + "name": "workspace_name", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the workspace." }, { "in": "query", @@ -9814,6 +9910,47 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "agent_pool", + "current_assessment_result", + "current_configuration_version", + "current_configuration_version.ingress_attributes", + "current_run", + "current_run.apply", + "current_run.plan", + "current_run.configuration_version", + "current_run.configuration_version.ingress_attributes", + "current_state_version", + "current_state_version.resources_processed", + "latest_run", + "latest_run.plan", + "latest_run.configuration_version", + "latest_run.configuration_version.ingress_attributes", + "locked_by", + "no_code_module_version", + "no_code_module_version.no_code_module", + "no_code_module_version.no_code_module.latest_version", + "organization", + "outputs", + "project", + "readme", + "vars", + "effective_tag_bindings" + ] + } + } } ], "responses": { @@ -9822,96 +9959,89 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/workspaces-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/agent-pools" - }, - { - "$ref": "#/components/schemas/assessment-results" - }, - { - "$ref": "#/components/schemas/configuration-versions" - }, - { - "$ref": "#/components/schemas/runs" - }, - { - "$ref": "#/components/schemas/applies" - }, - { - "$ref": "#/components/schemas/plans" - }, - { - "$ref": "#/components/schemas/ingress-attributes" - }, - { - "$ref": "#/components/schemas/state-versions" - }, - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/no-code-module-versions" - }, - { - "$ref": "#/components/schemas/no-code-modules" - }, - { - "$ref": "#/components/schemas/organizations" - }, - { - "$ref": "#/components/schemas/workspace-outputs" - }, - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/workspace-readme" - }, - { - "$ref": "#/components/schemas/vars" - }, - { - "$ref": "#/components/schemas/effective-tag-bindings" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "agent-pools": "#/components/schemas/agent-pools", - "assessment-results": "#/components/schemas/assessment-results", - "configuration-versions": "#/components/schemas/configuration-versions", - "runs": "#/components/schemas/runs", - "applies": "#/components/schemas/applies", - "plans": "#/components/schemas/plans", - "ingress-attributes": "#/components/schemas/ingress-attributes", - "state-versions": "#/components/schemas/state-versions", - "users": "#/components/schemas/users", - "no-code-module-versions": "#/components/schemas/no-code-module-versions", - "no-code-modules": "#/components/schemas/no-code-modules", - "organizations": "#/components/schemas/organizations", - "workspace-outputs": "#/components/schemas/workspace-outputs", - "projects": "#/components/schemas/projects", - "workspace-readme": "#/components/schemas/workspace-readme", - "vars": "#/components/schemas/vars", - "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" - } - } + "$ref": "#/components/schemas/workspaces-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/agent-pools" + }, + { + "$ref": "#/components/schemas/assessment-results" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/state-versions" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/no-code-module-versions" + }, + { + "$ref": "#/components/schemas/no-code-modules" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/workspace-outputs" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspace-readme" + }, + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/effective-tag-bindings" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "agent-pools": "#/components/schemas/agent-pools", + "assessment-results": "#/components/schemas/assessment-results", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "runs": "#/components/schemas/runs", + "applies": "#/components/schemas/applies", + "plans": "#/components/schemas/plans", + "state-versions": "#/components/schemas/state-versions", + "users": "#/components/schemas/users", + "no-code-module-versions": "#/components/schemas/no-code-module-versions", + "no-code-modules": "#/components/schemas/no-code-modules", + "organizations": "#/components/schemas/organizations", + "workspace-outputs": "#/components/schemas/workspace-outputs", + "projects": "#/components/schemas/projects", + "workspace-readme": "#/components/schemas/workspace-readme", + "vars": "#/components/schemas/vars", + "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" } } } } - ] + } } } } @@ -11123,37 +11253,31 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/queries-envelope" - }, - { + "properties": { + "data": { "type": "object", "properties": { - "data": { + "attributes": { "type": "object", + "required": [ + "list-completions" + ], "properties": { - "attributes": { - "type": "object", - "required": [ - "list-completions" - ], - "properties": { - "list-completions": { - "type": "array", - "readOnly": true, - "description": "A summary of each list completion returned by the query run.", - "items": { - "$ref": "#/components/schemas/query-completion-summary" - } - } + "list-completions": { + "type": "array", + "readOnly": true, + "description": "A summary of each list completion returned by the query run.", + "items": { + "$ref": "#/components/schemas/query-completion-summary" } } } } } } - ] + }, + "$ref": "#/components/schemas/queries-envelope", + "type": "object" } } } @@ -11808,32 +11932,32 @@ }, { "in": "query", - "name": "include", + "name": "fields[provider-sets]", + "description": "Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "projects", - "workspaces" - ] + "type": "string" } - }, - "required": false, - "description": "Comma-separated list of related resources to include." + } }, { "in": "query", - "name": "fields[provider-sets]", - "description": "Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "projects", + "workspaces" + ] } } } @@ -11844,19 +11968,29 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/provider-sets-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/provider-sets-included" + "$ref": "#/components/schemas/provider-sets-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "workspaces": "#/components/schemas/workspaces" + } } } } - ] + } } } } @@ -12166,24 +12300,6 @@ "required": true, "description": "The name of the organization." }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "projects", - "workspaces" - ] - } - }, - "required": false, - "description": "Comma-separated list of related resources to include." - }, { "$ref": "#/components/parameters/page_number" }, @@ -12202,6 +12318,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "projects", + "workspaces" + ] + } + } } ], "responses": { @@ -12218,9 +12352,6 @@ "$ref": "#/components/schemas/provider-sets" } }, - "included": { - "$ref": "#/components/schemas/provider-sets-included" - }, "links": { "$ref": "#/components/schemas/self-with-pagination" }, @@ -12231,6 +12362,26 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "workspaces": "#/components/schemas/workspaces" + } + } + } } } } @@ -12396,32 +12547,32 @@ }, { "in": "query", - "name": "include", + "name": "fields[provider-sets]", + "description": "Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "projects", - "workspaces" - ] + "type": "string" } - }, - "required": false, - "description": "Comma-separated list of related resources to include." + } }, { "in": "query", - "name": "fields[provider-sets]", - "description": "Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "projects", + "workspaces" + ] } } } @@ -12432,19 +12583,29 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/provider-sets-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/provider-sets-included" + "$ref": "#/components/schemas/provider-sets-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "workspaces": "#/components/schemas/workspaces" + } } } } - ] + } } } } @@ -14060,11 +14221,26 @@ "required": true, "description": "The external ID of the workspace." }, + { + "in": "query", + "name": "fields[workspaces]", + "description": "Return only the specified fields for workspaces resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, { "in": "query", "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { @@ -14097,21 +14273,6 @@ "effective_tag_bindings" ] } - }, - "required": false, - "description": "Optionally side-load relationships.\n" - }, - { - "in": "query", - "name": "fields[workspaces]", - "description": "Return only the specified fields for workspaces resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } } } ], @@ -14121,19 +14282,89 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/workspaces-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/workspaces-included" + "$ref": "#/components/schemas/workspaces-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/agent-pools" + }, + { + "$ref": "#/components/schemas/assessment-results" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/state-versions" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/no-code-module-versions" + }, + { + "$ref": "#/components/schemas/no-code-modules" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/workspace-outputs" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspace-readme" + }, + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/effective-tag-bindings" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "agent-pools": "#/components/schemas/agent-pools", + "assessment-results": "#/components/schemas/assessment-results", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "runs": "#/components/schemas/runs", + "applies": "#/components/schemas/applies", + "plans": "#/components/schemas/plans", + "state-versions": "#/components/schemas/state-versions", + "users": "#/components/schemas/users", + "no-code-module-versions": "#/components/schemas/no-code-module-versions", + "no-code-modules": "#/components/schemas/no-code-modules", + "organizations": "#/components/schemas/organizations", + "workspace-outputs": "#/components/schemas/workspace-outputs", + "projects": "#/components/schemas/projects", + "workspace-readme": "#/components/schemas/workspace-readme", + "vars": "#/components/schemas/vars", + "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" + } } } } - ] + } } } } @@ -15652,31 +15883,31 @@ }, { "in": "query", - "name": "include", + "name": "fields[state-versions]", + "description": "Return only the specified fields for state-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "outputs" - ] + "type": "string" } - }, - "required": false, - "description": "Optionally side-load relationships.\n" + } }, { "in": "query", - "name": "fields[state-versions]", - "description": "Return only the specified fields for state-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "outputs" + ] } } } @@ -15687,19 +15918,25 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/current-state-version-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/current-state-version-included" + "$ref": "#/components/schemas/current-state-version-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/state-version-outputs" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "state-version-outputs": "#/components/schemas/state-version-outputs" + } } } } - ] + } } } } @@ -16134,6 +16371,31 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "plan", + "apply", + "created_by", + "configuration_version", + "configuration_version.ingress_attributes", + "cost_estimate", + "workspace", + "task_stages", + "tf_policy_evaluations" + ] + } + } } ], "responses": { @@ -16158,6 +16420,9 @@ } } }, + "links": { + "$ref": "#/components/schemas/self-with-pagination" + }, "included": { "type": "array", "items": { @@ -16187,7 +16452,7 @@ "$ref": "#/components/schemas/task-stages" }, { - "$ref": "#/components/schemas/tf-policy-evaluation" + "$ref": "#/components/schemas/tf-policy-evaluations" } ], "discriminator": { @@ -16201,13 +16466,10 @@ "cost-estimates": "#/components/schemas/cost-estimates", "workspaces": "#/components/schemas/workspaces", "task-stages": "#/components/schemas/task-stages", - "tf-policy-evaluations": "#/components/schemas/tf-policy-evaluation" + "tf-policy-evaluations": "#/components/schemas/tf-policy-evaluations" } } } - }, - "links": { - "$ref": "#/components/schemas/self-with-pagination" } } } @@ -16245,11 +16507,26 @@ "required": true, "description": "Run ID" }, + { + "in": "query", + "name": "fields[runs]", + "description": "Return only the specified fields for runs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, { "in": "query", "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { @@ -16266,21 +16543,6 @@ "tf_policy_evaluations" ] } - }, - "required": false, - "description": "Available side-load related resources. Multiple values can be comma-separated.\n\nAvailable includes:\n- `plan` - The plan for this run\n- `apply` - The apply for this run\n- `created_by` - The user who created this run\n- `configuration_version` - The configuration version used\n- `configuration_version.ingress_attributes` - VCS ingress details\n- `cost_estimate` - Cost estimation for this run\n- `workspace` - The workspace this run belongs to\n- `task_stages` - Run task stages\n- `tf_policy_evaluations` - Terraform Policy evaluations *(public-beta)*\n" - }, - { - "in": "query", - "name": "fields[runs]", - "description": "Return only the specified fields for runs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } } } ], @@ -16290,7 +16552,57 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/runs-envelope" + "$ref": "#/components/schemas/runs-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/cost-estimates" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/task-stages" + }, + { + "$ref": "#/components/schemas/tf-policy-evaluations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "plans": "#/components/schemas/plans", + "applies": "#/components/schemas/applies", + "users": "#/components/schemas/users", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "cost-estimates": "#/components/schemas/cost-estimates", + "workspaces": "#/components/schemas/workspaces", + "task-stages": "#/components/schemas/task-stages", + "tf-policy-evaluations": "#/components/schemas/tf-policy-evaluations" + } + } + } + } + } } } } @@ -18341,7 +18653,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/tf-policy-evaluation" + "$ref": "#/components/schemas/tf-policy-evaluations" } }, "meta": { @@ -18396,31 +18708,31 @@ }, { "in": "query", - "name": "include", + "name": "fields[tf-policy-evaluations]", + "description": "Return only the specified fields for tf-policy-evaluations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "tf_policy_set_outcomes" - ] + "type": "string" } - }, - "required": false, - "description": "Comma-separated list of related resources to include." + } }, { "in": "query", - "name": "fields[tf-policy-evaluations]", - "description": "Return only the specified fields for tf-policy-evaluations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "tf_policy_set_outcomes" + ] } } } @@ -18431,32 +18743,25 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/tf-policy-evaluations-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/tf-policy-set-outcome" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "tf-policy-set-outcomes": "#/components/schemas/tf-policy-set-outcome" - } - } + "$ref": "#/components/schemas/tf-policy-evaluations-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/tf-policy-set-outcomes" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "tf-policy-set-outcomes": "#/components/schemas/tf-policy-set-outcomes" } } } } - ] + } } } } @@ -18634,7 +18939,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/tf-policy-set-outcome" + "$ref": "#/components/schemas/tf-policy-set-outcomes" } }, "meta": { @@ -19068,6 +19373,31 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "policies", + "workspaces", + "projects", + "current-version", + "newest-version", + "workspace-exclusions", + "project-exclusions", + "stacks", + "stack-exclusions" + ] + } + } } ], "responses": { @@ -19076,7 +19406,41 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/policy-sets-envelope" + "$ref": "#/components/schemas/policy-sets-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/policies" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/policy-set-versions" + }, + { + "$ref": "#/components/schemas/stacks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "policies": "#/components/schemas/policies", + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects", + "policy-set-versions": "#/components/schemas/policy-set-versions", + "stacks": "#/components/schemas/stacks" + } + } + } + } + } } } } @@ -24106,24 +24470,6 @@ "required": false, "description": "If specified, restricts results to a team with a matching name. If multiple comma separated values are specified, teams matching any of the names are returned." }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "users", - "organization-memberships" - ] - } - }, - "required": false, - "description": "Optionally side-load relationships. Can include \"users\" or \"organization-memberships\"." - }, { "$ref": "#/components/parameters/page_number" }, @@ -24142,6 +24488,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "users", + "organization-memberships" + ] + } + } } ], "responses": { @@ -24331,32 +24695,32 @@ }, { "in": "query", - "name": "include", + "name": "fields[teams]", + "description": "Return only the specified fields for teams resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "users", - "organization-memberships" - ] + "type": "string" } - }, - "required": false, - "description": "Optionally side-load relationships. Can include \"users\" or \"organization-memberships\"." + } }, { "in": "query", - "name": "fields[teams]", - "description": "Return only the specified fields for teams resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "users", + "organization-memberships" + ] } } } @@ -24367,7 +24731,29 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/teams-envelope" + "$ref": "#/components/schemas/teams-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/organization-memberships" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "users": "#/components/schemas/users", + "organization-memberships": "#/components/schemas/organization-memberships" + } + } + } + } + } } } } @@ -26290,23 +26676,6 @@ "required": false, "description": "Comma-separated list of event levels to filter by. Accepted values are \"info\" and \"error\"." }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "oauth_client" - ] - } - }, - "required": false, - "description": "Allows including related resource data." - }, { "$ref": "#/components/parameters/page_number" }, @@ -26325,6 +26694,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "oauth_client" + ] + } + } } ], "responses": { @@ -26341,9 +26727,6 @@ "$ref": "#/components/schemas/vcs-events" } }, - "included": { - "$ref": "#/components/schemas/vcs-events-included" - }, "meta": { "type": "object", "properties": { @@ -26354,6 +26737,22 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/oauth-clients" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "oauth-clients": "#/components/schemas/oauth-clients" + } + } + } } } } @@ -29133,32 +29532,32 @@ }, { "in": "query", - "name": "include", + "name": "fields[tasks]", + "description": "Return only the specified fields for tasks resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "workspace_tasks", - "workspace_tasks.workspace" - ] + "type": "string" } - }, - "required": false, - "description": "Allows including related resource data.\n" + } }, { "in": "query", - "name": "fields[tasks]", - "description": "Return only the specified fields for tasks resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "workspace_tasks", + "workspace_tasks.workspace" + ] } } } @@ -29169,19 +29568,29 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/tasks-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/tasks-included" + "$ref": "#/components/schemas/tasks-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspace-tasks" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspace-tasks": "#/components/schemas/workspace-tasks", + "workspaces": "#/components/schemas/workspaces" + } } } } - ] + } } } } @@ -29302,24 +29711,6 @@ "required": true, "description": "The name of the organization." }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "workspace_tasks", - "workspace_tasks.workspace" - ] - } - }, - "required": false, - "description": "Allows including related resource data.\n" - }, { "$ref": "#/components/parameters/page_number" }, @@ -29338,6 +29729,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "workspace_tasks", + "workspace_tasks.workspace" + ] + } + } } ], "responses": { @@ -29354,9 +29763,6 @@ "$ref": "#/components/schemas/tasks" } }, - "included": { - "$ref": "#/components/schemas/tasks-included" - }, "meta": { "type": "object", "properties": { @@ -29367,6 +29773,26 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspace-tasks" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspace-tasks": "#/components/schemas/workspace-tasks", + "workspaces": "#/components/schemas/workspaces" + } + } + } } } } @@ -29538,35 +29964,35 @@ }, { "in": "query", - "name": "include", + "name": "fields[task-configs]", + "description": "Return only the specified fields for task-configs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "projects", - "task", - "owner", - "organization", - "workspaces" - ] + "type": "string" } - }, - "required": false, - "description": "Allows including related resource data. Value must be a comma-separated list containing one or more of `projects`, `task`, `owner`, or `organization`.\n" + } }, { "in": "query", - "name": "fields[task-configs]", - "description": "Return only the specified fields for task-configs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "projects", + "task", + "owner", + "organization", + "workspaces" + ] } } } @@ -29577,19 +30003,37 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/task-configs-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/task-configs-included" + "$ref": "#/components/schemas/task-configs-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/tasks" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "tasks": "#/components/schemas/tasks", + "organizations": "#/components/schemas/organizations", + "workspaces": "#/components/schemas/workspaces" + } } } } - ] + } } } } @@ -30231,35 +30675,35 @@ }, { "in": "query", - "name": "include", + "name": "fields[task-stages]", + "description": "Return only the specified fields for task-stages resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "run", - "run.workspace", - "task_results", - "policy_evaluations", - "cost_estimate" - ] + "type": "string" } - }, - "required": false, - "description": "A comma-separated list of related resources to include." + } }, { "in": "query", - "name": "fields[task-stages]", - "description": "Return only the specified fields for task-stages resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "run", + "run.workspace", + "task_results", + "policy_evaluations", + "cost_estimate" + ] } } } @@ -30270,19 +30714,41 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/task-stages-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/task-stages-included" + "$ref": "#/components/schemas/task-stages-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/task-results" + }, + { + "$ref": "#/components/schemas/policy-evaluations" + }, + { + "$ref": "#/components/schemas/cost-estimates" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runs": "#/components/schemas/runs", + "workspaces": "#/components/schemas/workspaces", + "task-results": "#/components/schemas/task-results", + "policy-evaluations": "#/components/schemas/policy-evaluations", + "cost-estimates": "#/components/schemas/cost-estimates" + } } } } - ] + } } } } @@ -30918,31 +31384,31 @@ }, { "in": "query", - "name": "include", + "name": "fields[workspace-transfers]", + "description": "Return only the specified fields for workspace-transfers resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", "style": "form", "explode": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "events" - ] + "type": "string" } - }, - "required": false, - "description": "Allows including related resource data." + } }, { "in": "query", - "name": "fields[workspace-transfers]", - "description": "Return only the specified fields for workspace-transfers resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "name": "include", "style": "form", "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "events" + ] } } } @@ -30953,19 +31419,25 @@ "content": { "application/vnd.api+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/workspace-transfers-envelope" - }, - { - "type": "object", - "properties": { - "included": { - "$ref": "#/components/schemas/workspace-transfers-included" + "$ref": "#/components/schemas/workspace-transfers-envelope", + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspace-transfer-events" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspace-transfer-events": "#/components/schemas/workspace-transfer-events" + } } } } - ] + } } } } @@ -32564,158 +33036,92 @@ } }, "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer" - } - }, "schemas": { - "errors": { + "entitlement-sets": { "type": "object", "properties": { - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "detail": { - "type": "string" - } - } - } + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "entitlement-sets" + ] + }, + "attributes": { + "type": "object" + }, + "links": { + "type": "object" } } }, - "admin-banners": { + "no-code-module-versions": { "type": "object", "required": [ + "id", "type", "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true, - "description": "The external ID of the banner (e.g. ab-xxxxxxxxxxxxxxxx)." + "readOnly": true }, "type": { "type": "string", "enum": [ - "admin-banners" + "no-code-module-versions" ] }, "attributes": { "type": "object", - "required": [ - "title", - "body", - "style", - "audience" - ], "properties": { - "title": { - "type": "string", - "maxLength": 100, - "description": "Short heading for the banner (max 100 characters)." - }, - "body": { - "type": "string", - "maxLength": 500, - "description": "Body text of the banner. Accepts the same HTML as the other customization settings (footer, login help, error and new user instructions): Rails' default allow-list, which permits common formatting such as bold, italic, links, lists, headings and code, and strips scripts, inline styles and form controls. Maximum 500 characters after sanitization.\n" - }, - "style": { - "type": "string", - "enum": [ - "info", - "warning", - "critical" - ], - "description": "Visual style controlling how the banner is rendered." - }, - "audience": { - "type": "string", - "enum": [ - "all_users", - "authenticated_only" - ], - "description": "Which users see the banner." - }, - "scheduled-publish-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "ISO 8601 datetime (UTC) when the banner should become active. scheduled-publish-at, scheduled-expire-at, and timezone must all be provided together or all omitted. Providing only a subset is a validation error.\n" - }, - "scheduled-expire-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "ISO 8601 datetime (UTC) when the banner should be automatically deactivated. Must be provided together with scheduled-publish-at and timezone.\n" - }, - "timezone": { + "module-version": { "type": "string", - "nullable": true, - "description": "IANA timezone identifier for the scheduled times (e.g. \"America/New_York\", \"UTC\"). Required when scheduled-publish-at and scheduled-expire-at are provided. Used by the UI to display the schedule in the administrator's local timezone; stored and returned as-is.\n" + "readOnly": true, + "description": "Registry module version string this no-code module version pins\n(for example, 1.0.0).\n" }, - "published-at": { - "type": "string", - "format": "date-time", - "nullable": true, + "version-number": { + "type": "integer", "readOnly": true, - "description": "Set to the current time the first time this banner becomes immediately active: on creation without a schedule, or when a scheduled banner has its schedule cleared via update. Once set, this value is not changed by subsequent updates. Null when the banner has an active schedule (scheduled-publish-at is set) and has not yet had it cleared.\n" + "description": "Monotonic version number for this no-code module version record.\n" } } - } - } - }, - "admin-banners-collection-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/admin-banners" + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "no-code-module": { + "$ref": "#/components/schemas/no-code-modules-has-one" + }, + "variable-options": { + "$ref": "#/components/schemas/variable-options-has-many" + } } } } }, - "admin-banners-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/admin-banners" - } - } - }, - "admin-saml-settings": { + "no-code-modules": { "type": "object", "required": [ - "type" + "id", + "type", + "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true, - "example": "saml", - "description": "Always the literal string `saml`; SAML settings are a singleton resource." + "readOnly": true }, "type": { "type": "string", "enum": [ - "saml-settings" + "no-code-modules" ] }, "attributes": { @@ -32723,1119 +33129,955 @@ "properties": { "enabled": { "type": "boolean", - "description": "Whether SAML single sign-on is enabled." - }, - "debug": { - "type": "boolean", - "description": "Whether SAML debug mode is enabled." - }, - "slo-endpoint-url": { - "type": "string", - "nullable": true, - "description": "Single Log Out URL of the identity provider." - }, - "sso-endpoint-url": { - "type": "string", - "nullable": true, - "description": "Single Sign On URL of the identity provider." - }, - "idp-cert": { - "type": "string", - "nullable": true, - "deprecated": true, - "description": "**Deprecated.** PEM-encoded primary IdP certificate. Use the `saml-settings/idp-certificates` resource instead. When the idp-certificates API is active this attribute reflects the cert body of the `legacy_primary` row; writing to it creates or rotates that row.\n" - }, - "old-idp-cert": { - "type": "string", - "nullable": true, - "deprecated": true, - "readOnly": true, - "description": "**Deprecated.** Previous identity provider certificate retained after a rotation. Use the `saml-settings/idp-certificates` resource to manage certificates directly.\n" - }, - "attr-username": { - "type": "string", - "nullable": true, - "description": "SAML attribute name for the username." - }, - "attr-groups": { - "type": "string", - "nullable": true, - "description": "SAML attribute name for team membership." - }, - "attr-site-admin": { - "type": "string", - "nullable": true, - "description": "SAML attribute name that designates a site admin." - }, - "site-admin-role": { - "type": "string", - "nullable": true, - "description": "Role value that grants site admin permissions." - }, - "attr-site-auditor": { - "type": "string", - "nullable": true, - "x-vis": [ - "tfe" - ], - "x-tfe-min-version": "2.1.0", - "description": "SAML attribute name that designates a site auditor.\n\nThis attribute is only available in Terraform Enterprise version 2.1.0 or later." - }, - "site-auditor-role": { - "type": "string", - "nullable": true, - "x-vis": [ - "tfe" - ], - "x-tfe-min-version": "2.1.0", - "description": "Role value that grants site auditor permissions.\n\nThis attribute is only available in Terraform Enterprise version 2.1.0 or later." - }, - "sso-api-token-session-timeout": { - "type": "integer", - "nullable": true, - "description": "Session timeout, in seconds, for API tokens issued via SSO." - }, - "team-management-enabled": { - "type": "boolean", - "nullable": true, - "description": "Whether team membership is managed by the identity provider." - }, - "acs-consumer-url": { - "type": "string", - "readOnly": true, - "description": "Assertion Consumer Service URL to configure in the identity provider." - }, - "metadata-url": { - "type": "string", - "readOnly": true, - "description": "Service provider metadata URL." - }, - "certificate": { - "type": "string", - "nullable": true, - "description": "PEM encoded X.509 certificate used to sign SAML requests." - }, - "private-key": { - "type": "string", - "nullable": true, - "writeOnly": true, - "description": "PEM encoded private key paired with `certificate`. Write-only: it is never returned in a response. Omit it on update to leave the stored key unchanged.\n" - }, - "authn-requests-signed": { - "type": "boolean", - "nullable": true, - "description": "Whether authentication requests are signed." - }, - "want-assertions-signed": { - "type": "boolean", - "nullable": true, - "description": "Whether signed assertions are required from the identity provider." - }, - "signature-signing-method": { - "type": "string", - "nullable": true, - "enum": [ - "SHA1", - "SHA256" - ], - "description": "Signature signing method." + "description": "Whether this no-code module is enabled for deployment." }, - "signature-digest-method": { + "version-pin": { "type": "string", "nullable": true, - "enum": [ - "SHA1", - "SHA256" - ], - "description": "Signature digest method." + "description": "Optional pinned module version for no-code deployments." + } + } + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" }, - "max-message-size-in-bytes": { - "type": "integer", - "description": "Maximum accepted size of a SAML message, in bytes." + "registry-module": { + "$ref": "#/components/schemas/registry-modules-has-one" }, - "provider-type": { - "type": "string", - "enum": [ - "entra", - "okta", - "saml", - "unknown" - ], - "description": "Identity provider family. `unknown` predates this setting." + "variable-options": { + "$ref": "#/components/schemas/variable-options-has-many" }, - "permissions": { - "type": "object", - "readOnly": true, - "properties": { - "can-read": { - "type": "boolean" - }, - "can-update": { - "type": "boolean" - } - } + "latest-version": { + "$ref": "#/components/schemas/no-code-module-versions-has-one" } } + }, + "links": { + "$ref": "#/components/schemas/self" } } }, - "admin-saml-settings-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/admin-saml-settings" - } - } - }, - "related": { - "type": "object", - "properties": { - "related": { - "type": "string" - } - } - }, - "links_related": { + "ootb-policy-libraries": { "type": "object", + "description": "A slim reference to an OOTB policy library, returned in the `included` array when ?include=ootb-policy-libraries is passed. Contains only the name attribute.", "properties": { - "links": { - "$ref": "#/components/schemas/related" + "id": { + "type": "string", + "description": "The slug of the OOTB policy library.", + "example": "nist-800-53-aws" + }, + "type": { + "type": "string", + "enum": [ + "ootb-policy-libraries" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Human-readable library name." + } + } } } }, - "admin-scim-settings": { + "scim-identities": { "type": "object", "required": [ - "type" + "type", + "attributes" ], "properties": { "id": { "type": "string", "readOnly": true, - "example": "scim", - "description": "Always the literal string `scim`; SCIM settings are a singleton resource." + "description": "The external ID of the SCIM identity" }, "type": { "type": "string", "enum": [ - "scim-settings" + "scim-identities" ] }, "attributes": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Whether SCIM provisioning is enabled. Enabling requires SAML to be enabled with a SCIM-compatible provider type.\n" - }, - "paused": { - "type": "boolean", - "description": "Whether SCIM provisioning is temporarily paused. Cannot be true while disabled." - }, - "site-admin-group-scim-id": { - "type": "string", - "nullable": true, - "description": "SCIM id of the group whose members are granted site admin permissions." - }, - "site-admin-group-display-name": { - "type": "string", - "nullable": true, - "readOnly": true, - "description": "Display name of the site admin group." - }, - "site-auditor-group-scim-id": { + "status": { "type": "string", - "nullable": true, - "x-vis": [ - "tfe" + "enum": [ + "provisioned", + "claimed" ], - "x-tfe-min-version": "2.1.0", - "description": "SCIM id of the group whose members are granted site auditor permissions.\n\nThis attribute is only available in Terraform Enterprise version 2.1.0 or later." - }, - "site-auditor-group-display-name": { - "type": "string", - "nullable": true, "readOnly": true, - "x-vis": [ - "tfe" - ], - "x-tfe-min-version": "2.1.0", - "description": "Display name of the site auditor group.\n\nThis attribute is only available in Terraform Enterprise version 2.1.0 or later." + "description": "The provisioning status of the user.\n- \"provisioned\": User was created via SCIM provisioning\n- \"claimed\": User claimed their account or existed before SCIM\n" }, - "permissions": { - "type": "object", + "username": { + "type": "string", "readOnly": true, - "properties": { - "can-read": { - "type": "boolean" - }, - "can-update": { - "type": "boolean" - }, - "can-destroy": { - "type": "boolean" - } - } - } - } - }, - "relationships": { - "type": "object", - "properties": { - "authentication-tokens": { - "$ref": "#/components/schemas/links_related" + "description": "The username/identity string from the SCIM provider." } } } } }, - "admin-scim-settings-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/admin-scim-settings" - } - } - }, - "saml-idp-certificates": { + "stack-aggregate-outputs": { "type": "object", "required": [ - "type" + "type", + "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true, - "description": "The external ID of the IdP certificate (e.g. idpc-xxxxxxxxxxxxxxxx).", - "example": "idpc-xxxxxxxxxxxxxxxx" + "readOnly": true }, "type": { "type": "string", + "readOnly": true, "enum": [ - "saml-idp-certificates" + "stack-aggregate-outputs" ] }, "attributes": { "type": "object", "properties": { - "display-name": { + "status": { "type": "string", - "description": "A human-readable label for this certificate.", - "example": "Primary IdP Cert" + "enum": [ + "created", + "queued", + "running", + "completed", + "failed", + "canceled" + ], + "readOnly": true }, - "cert": { - "type": "string", - "description": "PEM-encoded X.509 certificate body." + "published-output-count": { + "type": "integer", + "readOnly": true }, - "fingerprint": { + "created-at": { "type": "string", - "readOnly": true, - "description": "Colon-separated uppercase SHA-256 fingerprint of the certificate.", - "example": "AB:CD:EF:..." + "format": "date-time", + "readOnly": true }, - "expires-at": { + "updated-at": { "type": "string", "format": "date-time", - "nullable": true, - "readOnly": true, - "description": "ISO 8601 datetime (UTC) when the certificate expires." + "readOnly": true }, - "created-at": { + "running-at": { "type": "string", "format": "date-time", - "readOnly": true, - "description": "ISO 8601 datetime (UTC) when this record was created." + "readOnly": true }, - "cert-role": { + "queued-at": { "type": "string", - "readOnly": true, - "description": "Internal role of this certificate. `managed` certificates are created and deleted through the idp-certificates API. `legacy_primary` and `legacy_old` certificates are managed via the deprecated `idp-cert` / `old-idp-cert` attributes on the SAML settings resource and cannot have their cert body replaced through this API.\n", - "enum": [ - "managed", - "legacy_primary", - "legacy_old" - ] + "format": "date-time", + "readOnly": true }, - "issuer": { + "completed-at": { "type": "string", + "format": "date-time", "nullable": true, - "readOnly": true, - "description": "Human-readable issuer string derived from the O and CN fields of the certificate." + "readOnly": true + }, + "failed-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true } } - } - } - }, - "saml-idp-certificates-collection-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/saml-idp-certificates" + }, + "relationships": { + "type": "object", + "properties": { + "stack-published-outputs": { + "$ref": "#/components/schemas/links_related" + }, + "stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" + } } } } }, - "saml-idp-certificates-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/saml-idp-certificates" - } - } - }, - "admin-customization-settings": { + "tf-policy-evaluations": { "type": "object", + "description": "Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle.", "required": [ "type", - "id", "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true, - "description": "Always \"customization\"." + "readOnly": true }, "type": { "type": "string", "enum": [ - "customization-settings" + "tf-policy-evaluations" ] }, "attributes": { "type": "object", "properties": { - "support-email-address": { + "status": { "type": "string", - "nullable": true, - "description": "The support email address shown in help text on the site. When set, it is rendered as a mailto: link in the support link chain.\n" + "description": "Current status of the Terraform policy evaluation. Status values:\n- `pending`: Initial state, not yet queued for evaluation\n- `queued`: Queued and waiting to be evaluated\n- `running`: Actively being evaluated\n- `awaiting_override`: Failed with overridable policies, awaiting manual override\n- `passed`: All policies passed (final state)\n- `failed`: Failed with mandatory policies (final state)\n- `overridden`: Failed evaluation manually overridden (final state)\n- `errored`: System error during processing (final state)\n- `canceled`: Canceled before completion (final state)\n- `unreachable`: Pseudo-state derived from run state\n", + "enum": [ + "pending", + "queued", + "running", + "awaiting_override", + "passed", + "failed", + "overridden", + "errored", + "canceled", + "unreachable" + ] }, - "support-url-address": { + "stage-type": { "type": "string", - "description": "The support URL shown in help text on the site. Used as the fallback when support-email-address is not set.\n" + "description": "The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init')" }, - "login-help": { - "type": "string", - "nullable": true, - "x-vis": [ - "tfe" - ], - "description": "HTML that overrides the default help text below the login form.\n\nThis attribute is only available in Terraform Enterprise." + "status-timestamps": { + "type": "object", + "description": "Timestamps for each status transition during the evaluation lifecycle", + "properties": { + "pending-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation entered pending status" + }, + "queued-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation was queued for processing" + }, + "running-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation started running" + }, + "awaiting-override-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation entered awaiting override status (for failed mandatory policies)" + }, + "passed-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation passed successfully" + }, + "failed-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation failed" + }, + "overridden-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When a failed evaluation was overridden" + }, + "errored-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation encountered an error" + }, + "canceled-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the evaluation was canceled" + } + } }, - "footer": { + "created-at": { "type": "string", - "nullable": true, - "x-vis": [ - "tfe" - ], - "description": "HTML rendered just above the copyright/release in the application footer.\n\n\nThis attribute is only available in Terraform Enterprise." + "format": "date-time", + "readOnly": true, + "description": "When the evaluation was created" }, - "error": { + "updated-at": { "type": "string", - "nullable": true, - "x-vis": [ - "tfe" - ], - "description": "HTML that overrides the default error instructions.\n\nThis attribute is only available in Terraform Enterprise." + "format": "date-time", + "readOnly": true, + "description": "When the evaluation was last updated" }, - "new-user": { - "type": "string", - "nullable": true, - "x-vis": [ - "tfe" - ], - "description": "HTML shown to users when they first create an account.\n\nThis attribute is only available in Terraform Enterprise." + "result-count": { + "type": "object", + "description": "Aggregated counts of policy results across all policy sets in this evaluation", + "properties": { + "advisory-failed": { + "type": "integer", + "description": "Policies with advisory enforcement level that failed" + }, + "mandatory-failed": { + "type": "integer", + "description": "Policies with mandatory enforcement level that failed" + }, + "mandatory-overridable-failed": { + "type": "integer", + "description": "Policies with mandatory-overridable enforcement level that failed" + }, + "passed": { + "type": "integer", + "description": "Policies that passed" + }, + "errored": { + "type": "integer", + "description": "Policies that errored during evaluation" + }, + "unknown": { + "type": "integer", + "description": "Policies with an unknown evaluation result" + } + } }, - "internal-support-url": { - "type": "string", + "error": { + "type": "object", "nullable": true, - "maxLength": 2048, - "x-vis": [ - "tfe" - ], - "description": "Overrides the default support links in the TFE UI (Help menu, error pages, welcome page). Accepts https://, http://, or mailto: schemes. Leave blank to restore the default HashiCorp support link resolution chain.\n\n\nThis attribute is only available in Terraform Enterprise." + "description": "Error information if the entire evaluation failed (not policy-specific errors)", + "properties": { + "type": { + "type": "string", + "enum": [ + "setup_error", + "incompatible_agent_version" + ], + "description": "Error type identifier indicating the category of failure" + }, + "summary": { + "type": "string", + "description": "Brief error summary for display" + }, + "detail": { + "type": "string", + "description": "Detailed error message with additional context" + } + } }, - "internal-documentation-url": { - "type": "string", - "nullable": true, - "maxLength": 2048, - "x-vis": [ - "tfe" - ], - "description": "Overrides documentation links in the TFE UI (Help menu). Accepts https:// or http:// only. Leave blank to use the default HashiCorp documentation URL.\n\n\nThis attribute is only available in Terraform Enterprise." + "archivist-supported": { + "type": "boolean", + "readOnly": true, + "description": "Whether this evaluation supports archivist-backed outcome storage. When `true`,\nfull policy results are available via `policy-set-result-url` on each\n`tf-policy-set-outcome`. When `false`, use the `outcomes` array instead.\n" }, - "internal-tutorials-url": { - "type": "string", - "nullable": true, - "maxLength": 2048, - "x-vis": [ - "tfe" - ], - "description": "Overrides tutorial links in the TFE UI (Help > Tutorials). Accepts https:// or http:// only. Leave blank to use the default HashiCorp tutorials URL.\n\n\nThis attribute is only available in Terraform Enterprise." + "permissions": { + "type": "object", + "description": "User permissions for this evaluation", + "properties": { + "can-override": { + "type": "boolean", + "description": "Whether the current user has permission to override failed policies" + } + } }, - "avatar-sources": { - "type": "array", - "nullable": true, - "x-vis": [ - "tfe" - ], - "description": "Ordered catalog of configurable avatar sources with enabled/disabled flags. Initials is the implicit terminal fallback and is not included. PATCH accepts the same array format and performs a full replacement.\n\n\nThis attribute is only available in Terraform Enterprise.", - "items": { - "type": "object", - "required": [ - "source", - "enabled" - ], - "properties": { - "source": { - "type": "string", - "enum": [ - "gravatar" - ], - "description": "The name of the avatar source." - }, - "enabled": { - "type": "boolean", - "description": "Whether the source is active." - } + "actions": { + "type": "object", + "description": "Available actions for this evaluation", + "properties": { + "is-overridable": { + "type": "boolean", + "description": "Whether this evaluation can be overridden (based on policy enforcement levels and current status)" } } } } + }, + "relationships": { + "type": "object", + "properties": { + "run": { + "description": "The run that this policy evaluation belongs to", + "$ref": "#/components/schemas/runs-has-one" + }, + "tf-policy-set-outcomes": { + "description": "The Terraform policy set outcomes that are part of this evaluation", + "$ref": "#/components/schemas/tf-policy-set-outcomes-has-many" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" + } + } } } }, - "admin-customization-settings-envelope": { + "workspace-outputs": { "type": "object", + "description": "Workspace outputs are Terraform output values associated with a workspace.\nThey include the name of the output and a sensitive boolean. There is an\nadditional attribute, \"value\", that can be any JSON type, including null when\nthe output is sensitive; it is intentionally omitted from this schema (same\npattern as state-version-outputs) because OpenAPI cannot express a nullable\nany-type under the project's nullable-type-sibling lint rule.\n", "required": [ - "data" + "id", + "type", + "attributes" ], "properties": { - "data": { - "$ref": "#/components/schemas/admin-customization-settings" + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "workspace-outputs" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "sensitive": { + "type": "boolean" + }, + "output-type": { + "type": "string", + "description": "The Terraform type of the output value (e.g. string, number, bool,\nlist, map, set, object, tuple).\n" + }, + "detailed-type": { + "description": "A detailed representation of the output type. May be a string for\nsimple types or an array for complex types such as tuples and objects.\n" + }, + "workspace-attributes": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "organization-attributes": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } } } }, - "admin-tfpolicy-version-architecture": { + "workspace-readme": { "type": "object", "required": [ - "url", - "sha", - "os", - "arch" + "id", + "type", + "attributes" ], "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Download URL for this platform/architecture's binary." - }, - "sha": { + "id": { "type": "string", - "pattern": "^[a-f0-9]{64}$", - "description": "SHA-256 checksum (64 lowercase hex characters) of the binary at `url`." + "readOnly": true }, - "os": { + "type": { "type": "string", "enum": [ - "linux" - ], - "description": "Operating system for this architecture. Currently only \"linux\" is supported." + "workspace-readme" + ] }, - "arch": { - "type": "string", - "enum": [ - "amd64", - "arm64", - "s390x" - ], - "description": "CPU architecture." + "attributes": { + "type": "object", + "properties": { + "raw-markdown": { + "type": "string", + "readOnly": true, + "description": "Raw markdown contents of the workspace README." + } + } } } }, - "admin-tfpolicy-versions": { + "workspace-transfer-events": { "type": "object", "required": [ - "type", - "attributes" + "type" ], "properties": { "id": { "type": "string", - "readOnly": true, - "description": "The external ID of the TFPolicy version (e.g. tool-xxxxxxxxxxxxxxxx)." + "readOnly": true }, "type": { "type": "string", "enum": [ - "tfpolicy-versions" + "workspace-transfer-events" ] }, "attributes": { "type": "object", "properties": { - "version": { + "event-type": { "type": "string", - "description": "The semantic version string for this TFPolicy release (e.g. \"0.1.0\"). Must be unique among TFPolicy versions.\n" + "enum": [ + "created", + "started", + "completed", + "failed", + "paused", + "resumed", + "canceled" + ], + "readOnly": true }, - "url": { + "operation-name": { "type": "string", - "format": "uri", "nullable": true, - "deprecated": true, - "description": "The URL where you can download the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].url` field instead. Null when no linux/amd64 architecture has been registered for this version (e.g. an arm64-only release). On create, either `url` and `sha` or at least one entry in `archs` must be provided. If both are given, the linux/amd64 entry in `archs` (when present) must match `url`/`sha` exactly, or the request is rejected with 422 Unprocessable Content.\n" + "readOnly": true }, - "sha": { + "message": { "type": "string", - "pattern": "^[a-f0-9]{64}$", "nullable": true, - "deprecated": true, - "description": "The SHA-256 checksum of the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].sha` field instead. Null under the same conditions as `url`.\n" - }, - "official": { - "type": "boolean", - "description": "Whether this is an official HashiCorp-published release." - }, - "enabled": { - "type": "boolean", - "description": "Whether this version can be selected for use. Attempting to set `enabled` to `false` while the version is in use returns 409 Conflict.\n" - }, - "beta": { - "type": "boolean", - "description": "Whether this version is a beta/pre-release." - }, - "deprecated": { - "type": "boolean", - "description": "Whether this version is deprecated. On update (`PATCH`), when set to `true` without a `deprecated-reason` in the same request, the server fills in a default reason referencing the current version. This default does not apply on create.\n" + "readOnly": true }, - "deprecated-reason": { + "user-id": { "type": "string", "nullable": true, - "description": "Explanation shown to users when `deprecated` is `true`." + "readOnly": true }, "created-at": { "type": "string", "format": "date-time", - "readOnly": true, - "description": "The timestamp when this version was created." - }, - "archs": { - "type": "array", - "description": "The set of platform/architecture builds available for this version. On create, either at least one entry here or the top-level `url`/`sha` pair must be provided. On update, providing `archs` replaces the full set of architectures for this version; omitting it leaves existing architectures unchanged, while providing an empty array is rejected with 422 Unprocessable Content (a TFPolicy version must always have at least one architecture).\n", - "items": { - "$ref": "#/components/schemas/admin-tfpolicy-version-architecture" - } - }, - "permissions": { - "type": "object", - "readOnly": true, - "description": "The current user's permissions for this TFPolicy version, when included.", - "properties": { - "can-read": { - "type": "boolean" - }, - "can-update": { - "type": "boolean" - } - } + "readOnly": true } } } } }, - "pagination": { - "type": "object", - "properties": { - "current-page": { - "type": "integer" - }, - "page-size": { - "type": "integer" - }, - "prev-page": { - "type": "integer", - "nullable": true - }, - "next-page": { - "type": "integer", - "nullable": true - }, - "total-pages": { - "type": "integer" - }, - "total-count": { - "type": "integer" - } - } - }, - "self-with-pagination": { + "errors": { "type": "object", "properties": { - "self": { - "type": "string" - }, - "first": { - "type": "string" - }, - "prev": { - "type": "string", - "nullable": true - }, - "next": { - "type": "string", - "nullable": true - }, - "last": { - "type": "string" + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "detail": { + "type": "string" + } + } + } } } }, - "admin-tfpolicy-versions-collection-envelope": { + "admin-banners": { "type": "object", "required": [ - "data" + "type", + "attributes" ], "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/admin-tfpolicy-versions" - } - }, - "meta": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/pagination" - } - } + "id": { + "type": "string", + "readOnly": true, + "description": "The external ID of the banner (e.g. ab-xxxxxxxxxxxxxxxx)." }, - "links": { - "$ref": "#/components/schemas/self-with-pagination" - } - } - }, - "admin-tfpolicy-version-create": { - "allOf": [ - { - "$ref": "#/components/schemas/admin-tfpolicy-versions" + "type": { + "type": "string", + "enum": [ + "admin-banners" + ] }, - { + "attributes": { "type": "object", + "required": [ + "title", + "body", + "style", + "audience" + ], "properties": { - "attributes": { - "type": "object", - "required": [ - "version" + "title": { + "type": "string", + "maxLength": 100, + "description": "Short heading for the banner (max 100 characters)." + }, + "body": { + "type": "string", + "maxLength": 500, + "description": "Body text of the banner. Accepts the same HTML as the other customization settings (footer, login help, error and new user instructions): Rails' default allow-list, which permits common formatting such as bold, italic, links, lists, headings and code, and strips scripts, inline styles and form controls. Maximum 500 characters after sanitization.\n" + }, + "style": { + "type": "string", + "enum": [ + "info", + "warning", + "critical" ], - "properties": { - "version": { - "type": "string" - } - } + "description": "Visual style controlling how the banner is rendered." + }, + "audience": { + "type": "string", + "enum": [ + "all_users", + "authenticated_only" + ], + "description": "Which users see the banner." + }, + "scheduled-publish-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "ISO 8601 datetime (UTC) when the banner should become active. scheduled-publish-at, scheduled-expire-at, and timezone must all be provided together or all omitted. Providing only a subset is a validation error.\n" + }, + "scheduled-expire-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "ISO 8601 datetime (UTC) when the banner should be automatically deactivated. Must be provided together with scheduled-publish-at and timezone.\n" + }, + "timezone": { + "type": "string", + "nullable": true, + "description": "IANA timezone identifier for the scheduled times (e.g. \"America/New_York\", \"UTC\"). Required when scheduled-publish-at and scheduled-expire-at are provided. Used by the UI to display the schedule in the administrator's local timezone; stored and returned as-is.\n" + }, + "published-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true, + "description": "Set to the current time the first time this banner becomes immediately active: on creation without a schedule, or when a scheduled banner has its schedule cleared via update. Once set, this value is not changed by subsequent updates. Null when the banner has an active schedule (scheduled-publish-at is set) and has not yet had it cleared.\n" } } } - ] + } }, - "admin-tfpolicy-version-create-envelope": { + "admin-banners-collection-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/admin-tfpolicy-version-create" + "type": "array", + "items": { + "$ref": "#/components/schemas/admin-banners" + } } } }, - "admin-tfpolicy-versions-envelope": { + "admin-banners-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/admin-tfpolicy-versions" + "$ref": "#/components/schemas/admin-banners" } } }, - "admin-general-settings": { + "admin-saml-settings": { "type": "object", "required": [ - "type", - "id", - "attributes" + "type" ], "properties": { "id": { "type": "string", "readOnly": true, - "description": "Always \"general\"." + "example": "saml", + "description": "Always the literal string `saml`; SAML settings are a singleton resource." }, "type": { "type": "string", "enum": [ - "general-settings" + "saml-settings" ] }, "attributes": { "type": "object", "properties": { - "require-two-factor-for-admins": { - "type": "boolean", - "description": "Whether two-factor authentication is required for site administrators." - }, - "limit-user-organization-creation": { + "enabled": { "type": "boolean", - "description": "Whether the creation of new organizations is limited to site administrators." + "description": "Whether SAML single sign-on is enabled." }, - "api-rate-limiting-enabled": { + "debug": { "type": "boolean", - "description": "Whether API rate limiting is enabled." + "description": "Whether SAML debug mode is enabled." }, - "api-rate-limit": { - "type": "integer", - "description": "The number of API requests allowed per second, per user token or IP address." + "slo-endpoint-url": { + "type": "string", + "nullable": true, + "description": "Single Log Out URL of the identity provider." }, - "agent-polling-retry-after": { - "type": "integer", - "description": "The number of seconds agents wait before polling for new work." + "sso-endpoint-url": { + "type": "string", + "nullable": true, + "description": "Single Sign On URL of the identity provider." }, - "agents-enabled": { - "type": "boolean", - "description": "Whether HCP Terraform agents are enabled." + "idp-cert": { + "type": "string", + "nullable": true, + "deprecated": true, + "description": "**Deprecated.** PEM-encoded primary IdP certificate. Use the `saml-settings/idp-certificates` resource instead. When the idp-certificates API is active this attribute reflects the cert body of the `legacy_primary` row; writing to it creates or rotates that row.\n" }, - "fair-run-queuing-enabled": { - "type": "boolean", + "old-idp-cert": { + "type": "string", + "nullable": true, + "deprecated": true, "readOnly": true, - "description": "Deprecated. Always returns false. Retained for backwards compatibility with the public API contract.\n" + "description": "**Deprecated.** Previous identity provider certificate retained after a rotation. Use the `saml-settings/idp-certificates` resource to manage certificates directly.\n" }, - "limit-organizations-per-user": { - "type": "boolean", - "description": "Whether the number of organizations a user may create is limited." + "attr-username": { + "type": "string", + "nullable": true, + "description": "SAML attribute name for the username." }, - "default-organizations-per-user-ceiling": { - "type": "integer", - "description": "The default maximum number of organizations a single user may create." + "attr-groups": { + "type": "string", + "nullable": true, + "description": "SAML attribute name for team membership." }, - "limit-workspaces-per-organization": { - "type": "boolean", - "description": "Whether the number of workspaces per organization is limited." + "attr-site-admin": { + "type": "string", + "nullable": true, + "description": "SAML attribute name that designates a site admin." }, - "default-workspaces-per-organization-ceiling": { + "site-admin-role": { + "type": "string", + "nullable": true, + "description": "Role value that grants site admin permissions." + }, + "attr-site-auditor": { + "type": "string", + "nullable": true, + "x-vis": [ + "tfe" + ], + "x-tfe-min-version": "2.1.0", + "description": "SAML attribute name that designates a site auditor.\n\nThis attribute is only available in Terraform Enterprise version 2.1.0 or later." + }, + "site-auditor-role": { + "type": "string", + "nullable": true, + "x-vis": [ + "tfe" + ], + "x-tfe-min-version": "2.1.0", + "description": "Role value that grants site auditor permissions.\n\nThis attribute is only available in Terraform Enterprise version 2.1.0 or later." + }, + "sso-api-token-session-timeout": { "type": "integer", - "description": "The default maximum number of workspaces per organization." + "nullable": true, + "description": "Session timeout, in seconds, for API tokens issued via SSO." }, - "terraform-build-worker-apply-timeout": { + "team-management-enabled": { + "type": "boolean", + "nullable": true, + "description": "Whether team membership is managed by the identity provider." + }, + "acs-consumer-url": { "type": "string", - "description": "The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string (for example, \"24h\").\n" + "readOnly": true, + "description": "Assertion Consumer Service URL to configure in the identity provider." }, - "terraform-build-worker-plan-timeout": { + "metadata-url": { "type": "string", - "description": "The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string (for example, \"24h\").\n" + "readOnly": true, + "description": "Service provider metadata URL." }, - "apply-timeout": { + "certificate": { "type": "string", - "description": "Alias of terraform-build-worker-apply-timeout. The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string.\n" + "nullable": true, + "description": "PEM encoded X.509 certificate used to sign SAML requests." }, - "plan-timeout": { + "private-key": { "type": "string", - "description": "Alias of terraform-build-worker-plan-timeout. The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string.\n" + "nullable": true, + "writeOnly": true, + "description": "PEM encoded private key paired with `certificate`. Write-only: it is never returned in a response. Omit it on update to leave the stored key unchanged.\n" }, - "send-passing-statuses-for-untriggered-speculative-plans": { + "authn-requests-signed": { "type": "boolean", - "description": "Whether passing commit statuses are sent for untriggered speculative plans.\n" + "nullable": true, + "description": "Whether authentication requests are signed." }, - "allow-speculative-plans-on-pull-requests-from-forks": { + "want-assertions-signed": { "type": "boolean", - "description": "Whether speculative plans are allowed on pull requests originating from forked repositories.\n" + "nullable": true, + "description": "Whether signed assertions are required from the identity provider." }, - "default-remote-state-access": { - "type": "boolean", - "description": "Whether new workspaces allow global remote state access by default.\n" + "signature-signing-method": { + "type": "string", + "nullable": true, + "enum": [ + "SHA1", + "SHA256" + ], + "description": "Signature signing method." }, - "automatic-assessment-interval": { - "type": "integer", - "description": "The interval, in hours, at which automatic health assessments run.\n" + "signature-digest-method": { + "type": "string", + "nullable": true, + "enum": [ + "SHA1", + "SHA256" + ], + "description": "Signature digest method." }, - "maximum-concurrent-assessments": { + "max-message-size-in-bytes": { "type": "integer", - "description": "The maximum number of health assessments that may run concurrently." - }, - "stacks-entitled": { - "type": "boolean", - "readOnly": true, - "description": "Whether the instance is licensed to use stacks." + "description": "Maximum accepted size of a SAML message, in bytes." }, - "stacks-enabled": { - "type": "boolean", - "x-vis": [ - "tfe" + "provider-type": { + "type": "string", + "enum": [ + "entra", + "okta", + "saml", + "unknown" ], - "description": "Whether stacks are enabled for use in this instance.\n\nThis attribute is only available in Terraform Enterprise." + "description": "Identity provider family. `unknown` predates this setting." }, - "enable-public-registration": { - "type": "boolean", - "x-vis": [ - "tfe" - ], - "description": "Whether public (self-service) user registration is enabled. Available only on Terraform Enterprise; silently ignored on HCP Terraform.\n\n\nThis attribute is only available in Terraform Enterprise." + "permissions": { + "type": "object", + "readOnly": true, + "properties": { + "can-read": { + "type": "boolean" + }, + "can-update": { + "type": "boolean" + } + } } } } } }, - "admin-general-settings-envelope": { + "admin-saml-settings-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/admin-general-settings" + "$ref": "#/components/schemas/admin-saml-settings" } } }, - "authenticated-resource-identifier": { + "related": { "type": "object", - "required": [ - "id", - "type" - ], "properties": { - "id": { + "related": { "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "organizations", - "runs", - "users", - "teams" - ] } } }, - "authenticated-resource-has-one": { + "links_related": { "type": "object", "properties": { - "data": { - "$ref": "#/components/schemas/authenticated-resource-identifier" - }, "links": { "$ref": "#/components/schemas/related" } } }, - "self": { - "type": "object", - "properties": { - "self": { - "type": "string" - } - } - }, - "users": { + "admin-scim-settings": { "type": "object", "required": [ - "id", - "type", - "attributes" + "type" ], "properties": { "id": { "type": "string", - "readOnly": true + "readOnly": true, + "example": "scim", + "description": "Always the literal string `scim`; SCIM settings are a singleton resource." }, "type": { "type": "string", "enum": [ - "users" + "scim-settings" ] }, "attributes": { "type": "object", "properties": { - "username": { - "type": "string", - "nullable": true - }, - "display-name": { - "description": "Human-readable display name for the user.", - "type": "string", - "readOnly": true, - "nullable": true + "enabled": { + "type": "boolean", + "description": "Whether SCIM provisioning is enabled. Enabling requires SAML to be enabled with a SCIM-compatible provider type.\n" }, - "is-service-account": { - "description": "Indicates whether this user is a synthetic user representing a team or organization.", - "type": "boolean" + "paused": { + "type": "boolean", + "description": "Whether SCIM provisioning is temporarily paused. Cannot be true while disabled." }, - "avatar-url": { + "site-admin-group-scim-id": { "type": "string", "nullable": true, - "description": "Gravatar URL for the user. Null in TFE when an admin has disabled Gravatar via the avatar_sources setting." + "description": "SCIM id of the group whose members are granted site admin permissions." }, - "initials": { + "site-admin-group-display-name": { "type": "string", + "nullable": true, "readOnly": true, - "description": "TFE only. Backend-computed initials derived from the user's username, or email local part as a fallback. At most two characters. Returns \"?\" when neither is available." - }, - "avatar-color-index": { - "type": "integer", - "readOnly": true, - "description": "TFE only. Stable index into the frontend avatar fallback colour palette, derived from the user's external ID. Colour uniqueness across users is not guaranteed." - }, - "auth-method": { - "type": "string" - }, - "v2-only": { - "type": "boolean" - }, - "is-admin": { - "type": "boolean" - }, - "is-site-admin": { - "description": "Deprecated. Use is-admin.", - "type": "boolean" - }, - "is-sso-login": { - "type": "boolean" - }, - "is-confirmed": { - "type": "boolean" - }, - "is-unified": { - "type": "boolean" - }, - "is-sudo": { - "type": "boolean" - }, - "email": { - "type": "string" + "description": "Display name of the site admin group." }, - "unconfirmed-email": { + "site-auditor-group-scim-id": { "type": "string", - "nullable": true + "nullable": true, + "x-vis": [ + "tfe" + ], + "x-tfe-min-version": "2.1.0", + "description": "SCIM id of the group whose members are granted site auditor permissions.\n\nThis attribute is only available in Terraform Enterprise version 2.1.0 or later." }, - "password": { + "site-auditor-group-display-name": { "type": "string", - "nullable": true - }, - "enterprise-support": { - "type": "boolean" - }, - "has-linked-hcp": { - "type": "boolean" - }, - "has-git-hub-app-token": { - "type": "boolean" - }, - "two-factor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "verified": { - "type": "boolean" - } - } + "nullable": true, + "readOnly": true, + "x-vis": [ + "tfe" + ], + "x-tfe-min-version": "2.1.0", + "description": "Display name of the site auditor group.\n\nThis attribute is only available in Terraform Enterprise version 2.1.0 or later." }, "permissions": { "type": "object", + "readOnly": true, "properties": { - "can-create-organization": { - "type": "boolean" - }, - "can-view-organizations": { - "type": "boolean" - }, - "can-view-settings": { - "type": "boolean" - }, - "can-view-smtp-settings": { - "type": "boolean" - }, - "can-view-twilio-settings": { - "type": "boolean" - }, - "can-view-saml-settings": { - "type": "boolean" - }, - "can-view-admin-workspaces": { - "type": "boolean" - }, - "can-view-admin-runs": { - "type": "boolean" - }, - "can-view-customization-settings": { - "type": "boolean" - }, - "can-view-cost-estimation-settings": { - "type": "boolean" - }, - "can-view-tool-versions": { - "type": "boolean" - }, - "can-create-tool-versions": { - "type": "boolean" - }, - "can-view-general-settings": { - "type": "boolean" - }, - "can-use-sql-runner": { - "type": "boolean" - }, - "can-view-profile": { - "type": "boolean" - }, - "can-change-email": { - "type": "boolean" - }, - "can-change-username": { - "type": "boolean" - }, - "can-change-password": { - "type": "boolean" - }, - "can-manage-sessions": { + "can-read": { "type": "boolean" }, - "can-manage-user-tokens": { + "can-update": { "type": "boolean" }, - "can-update-user": { + "can-destroy": { "type": "boolean" - }, - "can-reenable-2fa-by-unlinking": { - "type": "boolean", - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." - }, - "can-manage-hcp-accounts": { - "type": "boolean", - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." } } } @@ -33846,596 +34088,636 @@ "properties": { "authentication-tokens": { "$ref": "#/components/schemas/links_related" - }, - "github-app-oauth-tokens": { - "$ref": "#/components/schemas/links_related" - }, - "authenticated-resource": { - "$ref": "#/components/schemas/authenticated-resource-has-one" } } - }, - "links": { - "$ref": "#/components/schemas/self" } } }, - "users-envelope": { + "admin-scim-settings-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/users" + "$ref": "#/components/schemas/admin-scim-settings" } } }, - "feature-sets-identifier": { + "saml-idp-certificates": { "type": "object", "required": [ - "id", "type" ], "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true, + "description": "The external ID of the IdP certificate (e.g. idpc-xxxxxxxxxxxxxxxx).", + "example": "idpc-xxxxxxxxxxxxxxxx" }, "type": { "type": "string", "enum": [ - "feature-sets" + "saml-idp-certificates" ] + }, + "attributes": { + "type": "object", + "properties": { + "display-name": { + "type": "string", + "description": "A human-readable label for this certificate.", + "example": "Primary IdP Cert" + }, + "cert": { + "type": "string", + "description": "PEM-encoded X.509 certificate body." + }, + "fingerprint": { + "type": "string", + "readOnly": true, + "description": "Colon-separated uppercase SHA-256 fingerprint of the certificate.", + "example": "AB:CD:EF:..." + }, + "expires-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true, + "description": "ISO 8601 datetime (UTC) when the certificate expires." + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "ISO 8601 datetime (UTC) when this record was created." + }, + "cert-role": { + "type": "string", + "readOnly": true, + "description": "Internal role of this certificate. `managed` certificates are created and deleted through the idp-certificates API. `legacy_primary` and `legacy_old` certificates are managed via the deprecated `idp-cert` / `old-idp-cert` attributes on the SAML settings resource and cannot have their cert body replaced through this API.\n", + "enum": [ + "managed", + "legacy_primary", + "legacy_old" + ] + }, + "issuer": { + "type": "string", + "nullable": true, + "readOnly": true, + "description": "Human-readable issuer string derived from the O and CN fields of the certificate." + } + } } } }, - "feature-sets-has-many": { + "saml-idp-certificates-collection-envelope": { "type": "object", - "nullable": true, + "required": [ + "data" + ], "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/feature-sets-identifier" + "$ref": "#/components/schemas/saml-idp-certificates" } } } }, - "hcp-organization": { + "saml-idp-certificates-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/saml-idp-certificates" + } + } + }, + "admin-customization-settings": { "type": "object", "required": [ - "id", "type", - "attributes", - "relationships" + "id", + "attributes" ], "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true, + "description": "Always \"customization\"." }, "type": { "type": "string", "enum": [ - "hcp-organization" + "customization-settings" ] }, "attributes": { "type": "object", - "required": [ - "name", - "is-hcp-admin" - ], "properties": { - "name": { - "type": "string" + "support-email-address": { + "type": "string", + "nullable": true, + "description": "The support email address shown in help text on the site. When set, it is rendered as a mailto: link in the support link chain.\n" }, - "hcp-owner-email": { + "support-url-address": { "type": "string", - "nullable": true + "description": "The support URL shown in help text on the site. Used as the fallback when support-email-address is not set.\n" }, - "is-hcp-admin": { - "type": "boolean" - } - } - }, - "relationships": { - "type": "object", - "required": [ - "connected-plans" - ], - "properties": { - "connected-plans": { - "$ref": "#/components/schemas/feature-sets-has-many" + "login-help": { + "type": "string", + "nullable": true, + "x-vis": [ + "tfe" + ], + "description": "HTML that overrides the default help text below the login form.\n\nThis attribute is only available in Terraform Enterprise." + }, + "footer": { + "type": "string", + "nullable": true, + "x-vis": [ + "tfe" + ], + "description": "HTML rendered just above the copyright/release in the application footer.\n\n\nThis attribute is only available in Terraform Enterprise." + }, + "error": { + "type": "string", + "nullable": true, + "x-vis": [ + "tfe" + ], + "description": "HTML that overrides the default error instructions.\n\nThis attribute is only available in Terraform Enterprise." + }, + "new-user": { + "type": "string", + "nullable": true, + "x-vis": [ + "tfe" + ], + "description": "HTML shown to users when they first create an account.\n\nThis attribute is only available in Terraform Enterprise." + }, + "internal-support-url": { + "type": "string", + "nullable": true, + "maxLength": 2048, + "x-vis": [ + "tfe" + ], + "description": "Overrides the default support links in the TFE UI (Help menu, error pages, welcome page). Accepts https://, http://, or mailto: schemes. Leave blank to restore the default HashiCorp support link resolution chain.\n\n\nThis attribute is only available in Terraform Enterprise." + }, + "internal-documentation-url": { + "type": "string", + "nullable": true, + "maxLength": 2048, + "x-vis": [ + "tfe" + ], + "description": "Overrides documentation links in the TFE UI (Help menu). Accepts https:// or http:// only. Leave blank to use the default HashiCorp documentation URL.\n\n\nThis attribute is only available in Terraform Enterprise." + }, + "internal-tutorials-url": { + "type": "string", + "nullable": true, + "maxLength": 2048, + "x-vis": [ + "tfe" + ], + "description": "Overrides tutorial links in the TFE UI (Help > Tutorials). Accepts https:// or http:// only. Leave blank to use the default HashiCorp tutorials URL.\n\n\nThis attribute is only available in Terraform Enterprise." + }, + "avatar-sources": { + "type": "array", + "nullable": true, + "x-vis": [ + "tfe" + ], + "description": "Ordered catalog of configurable avatar sources with enabled/disabled flags. Initials is the implicit terminal fallback and is not included. PATCH accepts the same array format and performs a full replacement.\n\n\nThis attribute is only available in Terraform Enterprise.", + "items": { + "type": "object", + "required": [ + "source", + "enabled" + ], + "properties": { + "source": { + "type": "string", + "enum": [ + "gravatar" + ], + "description": "The name of the avatar source." + }, + "enabled": { + "type": "boolean", + "description": "Whether the source is active." + } + } + } } } } } }, - "hcp-organization-envelope": { + "admin-customization-settings-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/hcp-organization" + "$ref": "#/components/schemas/admin-customization-settings" } } }, - "feature-sets": { + "admin-tfpolicy-version-architecture": { + "type": "object", + "required": [ + "url", + "sha", + "os", + "arch" + ], + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Download URL for this platform/architecture's binary." + }, + "sha": { + "type": "string", + "pattern": "^[a-f0-9]{64}$", + "description": "SHA-256 checksum (64 lowercase hex characters) of the binary at `url`." + }, + "os": { + "type": "string", + "enum": [ + "linux" + ], + "description": "Operating system for this architecture. Currently only \"linux\" is supported." + }, + "arch": { + "type": "string", + "enum": [ + "amd64", + "arm64", + "s390x" + ], + "description": "CPU architecture." + } + } + }, + "admin-tfpolicy-versions": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { "type": "string", - "description": "The ID of the feature set" + "readOnly": true, + "description": "The external ID of the TFPolicy version (e.g. tool-xxxxxxxxxxxxxxxx)." }, "type": { "type": "string", "enum": [ - "feature-sets" + "tfpolicy-versions" ] }, "attributes": { "type": "object", "properties": { - "assessments": { - "type": "boolean", - "description": "Whether the feature set includes assessments" - }, - "audit-logging": { - "type": "boolean", - "description": "Whether the feature set includes audit logging" - }, - "can-self-service-downgrade": { - "type": "boolean", - "description": "Whether the organization can self-service downgrade from this feature set" - }, - "change-requests": { - "type": "boolean", - "description": "Whether the feature set includes change requests" - }, - "cost": { - "type": "number", - "description": "The cost of the feature set in cents" - }, - "cost-estimation": { - "type": "boolean", - "description": "Whether the feature set includes cost estimation" - }, - "default-agents-ceiling": { - "type": "number", - "description": "Default maximum number of concurrent agents" - }, - "default-runs-ceiling": { - "type": "number", - "description": "Default maximum number of concurrent runs" - }, - "description": { - "type": "string", - "description": "Description of the feature set" - }, - "global-run-tasks": { - "type": "boolean", - "description": "Whether the feature set includes global run tasks" - }, - "hyok": { - "type": "boolean", - "description": "Whether the feature set includes Hold Your Own Key encryption" - }, - "identifier": { - "type": "string", - "description": "Unique identifier for the feature set" - }, - "terraform-actions": { - "type": "boolean", - "description": "Whether the feature set includes Terraform Actions features" - }, - "is-current": { - "type": "boolean", - "description": "Whether this is a current/active feature set" - }, - "is-free-tier": { - "type": "boolean", - "description": "Whether this is a free tier feature set" - }, - "is-managed-resource-plan": { - "type": "boolean", - "description": "Whether this is a managed resource plan" - }, - "module-deprecations": { - "type": "boolean", - "description": "Whether this feature set includes module deprecations" - }, - "module-revocations": { - "type": "boolean", - "description": "Whether this feature set includes module revocations" - }, - "module-tests-agent-support": { - "type": "boolean" - }, - "module-tests-generation": { - "type": "boolean", - "description": "Whether the feature set includes module test generation" - }, - "name": { + "version": { "type": "string", - "description": "Name of the feature set" - }, - "native-tasks": { - "type": "boolean", - "description": "Whether the feature set includes native tasks" - }, - "no-code-modules": { - "type": "boolean", - "description": "Whether the feature set includes no-code modules" + "description": "The semantic version string for this TFPolicy release (e.g. \"0.1.0\"). Must be unique among TFPolicy versions.\n" }, - "plan": { + "url": { "type": "string", + "format": "uri", "nullable": true, - "description": "Associated plan ID" - }, - "policy-enforcement": { - "type": "boolean", - "description": "Whether the feature set includes policy enforcement" - }, - "policy-limit": { - "type": "number", - "nullable": true, - "description": "Maximum number of policies (null means unlimited)" - }, - "policy-mandatory-enforcement-limit": { - "type": "number", - "nullable": true, - "description": "Maximum number of mandatory enforcement policies (null means unlimited)" + "deprecated": true, + "description": "The URL where you can download the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].url` field instead. Null when no linux/amd64 architecture has been registered for this version (e.g. an arm64-only release). On create, either `url` and `sha` or at least one entry in `archs` must be provided. If both are given, the linux/amd64 entry in `archs` (when present) must match `url`/`sha` exactly, or the request is rejected with 422 Unprocessable Content.\n" }, - "policy-set-limit": { - "type": "number", + "sha": { + "type": "string", + "pattern": "^[a-f0-9]{64}$", "nullable": true, - "description": "Maximum number of policy sets (null means unlimited)" + "deprecated": true, + "description": "The SHA-256 checksum of the linux/amd64 binary of this version. This field is deprecated; we recommend using the `archs[n].sha` field instead. Null under the same conditions as `url`.\n" }, - "private-networking": { + "official": { "type": "boolean", - "description": "Whether the feature set includes private networking" + "description": "Whether this is an official HashiCorp-published release." }, - "private-policy-agents": { + "enabled": { "type": "boolean", - "description": "Whether the feature set includes private policy agents" + "description": "Whether this version can be selected for use. Attempting to set `enabled` to `false` while the version is in use returns 409 Conflict.\n" }, - "private-run-tasks": { + "beta": { "type": "boolean", - "description": "Whether the feature set includes private run tasks" + "description": "Whether this version is a beta/pre-release." }, - "private-vcs": { + "deprecated": { "type": "boolean", - "description": "Whether the feature set includes private VCS" + "description": "Whether this version is deprecated. On update (`PATCH`), when set to `true` without a `deprecated-reason` in the same request, the server fills in a default reason referencing the current version. This default does not apply on create.\n" }, - "run-task-limit": { - "type": "number", + "deprecated-reason": { + "type": "string", "nullable": true, - "description": "Maximum number of run tasks (null means unlimited)" + "description": "Explanation shown to users when `deprecated` is `true`." }, - "recoverable-items": { - "type": "boolean", - "description": "Whether the feature set allows enabling of recoverable items\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", - "x-vis": [ - "public-beta" - ] + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "The timestamp when this version was created." }, - "run-task-mandatory-enforcement-limit": { - "type": "number", - "nullable": true, - "description": "Maximum number of mandatory enforcement run tasks (null means unlimited)" - }, - "run-task-workspace-limit": { - "type": "number", - "nullable": true, - "description": "Maximum number of workspaces per run task (null means unlimited)" - }, - "run-tasks": { - "type": "boolean", - "description": "Whether the feature set includes run tasks" - }, - "self-serve-billing": { - "type": "boolean", - "description": "Whether the feature set supports self-serve billing" - }, - "sentinel": { - "type": "boolean", - "description": "Whether the feature set includes Sentinel (alias for policy-enforcement)" - }, - "sso": { - "type": "boolean", - "description": "Whether the feature set includes SSO" - }, - "stacks": { - "type": "boolean", - "description": "Whether the feature set includes stacks" - }, - "task-project-scoping": { - "type": "boolean", - "description": "Whether the feature set includes the ability to scope tasks to projects" - }, - "teams": { - "type": "boolean", - "description": "Whether the feature set includes teams" - }, - "tf-policy-init-enforcement": { - "type": "boolean", - "description": "Whether the feature set includes init-stage Terraform policy enforcement" - }, - "user-limit": { - "type": "number", - "nullable": true, - "description": "Maximum number of users (null means unlimited)" - }, - "uses-hcp-rum-billing-resource": { - "type": "boolean", - "description": "Whether the feature set uses HCP RUM billing resource" - }, - "versioned-policy-set-limit": { - "type": "number", - "nullable": true, - "description": "Maximum number of versioned policy sets (null means unlimited)" - }, - "waypoint-actions": { - "type": "boolean" + "archs": { + "type": "array", + "description": "The set of platform/architecture builds available for this version. On create, either at least one entry here or the top-level `url`/`sha` pair must be provided. On update, providing `archs` replaces the full set of architectures for this version; omitting it leaves existing architectures unchanged, while providing an empty array is rejected with 422 Unprocessable Content (a TFPolicy version must always have at least one architecture).\n", + "items": { + "$ref": "#/components/schemas/admin-tfpolicy-version-architecture" + } }, - "waypoint-templates-and-addons": { - "type": "boolean" + "permissions": { + "type": "object", + "readOnly": true, + "description": "The current user's permissions for this TFPolicy version, when included.", + "properties": { + "can-read": { + "type": "boolean" + }, + "can-update": { + "type": "boolean" + } + } } } } - }, - "required": [ - "id", - "type", - "attributes" - ] + } }, - "organizations-identifier": { + "pagination": { "type": "object", - "required": [ - "id", - "type" - ], "properties": { - "id": { - "type": "string" + "current-page": { + "type": "integer" }, - "type": { - "type": "string", - "enum": [ - "organizations" - ] + "page-size": { + "type": "integer" + }, + "prev-page": { + "type": "integer", + "nullable": true + }, + "next-page": { + "type": "integer", + "nullable": true + }, + "total-pages": { + "type": "integer" + }, + "total-count": { + "type": "integer" } } }, - "organizations-has-one": { + "self-with-pagination": { "type": "object", "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/organizations-identifier" - } - ], + "self": { + "type": "string" + }, + "first": { + "type": "string" + }, + "prev": { + "type": "string", "nullable": true }, - "links": { - "$ref": "#/components/schemas/related" + "next": { + "type": "string", + "nullable": true + }, + "last": { + "type": "string" } } }, - "feature-sets-has-one": { + "admin-tfpolicy-versions-collection-envelope": { "type": "object", - "nullable": true, "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/feature-sets-identifier" + "type": "array", + "items": { + "$ref": "#/components/schemas/admin-tfpolicy-versions" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/pagination" + } + } + }, + "links": { + "$ref": "#/components/schemas/self-with-pagination" } } }, - "subscriptions-identifier": { + "admin-tfpolicy-version-create": { + "allOf": [ + { + "$ref": "#/components/schemas/admin-tfpolicy-versions" + }, + { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + } + } + } + } + ] + }, + "admin-tfpolicy-version-create-envelope": { "type": "object", + "required": [ + "data" + ], "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "subscriptions" - ] + "data": { + "$ref": "#/components/schemas/admin-tfpolicy-version-create" } } }, - "subscriptions-has-one": { + "admin-tfpolicy-versions-envelope": { "type": "object", + "required": [ + "data" + ], "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/subscriptions-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" + "$ref": "#/components/schemas/admin-tfpolicy-versions" } } }, - "subscriptions": { + "admin-general-settings": { "type": "object", "required": [ "type", + "id", "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true + "readOnly": true, + "description": "Always \"general\"." }, "type": { "type": "string", "enum": [ - "subscriptions" + "general-settings" ] }, "attributes": { "type": "object", "properties": { - "end-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "is-active": { - "type": "boolean" - }, - "start-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runs-ceiling": { - "type": "integer", - "nullable": true - }, - "agents-ceiling": { - "type": "integer", - "nullable": true - }, - "contract-start-at": { - "type": "string", - "format": "date-time", - "nullable": true + "require-two-factor-for-admins": { + "type": "boolean", + "description": "Whether two-factor authentication is required for site administrators." }, - "contract-user-limit": { - "type": "integer", - "nullable": true + "limit-user-organization-creation": { + "type": "boolean", + "description": "Whether the creation of new organizations is limited to site administrators." }, - "contract-apply-limit": { - "type": "integer", - "nullable": true + "api-rate-limiting-enabled": { + "type": "boolean", + "description": "Whether API rate limiting is enabled." }, - "contract-managed-resources-limit": { + "api-rate-limit": { "type": "integer", - "nullable": true - }, - "hcp-organization-id": { - "type": "string", - "nullable": true - }, - "hcp-project-id": { - "type": "string", - "nullable": true + "description": "The number of API requests allowed per second, per user token or IP address." }, - "run-task-limit": { + "agent-polling-retry-after": { "type": "integer", - "nullable": true + "description": "The number of seconds agents wait before polling for new work." }, - "run-task-workspace-limit": { - "type": "integer", - "nullable": true + "agents-enabled": { + "type": "boolean", + "description": "Whether HCP Terraform agents are enabled." }, - "run-task-mandatory-enforcement-limit": { - "type": "integer", - "nullable": true + "fair-run-queuing-enabled": { + "type": "boolean", + "readOnly": true, + "description": "Deprecated. Always returns false. Retained for backwards compatibility with the public API contract.\n" }, - "versioned-policy-set-limit": { - "type": "integer", - "nullable": true + "limit-organizations-per-user": { + "type": "boolean", + "description": "Whether the number of organizations a user may create is limited." }, - "policy-set-limit": { + "default-organizations-per-user-ceiling": { "type": "integer", - "nullable": true + "description": "The default maximum number of organizations a single user may create." }, - "policy-limit": { - "type": "integer", - "nullable": true + "limit-workspaces-per-organization": { + "type": "boolean", + "description": "Whether the number of workspaces per organization is limited." }, - "policy-mandatory-enforcement-limit": { + "default-workspaces-per-organization-ceiling": { "type": "integer", - "nullable": true + "description": "The default maximum number of workspaces per organization." }, - "is-public-free-tier": { - "type": "boolean" + "terraform-build-worker-apply-timeout": { + "type": "string", + "description": "The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string (for example, \"24h\").\n" }, - "is-self-serve-trial": { - "type": "boolean" + "terraform-build-worker-plan-timeout": { + "type": "string", + "description": "The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string (for example, \"24h\").\n" }, - "is-change-approved": { - "type": "boolean" + "apply-timeout": { + "type": "string", + "description": "Alias of terraform-build-worker-apply-timeout. The maximum time a Terraform apply may run before it is canceled, expressed as a Go duration string.\n" }, - "free-apply-monthly-limit-starts-at": { + "plan-timeout": { "type": "string", - "format": "date-time", - "nullable": true + "description": "Alias of terraform-build-worker-plan-timeout. The maximum time a Terraform plan may run before it is canceled, expressed as a Go duration string.\n" }, - "free-apply-monthly-limit": { - "type": "integer", - "nullable": true + "send-passing-statuses-for-untriggered-speculative-plans": { + "type": "boolean", + "description": "Whether passing commit statuses are sent for untriggered speculative plans.\n" }, - "free-apply-monthly-limit-remaining": { - "type": "integer", - "nullable": true + "allow-speculative-plans-on-pull-requests-from-forks": { + "type": "boolean", + "description": "Whether speculative plans are allowed on pull requests originating from forked repositories.\n" }, - "free-resource-under-management-monthly-limit": { + "default-remote-state-access": { + "type": "boolean", + "description": "Whether new workspaces allow global remote state access by default.\n" + }, + "automatic-assessment-interval": { "type": "integer", - "nullable": true + "description": "The interval, in hours, at which automatic health assessments run.\n" }, - "rum-alert-threshold": { + "maximum-concurrent-assessments": { "type": "integer", - "nullable": true, - "description": "The custom RUM usage alert threshold for the organization. When the organization's billable resource count meets or exceeds this value, an alert email is sent to org owners. Set to null to disable alerting. Only available on paid RUM plans.\n" + "description": "The maximum number of health assessments that may run concurrently." }, - "rum-threshold-alert-sent-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "Timestamp of the last time a RUM usage threshold alert was sent for the current rum-alert-threshold. Null when no alert has been sent for the current threshold.\n" - } - } - }, - "relationships": { - "type": "object", - "required": [ - "organization", - "feature-set" - ], - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" + "stacks-entitled": { + "type": "boolean", + "readOnly": true, + "description": "Whether the instance is licensed to use stacks." }, - "feature-set": { - "$ref": "#/components/schemas/feature-sets-has-one" + "stacks-enabled": { + "type": "boolean", + "x-vis": [ + "tfe" + ], + "description": "Whether stacks are enabled for use in this instance.\n\nThis attribute is only available in Terraform Enterprise." }, - "next-subscription": { - "$ref": "#/components/schemas/subscriptions-has-one" + "enable-public-registration": { + "type": "boolean", + "x-vis": [ + "tfe" + ], + "description": "Whether public (self-service) user registration is enabled. Available only on Terraform Enterprise; silently ignored on HCP Terraform.\n\n\nThis attribute is only available in Terraform Enterprise." } } } } }, - "subscriptions-envelope": { + "admin-general-settings-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/subscriptions" + "$ref": "#/components/schemas/admin-general-settings" } } }, - "workspaces-identifier": { + "authenticated-resource-identifier": { "type": "object", + "required": [ + "id", + "type" + ], "properties": { "id": { "type": "string" @@ -34443,52 +34725,37 @@ "type": { "type": "string", "enum": [ - "workspaces" + "organizations", + "runs", + "users", + "teams" ] } } }, - "workspaces-has-many": { + "authenticated-resource-has-one": { "type": "object", - "nullable": true, "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/workspaces-identifier" - } - } - } - }, - "projects-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" + "$ref": "#/components/schemas/authenticated-resource-identifier" }, - "type": { - "type": "string", - "enum": [ - "projects" - ] + "links": { + "$ref": "#/components/schemas/related" } } }, - "projects-has-many": { + "self": { "type": "object", - "nullable": true, "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/projects-identifier" - } + "self": { + "type": "string" } } }, - "agent-pools": { + "users": { "type": "object", "required": [ + "id", "type", "attributes" ], @@ -34500,123 +34767,212 @@ "type": { "type": "string", "enum": [ - "agent-pools" + "users" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string" + "username": { + "type": "string", + "nullable": true }, - "created-at": { + "display-name": { + "description": "Human-readable display name for the user.", "type": "string", - "format": "date-time", - "readOnly": true + "readOnly": true, + "nullable": true }, - "organization-scoped": { + "is-service-account": { + "description": "Indicates whether this user is a synthetic user representing a team or organization.", "type": "boolean" }, - "agent-count": { + "avatar-url": { + "type": "string", + "nullable": true, + "description": "Gravatar URL for the user. Null in TFE when an admin has disabled Gravatar via the avatar_sources setting." + }, + "initials": { + "type": "string", + "readOnly": true, + "description": "TFE only. Backend-computed initials derived from the user's username, or email local part as a fallback. At most two characters. Returns \"?\" when neither is available." + }, + "avatar-color-index": { "type": "integer", - "readOnly": true - } - } - }, - "links": { - "$ref": "#/components/schemas/self" - }, - "relationships": { - "type": "object", - "properties": { - "agents": { - "$ref": "#/components/schemas/links_related" + "readOnly": true, + "description": "TFE only. Stable index into the frontend avatar fallback colour palette, derived from the user's external ID. Colour uniqueness across users is not guaranteed." }, - "authentication-tokens": { - "$ref": "#/components/schemas/links_related" + "auth-method": { + "type": "string" }, - "workspaces": { - "$ref": "#/components/schemas/workspaces-has-many" + "v2-only": { + "type": "boolean" }, - "allowed-workspaces": { - "$ref": "#/components/schemas/workspaces-has-many" + "is-admin": { + "type": "boolean" }, - "allowed-projects": { - "$ref": "#/components/schemas/projects-has-many" + "is-site-admin": { + "description": "Deprecated. Use is-admin.", + "type": "boolean" }, - "excluded-workspaces": { - "$ref": "#/components/schemas/workspaces-has-many" + "is-sso-login": { + "type": "boolean" }, - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - } - } - } - } - }, - "agent-pools-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/agent-pools" - } - } - }, - "agents": { - "type": "object", - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "agents" - ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" + "is-confirmed": { + "type": "boolean" }, - "status": { + "is-unified": { + "type": "boolean" + }, + "is-sudo": { + "type": "boolean" + }, + "email": { "type": "string" }, - "ip-address": { + "unconfirmed-email": { "type": "string", "nullable": true }, - "last-ping-at": { + "password": { "type": "string", - "format": "date-time", "nullable": true }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true + "enterprise-support": { + "type": "boolean" + }, + "has-linked-hcp": { + "type": "boolean" + }, + "has-git-hub-app-token": { + "type": "boolean" + }, + "two-factor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "verified": { + "type": "boolean" + } + } + }, + "permissions": { + "type": "object", + "properties": { + "can-create-organization": { + "type": "boolean" + }, + "can-view-organizations": { + "type": "boolean" + }, + "can-view-settings": { + "type": "boolean" + }, + "can-view-smtp-settings": { + "type": "boolean" + }, + "can-view-twilio-settings": { + "type": "boolean" + }, + "can-view-saml-settings": { + "type": "boolean" + }, + "can-view-admin-workspaces": { + "type": "boolean" + }, + "can-view-admin-runs": { + "type": "boolean" + }, + "can-view-customization-settings": { + "type": "boolean" + }, + "can-view-cost-estimation-settings": { + "type": "boolean" + }, + "can-view-tool-versions": { + "type": "boolean" + }, + "can-create-tool-versions": { + "type": "boolean" + }, + "can-view-general-settings": { + "type": "boolean" + }, + "can-use-sql-runner": { + "type": "boolean" + }, + "can-view-profile": { + "type": "boolean" + }, + "can-change-email": { + "type": "boolean" + }, + "can-change-username": { + "type": "boolean" + }, + "can-change-password": { + "type": "boolean" + }, + "can-manage-sessions": { + "type": "boolean" + }, + "can-manage-user-tokens": { + "type": "boolean" + }, + "can-update-user": { + "type": "boolean" + }, + "can-reenable-2fa-by-unlinking": { + "type": "boolean", + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." + }, + "can-manage-hcp-accounts": { + "type": "boolean", + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." + } + } + } + } + }, + "relationships": { + "type": "object", + "properties": { + "authentication-tokens": { + "$ref": "#/components/schemas/links_related" + }, + "github-app-oauth-tokens": { + "$ref": "#/components/schemas/links_related" + }, + "authenticated-resource": { + "$ref": "#/components/schemas/authenticated-resource-has-one" } } + }, + "links": { + "$ref": "#/components/schemas/self" } } }, - "agents-envelope": { + "users-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/agents" + "$ref": "#/components/schemas/users" } } }, - "agent-pools-identifier": { + "feature-sets-identifier": { "type": "object", "required": [ "id", @@ -34629,28 +34985,30 @@ "type": { "type": "string", "enum": [ - "agent-pools" + "feature-sets" ] } } }, - "agent-pools-has-many": { + "feature-sets-has-many": { "type": "object", "nullable": true, "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/agent-pools-identifier" + "$ref": "#/components/schemas/feature-sets-identifier" } } } }, - "cidr-range-lists-identifier": { + "hcp-organization": { "type": "object", "required": [ "id", - "type" + "type", + "attributes", + "relationships" ], "properties": { "id": { @@ -34659,262 +35017,308 @@ "type": { "type": "string", "enum": [ - "cidr-range-lists" - ] - } - } - }, - "cidr-range-lists-has-one": { - "type": "object", - "nullable": true, - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/cidr-range-lists-identifier" - } - ], - "nullable": true - } - } - }, - "cidr-ranges": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "cidr-ranges" + "hcp-organization" ] }, "attributes": { "type": "object", "required": [ - "range", - "enabled" + "name", + "is-hcp-admin" ], "properties": { - "range": { + "name": { "type": "string" }, - "description": { + "hcp-owner-email": { "type": "string", "nullable": true }, - "enabled": { + "is-hcp-admin": { "type": "boolean" - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true } } }, "relationships": { "type": "object", + "required": [ + "connected-plans" + ], "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "cidr-range-list": { - "$ref": "#/components/schemas/cidr-range-lists-has-one" + "connected-plans": { + "$ref": "#/components/schemas/feature-sets-has-many" } } } } }, - "cidr-ranges-envelope-many": { + "hcp-organization-envelope": { "type": "object", - "nullable": true, + "required": [ + "data" + ], "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cidr-ranges" - } + "$ref": "#/components/schemas/hcp-organization" } } }, - "cidr-range-lists": { + "feature-sets": { "type": "object", - "required": [ - "type", - "attributes" - ], "properties": { "id": { "type": "string", - "readOnly": true + "description": "The ID of the feature set" }, "type": { "type": "string", "enum": [ - "cidr-range-lists" + "feature-sets" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string" + "assessments": { + "type": "boolean", + "description": "Whether the feature set includes assessments" + }, + "audit-logging": { + "type": "boolean", + "description": "Whether the feature set includes audit logging" + }, + "can-self-service-downgrade": { + "type": "boolean", + "description": "Whether the organization can self-service downgrade from this feature set" + }, + "change-requests": { + "type": "boolean", + "description": "Whether the feature set includes change requests" + }, + "cost": { + "type": "number", + "description": "The cost of the feature set in cents" + }, + "cost-estimation": { + "type": "boolean", + "description": "Whether the feature set includes cost estimation" + }, + "default-agents-ceiling": { + "type": "number", + "description": "Default maximum number of concurrent agents" + }, + "default-runs-ceiling": { + "type": "number", + "description": "Default maximum number of concurrent runs" }, "description": { - "type": "string" + "type": "string", + "description": "Description of the feature set" }, - "enforcement-scope": { + "global-run-tasks": { + "type": "boolean", + "description": "Whether the feature set includes global run tasks" + }, + "hyok": { + "type": "boolean", + "description": "Whether the feature set includes Hold Your Own Key encryption" + }, + "identifier": { "type": "string", - "enum": [ - "organization", - "all_agent_pools", - "selected_agent_pools" - ] + "description": "Unique identifier for the feature set" }, - "updated-at": { + "terraform-actions": { + "type": "boolean", + "description": "Whether the feature set includes Terraform Actions features" + }, + "is-current": { + "type": "boolean", + "description": "Whether this is a current/active feature set" + }, + "is-free-tier": { + "type": "boolean", + "description": "Whether this is a free tier feature set" + }, + "is-managed-resource-plan": { + "type": "boolean", + "description": "Whether this is a managed resource plan" + }, + "module-deprecations": { + "type": "boolean", + "description": "Whether this feature set includes module deprecations" + }, + "module-revocations": { + "type": "boolean", + "description": "Whether this feature set includes module revocations" + }, + "module-tests-agent-support": { + "type": "boolean" + }, + "module-tests-generation": { + "type": "boolean", + "description": "Whether the feature set includes module test generation" + }, + "name": { "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" + "description": "Name of the feature set" }, - "agent-pools": { - "$ref": "#/components/schemas/agent-pools-has-many" + "native-tasks": { + "type": "boolean", + "description": "Whether the feature set includes native tasks" }, - "cidr-ranges": { - "$ref": "#/components/schemas/cidr-ranges-envelope-many" + "no-code-modules": { + "type": "boolean", + "description": "Whether the feature set includes no-code modules" + }, + "plan": { + "type": "string", + "nullable": true, + "description": "Associated plan ID" + }, + "policy-enforcement": { + "type": "boolean", + "description": "Whether the feature set includes policy enforcement" + }, + "policy-limit": { + "type": "number", + "nullable": true, + "description": "Maximum number of policies (null means unlimited)" + }, + "policy-mandatory-enforcement-limit": { + "type": "number", + "nullable": true, + "description": "Maximum number of mandatory enforcement policies (null means unlimited)" + }, + "policy-set-limit": { + "type": "number", + "nullable": true, + "description": "Maximum number of policy sets (null means unlimited)" + }, + "private-networking": { + "type": "boolean", + "description": "Whether the feature set includes private networking" + }, + "private-policy-agents": { + "type": "boolean", + "description": "Whether the feature set includes private policy agents" + }, + "private-run-tasks": { + "type": "boolean", + "description": "Whether the feature set includes private run tasks" + }, + "private-vcs": { + "type": "boolean", + "description": "Whether the feature set includes private VCS" + }, + "run-task-limit": { + "type": "number", + "nullable": true, + "description": "Maximum number of run tasks (null means unlimited)" + }, + "recoverable-items": { + "type": "boolean", + "description": "Whether the feature set allows enabling of recoverable items\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "x-vis": [ + "public-beta" + ] + }, + "run-task-mandatory-enforcement-limit": { + "type": "number", + "nullable": true, + "description": "Maximum number of mandatory enforcement run tasks (null means unlimited)" + }, + "run-task-workspace-limit": { + "type": "number", + "nullable": true, + "description": "Maximum number of workspaces per run task (null means unlimited)" + }, + "run-tasks": { + "type": "boolean", + "description": "Whether the feature set includes run tasks" + }, + "self-serve-billing": { + "type": "boolean", + "description": "Whether the feature set supports self-serve billing" + }, + "sentinel": { + "type": "boolean", + "description": "Whether the feature set includes Sentinel (alias for policy-enforcement)" + }, + "sso": { + "type": "boolean", + "description": "Whether the feature set includes SSO" + }, + "stacks": { + "type": "boolean", + "description": "Whether the feature set includes stacks" + }, + "task-project-scoping": { + "type": "boolean", + "description": "Whether the feature set includes the ability to scope tasks to projects" + }, + "teams": { + "type": "boolean", + "description": "Whether the feature set includes teams" + }, + "tf-policy-init-enforcement": { + "type": "boolean", + "description": "Whether the feature set includes init-stage Terraform policy enforcement" + }, + "user-limit": { + "type": "number", + "nullable": true, + "description": "Maximum number of users (null means unlimited)" + }, + "uses-hcp-rum-billing-resource": { + "type": "boolean", + "description": "Whether the feature set uses HCP RUM billing resource" + }, + "versioned-policy-set-limit": { + "type": "number", + "nullable": true, + "description": "Maximum number of versioned policy sets (null means unlimited)" + }, + "waypoint-actions": { + "type": "boolean" + }, + "waypoint-templates-and-addons": { + "type": "boolean" } } } - } + }, + "required": [ + "id", + "type", + "attributes" + ] }, - "cidr-range-list-envelope": { + "organizations-identifier": { "type": "object", "required": [ - "data" + "id", + "type" ], "properties": { - "data": { - "$ref": "#/components/schemas/cidr-range-lists" + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "organizations" + ] } } }, - "cidr-ranges-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/cidr-ranges" - } - } - }, - "agent-pool-ids": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "agent-pools" - ] - } - } - } - } - } - }, - "metrics-token": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "metrics-tokens" - ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the token." - }, - "token-id": { - "type": "string", - "readOnly": true, - "description": "The ID of the token." - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true, - "description": "The time when the token was created." - }, - "expires-at": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true, - "description": "The time when the token expires." - }, - "token": { - "type": "string", - "readOnly": true, - "nullable": true, - "description": "The secret text of the new authentication token. Only returned when the token is created." - } - } - } - } - }, - "projects-has-one": { + "organizations-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/projects-identifier" + "$ref": "#/components/schemas/organizations-identifier" } ], "nullable": true @@ -34924,7 +35328,7 @@ } } }, - "agent-pools-has-one": { + "feature-sets-has-one": { "type": "object", "nullable": true, "required": [ @@ -34932,22 +35336,12 @@ ], "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/agent-pools-identifier" - } - ], - "nullable": true + "$ref": "#/components/schemas/feature-sets-identifier" } } }, - "stack-configurations-identifier": { + "subscriptions-identifier": { "type": "object", - "required": [ - "id", - "type" - ], "properties": { "id": { "type": "string" @@ -34955,26 +35349,29 @@ "type": { "type": "string", "enum": [ - "stack-configurations" + "subscriptions" ] } } }, - "stack-configurations-has-one": { + "subscriptions-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/stack-configurations-identifier" + "$ref": "#/components/schemas/subscriptions-identifier" } ], "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "stacks": { + "subscriptions": { "type": "object", "required": [ "type", @@ -34987,335 +35384,158 @@ }, "type": { "type": "string", - "readOnly": true, "enum": [ - "stacks" + "subscriptions" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { + "end-at": { "type": "string", + "format": "date-time", "nullable": true }, - "working-directory": { + "is-active": { + "type": "boolean" + }, + "start-at": { "type": "string", - "maxLength": 100, + "format": "date-time", "nullable": true }, - "deleteable": { - "type": "boolean", - "readOnly": true - }, - "speculative-enabled": { - "type": "boolean", - "default": false - }, - "upstream-count": { + "runs-ceiling": { "type": "integer", - "readOnly": true + "nullable": true }, - "downstream-count": { + "agents-ceiling": { "type": "integer", - "readOnly": true + "nullable": true }, - "inputs-count": { - "type": "integer", - "readOnly": true + "contract-start-at": { + "type": "string", + "format": "date-time", + "nullable": true }, - "outputs-count": { + "contract-user-limit": { "type": "integer", - "readOnly": true - }, - "execution-mode": { - "type": "string", - "enum": [ - "remote", - "agent" - ] + "nullable": true }, - "setting-overwrites": { - "type": "object", - "properties": { - "execution-mode": { - "type": "boolean" - }, - "agent-pool": { - "type": "boolean" - } - } + "contract-apply-limit": { + "type": "integer", + "nullable": true }, - "vcs-repo": { - "type": "object", - "nullable": true, - "properties": { - "branch": { - "type": "string", - "nullable": true - }, - "tags-regex": { - "type": "string", - "nullable": true - }, - "identifier": { - "type": "string" - }, - "display-identifier": { - "type": "string" - }, - "oauth-token-id": { - "type": "string", - "nullable": true - }, - "repository-http-url": { - "type": "string", - "nullable": true - }, - "service-provider": { - "type": "string", - "nullable": true - }, - "trigger-disabled": { - "type": "boolean" - } - } + "contract-managed-resources-limit": { + "type": "integer", + "nullable": true }, - "created-at": { + "hcp-organization-id": { "type": "string", - "format": "date-time", - "readOnly": true + "nullable": true }, - "updated-at": { + "hcp-project-id": { "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" + "nullable": true }, - "latest-output-summary": { - "type": "string" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "stack-configurations": { - "$ref": "#/components/schemas/links_related" + "run-task-limit": { + "type": "integer", + "nullable": true }, - "project": { - "$ref": "#/components/schemas/projects-has-one" + "run-task-workspace-limit": { + "type": "integer", + "nullable": true }, - "agent-pool": { - "$ref": "#/components/schemas/agent-pools-has-one" + "run-task-mandatory-enforcement-limit": { + "type": "integer", + "nullable": true }, - "latest-stack-configuration": { - "$ref": "#/components/schemas/stack-configurations-has-one" - } - } - } - } - }, - "projects": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "projects" - ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" + "versioned-policy-set-limit": { + "type": "integer", + "nullable": true }, - "description": { - "type": "string", + "policy-set-limit": { + "type": "integer", "nullable": true }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true + "policy-limit": { + "type": "integer", + "nullable": true }, - "auto-destroy-activity-duration": { - "type": "string", + "policy-mandatory-enforcement-limit": { + "type": "integer", "nullable": true }, - "default-execution-mode": { - "type": "string", - "enum": [ - "remote", - "local", - "agent" - ] + "is-public-free-tier": { + "type": "boolean" }, - "stacks-default-execution-mode": { - "type": "string", - "enum": [ - "remote", - "agent" - ] + "is-self-serve-trial": { + "type": "boolean" }, - "setting-overwrites": { - "type": "object", - "properties": { - "default-execution-mode": { - "type": "boolean" - }, - "default-agent-pool": { - "type": "boolean" - }, - "stacks-default-execution-mode": { - "type": "boolean" - }, - "stacks-default-agent-pool": { - "type": "boolean" - } - } + "is-change-approved": { + "type": "boolean" }, - "permissions": { - "type": "object", - "nullable": true, - "properties": { - "can-read": { - "type": "boolean" - }, - "can-update": { - "type": "boolean" - }, - "can-destroy": { - "type": "boolean" - }, - "can-create-workspace": { - "type": "boolean" - }, - "can-move-workspace": { - "type": "boolean" - }, - "can-move-stack": { - "type": "boolean" - }, - "can-manage-stacks": { - "type": "boolean" - }, - "can-view-stacks": { - "type": "boolean" - }, - "can-update-stacks": { - "type": "boolean" - }, - "can-deploy-no-code-modules": { - "type": "boolean" - }, - "can-read-teams": { - "type": "boolean" - }, - "can-manage-tags": { - "type": "boolean" - }, - "can-manage-teams": { - "type": "boolean" - }, - "can-manage-in-hcp": { - "type": "boolean", - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." - }, - "can-manage-varsets": { - "type": "boolean" - }, - "can-manage-ephemeral-workspace-for-projects": { - "type": "boolean" - } - } + "free-apply-monthly-limit-starts-at": { + "type": "string", + "format": "date-time", + "nullable": true }, - "workspace-count": { + "free-apply-monthly-limit": { "type": "integer", "nullable": true }, - "team-count": { + "free-apply-monthly-limit-remaining": { "type": "integer", "nullable": true }, - "hcp-id": { - "type": "string", + "free-resource-under-management-monthly-limit": { + "type": "integer", + "nullable": true + }, + "rum-alert-threshold": { + "type": "integer", "nullable": true, - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." + "description": "The custom RUM usage alert threshold for the organization. When the organization's billable resource count meets or exceeds this value, an alert email is sent to org owners. Set to null to disable alerting. Only available on paid RUM plans.\n" }, - "is-unified": { - "type": "boolean", + "rum-threshold-alert-sent-at": { + "type": "string", + "format": "date-time", "nullable": true, - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." + "description": "Timestamp of the last time a RUM usage threshold alert was sent for the current rum-alert-threshold. Null when no alert has been sent for the current threshold.\n" } } }, "relationships": { "type": "object", + "required": [ + "organization", + "feature-set" + ], "properties": { "organization": { "$ref": "#/components/schemas/organizations-has-one" }, - "tag-bindings": { - "type": "object", - "nullable": true, - "properties": { - "links": { - "type": "object", - "properties": { - "related": { - "type": "string" - } - } - } - } - }, - "default-agent-pool": { - "$ref": "#/components/schemas/agent-pools-has-one" + "feature-set": { + "$ref": "#/components/schemas/feature-sets-has-one" }, - "stacks-default-agent-pool": { - "$ref": "#/components/schemas/agent-pools-has-one" - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" + "next-subscription": { + "$ref": "#/components/schemas/subscriptions-has-one" } } } } }, - "stacks-identifier": { + "subscriptions-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/subscriptions" + } + } + }, + "workspaces-identifier": { "type": "object", "properties": { "id": { @@ -35324,29 +35544,24 @@ "type": { "type": "string", "enum": [ - "stacks" + "workspaces" ] } } }, - "stacks-has-one": { + "workspaces-has-many": { "type": "object", + "nullable": true, "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/stacks-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" + "type": "array", + "items": { + "$ref": "#/components/schemas/workspaces-identifier" + } } } }, - "ingress-attributes-identifier": { + "projects-identifier": { "type": "object", "properties": { "id": { @@ -35355,98 +35570,104 @@ "type": { "type": "string", "enum": [ - "ingress-attributes" + "projects" ] } } }, - "ingress-attributes-has-one": { + "projects-has-many": { "type": "object", + "nullable": true, "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/ingress-attributes-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" + "type": "array", + "items": { + "$ref": "#/components/schemas/projects-identifier" + } } } }, - "stack-configuration-summaries-identifier": { + "agent-pools": { "type": "object", "required": [ - "id", - "type" + "type", + "attributes" ], "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true }, "type": { "type": "string", "enum": [ - "stack-configuration-summaries" + "agent-pools" ] - } - } - }, - "stack-configuration-summaries-has-one": { - "type": "object", - "properties": { - "data": { + }, + "attributes": { "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/stack-configuration-summaries-identifier" + "properties": { + "name": { + "type": "string" + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "organization-scoped": { + "type": "boolean" + }, + "agent-count": { + "type": "integer", + "readOnly": true } - ], - "nullable": true + } + }, + "links": { + "$ref": "#/components/schemas/self" + }, + "relationships": { + "type": "object", + "properties": { + "agents": { + "$ref": "#/components/schemas/links_related" + }, + "authentication-tokens": { + "$ref": "#/components/schemas/links_related" + }, + "workspaces": { + "$ref": "#/components/schemas/workspaces-has-many" + }, + "allowed-workspaces": { + "$ref": "#/components/schemas/workspaces-has-many" + }, + "allowed-projects": { + "$ref": "#/components/schemas/projects-has-many" + }, + "excluded-workspaces": { + "$ref": "#/components/schemas/workspaces-has-many" + }, + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + } + } } } }, - "stack-aggregate-outputs-identifier": { + "agent-pools-envelope": { "type": "object", "required": [ - "id", - "type" + "data" ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "stack-aggregate-outputs" - ] - } - } - }, - "stack-aggregate-outputs-has-one": { - "type": "object", "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/stack-aggregate-outputs-identifier" - } - ], - "nullable": true + "$ref": "#/components/schemas/agent-pools" } } }, - "stack-configurations": { + "agents": { "type": "object", - "required": [ - "type", - "attributes" - ], "properties": { "id": { "type": "string", @@ -35454,100 +35675,79 @@ }, "type": { "type": "string", - "readOnly": true, "enum": [ - "stack-configurations" + "agents" ] }, "attributes": { "type": "object", "properties": { - "status": { - "type": "string", - "enum": [ - "pending", - "queued", - "preparing", - "completed", - "failed" - ], - "readOnly": true - }, - "sequence-number": { - "type": "integer", - "nullable": true, - "readOnly": true - }, - "speculative": { - "type": "boolean", - "nullable": false, - "default": false, - "description": "Specifies if this is a speculative configuration that HCP Terraform cannot converge past the plan step." + "name": { + "type": "string" }, - "destroy-all": { - "type": "boolean", - "nullable": false, - "default": false, - "description": "If true, the created configuration will behave as though every deployment in the configuration was declared with `destroy = true`." + "status": { + "type": "string" }, - "preparing-event-stream-url": { + "ip-address": { "type": "string", - "readOnly": true + "nullable": true }, - "created-at": { + "last-ping-at": { "type": "string", "format": "date-time", - "readOnly": true + "nullable": true }, - "updated-at": { + "created-at": { "type": "string", "format": "date-time", "readOnly": true } } + } + } + }, + "agents-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/agents" + } + } + }, + "agent-pools-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "stack-deployment-groups": { - "$ref": "#/components/schemas/links_related" - }, - "stack-diagnostics": { - "$ref": "#/components/schemas/links_related" - }, - "stack-published-outputs": { - "$ref": "#/components/schemas/links_related" - }, - "stack": { - "$ref": "#/components/schemas/stacks-has-one" - }, - "ingress-attributes": { - "$ref": "#/components/schemas/ingress-attributes-has-one" - }, - "stack-configuration-summary": { - "description": "Contains summed status counts for the deployment groups and deployment runs in this configuration.", - "$ref": "#/components/schemas/stack-configuration-summaries-has-one" - }, - "group-status-summaries": { - "description": "Deprecated alias for stack-configuration-summary.", - "$ref": "#/components/schemas/stack-configuration-summaries-has-one" - }, - "stack-aggregate-outputs": { - "$ref": "#/components/schemas/stack-aggregate-outputs-has-one" - } + "type": { + "type": "string", + "enum": [ + "agent-pools" + ] + } + } + }, + "agent-pools-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/agent-pools-identifier" } } } }, - "stack-deployment-steps-identifier": { + "cidr-range-lists-identifier": { "type": "object", "required": [ "id", @@ -35560,30 +35760,33 @@ "type": { "type": "string", "enum": [ - "stack-deployment-steps" + "cidr-range-lists" ] } } }, - "stack-deployment-steps-has-one": { + "cidr-range-lists-has-one": { "type": "object", + "nullable": true, + "required": [ + "data" + ], "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/stack-deployment-steps-identifier" + "$ref": "#/components/schemas/cidr-range-lists-identifier" } ], "nullable": true } } }, - "stack-diagnostics": { + "cidr-ranges": { "type": "object", "required": [ - "type", - "attributes" + "type" ], "properties": { "id": { @@ -35592,104 +35795,60 @@ }, "type": { "type": "string", - "readOnly": true, "enum": [ - "stack-diagnostics" + "cidr-ranges" ] }, "attributes": { "type": "object", + "required": [ + "range", + "enabled" + ], "properties": { - "severity": { - "type": "string", - "enum": [ - "warning", - "error" - ], - "readOnly": true - }, - "summary": { - "type": "string", - "readOnly": true + "range": { + "type": "string" }, - "detail": { + "description": { "type": "string", - "readOnly": true - }, - "diags": { - "type": "array", - "readOnly": true, "nullable": true }, - "acknowledged": { - "type": "boolean", - "readOnly": true - }, - "acknowledged-at": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true + "enabled": { + "type": "boolean" }, - "created-at": { + "updated-at": { "type": "string", "format": "date-time", "readOnly": true } } }, - "links": { - "$ref": "#/components/schemas/self" - }, "relationships": { "type": "object", "properties": { - "stack-configuration": { - "$ref": "#/components/schemas/stack-configurations-has-one" + "organization": { + "$ref": "#/components/schemas/organizations-has-one" }, - "stack-deployment-step": { - "$ref": "#/components/schemas/stack-deployment-steps-has-one" + "cidr-range-list": { + "$ref": "#/components/schemas/cidr-range-lists-has-one" } } } } }, - "stacks-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/stack-configurations" - }, - { - "$ref": "#/components/schemas/stack-diagnostics" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "projects": "#/components/schemas/projects", - "stack-configurations": "#/components/schemas/stack-configurations", - "stack-diagnostics": "#/components/schemas/stack-diagnostics" - } - } - } - }, - "stacks-envelope": { + "cidr-ranges-envelope-many": { "type": "object", - "required": [ - "data" - ], + "nullable": true, "properties": { "data": { - "$ref": "#/components/schemas/stacks" + "type": "array", + "items": { + "$ref": "#/components/schemas/cidr-ranges" + } } } }, - "stack-configuration-summaries": { + "cidr-range-lists": { "type": "object", "required": [ "type", @@ -35702,125 +35861,102 @@ }, "type": { "type": "string", - "readOnly": true, "enum": [ - "stack-configuration-summaries" + "cidr-range-lists" ] }, "attributes": { "type": "object", "properties": { - "status": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enforcement-scope": { "type": "string", "enum": [ - "pending", - "queued", - "preparing", - "completed", - "failed" - ], - "readOnly": true + "organization", + "all_agent_pools", + "selected_agent_pools" + ] }, - "sequence-number": { - "type": "integer", + "updated-at": { + "type": "string", + "format": "date-time", "readOnly": true - }, - "stack-deployment-group-status-summary": { - "type": "object", - "description": "Contains a count of the number of deployment groups in each state.", - "properties": { - "pending": { - "type": "integer" - }, - "pre-deploying": { - "type": "integer" - }, - "deploying": { - "type": "integer" - }, - "succeeded": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "abandoned": { - "type": "integer" - } - } - }, - "stack-deployment-run-status-summary": { - "type": "object", - "description": "Contains a count of the number of deployment runs in each state.", - "properties": { - "pending": { - "type": "integer" - }, - "pending-capacity": { - "type": "integer" - }, - "pre-deploying": { - "type": "integer" - }, - "pre-deploying-pending-operator": { - "type": "integer" - }, - "acquiring-lock": { - "type": "integer" - }, - "deploying": { - "type": "integer" - }, - "deploying-pending-operator": { - "type": "integer" - }, - "succeeded": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "abandoned": { - "type": "integer" - } - } } } }, "relationships": { "type": "object", "properties": { - "stack-configuration": { - "$ref": "#/components/schemas/stack-configurations-has-one" + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "agent-pools": { + "$ref": "#/components/schemas/agent-pools-has-many" + }, + "cidr-ranges": { + "$ref": "#/components/schemas/cidr-ranges-envelope-many" } } } } }, - "users-has-one": { + "cidr-range-list-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/cidr-range-lists" + } + } + }, + "cidr-ranges-envelope": { "type": "object", + "required": [ + "data" + ], "properties": { "data": { - "type": "object", - "nullable": true, - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "users" - ] + "$ref": "#/components/schemas/cidr-ranges" + } + } + }, + "agent-pool-ids": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "agent-pools" + ] + } } } - }, - "links": { - "$ref": "#/components/schemas/related" } } }, - "ingress-attributes": { + "metrics-token": { "type": "object", "required": [ "type", @@ -35834,80 +35970,112 @@ "type": { "type": "string", "enum": [ - "ingress-attributes" + "metrics-tokens" ] }, "attributes": { "type": "object", "properties": { - "branch": { - "type": "string" - }, - "clone-url": { - "type": "string" - }, - "commit-message": { - "type": "string" - }, - "commit-sha": { - "type": "string" + "name": { + "type": "string", + "description": "The name of the token." }, - "commit-url": { - "type": "string" + "token-id": { + "type": "string", + "readOnly": true, + "description": "The ID of the token." }, - "compare-url": { - "type": "string" + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "The time when the token was created." }, - "identifier": { - "type": "string" + "expires-at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true, + "description": "The time when the token expires." }, - "is-pull-request": { - "type": "boolean" - }, - "on-default-branch": { - "type": "boolean" - }, - "pull-request-number": { - "type": "integer" - }, - "pull-request-url": { - "type": "string" - }, - "pull-request-title": { - "type": "string" - }, - "pull-request-body": { - "type": "string" - }, - "tag": { + "token": { "type": "string", - "nullable": true - }, - "sender-username": { - "type": "string" - }, - "sender-avatar-url": { - "type": "string" - }, - "sender-html-url": { - "type": "string" + "readOnly": true, + "nullable": true, + "description": "The secret text of the new authentication token. Only returned when the token is created." } } - }, - "relationships": { + } + } + }, + "projects-has-one": { + "type": "object", + "properties": { + "data": { "type": "object", - "properties": { - "created-by": { - "$ref": "#/components/schemas/users-has-one" + "allOf": [ + { + "$ref": "#/components/schemas/projects-identifier" } - } + ], + "nullable": true }, "links": { - "$ref": "#/components/schemas/self" + "$ref": "#/components/schemas/related" } } }, - "stack-aggregate-outputs": { + "agent-pools-has-one": { + "type": "object", + "nullable": true, + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/agent-pools-identifier" + } + ], + "nullable": true + } + } + }, + "stack-configurations-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-configurations" + ] + } + } + }, + "stack-configurations-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/stack-configurations-identifier" + } + ], + "nullable": true + } + } + }, + "stacks": { "type": "object", "required": [ "type", @@ -35922,115 +36090,155 @@ "type": "string", "readOnly": true, "enum": [ - "stack-aggregate-outputs" + "stacks" ] }, "attributes": { "type": "object", "properties": { - "status": { + "name": { + "type": "string" + }, + "description": { "type": "string", - "enum": [ - "created", - "queued", - "running", - "completed", - "failed", - "canceled" - ], + "nullable": true + }, + "working-directory": { + "type": "string", + "maxLength": 100, + "nullable": true + }, + "deleteable": { + "type": "boolean", "readOnly": true }, - "published-output-count": { + "speculative-enabled": { + "type": "boolean", + "default": false + }, + "upstream-count": { "type": "integer", "readOnly": true }, - "created-at": { - "type": "string", - "format": "date-time", + "downstream-count": { + "type": "integer", "readOnly": true }, - "updated-at": { - "type": "string", - "format": "date-time", + "inputs-count": { + "type": "integer", "readOnly": true }, - "running-at": { - "type": "string", - "format": "date-time", + "outputs-count": { + "type": "integer", "readOnly": true }, - "queued-at": { + "execution-mode": { "type": "string", - "format": "date-time", - "readOnly": true + "enum": [ + "remote", + "agent" + ] }, - "completed-at": { + "setting-overwrites": { + "type": "object", + "properties": { + "execution-mode": { + "type": "boolean" + }, + "agent-pool": { + "type": "boolean" + } + } + }, + "vcs-repo": { + "type": "object", + "nullable": true, + "properties": { + "branch": { + "type": "string", + "nullable": true + }, + "tags-regex": { + "type": "string", + "nullable": true + }, + "identifier": { + "type": "string" + }, + "display-identifier": { + "type": "string" + }, + "oauth-token-id": { + "type": "string", + "nullable": true + }, + "repository-http-url": { + "type": "string", + "nullable": true + }, + "service-provider": { + "type": "string", + "nullable": true + }, + "trigger-disabled": { + "type": "boolean" + } + } + }, + "created-at": { "type": "string", "format": "date-time", - "nullable": true, "readOnly": true }, - "failed-at": { + "updated-at": { "type": "string", "format": "date-time", - "nullable": true, "readOnly": true } } }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "latest-output-summary": { + "type": "string" + } + } + }, "relationships": { "type": "object", "properties": { - "stack-published-outputs": { + "stack-configurations": { "$ref": "#/components/schemas/links_related" }, - "stack-configuration": { + "project": { + "$ref": "#/components/schemas/projects-has-one" + }, + "agent-pool": { + "$ref": "#/components/schemas/agent-pools-has-one" + }, + "latest-stack-configuration": { "$ref": "#/components/schemas/stack-configurations-has-one" } } } } }, - "stack-configurations-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ingress-attributes" - }, - { - "$ref": "#/components/schemas/stack-configuration-summaries" - }, - { - "$ref": "#/components/schemas/stack-diagnostics" - }, - { - "$ref": "#/components/schemas/stack-aggregate-outputs" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "ingress-attributes": "#/components/schemas/ingress-attributes", - "stack-configuration-summaries": "#/components/schemas/stack-configuration-summaries", - "stack-diagnostics": "#/components/schemas/stack-diagnostics", - "stack-aggregate-outputs": "#/components/schemas/stack-aggregate-outputs" - } - } - } - }, - "stack-configurations-envelope": { + "stacks-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/stack-configurations" + "$ref": "#/components/schemas/stacks" } } }, - "stack-deployments": { + "stack-configuration-summaries": { "type": "object", "required": [ "type", @@ -36045,44 +36253,132 @@ "type": "string", "readOnly": true, "enum": [ - "stack-deployments" + "stack-configuration-summaries" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "pending", + "queued", + "preparing", + "completed", + "failed" + ], + "readOnly": true + }, + "sequence-number": { + "type": "integer", + "readOnly": true + }, + "stack-deployment-group-status-summary": { + "type": "object", + "description": "Contains a count of the number of deployment groups in each state.", + "properties": { + "pending": { + "type": "integer" + }, + "pre-deploying": { + "type": "integer" + }, + "deploying": { + "type": "integer" + }, + "succeeded": { + "type": "integer" + }, + "failed": { + "type": "integer" + }, + "abandoned": { + "type": "integer" + } + } + }, + "stack-deployment-run-status-summary": { + "type": "object", + "description": "Contains a count of the number of deployment runs in each state.", + "properties": { + "pending": { + "type": "integer" + }, + "pending-capacity": { + "type": "integer" + }, + "pre-deploying": { + "type": "integer" + }, + "pre-deploying-pending-operator": { + "type": "integer" + }, + "acquiring-lock": { + "type": "integer" + }, + "deploying": { + "type": "integer" + }, + "deploying-pending-operator": { + "type": "integer" + }, + "succeeded": { + "type": "integer" + }, + "failed": { + "type": "integer" + }, + "abandoned": { + "type": "integer" + } + } } } }, - "links": { + "relationships": { "type": "object", "properties": { - "self": { - "type": "string" - }, - "stack-deployment-runs": { - "type": "string" + "stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" } } + } + } + }, + "stacks-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "relationships": { + "type": { + "type": "string", + "enum": [ + "stacks" + ] + } + } + }, + "stacks-has-one": { + "type": "object", + "properties": { + "data": { "type": "object", - "properties": { - "stack": { - "$ref": "#/components/schemas/stacks-has-one" + "allOf": [ + { + "$ref": "#/components/schemas/stacks-identifier" } - } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "stack-deployment-groups-identifier": { + "ingress-attributes-identifier": { "type": "object", - "required": [ - "id", - "type" - ], "properties": { "id": { "type": "string" @@ -36090,27 +36386,34 @@ "type": { "type": "string", "enum": [ - "stack-deployment-groups" + "ingress-attributes" ] } } }, - "stack-deployment-groups-has-one": { + "ingress-attributes-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/stack-deployment-groups-identifier" + "$ref": "#/components/schemas/ingress-attributes-identifier" } ], "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "stack-approvals-identifier": { + "stack-configuration-summaries-identifier": { "type": "object", + "required": [ + "id", + "type" + ], "properties": { "id": { "type": "string" @@ -36118,26 +36421,26 @@ "type": { "type": "string", "enum": [ - "stack-approvals" + "stack-configuration-summaries" ] } } }, - "stack-approvals-has-one": { + "stack-configuration-summaries-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/stack-approvals-identifier" + "$ref": "#/components/schemas/stack-configuration-summaries-identifier" } ], "nullable": true } } }, - "stack-deployment-runs-identifier": { + "stack-aggregate-outputs-identifier": { "type": "object", "required": [ "id", @@ -36150,27 +36453,26 @@ "type": { "type": "string", "enum": [ - "stack-deployment-runs", - "stack-states" + "stack-aggregate-outputs" ] } } }, - "stack-deployment-runs-has-one": { + "stack-aggregate-outputs-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/stack-deployment-runs-identifier" + "$ref": "#/components/schemas/stack-aggregate-outputs-identifier" } ], "nullable": true } } }, - "stack-deployment-runs": { + "stack-configurations": { "type": "object", "required": [ "type", @@ -36185,125 +36487,414 @@ "type": "string", "readOnly": true, "enum": [ - "stack-deployment-runs" + "stack-configurations" ] }, "attributes": { "type": "object", "properties": { - "plan-mode": { - "type": "string", - "enum": [ - "normal", - "destroy", - "import" - ], - "readOnly": true - }, - "deployment": { - "type": "string", - "readOnly": true - }, "status": { "type": "string", "enum": [ "pending", - "pending-capacity", - "pre-deploying", - "pre-deploying-pending-operator", - "acquiring-lock", - "deploying", - "deploying-pending-operator", - "succeeded", - "failed", - "abandoned" + "queued", + "preparing", + "completed", + "failed" ], "readOnly": true }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "pre-deploying-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "pre-deploying-pending-operator-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "pending-capacity-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "acquiring-lock-at": { - "type": "string", - "format": "date-time", + "sequence-number": { + "type": "integer", "nullable": true, "readOnly": true }, - "deploying-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true + "speculative": { + "type": "boolean", + "nullable": false, + "default": false, + "description": "Specifies if this is a speculative configuration that HCP Terraform cannot converge past the plan step." }, - "deploying-pending-operator-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true + "destroy-all": { + "type": "boolean", + "nullable": false, + "default": false, + "description": "If true, the created configuration will behave as though every deployment in the configuration was declared with `destroy = true`." }, - "succeeded-at": { + "preparing-event-stream-url": { "type": "string", - "format": "date-time", - "nullable": true, "readOnly": true }, - "failed-at": { + "created-at": { "type": "string", "format": "date-time", - "nullable": true, "readOnly": true }, - "abandoned-at": { + "updated-at": { "type": "string", "format": "date-time", - "nullable": true, - "readOnly": true - }, - "eligible-for-rerun": { - "type": "boolean", "readOnly": true } } }, "links": { - "$ref": "#/components/schemas/self" + "type": "object", + "properties": { + "self": { + "type": "string" + } + } }, "relationships": { "type": "object", "properties": { - "stack-deployment-steps": { + "stack-deployment-groups": { "$ref": "#/components/schemas/links_related" }, - "stack-deployment-group": { - "$ref": "#/components/schemas/stack-deployment-groups-has-one" - }, - "stack-configuration": { - "$ref": "#/components/schemas/stack-configurations-has-one" + "stack-diagnostics": { + "$ref": "#/components/schemas/links_related" + }, + "stack-published-outputs": { + "$ref": "#/components/schemas/links_related" + }, + "stack": { + "$ref": "#/components/schemas/stacks-has-one" + }, + "ingress-attributes": { + "$ref": "#/components/schemas/ingress-attributes-has-one" + }, + "stack-configuration-summary": { + "description": "Contains summed status counts for the deployment groups and deployment runs in this configuration.", + "$ref": "#/components/schemas/stack-configuration-summaries-has-one" + }, + "group-status-summaries": { + "description": "Deprecated alias for stack-configuration-summary.", + "$ref": "#/components/schemas/stack-configuration-summaries-has-one" + }, + "stack-aggregate-outputs": { + "$ref": "#/components/schemas/stack-aggregate-outputs-has-one" + } + } + } + } + }, + "stack-configurations-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/stack-configurations" + } + } + }, + "stack-deployments": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-deployments" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "stack-deployment-runs": { + "type": "string" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "stack": { + "$ref": "#/components/schemas/stacks-has-one" + } + } + } + } + }, + "stack-deployment-groups-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-deployment-groups" + ] + } + } + }, + "stack-deployment-groups-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/stack-deployment-groups-identifier" + } + ], + "nullable": true + } + } + }, + "stack-approvals-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-approvals" + ] + } + } + }, + "stack-approvals-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/stack-approvals-identifier" + } + ], + "nullable": true + } + } + }, + "stack-deployment-steps-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-deployment-steps" + ] + } + } + }, + "stack-deployment-steps-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/stack-deployment-steps-identifier" + } + ], + "nullable": true + } + } + }, + "stack-deployment-runs-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-deployment-runs", + "stack-states" + ] + } + } + }, + "stack-deployment-runs-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/stack-deployment-runs-identifier" + } + ], + "nullable": true + } + } + }, + "stack-deployment-runs": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-deployment-runs" + ] + }, + "attributes": { + "type": "object", + "properties": { + "plan-mode": { + "type": "string", + "enum": [ + "normal", + "destroy", + "import" + ], + "readOnly": true + }, + "deployment": { + "type": "string", + "readOnly": true + }, + "status": { + "type": "string", + "enum": [ + "pending", + "pending-capacity", + "pre-deploying", + "pre-deploying-pending-operator", + "acquiring-lock", + "deploying", + "deploying-pending-operator", + "succeeded", + "failed", + "abandoned" + ], + "readOnly": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "pre-deploying-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "pre-deploying-pending-operator-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "pending-capacity-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "acquiring-lock-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "deploying-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "deploying-pending-operator-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "succeeded-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "failed-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "abandoned-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "eligible-for-rerun": { + "type": "boolean", + "readOnly": true + } + } + }, + "links": { + "$ref": "#/components/schemas/self" + }, + "relationships": { + "type": "object", + "properties": { + "stack-deployment-steps": { + "$ref": "#/components/schemas/links_related" + }, + "stack-deployment-group": { + "$ref": "#/components/schemas/stack-deployment-groups-has-one" + }, + "stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" }, "destroy-stack-configuration": { "$ref": "#/components/schemas/stack-configurations-has-one" @@ -36614,6 +37205,81 @@ } } }, + "stack-diagnostics": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-diagnostics" + ] + }, + "attributes": { + "type": "object", + "properties": { + "severity": { + "type": "string", + "enum": [ + "warning", + "error" + ], + "readOnly": true + }, + "summary": { + "type": "string", + "readOnly": true + }, + "detail": { + "type": "string", + "readOnly": true + }, + "diags": { + "type": "array", + "readOnly": true, + "nullable": true + }, + "acknowledged": { + "type": "boolean", + "readOnly": true + }, + "acknowledged-at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "links": { + "$ref": "#/components/schemas/self" + }, + "relationships": { + "type": "object", + "properties": { + "stack-configuration": { + "$ref": "#/components/schemas/stack-configurations-has-one" + }, + "stack-deployment-step": { + "$ref": "#/components/schemas/stack-deployment-steps-has-one" + } + } + } + } + }, "stack-published-outputs": { "type": "object", "required": [ @@ -36863,22 +37529,6 @@ } } }, - "stack-deployment-groups-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/stack-deployment-group-summaries" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "stack-deployment-group-summaries": "#/components/schemas/stack-deployment-group-summaries" - } - } - } - }, "stack-deployment-groups-envelope": { "type": "object", "required": [ @@ -37696,22 +38346,19 @@ "$ref": "#/components/schemas/data-retention-policy-has-one", "x-vis": [ "tfe" - ], - "description": "This relationship is only available in Terraform Enterprise." + ] }, "module-producers": { "x-vis": [ "tfe" ], - "$ref": "#/components/schemas/links_related", - "description": "This relationship is only available in Terraform Enterprise." + "$ref": "#/components/schemas/links_related" }, "provider-producers": { "x-vis": [ "tfe" ], - "$ref": "#/components/schemas/links_related", - "description": "This relationship is only available in Terraform Enterprise." + "$ref": "#/components/schemas/links_related" }, "oauth-tokens": { "$ref": "#/components/schemas/links_related" @@ -37723,8 +38370,7 @@ "$ref": "#/components/schemas/links_related", "x-vis": [ "hcpt" - ], - "description": "This relationship is only available in HCP Terraform." + ] }, "entitlement-set": { "$ref": "#/components/schemas/entitlement-sets-has-one" @@ -37739,102 +38385,12 @@ "x-vis": [ "hcpt" ], - "$ref": "#/components/schemas/hyok-configurations-has-one", - "description": "This relationship is only available in HCP Terraform." - } - } - } - } - }, - "entitlement-sets": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "entitlement-sets" - ] - }, - "attributes": { - "type": "object" - }, - "links": { - "type": "object" - } - } - }, - "onboarding-task-lists": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "onboarding-task-lists" - ] - }, - "attributes": { - "type": "object", - "properties": { - "total-task-count": { - "type": "integer" - }, - "incomplete-task-count": { - "type": "integer" - }, - "expired": { - "type": "boolean" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" + "$ref": "#/components/schemas/hyok-configurations-has-one" } } } } }, - "organizations-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/subscriptions" - }, - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/entitlement-sets" - }, - { - "$ref": "#/components/schemas/onboarding-task-lists" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "subscriptions": "#/components/schemas/subscriptions", - "projects": "#/components/schemas/projects", - "entitlement-sets": "#/components/schemas/entitlement-sets", - "onboarding-task-lists": "#/components/schemas/onboarding-task-lists" - } - } - } - }, "organizations-envelope": { "type": "object", "required": [ @@ -37883,6 +38439,29 @@ } } }, + "users-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "users" + ] + } + } + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, "scim-identities-identifier": { "type": "object", "required": [ @@ -38016,353 +38595,6 @@ } } }, - "users-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "users" - ] - } - } - }, - "users-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/users-identifier" - } - } - } - }, - "organization-memberships-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "organization-memberships" - ] - } - } - }, - "organization-memberships-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/organization-memberships-identifier" - } - } - } - }, - "teams": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "teams" - ] - }, - "attributes": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the team, which can only include letters, numbers, `-`, and `_`." - }, - "users-count": { - "type": "integer", - "readOnly": true, - "description": "The number of active users in the team." - }, - "description": { - "type": "string", - "nullable": true, - "description": "Team description. Can be manually entered for all teams." - }, - "sso-team-id": { - "type": "string", - "nullable": true, - "description": "The unique identifier of the team from the SAML MemberOf attribute." - }, - "visibility": { - "type": "string", - "enum": [ - "secret", - "organization" - ], - "description": "The team's visibility. Can be \"secret\" or \"organization\" (visible)." - }, - "allow-member-token-management": { - "type": "boolean", - "description": "Whether team members are allowed to manage their own authentication tokens." - }, - "scim-linked": { - "type": "boolean", - "readOnly": true, - "description": "Whether this team is linked to a SCIM group. Only available when SCIM is enabled.\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", - "x-vis": [ - "public-beta" - ] - }, - "scim-group-name": { - "type": "string", - "nullable": true, - "readOnly": true, - "description": "The display name of the linked SCIM group. Only available when SCIM is enabled.\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", - "x-vis": [ - "public-beta" - ] - }, - "scim-updated-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true, - "description": "The timestamp of the most recent SCIM sync update for this team. Only available when SCIM is enabled.\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", - "x-vis": [ - "public-beta" - ] - }, - "scim-sync-paused": { - "type": "boolean", - "readOnly": true, - "description": "Whether SCIM sync is paused for this team. Only available when SCIM is enabled.\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", - "x-vis": [ - "public-beta" - ] - }, - "hcp-resource-name": { - "type": "string", - "nullable": true, - "readOnly": true, - "description": "The HCP resource name for unified teams.\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - }, - "is-unified": { - "type": "boolean", - "readOnly": true, - "description": "Whether this team is unified with HCP.\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - }, - "non-service-users-count": { - "type": "integer", - "nullable": true, - "readOnly": true, - "description": "The number of non-service account users in the team." - }, - "permissions": { - "type": "object", - "readOnly": true, - "description": "Permissions for the current user on this team.", - "properties": { - "can-update-membership": { - "type": "boolean" - }, - "can-destroy": { - "type": "boolean" - }, - "can-update-organization-access": { - "type": "boolean" - }, - "can-update-api-token": { - "type": "boolean" - }, - "can-update-visibility": { - "type": "boolean" - }, - "can-update-name": { - "type": "boolean" - }, - "can-update-sso-team-id": { - "type": "boolean" - }, - "can-update-member-token-management": { - "type": "boolean" - }, - "can-view-api-token": { - "type": "boolean" - } - } - }, - "organization-access": { - "type": "object", - "nullable": true, - "description": "Settings for the team's organization-level permissions.", - "properties": { - "manage-policies": { - "type": "boolean" - }, - "manage-workspaces": { - "type": "boolean" - }, - "manage-vcs-settings": { - "type": "boolean" - }, - "manage-policy-overrides": { - "type": "boolean" - }, - "delegate-policy-overrides": { - "type": "boolean" - }, - "manage-modules": { - "type": "boolean" - }, - "manage-providers": { - "type": "boolean" - }, - "manage-run-tasks": { - "type": "boolean" - }, - "manage-projects": { - "type": "boolean" - }, - "manage-membership": { - "type": "boolean" - }, - "manage-teams": { - "type": "boolean" - }, - "manage-organization-access": { - "type": "boolean" - }, - "access-secret-teams": { - "type": "boolean" - }, - "read-projects": { - "type": "boolean" - }, - "read-workspaces": { - "type": "boolean" - }, - "manage-agent-pools": { - "type": "boolean" - }, - "manage-public-providers": { - "type": "boolean", - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." - }, - "manage-public-modules": { - "type": "boolean", - "x-vis": [ - "hcpt" - ], - "description": "This attribute is only available in HCP Terraform." - }, - "manage-registry-components": { - "type": "boolean", - "nullable": true - }, - "manage-registry-artifact-tags": { - "type": "boolean", - "nullable": true - }, - "manage-registry-artifact-version-tags": { - "type": "boolean", - "nullable": true - } - } - } - } - }, - "links": { - "$ref": "#/components/schemas/self" - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "users": { - "description": "Team members (active users only).", - "$ref": "#/components/schemas/users-has-many" - }, - "organization-memberships": { - "description": "Organization memberships for team members.", - "$ref": "#/components/schemas/organization-memberships-has-many" - }, - "authentication-token": { - "$ref": "#/components/schemas/links_related" - }, - "authentication-tokens": { - "$ref": "#/components/schemas/links_related" - } - } - } - } - }, - "scim-identities": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "The external ID of the SCIM identity" - }, - "type": { - "type": "string", - "enum": [ - "scim-identities" - ] - }, - "attributes": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "provisioned", - "claimed" - ], - "readOnly": true, - "description": "The provisioning status of the user.\n- \"provisioned\": User was created via SCIM provisioning\n- \"claimed\": User claimed their account or existed before SCIM\n" - }, - "username": { - "type": "string", - "readOnly": true, - "description": "The username/identity string from the SCIM provider." - } - } - } - } - }, "organization-memberships-envelope": { "type": "object", "required": [ @@ -38463,2320 +38695,22 @@ "type": "object", "required": [ "project", - "recoverable" - ], - "properties": { - "project": { - "description": "The project this recoverable item belongs to", - "$ref": "#/components/schemas/projects-has-one" - }, - "recoverable": { - "description": "The recoverable resource (can be a workspace or stack.)", - "$ref": "#/components/schemas/recoverable-has-one" - } - } - } - } - }, - "ssh-keys-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "ssh-keys" - ] - } - } - }, - "ssh-keys-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/ssh-keys-identifier" - } - ], - "nullable": true - } - } - }, - "locked-by-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "users", - "teams", - "runs" - ] - } - } - }, - "locked-by-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/locked-by-identifier" - } - ], - "nullable": true - } - } - }, - "runs-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "runs" - ] - } - } - }, - "runs-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/runs-identifier" - } - ], - "nullable": true - } - } - }, - "workspace-outputs-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "workspace-outputs" - ] - } - } - }, - "workspace-outputs-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/workspace-outputs-identifier" - } - } - } - }, - "state-versions-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "state-versions" - ] - } - } - }, - "state-versions-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/state-versions-identifier" - } - ], - "nullable": true - } - } - }, - "configuration-versions-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "configuration-versions" - ] - } - } - }, - "configuration-versions-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/configuration-versions-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "workspace-readme-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "workspace-readme" - ] - } - } - }, - "workspace-readme-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/workspace-readme-identifier" - } - ], - "nullable": true - } - } - }, - "assessment-results-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "assessment-results" - ] - } - } - }, - "assessment-results-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/assessment-results-identifier" - } - ], - "nullable": true - } - } - }, - "no-code-module-versions-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "no-code-module-versions" - ] - } - } - }, - "no-code-module-versions-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/no-code-module-versions-identifier" - } - ], - "nullable": true - } - } - }, - "vars-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "vars" - ] - } - } - }, - "vars-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/vars-identifier" - } - } - } - }, - "tags-has-many": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "tags" - ] - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - } - } - } - } - } - }, - "workspace-links": { - "type": "object", - "properties": { - "self": { - "type": "string" - }, - "self-html": { - "type": "string" - } - } - }, - "workspaces": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "workspaces" - ] - }, - "attributes": { - "type": "object", - "properties": { - "allow-destroy-plan": { - "type": "boolean" - }, - "auto-apply": { - "type": "boolean" - }, - "auto-apply-run-trigger": { - "type": "boolean" - }, - "auto-destroy-activity-duration": { - "type": "string", - "nullable": true - }, - "auto-destroy-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "auto-destroy-status": { - "type": "string", - "nullable": true - }, - "inherits-project-auto-destroy": { - "type": "boolean" - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "environment": { - "type": "string" - }, - "locked": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "queue-all-runs": { - "type": "boolean" - }, - "speculative-enabled": { - "type": "boolean" - }, - "structured-run-output-enabled": { - "type": "boolean" - }, - "terraform-version": { - "type": "string" - }, - "working-directory": { - "type": "string", - "nullable": true - }, - "global-remote-state": { - "type": "boolean" - }, - "project-remote-state": { - "type": "boolean" - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "resource-count": { - "type": "integer" - }, - "apply-duration-average": { - "type": "integer", - "nullable": true - }, - "plan-duration-average": { - "type": "integer", - "nullable": true - }, - "policy-check-failures": { - "type": "integer", - "nullable": true - }, - "run-failures": { - "type": "integer", - "nullable": true - }, - "workspace-kpis-runs-count": { - "type": "integer", - "nullable": true - }, - "latest-change-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "operations": { - "type": "boolean", - "description": "Deprecated. Use execution-mode instead." - }, - "execution-mode": { - "type": "string", - "enum": [ - "remote", - "local", - "agent" - ] - }, - "setting-overwrites": { - "type": "object", - "properties": { - "execution-mode": { - "type": "boolean" - }, - "agent-pool": { - "type": "boolean" - } - } - }, - "vcs-repo": { - "type": "object", - "nullable": true, - "properties": { - "identifier": { - "type": "string" - }, - "display-identifier": { - "type": "string", - "nullable": true - }, - "branch": { - "type": "string", - "nullable": true - }, - "ingress-submodules": { - "type": "boolean" - }, - "oauth-token-id": { - "type": "string", - "nullable": true - }, - "github-app-installation-id": { - "type": "string", - "nullable": true - }, - "tags-regex": { - "type": "string", - "nullable": true - } - } - }, - "vcs-repo-identifier": { - "type": "string", - "nullable": true - }, - "permissions": { - "type": "object", - "nullable": true, - "properties": { - "can-update": { - "type": "boolean" - }, - "can-destroy": { - "type": "boolean" - }, - "can-queue-run": { - "type": "boolean" - }, - "can-read-run": { - "type": "boolean" - }, - "can-read-variable": { - "type": "boolean" - }, - "can-update-variable": { - "type": "boolean" - }, - "can-read-state-versions": { - "type": "boolean" - }, - "can-read-state-outputs": { - "type": "boolean" - }, - "can-create-state-versions": { - "type": "boolean" - }, - "can-queue-apply": { - "type": "boolean" - }, - "can-lock": { - "type": "boolean" - }, - "can-unlock": { - "type": "boolean" - }, - "can-force-unlock": { - "type": "boolean" - }, - "can-read-settings": { - "type": "boolean" - }, - "can-manage-tags": { - "type": "boolean" - }, - "can-manage-run-tasks": { - "type": "boolean" - }, - "can-force-delete": { - "type": "boolean" - }, - "can-manage-assessments": { - "type": "boolean" - }, - "can-manage-ephemeral-workspaces": { - "type": "boolean" - }, - "can-read-assessment-results": { - "type": "boolean" - }, - "can-queue-destroy": { - "type": "boolean" - } - } - }, - "actions": { - "type": "object", - "properties": { - "is-destroyable": { - "type": "boolean" - } - } - }, - "description": { - "type": "string", - "nullable": true - }, - "file-triggers-enabled": { - "type": "boolean" - }, - "trigger-prefixes": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - }, - "trigger-patterns": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - }, - "assessments-enabled": { - "type": "boolean" - }, - "last-assessment-result-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "locked-reason": { - "type": "string", - "nullable": true - }, - "source": { - "type": "string", - "nullable": true - }, - "source-name": { - "type": "string", - "nullable": true - }, - "source-url": { - "type": "string", - "nullable": true - }, - "source-module-id": { - "type": "string", - "nullable": true, - "readOnly": true, - "description": "Identifier of the no-code module and version this workspace was created from\n(for example, private////). Present only for\nno-code workspaces; omitted otherwise. Prefer the no-code-module-version\nrelationship for a typed link to the current no-code module version.\n" - }, - "no-code-upgrade-available": { - "type": "boolean", - "nullable": true, - "readOnly": true, - "description": "Whether a newer no-code module version is available for this workspace.\nPresent only for no-code workspaces; omitted otherwise.\n" - }, - "tag-names": { - "type": "array", - "items": { - "type": "string" - } - }, - "effective-state-version-retention-desc": { - "type": "string", - "nullable": true, - "x-vis": [ - "tfe" - ], - "description": "A human-readable description of the effective state-version\nretention window for this workspace. Returns null when no state-version retention policy is in effect for the\nworkspace, or when the policy does not delete state versions.\n\n\nThis attribute is only available in Terraform Enterprise." - }, - "effective-run-data-retention-desc": { - "type": "string", - "nullable": true, - "x-vis": [ - "tfe" - ], - "description": "A human-readable description of the effective run data and logs\nretention window for this workspace. Returns null when no run data retention policy is in effect for the\nworkspace, or when the policy does not delete run data and logs.\n\n\nThis attribute is only available in Terraform Enterprise." - }, - "hyok-enabled": { - "type": "boolean", - "x-vis": [ - "hcpt" - ], - "description": "HCP Terraform Premium Tier only. Enabled Hold Your Own Key for the workspace. Once this has been set to true,\nit can no longer be disabled.\n\n\nThis attribute is only available in HCP Terraform." - } - } - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "ssh-key": { - "$ref": "#/components/schemas/ssh-keys-has-one" - }, - "locked-by": { - "$ref": "#/components/schemas/locked-by-has-one" - }, - "current-run": { - "$ref": "#/components/schemas/runs-has-one" - }, - "latest-run": { - "$ref": "#/components/schemas/runs-has-one" - }, - "outputs": { - "$ref": "#/components/schemas/workspace-outputs-has-many" - }, - "remote-state-consumers": { - "type": "object", - "properties": { - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "current-state-version": { - "$ref": "#/components/schemas/state-versions-has-one" - }, - "current-configuration-version": { - "$ref": "#/components/schemas/configuration-versions-has-one" - }, - "agent-pool": { - "$ref": "#/components/schemas/agent-pools-has-one" - }, - "readme": { - "$ref": "#/components/schemas/workspace-readme-has-one" - }, - "project": { - "$ref": "#/components/schemas/projects-has-one" - }, - "current-assessment-result": { - "$ref": "#/components/schemas/assessment-results-has-one" - }, - "no-code-module-version": { - "description": "The no-code module version this workspace was created from. Present\nonly for no-code workspaces; data is null or omitted otherwise.\n", - "$ref": "#/components/schemas/no-code-module-versions-has-one" - }, - "vars": { - "$ref": "#/components/schemas/vars-has-many" - }, - "tags": { - "$ref": "#/components/schemas/tags-has-many" - } - } - }, - "links": { - "$ref": "#/components/schemas/workspace-links" - } - } - }, - "recoverable-items-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/workspaces" - }, - { - "$ref": "#/components/schemas/stacks" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "projects": "#/components/schemas/projects", - "users": "#/components/schemas/users", - "workspaces": "#/components/schemas/workspaces", - "stacks": "#/components/schemas/stacks" - } - } - } - }, - "data-retention-target-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "organizations", - "workspaces" - ] - } - } - }, - "data-retention-target-has-one": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/data-retention-target-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "data-retention-policy": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "data-retention-policy-delete-olders", - "data-retention-policy-dont-deletes" - ] - }, - "attributes": { - "type": "object", - "properties": { - "delete-older-than-n-days": { - "type": "integer" - }, - "delete-state-versions": { - "type": "boolean" - }, - "delete-configuration-versions": { - "type": "boolean" - }, - "delete-run-data-and-logs": { - "type": "boolean" - }, - "state-versions-delete-after-n-days": { - "type": "integer", - "nullable": true - }, - "configuration-versions-delete-after-n-days": { - "type": "integer", - "nullable": true - }, - "run-data-and-logs-delete-after-n-days": { - "type": "integer", - "nullable": true - }, - "state-versions-keep-latest-count": { - "type": "integer", - "nullable": true - }, - "configuration-versions-keep-latest-count": { - "type": "integer", - "nullable": true - }, - "run-data-keep-latest-count": { - "type": "integer", - "nullable": true - } - } - }, - "links": { - "$ref": "#/components/schemas/self" - }, - "relationships": { - "type": "object", - "properties": { - "target": { - "$ref": "#/components/schemas/data-retention-target-has-one" - } - } - } - } - }, - "data-retention-policy-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/data-retention-policy" - } - } - }, - "projects-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/projects" - } - } - }, - "token-ttl-policy": { - "type": "object", - "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "The token TTL policy ID" - }, - "type": { - "type": "string", - "enum": [ - "organization-token-ttl-policies" - ] - }, - "attributes": { - "type": "object", - "properties": { - "token-type": { - "type": "string", - "description": "The type of the token TTL policy", - "enum": [ - "organization", - "team", - "user", - "audit_trails", - "metrics" - ], - "example": "organization" - }, - "max-ttl-ms": { - "type": "integer", - "format": "int64", - "description": "The maximum time-to-live for the token in milliseconds", - "example": 3600000 - }, - "created-at": { - "type": "string", - "format": "date-time", - "description": "When the policy was created" - }, - "updated-at": { - "type": "string", - "format": "date-time", - "description": "When the policy was last updated" - } - }, - "required": [ - "token-type", - "max-ttl-ms" - ] - } - } - }, - "token-ttl-policy-entry": { - "type": "object", - "required": [ - "token-type", - "max-ttl-ms" - ], - "properties": { - "token-type": { - "type": "string", - "description": "The type of the token TTL policy", - "enum": [ - "organization", - "team", - "user", - "audit_trails", - "metrics" - ], - "example": "organization" - }, - "max-ttl-ms": { - "type": "integer", - "format": "int64", - "description": "The maximum time-to-live for the token in milliseconds", - "example": 3600000 - } - } - }, - "token-ttl-policies": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "organization-token-ttl-policies" - ] - }, - "attributes": { - "type": "object", - "properties": { - "token-ttl-policies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/token-ttl-policy-entry" - } - } - } - } - } - }, - "token-ttl-policies-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/token-ttl-policies" - } - } - }, - "workspaces-identifier-array-document": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "workspaces" - ] - }, - "id": { - "type": "string" - } - } - } - } - } - }, - "tag-bindings": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true, - "example": "tb-7AHdkTVXrmxiB8vQ" - }, - "type": { - "type": "string", - "enum": [ - "tag-bindings" - ] - }, - "attributes": { - "type": "object", - "required": [ - "key" - ], - "properties": { - "created-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - }, - "tag-bindings-collection": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/tag-bindings" - } - } - } - }, - "inherited-from-has-one": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "object", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/projects-identifier" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "projects": "#/components/schemas/projects-identifier" - } - } - } - } - }, - "effective-tag-bindings": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true, - "example": "3JAnx3G4puQcjHu3" - }, - "type": { - "type": "string", - "enum": [ - "effective-tag-bindings" - ] - }, - "attributes": { - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "relationships": { - "type": "object", - "description": "Optional relationship indicating the project this binding was inherited from, if applicable.", - "properties": { - "inherited-from": { - "$ref": "#/components/schemas/inherited-from-has-one" - } - } - } - } - }, - "effective-tag-bindings-envelope-many": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/effective-tag-bindings" - } - } - } - }, - "workspaces-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/workspaces-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "assessment-source-identifier": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "assessments", - "plans" - ] - } - } - }, - "assessment-source-has-one": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/assessment-source-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "assessment-results": { - "type": "object", - "required": [ - "id", - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "example": "asmtres-8F5JFydVYAmtTjET" - }, - "type": { - "type": "string", - "enum": [ - "assessment-results" - ] - }, - "attributes": { - "type": "object", - "properties": { - "succeeded": { - "type": "boolean", - "description": "Whether the assessment completed successfully" - }, - "all-checks-succeeded": { - "type": "boolean", - "description": "Whether all health checks passed" - }, - "checks-errored": { - "type": "integer", - "description": "Number of health checks that errored", - "nullable": true - }, - "checks-failed": { - "type": "integer", - "description": "Number of health checks that failed", - "nullable": true - }, - "checks-passed": { - "type": "integer", - "description": "Number of health checks that passed", - "nullable": true - }, - "checks-unknown": { - "type": "integer", - "description": "Number of health checks with unknown status", - "nullable": true - }, - "created-at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the assessment result was created" - }, - "drifted": { - "type": "boolean", - "description": "Whether drift was detected" - }, - "error-message": { - "type": "string", - "nullable": true, - "description": "Error message if the assessment failed" - }, - "resources-drifted": { - "type": "integer", - "nullable": true, - "description": "Number of resources that have drifted" - }, - "resources-undrifted": { - "type": "integer", - "nullable": true, - "description": "Number of resources that have not drifted" - } - } - }, - "relationships": { - "type": "object", - "properties": { - "workspace": { - "description": "The workspace this assessment result belongs to", - "$ref": "#/components/schemas/workspaces-has-one" - }, - "source": { - "description": "The source assessment or plan that produced this result.", - "$ref": "#/components/schemas/assessment-source-has-one" - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string", - "description": "API URL for this assessment result" - }, - "json-output": { - "type": "string", - "nullable": true, - "description": "API URL for the JSON formatted assessment output (available when assessment succeeded)" - }, - "json-schema": { - "type": "string", - "nullable": true, - "description": "API URL for the JSON schema of this assessment (available when assessment succeeded)" - }, - "sanitized-plan": { - "type": "string", - "nullable": true, - "description": "API URL for the sanitized plan (available when HYOK is enabled and assessment succeeded)", - "x-vis": [ - "public-beta" - ] - }, - "log-output": { - "type": "string", - "description": "API URL to read the logs for this assessment" - } - } - } - } - }, - "configuration-versions": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "configuration-versions" - ] - }, - "attributes": { - "type": "object", - "properties": { - "auto-queue-runs": { - "type": "boolean" - }, - "error": { - "type": "string", - "nullable": true - }, - "error-message": { - "type": "string", - "nullable": true - }, - "source": { - "type": "string", - "nullable": true - }, - "speculative": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "fetching", - "uploaded", - "archived", - "errored", - "backing_data_soft_deleted", - "backing_data_permanently_deleted" - ] - }, - "status-timestamps": { - "type": "object", - "properties": { - "fetching-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "uploaded-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "errored-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "archived-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "soft-delete-backing-data-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "restore-backing-data-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "permanently-delete-backing-data-at": { - "type": "string", - "format": "date-time", - "nullable": true - } - } - }, - "provisional": { - "type": "boolean" - }, - "upload-url": { - "type": "string", - "nullable": true, - "readOnly": true - } - } - }, - "relationships": { - "type": "object", - "properties": { - "ingress-attributes": { - "$ref": "#/components/schemas/ingress-attributes-has-one" - } - } - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string" - }, - "download": { - "type": "string" - } - } - } - } - }, - "applies-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "applies" - ] - } - } - }, - "applies-has-one": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/applies-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "cost-estimates-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "cost-estimates" - ] - } - } - }, - "cost-estimates-has-one": { - "type": "object", - "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/cost-estimates-identifier" - } - ], - "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "plans-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "plans" - ] - } - } - }, - "plans-has-one": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/plans-identifier" - }, - "links": { - "$ref": "#/components/schemas/related" - } - } - }, - "run-events-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "run-events" - ] - } - } - }, - "run-events-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/run-events-identifier" - } - } - } - }, - "task-stages-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "task-stages" - ] - } - } - }, - "task-stages-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/task-stages-identifier" - } - } - } - }, - "policy-checks-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "policy-checks" - ] - } - } - }, - "policy-checks-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/policy-checks-identifier" - } - } - } - }, - "workspace-comments-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "workspace-comments" - ] - } - } - }, - "workspace-comments-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/workspace-comments-identifier" - } - } - } - }, - "tf-policy-evaluations-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "tf-policy-evaluations" - ] - } - } - }, - "tf-policy-evaluations-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/tf-policy-evaluations-identifier" - } - } - } - }, - "runs": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "runs" - ] - }, - "attributes": { - "type": "object", - "properties": { - "actions": { - "type": "object", - "properties": { - "is-cancelable": { - "type": "boolean" - }, - "is-confirmable": { - "type": "boolean" - }, - "is-discardable": { - "type": "boolean" - }, - "is-force-cancelable": { - "type": "boolean" - } - } - }, - "allow-config-generation": { - "type": "boolean" - }, - "allow-empty-apply": { - "type": "boolean" - }, - "auto-apply": { - "type": "boolean" - }, - "comment": { - "type": "string", - "writeOnly": true - }, - "canceled-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "readOnly": true - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "debugging-mode": { - "type": "boolean" - }, - "has-changes": { - "type": "boolean" - }, - "is-destroy": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "minimal-refresh": { - "type": "boolean" - }, - "plan-only": { - "type": "boolean" - }, - "refresh": { - "type": "boolean" - }, - "refresh-only": { - "type": "boolean" - }, - "replace-addrs": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "save-plan": { - "type": "boolean" - }, - "source": { - "type": "string" - }, - "status-timestamps": { - "type": "object", - "properties": { - "fetching-at": { - "type": "string", - "format": "date-time" - }, - "fetched-at": { - "type": "string", - "format": "date-time" - }, - "pre-plan-running-at": { - "type": "string", - "format": "date-time" - }, - "pre-plan-completed-at": { - "type": "string", - "format": "date-time" - }, - "plan-queued-at": { - "type": "string", - "format": "date-time" - }, - "planning-at": { - "type": "string", - "format": "date-time" - }, - "planned-at": { - "type": "string", - "format": "date-time" - }, - "tf-policy-checked-at": { - "type": "string", - "format": "date-time", - "x-vis": [ - "public-beta" - ], - "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." - }, - "tf-policy-override-at": { - "type": "string", - "format": "date-time", - "x-vis": [ - "public-beta" - ], - "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." - }, - "post-plan-running-at": { - "type": "string", - "format": "date-time" - }, - "post-plan-completed-at": { - "type": "string", - "format": "date-time" - }, - "cost-estimating-at": { - "type": "string", - "format": "date-time" - }, - "cost-estimated-at": { - "type": "string", - "format": "date-time" - }, - "policy-soft-failed-at": { - "type": "string", - "format": "date-time" - }, - "policy-checked-at": { - "type": "string", - "format": "date-time" - }, - "confirmed-at": { - "type": "string", - "format": "date-time" - }, - "planned-and-finished-at": { - "type": "string", - "format": "date-time" - }, - "planned-and-saved-at": { - "type": "string", - "format": "date-time" - }, - "pre-apply-running-at": { - "type": "string", - "format": "date-time" - }, - "pre-apply-completed-at": { - "type": "string", - "format": "date-time" - }, - "apply-queued-at": { - "type": "string", - "format": "date-time" - }, - "applying-at": { - "type": "string", - "format": "date-time" - }, - "post-apply-completed-at": { - "type": "string", - "format": "date-time" - }, - "applied-at": { - "type": "string", - "format": "date-time" - }, - "post-apply-running-at": { - "type": "string", - "format": "date-time" - }, - "discarded-at": { - "type": "string", - "format": "date-time" - }, - "errored-at": { - "type": "string", - "format": "date-time" - }, - "canceled-at": { - "type": "string", - "format": "date-time" - }, - "force-canceled-at": { - "type": "string", - "format": "date-time" - }, - "assessed-at": { - "type": "string", - "format": "date-time" - }, - "queuing-at": { - "type": "string", - "format": "date-time" - }, - "queuing-apply-at": { - "type": "string", - "format": "date-time" - } - } - }, - "status": { - "type": "string", - "description": "The current status of the run.\n\n**Note:** The following status values are in public-beta:\n- `tf_policy_checked` - Terraform Policy evaluation completed at plan stage\n- `tf_policy_override` - Terraform Policy evaluation was overridden at plan stage\n", - "enum": [ - "pending", - "fetching", - "fetching_completed", - "pre_plan_running", - "pre_plan_completed", - "pre_plan_awaiting_decision", - "queuing", - "plan_queued", - "planning", - "planned", - "tf_policy_checked", - "tf_policy_override", - "post_plan_running", - "post_plan_completed", - "cost_estimating", - "cost_estimated", - "policy_checking", - "policy_override", - "policy_soft_failed", - "policy_checked", - "confirmed", - "pre_apply_running", - "pre_apply_completed", - "queuing_apply", - "apply_queued", - "applying", - "post_apply_running", - "post_apply_completed", - "applied", - "discarded", - "errored", - "canceled", - "planned_and_finished", - "planned_and_saved", - "assessing", - "assessed" - ] - }, - "target-addrs": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "trigger-reason": { - "type": "string" - }, - "terraform-version": { - "type": "string" - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "triggering-source-name": { - "type": "string", - "nullable": true - }, - "policy-paths": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "invoke-action-addrs": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "permissions": { - "type": "object", - "properties": { - "can-apply": { - "type": "boolean" - }, - "can-cancel": { - "type": "boolean" - }, - "can-comment": { - "type": "boolean" - }, - "can-discard": { - "type": "boolean" - }, - "can-force-execute": { - "type": "boolean" - }, - "can-force-cancel": { - "type": "boolean" - }, - "can-override-policy-check": { - "type": "boolean" - } - } - }, - "variables": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "force-cancel-available-at": { - "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, - "relationships": { - "type": "object", - "properties": { - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" - }, - "triggering-source": { - "$ref": "#/components/schemas/workspaces-has-one" - }, - "triggering-run": { - "$ref": "#/components/schemas/runs-has-one" - }, - "apply": { - "$ref": "#/components/schemas/applies-has-one" - }, - "canceled-by": { - "$ref": "#/components/schemas/users-has-one" - }, - "configuration-version": { - "$ref": "#/components/schemas/configuration-versions-has-one" - }, - "confirmed-by": { - "$ref": "#/components/schemas/users-has-one" - }, - "cost-estimate": { - "$ref": "#/components/schemas/cost-estimates-has-one" - }, - "created-by": { - "$ref": "#/components/schemas/users-has-one" - }, - "plan": { - "$ref": "#/components/schemas/plans-has-one" - }, - "run-events": { - "$ref": "#/components/schemas/run-events-has-many" - }, - "task-stages": { - "$ref": "#/components/schemas/task-stages-has-many" - }, - "policy-checks": { - "$ref": "#/components/schemas/policy-checks-has-many" - }, - "run-trigger-snapshots": { - "$ref": "#/components/schemas/links_related" - }, - "comments": { - "$ref": "#/components/schemas/workspace-comments-has-many" - }, - "tf-policy-evaluations": { - "x-vis": [ - "public-beta" - ], - "$ref": "#/components/schemas/tf-policy-evaluations-has-many", - "description": "This relationship is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." - } - } - } - } - }, - "state-versions-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/state-versions-identifier" - } - } - } - }, - "applies": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "applies" - ] - }, - "attributes": { - "type": "object", - "properties": { - "execution-details": { - "type": "object", - "readOnly": true, - "nullable": true, - "properties": { - "mode": { - "type": "string", - "enum": [ - "agent", - "remote", - "local" - ] - }, - "agent-id": { - "type": "string" - }, - "agent-name": { - "type": "string" - }, - "agent-pool-id": { - "type": "string" - }, - "agent-pool-name": { - "type": "string" - } - } - }, - "status": { - "readOnly": true, - "type": "string", - "enum": [ - "created", - "pending", - "queued", - "agent_queued", - "running", - "errored", - "canceled", - "finished", - "unreachable" - ] - }, - "status-timestamps": { - "readOnly": true, - "type": "object", - "properties": { - "agent-queued-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "started-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "errored-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "canceled-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "force-canceled-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "finished-at": { - "type": "string", - "format": "date-time", - "nullable": true - } - } - }, - "log-read-url": { - "readOnly": true, - "type": "string" - }, - "resource-additions": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "resource-changes": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "resource-destructions": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "resource-imports": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "action-invocations": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "action-failures": { - "readOnly": true, - "type": "integer", - "nullable": true - }, - "backing-data-state": { - "type": "string", - "readOnly": true, - "x-vis": [ - "tfe" - ], - "description": "Data retention lifecycle state of the apply's backing data.\n\nThis attribute is only available in Terraform Enterprise.", - "enum": [ - "backing_data_initialized", - "backing_data_available", - "backing_data_soft_deleted", - "backing_data_permanently_deleted" - ] - } - } - }, - "relationships": { - "type": "object", + "recoverable" + ], "properties": { - "state-versions": { - "$ref": "#/components/schemas/state-versions-has-many" + "project": { + "description": "The project this recoverable item belongs to", + "$ref": "#/components/schemas/projects-has-one" + }, + "recoverable": { + "description": "The recoverable resource (can be a workspace or stack.)", + "$ref": "#/components/schemas/recoverable-has-one" } } - }, - "links": { - "$ref": "#/components/schemas/self" - } - } - }, - "plan-exports-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "plan-exports" - ] - } - } - }, - "plan-exports-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/plan-exports-identifier" - } } } }, - "hyok-encrypted-data-keys-identifier": { + "data-retention-target-identifier": { "type": "object", "required": [ "id", @@ -40789,624 +38723,583 @@ "type": { "type": "string", "enum": [ - "hyok-encrypted-data-keys" + "organizations", + "workspaces" ] } } }, - "hyok-encrypted-data-keys-has-one": { + "data-retention-target-has-one": { "type": "object", "properties": { "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/hyok-encrypted-data-keys-identifier" - } - ], - "nullable": true + "$ref": "#/components/schemas/data-retention-target-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "plans": { + "data-retention-policy": { "type": "object", "required": [ - "id", "type", "attributes" ], "properties": { "id": { "type": "string", - "example": "plan-8F5JFydVYAmtTjET" + "readOnly": true }, "type": { "type": "string", "enum": [ - "plans" + "data-retention-policy-delete-olders", + "data-retention-policy-dont-deletes" ] }, "attributes": { "type": "object", "properties": { - "execution-details": { - "type": "object", - "nullable": true, - "description": "Details about the execution of this plan. Null if plan has not started.", - "properties": { - "mode": { - "type": "string", - "description": "Execution mode of the run", - "enum": [ - "remote", - "agent", - "local" - ] - }, - "agent-id": { - "type": "string", - "example": "agent-S1Y7tcKxXPJDQAvq", - "description": "ID of the agent used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - }, - "agent-name": { - "type": "string", - "example": "agent_01", - "description": "Name of the agent used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - }, - "agent-pool-id": { - "type": "string", - "example": "apool-Zigq2VGreKq7nwph", - "description": "ID of the agent pool used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - }, - "agent-pool-name": { - "type": "string", - "example": "first-pool", - "description": "Name of the agent pool used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ] - } - } + "delete-older-than-n-days": { + "type": "integer" }, - "generated-configuration": { - "type": "boolean", - "default": false, - "nullable": true, - "description": "Whether the plan generated new configuration as part of this run" + "delete-state-versions": { + "type": "boolean" }, - "has-changes": { - "type": "boolean", - "description": "Whether the plan has any changes" + "delete-configuration-versions": { + "type": "boolean" }, - "resource-additions": { + "delete-run-data-and-logs": { + "type": "boolean" + }, + "state-versions-delete-after-n-days": { "type": "integer", - "description": "Number of resources that will be added", "nullable": true }, - "resource-changes": { + "configuration-versions-delete-after-n-days": { "type": "integer", - "description": "Number of resources that will be changed", "nullable": true }, - "resource-destructions": { + "run-data-and-logs-delete-after-n-days": { "type": "integer", - "description": "Number of resources that will be destroyed", "nullable": true }, - "resource-imports": { + "state-versions-keep-latest-count": { "type": "integer", - "description": "Number of resources that will be imported", "nullable": true }, - "structured-run-output-enabled": { - "type": "boolean", - "nullable": true, - "description": "Whether structured run output is enabled" - }, - "status": { - "type": "string", - "description": "Current status of the plan", - "enum": [ - "pending", - "managed_queued", - "queued", - "running", - "errored", - "canceled", - "finished", - "unreachable" - ] - }, - "status-timestamps": { - "type": "object", - "description": "Timestamps for state transitions of the plan", - "properties": { - "queued-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "pending-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "started-at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "finished-at": { - "type": "string", - "format": "date-time", - "nullable": true - } - } - }, - "log-read-url": { - "type": "string", - "nullable": true, - "description": "URL to read the logs for this plan" - }, - "actions": { - "type": "object", - "description": "Actions available for this plan", - "properties": { - "is-exportable": { - "type": "boolean", - "description": "Whether the plan can be exported" - } - } - }, - "backing-data-state": { - "type": "string", - "readOnly": true, - "x-vis": [ - "tfe" - ], - "description": "Data retention lifecycle state of the plan's backing data.\n\nThis attribute is only available in Terraform Enterprise.", - "enum": [ - "backing_data_initialized", - "backing_data_available", - "backing_data_soft_deleted", - "backing_data_permanently_deleted" - ] - }, - "permissions": { - "type": "object", - "description": "Permissions for the current user related to this plan", - "nullable": true, - "properties": { - "can-export": { - "type": "boolean", - "description": "Whether the current user can export the plan" - } - } - } - } - }, - "relationships": { - "type": "object", - "properties": { - "state-versions": { - "description": "State versions associated with this plan (for TF <= 0.8)", - "$ref": "#/components/schemas/state-versions-has-many" - }, - "exports": { - "description": "Exports associated with this plan", - "$ref": "#/components/schemas/plan-exports-has-many" + "configuration-versions-keep-latest-count": { + "type": "integer", + "nullable": true }, - "hyok-encrypted-data-key": { - "description": "HYOK encrypted data key associated with this plan\n\nThis relationship is only available in HCP Terraform.", - "x-vis": [ - "hcpt" - ], - "$ref": "#/components/schemas/hyok-encrypted-data-keys-has-one" + "run-data-keep-latest-count": { + "type": "integer", + "nullable": true } } }, "links": { + "$ref": "#/components/schemas/self" + }, + "relationships": { "type": "object", "properties": { - "self": { - "type": "string", - "description": "API URL for this plan" - }, - "json-output": { - "type": "string", - "nullable": true, - "description": "API URL for the JSON formatted execution plan (available for Terraform 0.12+)" - }, - "json-output-redacted": { - "type": "string", - "nullable": true, - "description": "API URL for the redacted JSON formatted execution plan (available for Terraform 0.15.2+)" - }, - "json-schema": { - "type": "string", - "nullable": true, - "description": "API URL for the JSON schema of this plan (available for Terraform 0.12+)" - }, - "sanitized-plan": { - "type": "string", - "nullable": true, - "description": "API URL for the sanitized plan (available when HYOK is enabled and with compatible Terraform version)", - "x-vis": [ - "public-beta" - ] + "target": { + "$ref": "#/components/schemas/data-retention-target-has-one" } } } } }, - "state-version-outputs-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "state-version-outputs" - ] - } - } - }, - "state-version-outputs-has-many": { + "data-retention-policy-envelope": { "type": "object", - "nullable": true, + "required": [ + "data" + ], "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/state-version-outputs-identifier" - } + "$ref": "#/components/schemas/data-retention-policy" } } }, - "state-versions": { + "projects": { "type": "object", "required": [ - "type" + "type", + "attributes" ], "properties": { "id": { - "type": "string", - "readOnly": true + "type": "string" }, "type": { "type": "string", "enum": [ - "state-versions" + "projects" ] }, "attributes": { "type": "object", "properties": { - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "size": { - "type": "integer", - "nullable": true, - "readOnly": true - }, - "hosted-state-download-url": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "hosted-json-state-download-url": { - "type": "string", - "nullable": true, - "readOnly": true + "name": { + "type": "string" }, - "hosted-state-upload-url": { + "description": { "type": "string", - "nullable": true, - "readOnly": true + "nullable": true }, - "hosted-json-state-upload-url": { + "created-at": { "type": "string", - "nullable": true, + "format": "date-time", "readOnly": true }, - "encrypted-state-download-url": { + "auto-destroy-activity-duration": { "type": "string", - "nullable": true, - "readOnly": true + "nullable": true }, - "sanitized-state-download-url": { + "default-execution-mode": { "type": "string", - "nullable": true, - "readOnly": true + "enum": [ + "remote", + "local", + "agent" + ] }, - "sanitized-state-upload-url": { + "stacks-default-execution-mode": { "type": "string", - "nullable": true, - "readOnly": true - }, - "modules": { - "type": "object", - "nullable": true, - "readOnly": true, - "additionalProperties": true + "enum": [ + "remote", + "agent" + ] }, - "providers": { + "setting-overwrites": { "type": "object", - "nullable": true, - "readOnly": true, - "additionalProperties": true - }, - "resources": { - "type": "array", - "nullable": true, - "readOnly": true, - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "count": { - "type": "integer" - }, - "module": { - "type": "string" - }, - "provider": { - "type": "string" - } + "properties": { + "default-execution-mode": { + "type": "boolean" + }, + "default-agent-pool": { + "type": "boolean" + }, + "stacks-default-execution-mode": { + "type": "boolean" + }, + "stacks-default-agent-pool": { + "type": "boolean" } } }, - "resources-processed": { - "type": "boolean", - "readOnly": true - }, - "serial": { - "type": "integer" - }, - "md5": { - "type": "string", - "writeOnly": true - }, - "lineage": { - "type": "string", - "writeOnly": true - }, - "state": { - "type": "string", - "writeOnly": true - }, - "json-state": { - "type": "string", - "writeOnly": true - }, - "json-state-outputs": { - "type": "string", - "writeOnly": true - }, - "force": { - "type": "boolean", - "writeOnly": true - }, - "state-version": { - "type": "integer", + "permissions": { + "type": "object", "nullable": true, - "readOnly": true - }, - "status": { - "type": "string", - "readOnly": true, - "enum": [ - "pending", - "finalized", - "discarded", - "backing_data_soft_deleted", - "backing_data_permanently_deleted" - ] + "properties": { + "can-read": { + "type": "boolean" + }, + "can-update": { + "type": "boolean" + }, + "can-destroy": { + "type": "boolean" + }, + "can-create-workspace": { + "type": "boolean" + }, + "can-move-workspace": { + "type": "boolean" + }, + "can-move-stack": { + "type": "boolean" + }, + "can-manage-stacks": { + "type": "boolean" + }, + "can-view-stacks": { + "type": "boolean" + }, + "can-update-stacks": { + "type": "boolean" + }, + "can-deploy-no-code-modules": { + "type": "boolean" + }, + "can-read-teams": { + "type": "boolean" + }, + "can-manage-tags": { + "type": "boolean" + }, + "can-manage-teams": { + "type": "boolean" + }, + "can-manage-in-hcp": { + "type": "boolean", + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." + }, + "can-manage-varsets": { + "type": "boolean" + }, + "can-manage-ephemeral-workspace-for-projects": { + "type": "boolean" + } + } }, - "terraform-version": { - "type": "string", - "nullable": true, - "readOnly": true + "workspace-count": { + "type": "integer", + "nullable": true }, - "vcs-commit-url": { - "type": "string", - "nullable": true, - "readOnly": true + "team-count": { + "type": "integer", + "nullable": true }, - "vcs-commit-sha": { + "hcp-id": { "type": "string", "nullable": true, - "readOnly": true + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." }, - "intermediate": { + "is-unified": { "type": "boolean", - "readOnly": true - }, - "billable-rum-count": { - "type": "integer", "nullable": true, - "readOnly": true - }, - "permissions": { - "type": "object", - "readOnly": true, - "properties": { - "can-restore-backing-data": { - "type": "boolean", - "readOnly": true - } - } + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." } } }, "relationships": { "type": "object", "properties": { - "run": { - "$ref": "#/components/schemas/runs-has-one" - }, - "rollback-state-version": { - "$ref": "#/components/schemas/state-versions-has-one" - }, - "next-state-version": { - "$ref": "#/components/schemas/state-versions-has-one" - }, - "previous-state-version": { - "$ref": "#/components/schemas/state-versions-has-one" - }, - "created-by": { - "$ref": "#/components/schemas/users-has-one" + "organization": { + "$ref": "#/components/schemas/organizations-has-one" }, - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" + "tag-bindings": { + "type": "object", + "nullable": true, + "properties": { + "links": { + "type": "object", + "properties": { + "related": { + "type": "string" + } + } + } + } }, - "hyok-encrypted-data-key": { - "$ref": "#/components/schemas/hyok-encrypted-data-keys-has-one" + "default-agent-pool": { + "$ref": "#/components/schemas/agent-pools-has-one" }, - "outputs": { - "$ref": "#/components/schemas/state-version-outputs-has-many" + "stacks-default-agent-pool": { + "$ref": "#/components/schemas/agent-pools-has-one" } } }, "links": { - "$ref": "#/components/schemas/self" + "type": "object", + "properties": { + "self": { + "type": "string" + } + } } } }, - "no-code-modules-identifier": { + "projects-envelope": { "type": "object", "required": [ - "id", - "type" + "data" ], + "properties": { + "data": { + "$ref": "#/components/schemas/projects" + } + } + }, + "token-ttl-policy": { + "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true, + "description": "The token TTL policy ID" }, "type": { "type": "string", "enum": [ - "no-code-modules" + "organization-token-ttl-policies" + ] + }, + "attributes": { + "type": "object", + "properties": { + "token-type": { + "type": "string", + "description": "The type of the token TTL policy", + "enum": [ + "organization", + "team", + "user", + "audit_trails", + "metrics" + ], + "example": "organization" + }, + "max-ttl-ms": { + "type": "integer", + "format": "int64", + "description": "The maximum time-to-live for the token in milliseconds", + "example": 3600000 + }, + "created-at": { + "type": "string", + "format": "date-time", + "description": "When the policy was created" + }, + "updated-at": { + "type": "string", + "format": "date-time", + "description": "When the policy was last updated" + } + }, + "required": [ + "token-type", + "max-ttl-ms" ] } } }, - "no-code-modules-has-one": { + "token-ttl-policy-entry": { "type": "object", + "required": [ + "token-type", + "max-ttl-ms" + ], "properties": { - "data": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/no-code-modules-identifier" - } + "token-type": { + "type": "string", + "description": "The type of the token TTL policy", + "enum": [ + "organization", + "team", + "user", + "audit_trails", + "metrics" ], - "nullable": true + "example": "organization" }, - "links": { - "$ref": "#/components/schemas/related" + "max-ttl-ms": { + "type": "integer", + "format": "int64", + "description": "The maximum time-to-live for the token in milliseconds", + "example": 3600000 } } }, - "variable-options-identifier": { + "token-ttl-policies": { "type": "object", "required": [ - "id", "type" ], + "properties": { + "type": { + "type": "string", + "enum": [ + "organization-token-ttl-policies" + ] + }, + "attributes": { + "type": "object", + "properties": { + "token-ttl-policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/token-ttl-policy-entry" + } + } + } + } + } + }, + "token-ttl-policies-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/token-ttl-policies" + } + } + }, + "workspaces-identifier-array-document": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "workspaces" + ] + }, + "id": { + "type": "string" + } + } + } + } + } + }, + "tag-bindings": { + "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { - "type": "string" + "type": "string", + "readOnly": true, + "example": "tb-7AHdkTVXrmxiB8vQ" }, "type": { "type": "string", "enum": [ - "variable-options" + "tag-bindings" ] + }, + "attributes": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "created-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } } } }, - "variable-options-has-many": { + "tag-bindings-collection": { "type": "object", - "nullable": true, + "required": [ + "data" + ], "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/variable-options-identifier" + "$ref": "#/components/schemas/tag-bindings" } } } }, - "no-code-module-versions": { + "inherited-from-has-one": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "object", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/projects-identifier" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects-identifier" + } + } + } + } + }, + "effective-tag-bindings": { "type": "object", "required": [ - "id", "type", "attributes" ], "properties": { "id": { "type": "string", - "readOnly": true + "readOnly": true, + "example": "3JAnx3G4puQcjHu3" }, "type": { "type": "string", "enum": [ - "no-code-module-versions" + "effective-tag-bindings" ] }, "attributes": { "type": "object", + "required": [ + "key" + ], "properties": { - "module-version": { - "type": "string", - "readOnly": true, - "description": "Registry module version string this no-code module version pins\n(for example, 1.0.0).\n" + "key": { + "type": "string" }, - "version-number": { - "type": "integer", - "readOnly": true, - "description": "Monotonic version number for this no-code module version record.\n" + "value": { + "type": "string" } } }, "relationships": { "type": "object", + "description": "Optional relationship indicating the project this binding was inherited from, if applicable.", "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "no-code-module": { - "$ref": "#/components/schemas/no-code-modules-has-one" - }, - "variable-options": { - "$ref": "#/components/schemas/variable-options-has-many" + "inherited-from": { + "$ref": "#/components/schemas/inherited-from-has-one" } } } } }, - "registry-modules-identifier": { + "effective-tag-bindings-envelope-many": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/effective-tag-bindings" + } + } + } + }, + "ssh-keys-identifier": { "type": "object", "required": [ "id", @@ -41419,174 +39312,177 @@ "type": { "type": "string", "enum": [ - "registry-modules" + "ssh-keys" ] } } }, - "registry-modules-has-one": { + "ssh-keys-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/registry-modules-identifier" + "$ref": "#/components/schemas/ssh-keys-identifier" } ], "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" } } }, - "no-code-modules": { + "locked-by-identifier": { "type": "object", "required": [ "id", - "type", - "attributes" + "type" ], "properties": { "id": { - "type": "string", - "readOnly": true + "type": "string" }, "type": { "type": "string", "enum": [ - "no-code-modules" + "users", + "teams", + "runs" ] - }, - "attributes": { + } + } + }, + "locked-by-has-one": { + "type": "object", + "properties": { + "data": { "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether this no-code module is enabled for deployment." - }, - "version-pin": { - "type": "string", - "nullable": true, - "description": "Optional pinned module version for no-code deployments." + "allOf": [ + { + "$ref": "#/components/schemas/locked-by-identifier" } - } + ], + "nullable": true + } + } + }, + "runs-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "relationships": { + "type": { + "type": "string", + "enum": [ + "runs" + ] + } + } + }, + "runs-has-one": { + "type": "object", + "properties": { + "data": { "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "registry-module": { - "$ref": "#/components/schemas/registry-modules-has-one" - }, - "variable-options": { - "$ref": "#/components/schemas/variable-options-has-many" - }, - "latest-version": { - "$ref": "#/components/schemas/no-code-module-versions-has-one" + "allOf": [ + { + "$ref": "#/components/schemas/runs-identifier" } - } + ], + "nullable": true + } + } + }, + "workspace-outputs-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "links": { - "$ref": "#/components/schemas/self" + "type": { + "type": "string", + "enum": [ + "workspace-outputs" + ] } } }, - "workspace-outputs": { + "workspace-outputs-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/workspace-outputs-identifier" + } + } + } + }, + "state-versions-identifier": { "type": "object", - "description": "Workspace outputs are Terraform output values associated with a workspace.\nThey include the name of the output and a sensitive boolean. There is an\nadditional attribute, \"value\", that can be any JSON type, including null when\nthe output is sensitive; it is intentionally omitted from this schema (same\npattern as state-version-outputs) because OpenAPI cannot express a nullable\nany-type under the project's nullable-type-sibling lint rule.\n", "required": [ "id", - "type", - "attributes" + "type" ], "properties": { "id": { - "type": "string", - "readOnly": true + "type": "string" }, "type": { "type": "string", "enum": [ - "workspace-outputs" + "state-versions" ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "sensitive": { - "type": "boolean" - }, - "output-type": { - "type": "string", - "description": "The Terraform type of the output value (e.g. string, number, bool,\nlist, map, set, object, tuple).\n" - }, - "detailed-type": { - "description": "A detailed representation of the output type. May be a string for\nsimple types or an array for complex types such as tuples and objects.\n" - }, - "workspace-attributes": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "organization-attributes": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } + } + } + }, + "state-versions-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/state-versions-identifier" } - } + ], + "nullable": true } } }, - "workspace-readme": { + "configuration-versions-identifier": { "type": "object", - "required": [ - "id", - "type", - "attributes" - ], "properties": { "id": { - "type": "string", - "readOnly": true + "type": "string" }, "type": { "type": "string", "enum": [ - "workspace-readme" + "configuration-versions" ] - }, - "attributes": { + } + } + }, + "configuration-versions-has-one": { + "type": "object", + "properties": { + "data": { "type": "object", - "properties": { - "raw-markdown": { - "type": "string", - "readOnly": true, - "description": "Raw markdown contents of the workspace README." + "allOf": [ + { + "$ref": "#/components/schemas/configuration-versions-identifier" } - } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "configurable-identifier": { + "workspace-readme-identifier": { "type": "object", "required": [ "id", @@ -41599,28 +39495,26 @@ "type": { "type": "string", "enum": [ - "workspaces", - "policy-sets", - "varsets" + "workspace-readme" ] } } }, - "configurable-has-one": { + "workspace-readme-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/configurable-identifier" + "$ref": "#/components/schemas/workspace-readme-identifier" } ], "nullable": true } } }, - "varsets-identifier": { + "assessment-results-identifier": { "type": "object", "required": [ "id", @@ -41633,44 +39527,134 @@ "type": { "type": "string", "enum": [ - "varsets" + "assessment-results" ] } } }, - "varsets-has-one": { + "assessment-results-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/varsets-identifier" + "$ref": "#/components/schemas/assessment-results-identifier" } ], "nullable": true } } }, - "vars-has-one": { + "no-code-module-versions-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "no-code-module-versions" + ] + } + } + }, + "no-code-module-versions-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/vars-identifier" + "$ref": "#/components/schemas/no-code-module-versions-identifier" } ], "nullable": true } } }, - "vars": { + "vars-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "vars" + ] + } + } + }, + "vars-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/vars-identifier" + } + } + } + }, + "tags-has-many": { "type": "object", "required": [ - "type", - "attributes" + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "tags" + ] + }, + "id": { + "type": "string" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + } + } + } + } + }, + "workspace-links": { + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "self-html": { + "type": "string" + } + } + }, + "workspaces": { + "type": "object", + "required": [ + "type" ], "properties": { "id": { @@ -41680,155 +39664,391 @@ "type": { "type": "string", "enum": [ - "vars" + "workspaces" ] }, "attributes": { "type": "object", "properties": { - "key": { + "allow-destroy-plan": { + "type": "boolean" + }, + "auto-apply": { + "type": "boolean" + }, + "auto-apply-run-trigger": { + "type": "boolean" + }, + "auto-destroy-activity-duration": { + "type": "string", + "nullable": true + }, + "auto-destroy-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "auto-destroy-status": { + "type": "string", + "nullable": true + }, + "inherits-project-auto-destroy": { + "type": "boolean" + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "environment": { "type": "string" }, - "value": { + "locked": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "queue-all-runs": { + "type": "boolean" + }, + "speculative-enabled": { + "type": "boolean" + }, + "structured-run-output-enabled": { + "type": "boolean" + }, + "terraform-version": { + "type": "string" + }, + "working-directory": { "type": "string", "nullable": true }, - "sensitive": { + "global-remote-state": { "type": "boolean" }, - "category": { + "project-remote-state": { + "type": "boolean" + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "resource-count": { + "type": "integer" + }, + "apply-duration-average": { + "type": "integer", + "nullable": true + }, + "plan-duration-average": { + "type": "integer", + "nullable": true + }, + "policy-check-failures": { + "type": "integer", + "nullable": true + }, + "run-failures": { + "type": "integer", + "nullable": true + }, + "workspace-kpis-runs-count": { + "type": "integer", + "nullable": true + }, + "latest-change-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "operations": { + "type": "boolean", + "description": "Deprecated. Use execution-mode instead." + }, + "execution-mode": { "type": "string", "enum": [ - "terraform", - "env", - "terraform-cloud", - "policy-set" + "remote", + "local", + "agent" ] }, - "hcl": { + "setting-overwrites": { + "type": "object", + "properties": { + "execution-mode": { + "type": "boolean" + }, + "agent-pool": { + "type": "boolean" + } + } + }, + "vcs-repo": { + "type": "object", + "nullable": true, + "properties": { + "identifier": { + "type": "string" + }, + "display-identifier": { + "type": "string", + "nullable": true + }, + "branch": { + "type": "string", + "nullable": true + }, + "ingress-submodules": { + "type": "boolean" + }, + "oauth-token-id": { + "type": "string", + "nullable": true + }, + "github-app-installation-id": { + "type": "string", + "nullable": true + }, + "tags-regex": { + "type": "string", + "nullable": true + } + } + }, + "vcs-repo-identifier": { + "type": "string", + "nullable": true + }, + "permissions": { + "type": "object", + "nullable": true, + "properties": { + "can-update": { + "type": "boolean" + }, + "can-destroy": { + "type": "boolean" + }, + "can-queue-run": { + "type": "boolean" + }, + "can-read-run": { + "type": "boolean" + }, + "can-read-variable": { + "type": "boolean" + }, + "can-update-variable": { + "type": "boolean" + }, + "can-read-state-versions": { + "type": "boolean" + }, + "can-read-state-outputs": { + "type": "boolean" + }, + "can-create-state-versions": { + "type": "boolean" + }, + "can-queue-apply": { + "type": "boolean" + }, + "can-lock": { + "type": "boolean" + }, + "can-unlock": { + "type": "boolean" + }, + "can-force-unlock": { + "type": "boolean" + }, + "can-read-settings": { + "type": "boolean" + }, + "can-manage-tags": { + "type": "boolean" + }, + "can-manage-run-tasks": { + "type": "boolean" + }, + "can-force-delete": { + "type": "boolean" + }, + "can-manage-assessments": { + "type": "boolean" + }, + "can-manage-ephemeral-workspaces": { + "type": "boolean" + }, + "can-read-assessment-results": { + "type": "boolean" + }, + "can-queue-destroy": { + "type": "boolean" + } + } + }, + "actions": { + "type": "object", + "properties": { + "is-destroyable": { + "type": "boolean" + } + } + }, + "description": { + "type": "string", + "nullable": true + }, + "file-triggers-enabled": { "type": "boolean" }, - "created-at": { + "trigger-prefixes": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "trigger-patterns": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "assessments-enabled": { + "type": "boolean" + }, + "last-assessment-result-at": { "type": "string", "format": "date-time", - "readOnly": true + "nullable": true }, - "description": { + "locked-reason": { "type": "string", "nullable": true }, - "version-id": { - "type": "string" + "source": { + "type": "string", + "nullable": true + }, + "source-name": { + "type": "string", + "nullable": true + }, + "source-url": { + "type": "string", + "nullable": true + }, + "source-module-id": { + "type": "string", + "nullable": true, + "readOnly": true, + "description": "Identifier of the no-code module and version this workspace was created from\n(for example, private////). Present only for\nno-code workspaces; omitted otherwise. Prefer the no-code-module-version\nrelationship for a typed link to the current no-code module version.\n" + }, + "no-code-upgrade-available": { + "type": "boolean", + "nullable": true, + "readOnly": true, + "description": "Whether a newer no-code module version is available for this workspace.\nPresent only for no-code workspaces; omitted otherwise.\n" + }, + "tag-names": { + "type": "array", + "items": { + "type": "string" + } + }, + "effective-state-version-retention-desc": { + "type": "string", + "nullable": true, + "x-vis": [ + "tfe" + ], + "description": "A human-readable description of the effective state-version\nretention window for this workspace. Returns null when no state-version retention policy is in effect for the\nworkspace, or when the policy does not delete state versions.\n\n\nThis attribute is only available in Terraform Enterprise." + }, + "effective-run-data-retention-desc": { + "type": "string", + "nullable": true, + "x-vis": [ + "tfe" + ], + "description": "A human-readable description of the effective run data and logs\nretention window for this workspace. Returns null when no run data retention policy is in effect for the\nworkspace, or when the policy does not delete run data and logs.\n\n\nThis attribute is only available in Terraform Enterprise." + }, + "hyok-enabled": { + "type": "boolean", + "x-vis": [ + "hcpt" + ], + "description": "HCP Terraform Premium Tier only. Enabled Hold Your Own Key for the workspace. Once this has been set to true,\nit can no longer be disabled.\n\n\nThis attribute is only available in HCP Terraform." } } }, "relationships": { "type": "object", "properties": { - "configurable": { - "$ref": "#/components/schemas/configurable-has-one" + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "ssh-key": { + "$ref": "#/components/schemas/ssh-keys-has-one" + }, + "locked-by": { + "$ref": "#/components/schemas/locked-by-has-one" + }, + "current-run": { + "$ref": "#/components/schemas/runs-has-one" + }, + "latest-run": { + "$ref": "#/components/schemas/runs-has-one" + }, + "outputs": { + "$ref": "#/components/schemas/workspace-outputs-has-many" + }, + "remote-state-consumers": { + "type": "object", + "properties": { + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "current-state-version": { + "$ref": "#/components/schemas/state-versions-has-one" + }, + "current-configuration-version": { + "$ref": "#/components/schemas/configuration-versions-has-one" + }, + "agent-pool": { + "$ref": "#/components/schemas/agent-pools-has-one" }, - "varset": { - "$ref": "#/components/schemas/varsets-has-one" + "readme": { + "$ref": "#/components/schemas/workspace-readme-has-one" }, - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" + "project": { + "$ref": "#/components/schemas/projects-has-one" }, - "overwritten": { + "current-assessment-result": { + "$ref": "#/components/schemas/assessment-results-has-one" + }, + "no-code-module-version": { + "description": "The no-code module version this workspace was created from. Present\nonly for no-code workspaces; data is null or omitted otherwise.\n", + "$ref": "#/components/schemas/no-code-module-versions-has-one" + }, + "vars": { "$ref": "#/components/schemas/vars-has-many" }, - "overwriter": { - "$ref": "#/components/schemas/vars-has-one" + "tags": { + "$ref": "#/components/schemas/tags-has-many" } } }, "links": { - "type": "object", - "properties": { - "self": { - "type": "string" - } - } - } - } - }, - "workspaces-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/agent-pools" - }, - { - "$ref": "#/components/schemas/assessment-results" - }, - { - "$ref": "#/components/schemas/configuration-versions" - }, - { - "$ref": "#/components/schemas/runs" - }, - { - "$ref": "#/components/schemas/applies" - }, - { - "$ref": "#/components/schemas/plans" - }, - { - "$ref": "#/components/schemas/ingress-attributes" - }, - { - "$ref": "#/components/schemas/state-versions" - }, - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/no-code-module-versions" - }, - { - "$ref": "#/components/schemas/no-code-modules" - }, - { - "$ref": "#/components/schemas/organizations" - }, - { - "$ref": "#/components/schemas/workspace-outputs" - }, - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/workspace-readme" - }, - { - "$ref": "#/components/schemas/vars" - }, - { - "$ref": "#/components/schemas/effective-tag-bindings" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "agent-pools": "#/components/schemas/agent-pools", - "assessment-results": "#/components/schemas/assessment-results", - "configuration-versions": "#/components/schemas/configuration-versions", - "runs": "#/components/schemas/runs", - "applies": "#/components/schemas/applies", - "plans": "#/components/schemas/plans", - "ingress-attributes": "#/components/schemas/ingress-attributes", - "state-versions": "#/components/schemas/state-versions", - "users": "#/components/schemas/users", - "no-code-module-versions": "#/components/schemas/no-code-module-versions", - "no-code-modules": "#/components/schemas/no-code-modules", - "organizations": "#/components/schemas/organizations", - "workspace-outputs": "#/components/schemas/workspace-outputs", - "projects": "#/components/schemas/projects", - "workspace-readme": "#/components/schemas/workspace-readme", - "vars": "#/components/schemas/vars", - "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" - } + "$ref": "#/components/schemas/workspace-links" } } }, @@ -41875,6 +40095,32 @@ } } }, + "users-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "users" + ] + } + } + }, + "users-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/users-identifier" + } + } + } + }, "notification-configurations": { "type": "object", "required": [ @@ -42074,6 +40320,23 @@ } } }, + "workspaces-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/workspaces-identifier" + } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, "no-code-queries-identifier": { "type": "object", "properties": { @@ -42174,7 +40437,6 @@ }, "policy-evaluation-opt-in": { "type": "boolean", - "writeOnly": true, "description": "Opts this query into policy evaluation. When query-policy-opt-in is enabled, omitted input defaults to true only for tfe-ui queries with generate-config-out enabled (which defaults to true); otherwise it defaults to false. Explicit true requires a UI, API, or MCP source and generated configuration. Explicit false opts out for those sources. Terraform CLI queries (source terraform) retain workspace policy evaluation regardless of this preference or generate-config-out, subject to the existing query-policy gates. Supplied input must be a non-null boolean when the feature is enabled. When the feature is disabled, this input is ignored and false is persisted; workspace policy evaluation retains its existing query-policy behavior." }, "resources-discovered": { @@ -42211,121 +40473,552 @@ } } }, - "status": { + "status": { + "type": "string", + "enum": [ + "pending", + "queued", + "running", + "finished", + "canceled", + "errored" + ] + }, + "log-read-url": { + "type": "string", + "readOnly": true + }, + "permissions": { + "type": "object", + "properties": { + "can-cancel": { + "type": "boolean" + }, + "can-force-cancel": { + "type": "boolean" + } + } + }, + "force-cancel-available-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "policy-paths": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + } + }, + "relationships": { + "type": "object", + "required": [ + "workspace", + "configuration-version" + ], + "properties": { + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "canceled-by": { + "$ref": "#/components/schemas/users-has-one" + }, + "configuration-version": { + "$ref": "#/components/schemas/configuration-versions-has-one" + }, + "created-by": { + "$ref": "#/components/schemas/users-has-one" + }, + "no-code-query": { + "$ref": "#/components/schemas/no-code-queries-has-one", + "description": "The no-code query that triggered this query run, if any." + } + } + } + } + }, + "queries-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/queries" + } + } + }, + "query-completion-summary": { + "type": "object", + "required": [ + "address", + "resource-type", + "total" + ], + "properties": { + "address": { + "type": "string", + "readOnly": true, + "description": "The resource address as it appeared in the query list completion." + }, + "resource-type": { + "type": "string", + "readOnly": true, + "description": "The Terraform resource type for this list completion." + }, + "total": { + "type": "integer", + "readOnly": true, + "description": "The total number of resources discovered for this address." + }, + "policies-passed": { + "type": "integer", + "readOnly": true, + "description": "The number of policies that passed for this resource address. Omitted when the query-policy feature is disabled for the organization.\n" + }, + "policies-failed": { + "type": "integer", + "readOnly": true, + "description": "The number of policies that failed for this resource address. Omitted when the query-policy feature is disabled for the organization.\n" + } + } + }, + "queries-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "queries" + ] + } + } + }, + "queries-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/queries-identifier" + } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "no-code-query": { + "type": "object", + "required": [ + "type", + "attributes", + "relationships" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "no-code-queries" + ] + }, + "attributes": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "terraform-mcp" + ], + "writeOnly": true, + "description": "The source assigned to the query run triggered on create. Only Terraform MCP may explicitly set this value. When omitted, the query run uses the default No-Code Query source." + }, + "generate-config-out": { + "type": "boolean", + "writeOnly": true, + "description": "Whether to generate config output for the query run triggered on create. This is a create-only input and is not returned by the GET endpoint. Defaults to false." + }, + "policy-evaluation-opt-in": { + "type": "boolean", + "writeOnly": true, + "description": "Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration for both UI and Terraform MCP queries. When the feature is inactive, all values resolve to false and workspace policy evaluation retains its existing query-policy behavior." + }, + "no-code-query-providers": { + "type": "array", + "items": { + "type": "object", + "required": [ + "namespace", + "name", + "version", + "no-code-query-resources" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "namespace": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "no-code-query-resources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "body": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + } + } + }, + "relationships": { + "type": "object", + "required": [ + "workspace" + ], + "properties": { + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "latest-query-run": { + "$ref": "#/components/schemas/queries-has-one" + } + } + } + } + }, + "configurable-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "workspaces", + "policy-sets", + "varsets" + ] + } + } + }, + "configurable-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/configurable-identifier" + } + ], + "nullable": true + } + } + }, + "varsets-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "varsets" + ] + } + } + }, + "varsets-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/varsets-identifier" + } + ], + "nullable": true + } + } + }, + "vars-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/vars-identifier" + } + ], + "nullable": true + } + } + }, + "vars": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "vars" + ] + }, + "attributes": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + }, + "sensitive": { + "type": "boolean" + }, + "category": { + "type": "string", + "enum": [ + "terraform", + "env", + "terraform-cloud", + "policy-set" + ] + }, + "hcl": { + "type": "boolean" + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "description": { + "type": "string", + "nullable": true + }, + "version-id": { + "type": "string" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "configurable": { + "$ref": "#/components/schemas/configurable-has-one" + }, + "varset": { + "$ref": "#/components/schemas/varsets-has-one" + }, + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "overwritten": { + "$ref": "#/components/schemas/vars-has-many" + }, + "overwriter": { + "$ref": "#/components/schemas/vars-has-one" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" + } + } + } + } + }, + "vars-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/vars" + } + } + }, + "provider-sets": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "provider-sets" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { "type": "string", - "enum": [ - "pending", - "queued", - "running", - "finished", - "canceled", - "errored" - ] + "nullable": true }, - "log-read-url": { + "global": { + "type": "boolean" + }, + "updated-at": { "type": "string", + "format": "date-time", "readOnly": true }, - "permissions": { - "type": "object", - "properties": { - "can-cancel": { - "type": "boolean" - }, - "can-force-cancel": { - "type": "boolean" - } - } - }, - "force-cancel-available-at": { + "created-at": { "type": "string", "format": "date-time", "readOnly": true }, - "policy-paths": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true + "priority": { + "type": "boolean" + }, + "provider-source": { + "type": "string", + "description": "Accepts either `{namespace}/{provider]` or `{hostname}/{namespace}/{provider}` Values are normalized to the fully qualified form.", + "pattern": "^(?:[A-Za-z0-9.-]+/)?[A-Za-z0-9-]+/[A-Za-z0-9-]+$", + "example": "registry.terraform.io/hashicorp/hcp" + }, + "configuration-hcl": { + "type": "string", + "example": "provider \"hcp\" {\n client_id = var.hcp_client_id\n}\n" } } }, "relationships": { "type": "object", - "required": [ - "workspace", - "configuration-version" - ], "properties": { - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" - }, - "canceled-by": { - "$ref": "#/components/schemas/users-has-one" - }, - "configuration-version": { - "$ref": "#/components/schemas/configuration-versions-has-one" + "organization": { + "$ref": "#/components/schemas/organizations-has-one" }, - "created-by": { - "$ref": "#/components/schemas/users-has-one" + "workspaces": { + "$ref": "#/components/schemas/workspaces-has-many" }, - "no-code-query": { - "$ref": "#/components/schemas/no-code-queries-has-one", - "description": "The no-code query that triggered this query run, if any." + "projects": { + "$ref": "#/components/schemas/projects-has-many" } } } } }, - "queries-envelope": { + "provider-sets-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/queries" + "$ref": "#/components/schemas/provider-sets" } } }, - "query-completion-summary": { + "projects-identifier-array-document": { "type": "object", "required": [ - "address", - "resource-type", - "total" + "data" ], "properties": { - "address": { - "type": "string", - "readOnly": true, - "description": "The resource address as it appeared in the query list completion." - }, - "resource-type": { - "type": "string", - "readOnly": true, - "description": "The Terraform resource type for this list completion." - }, - "total": { - "type": "integer", - "readOnly": true, - "description": "The total number of resources discovered for this address." - }, - "policies-passed": { - "type": "integer", - "readOnly": true, - "description": "The number of policies that passed for this resource address. Omitted when the query-policy feature is disabled for the organization.\n" - }, - "policies-failed": { - "type": "integer", - "readOnly": true, - "description": "The number of policies that failed for this resource address. Omitted when the query-policy feature is disabled for the organization.\n" + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "projects" + ] + }, + "id": { + "type": "string" + } + } + } } } }, - "queries-identifier": { + "stacks-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/stacks-identifier" + } + } + } + }, + "varset-parent-identifier": { "type": "object", + "required": [ + "id", + "type" + ], "properties": { "id": { "type": "string" @@ -42333,35 +41026,28 @@ "type": { "type": "string", "enum": [ - "queries" + "organizations", + "projects" ] } } }, - "queries-has-one": { + "varset-parent-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/queries-identifier" + "$ref": "#/components/schemas/varset-parent-identifier" } ], "nullable": true - }, - "links": { - "$ref": "#/components/schemas/related" } } }, - "no-code-query": { + "varsets": { "type": "object", - "required": [ - "type", - "attributes", - "relationships" - ], "properties": { "id": { "type": "string", @@ -42370,70 +41056,52 @@ "type": { "type": "string", "enum": [ - "no-code-queries" + "varsets" ] }, "attributes": { "type": "object", "properties": { - "source": { + "name": { + "type": "string" + }, + "description": { "type": "string", - "enum": [ - "terraform-mcp" - ], - "writeOnly": true, - "description": "The source assigned to the query run triggered on create. Only Terraform MCP may explicitly set this value. When omitted, the query run uses the default No-Code Query source." + "nullable": true }, - "generate-config-out": { - "type": "boolean", - "writeOnly": true, - "description": "Whether to generate config output for the query run triggered on create. This is a create-only input and is not returned by the GET endpoint. Defaults to false." + "global": { + "type": "boolean" }, - "policy-evaluation-opt-in": { - "type": "boolean", - "writeOnly": true, - "description": "Whether to evaluate workspace policies for the query run triggered on create. This is a create-only input. When QUERY_POLICY_OPT_IN is active, omission defaults to true for No-Code UI queries with generate-config-out enabled, and false otherwise. Explicit false opts out. Explicit true requires generated configuration for both UI and Terraform MCP queries. When the feature is inactive, all values resolve to false and workspace policy evaluation retains its existing query-policy behavior." + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true }, - "no-code-query-providers": { - "type": "array", - "items": { - "type": "object", - "required": [ - "namespace", - "name", - "version", - "no-code-query-resources" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "namespace": { - "type": "string" - }, - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "no-code-query-resources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "body": { - "type": "object", - "additionalProperties": true - } - } - } - } + "var-count": { + "type": "integer", + "readOnly": true + }, + "workspace-count": { + "type": "integer", + "readOnly": true + }, + "project-count": { + "type": "integer", + "readOnly": true + }, + "stack-count": { + "type": "integer", + "readOnly": true + }, + "priority": { + "type": "boolean" + }, + "permissions": { + "type": "object", + "readOnly": true, + "properties": { + "can-update": { + "type": "boolean" } } } @@ -42441,130 +41109,264 @@ }, "relationships": { "type": "object", - "required": [ - "workspace" - ], "properties": { - "workspace": { - "$ref": "#/components/schemas/workspaces-has-one" + "organization": { + "$ref": "#/components/schemas/organizations-has-one" }, - "latest-query-run": { - "$ref": "#/components/schemas/queries-has-one" + "vars": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "vars" + ] + }, + "attributes": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + }, + "category": { + "type": "string", + "enum": [ + "terraform", + "env" + ] + } + } + } + } + } + } + } + }, + "workspaces": { + "$ref": "#/components/schemas/workspaces-has-many" + }, + "projects": { + "$ref": "#/components/schemas/projects-has-many" + }, + "stacks": { + "$ref": "#/components/schemas/stacks-has-many" + }, + "parent": { + "$ref": "#/components/schemas/varset-parent-has-one" } } } } }, - "vars-envelope": { + "varsets-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/vars" + "$ref": "#/components/schemas/varsets" } } }, - "provider-sets": { + "jsonapi-resource-identifier": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "jsonapi-identifier-array-document": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/jsonapi-resource-identifier" + } + } + } + }, + "workspace-resource": { "type": "object", + "required": [ + "id", + "type", + "attributes" + ], "properties": { "id": { "type": "string", - "readOnly": true + "readOnly": true, + "description": "The ID of the workspace resource" }, "type": { "type": "string", "enum": [ - "provider-sets" + "resources" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string" + "address": { + "type": "string", + "description": "The full address of the resource in Terraform configuration" }, - "description": { + "name": { "type": "string", - "nullable": true + "description": "The name of the resource" }, - "global": { - "type": "boolean" + "created-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true, + "description": "The timestamp when the resource was first created" }, "updated-at": { "type": "string", "format": "date-time", - "readOnly": true + "nullable": true, + "readOnly": true, + "description": "The timestamp when the resource was last updated" }, - "created-at": { + "module": { "type": "string", - "format": "date-time", - "readOnly": true + "nullable": true, + "description": "The module name where the resource is defined (e.g., \"root\" for root module)" }, - "priority": { - "type": "boolean" + "provider": { + "type": "string", + "nullable": true, + "description": "The provider name (e.g., \"hashicorp/random\")" }, - "provider-source": { + "provider-type": { "type": "string", - "description": "Accepts either `{namespace}/{provider]` or `{hostname}/{namespace}/{provider}` Values are normalized to the fully qualified form.", - "pattern": "^(?:[A-Za-z0-9.-]+/)?[A-Za-z0-9-]+/[A-Za-z0-9-]+$", - "example": "registry.terraform.io/hashicorp/hcp" + "nullable": true, + "description": "The resource type from the provider (e.g., \"random_pet\")" }, - "configuration-hcl": { + "modified-by-state-version-id": { "type": "string", - "example": "provider \"hcp\" {\n client_id = var.hcp_client_id\n}\n" + "nullable": true, + "readOnly": true, + "description": "The ID of the state version that last modified this resource" + }, + "name-index": { + "type": "string", + "nullable": true, + "description": "The index of the resource when there are multiple instances with the same name" } } - }, - "relationships": { + } + } + }, + "ssh-keys-nullable-identifier-document": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { "type": "object", + "nullable": true, "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "workspaces": { - "$ref": "#/components/schemas/workspaces-has-many" + "type": { + "type": "string", + "enum": [ + "ssh-keys" + ] }, - "projects": { - "$ref": "#/components/schemas/projects-has-many" + "id": { + "type": "string", + "nullable": true } } } } }, - "provider-sets-envelope": { + "workspace-vars-update-document": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/provider-sets" - } - } - }, - "provider-sets-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/workspaces" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "projects": "#/components/schemas/projects", - "workspaces": "#/components/schemas/workspaces" + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "vars" + ] + }, + "id": { + "type": "string" + }, + "attributes": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + }, + "sensitive": { + "type": "boolean" + }, + "category": { + "type": "string", + "enum": [ + "terraform", + "env" + ] + }, + "hcl": { + "type": "boolean" + }, + "description": { + "type": "string", + "nullable": true + } + } + } + } } } } }, - "projects-identifier-array-document": { + "tags-create-array-document": { "type": "object", "required": [ "data" @@ -42575,37 +41377,61 @@ "items": { "type": "object", "required": [ - "type", - "id" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "projects" + "tags" ] }, "id": { "type": "string" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } } } } } } }, - "stacks-has-many": { + "tags-remove-array-document": { "type": "object", - "nullable": true, + "required": [ + "data" + ], "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/stacks-identifier" + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "tags" + ] + }, + "id": { + "type": "string" + } + } } } } }, - "varset-parent-identifier": { + "hyok-encrypted-data-keys-identifier": { "type": "object", "required": [ "id", @@ -42618,28 +41444,56 @@ "type": { "type": "string", "enum": [ - "organizations", - "projects" + "hyok-encrypted-data-keys" ] } } }, - "varset-parent-has-one": { + "hyok-encrypted-data-keys-has-one": { "type": "object", "properties": { "data": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/varset-parent-identifier" + "$ref": "#/components/schemas/hyok-encrypted-data-keys-identifier" } ], "nullable": true } } }, - "varsets": { + "state-version-outputs-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "state-version-outputs" + ] + } + } + }, + "state-version-outputs-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/state-version-outputs-identifier" + } + } + } + }, + "state-versions": { "type": "object", + "required": [ + "type" + ], "properties": { "id": { "type": "string", @@ -42648,52 +41502,172 @@ "type": { "type": "string", "enum": [ - "varsets" + "state-versions" ] }, "attributes": { "type": "object", "properties": { - "name": { - "type": "string" + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true }, - "description": { + "size": { + "type": "integer", + "nullable": true, + "readOnly": true + }, + "hosted-state-download-url": { "type": "string", - "nullable": true + "nullable": true, + "readOnly": true }, - "global": { - "type": "boolean" + "hosted-json-state-download-url": { + "type": "string", + "nullable": true, + "readOnly": true }, - "updated-at": { + "hosted-state-upload-url": { "type": "string", - "format": "date-time", + "nullable": true, "readOnly": true }, - "var-count": { - "type": "integer", + "hosted-json-state-upload-url": { + "type": "string", + "nullable": true, "readOnly": true }, - "workspace-count": { - "type": "integer", + "encrypted-state-download-url": { + "type": "string", + "nullable": true, "readOnly": true }, - "project-count": { - "type": "integer", + "sanitized-state-download-url": { + "type": "string", + "nullable": true, "readOnly": true }, - "stack-count": { + "sanitized-state-upload-url": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "modules": { + "type": "object", + "nullable": true, + "readOnly": true, + "additionalProperties": true + }, + "providers": { + "type": "object", + "nullable": true, + "readOnly": true, + "additionalProperties": true + }, + "resources": { + "type": "array", + "nullable": true, + "readOnly": true, + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "count": { + "type": "integer" + }, + "module": { + "type": "string" + }, + "provider": { + "type": "string" + } + } + } + }, + "resources-processed": { + "type": "boolean", + "readOnly": true + }, + "serial": { + "type": "integer" + }, + "md5": { + "type": "string", + "writeOnly": true + }, + "lineage": { + "type": "string", + "writeOnly": true + }, + "state": { + "type": "string", + "writeOnly": true + }, + "json-state": { + "type": "string", + "writeOnly": true + }, + "json-state-outputs": { + "type": "string", + "writeOnly": true + }, + "force": { + "type": "boolean", + "writeOnly": true + }, + "state-version": { "type": "integer", + "nullable": true, "readOnly": true }, - "priority": { - "type": "boolean" + "status": { + "type": "string", + "readOnly": true, + "enum": [ + "pending", + "finalized", + "discarded", + "backing_data_soft_deleted", + "backing_data_permanently_deleted" + ] + }, + "terraform-version": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "vcs-commit-url": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "vcs-commit-sha": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "intermediate": { + "type": "boolean", + "readOnly": true + }, + "billable-rum-count": { + "type": "integer", + "nullable": true, + "readOnly": true }, "permissions": { "type": "object", "readOnly": true, "properties": { - "can-update": { - "type": "boolean" + "can-restore-backing-data": { + "type": "boolean", + "readOnly": true } } } @@ -42702,107 +41676,79 @@ "relationships": { "type": "object", "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" + "run": { + "$ref": "#/components/schemas/runs-has-one" }, - "vars": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "vars" - ] - }, - "attributes": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string", - "nullable": true - }, - "category": { - "type": "string", - "enum": [ - "terraform", - "env" - ] - } - } - } - } - } - } - } + "rollback-state-version": { + "$ref": "#/components/schemas/state-versions-has-one" }, - "workspaces": { - "$ref": "#/components/schemas/workspaces-has-many" + "next-state-version": { + "$ref": "#/components/schemas/state-versions-has-one" }, - "projects": { - "$ref": "#/components/schemas/projects-has-many" + "previous-state-version": { + "$ref": "#/components/schemas/state-versions-has-one" }, - "stacks": { - "$ref": "#/components/schemas/stacks-has-many" + "created-by": { + "$ref": "#/components/schemas/users-has-one" }, - "parent": { - "$ref": "#/components/schemas/varset-parent-has-one" + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "hyok-encrypted-data-key": { + "$ref": "#/components/schemas/hyok-encrypted-data-keys-has-one" + }, + "outputs": { + "$ref": "#/components/schemas/state-version-outputs-has-many" } } + }, + "links": { + "$ref": "#/components/schemas/self" } } }, - "varsets-envelope": { + "current-state-version-envelope": { "type": "object", "required": [ "data" ], "properties": { "data": { - "$ref": "#/components/schemas/varsets" + "$ref": "#/components/schemas/state-versions" } } }, - "jsonapi-resource-identifier": { + "assessment-source-identifier": { "type": "object", "required": [ - "type", - "id" + "id", + "type" ], "properties": { - "type": { - "type": "string" - }, "id": { "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "assessments", + "plans" + ] } } }, - "jsonapi-identifier-array-document": { + "assessment-source-has-one": { "type": "object", - "required": [ - "data" - ], "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/jsonapi-resource-identifier" - } + "$ref": "#/components/schemas/assessment-source-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "workspace-resource": { + "assessment-results": { "type": "object", "required": [ "id", @@ -42812,309 +41758,340 @@ "properties": { "id": { "type": "string", - "readOnly": true, - "description": "The ID of the workspace resource" + "example": "asmtres-8F5JFydVYAmtTjET" }, "type": { "type": "string", "enum": [ - "resources" + "assessment-results" ] }, "attributes": { "type": "object", "properties": { - "address": { - "type": "string", - "description": "The full address of the resource in Terraform configuration" + "succeeded": { + "type": "boolean", + "description": "Whether the assessment completed successfully" }, - "name": { - "type": "string", - "description": "The name of the resource" + "all-checks-succeeded": { + "type": "boolean", + "description": "Whether all health checks passed" + }, + "checks-errored": { + "type": "integer", + "description": "Number of health checks that errored", + "nullable": true + }, + "checks-failed": { + "type": "integer", + "description": "Number of health checks that failed", + "nullable": true + }, + "checks-passed": { + "type": "integer", + "description": "Number of health checks that passed", + "nullable": true + }, + "checks-unknown": { + "type": "integer", + "description": "Number of health checks with unknown status", + "nullable": true }, "created-at": { "type": "string", "format": "date-time", - "nullable": true, - "readOnly": true, - "description": "The timestamp when the resource was first created" + "description": "Timestamp when the assessment result was created" }, - "updated-at": { + "drifted": { + "type": "boolean", + "description": "Whether drift was detected" + }, + "error-message": { "type": "string", - "format": "date-time", "nullable": true, - "readOnly": true, - "description": "The timestamp when the resource was last updated" + "description": "Error message if the assessment failed" }, - "module": { - "type": "string", + "resources-drifted": { + "type": "integer", "nullable": true, - "description": "The module name where the resource is defined (e.g., \"root\" for root module)" + "description": "Number of resources that have drifted" }, - "provider": { - "type": "string", + "resources-undrifted": { + "type": "integer", "nullable": true, - "description": "The provider name (e.g., \"hashicorp/random\")" + "description": "Number of resources that have not drifted" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "workspace": { + "description": "The workspace this assessment result belongs to", + "$ref": "#/components/schemas/workspaces-has-one" }, - "provider-type": { + "source": { + "description": "The source assessment or plan that produced this result.", + "$ref": "#/components/schemas/assessment-source-has-one" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string", + "description": "API URL for this assessment result" + }, + "json-output": { "type": "string", "nullable": true, - "description": "The resource type from the provider (e.g., \"random_pet\")" + "description": "API URL for the JSON formatted assessment output (available when assessment succeeded)" }, - "modified-by-state-version-id": { + "json-schema": { "type": "string", "nullable": true, - "readOnly": true, - "description": "The ID of the state version that last modified this resource" + "description": "API URL for the JSON schema of this assessment (available when assessment succeeded)" }, - "name-index": { + "sanitized-plan": { "type": "string", "nullable": true, - "description": "The index of the resource when there are multiple instances with the same name" + "description": "API URL for the sanitized plan (available when HYOK is enabled and assessment succeeded)", + "x-vis": [ + "public-beta" + ] + }, + "log-output": { + "type": "string", + "description": "API URL to read the logs for this assessment" + } + } + } + } + }, + "assessment-results-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/assessment-results" + } + } + }, + "applies-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "applies" + ] + } + } + }, + "applies-has-one": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/applies-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "cost-estimates-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "cost-estimates" + ] + } + } + }, + "cost-estimates-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/cost-estimates-identifier" } - } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "ssh-keys-nullable-identifier-document": { + "plans-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "plans" + ] + } + } + }, + "plans-has-one": { "type": "object", - "required": [ - "data" - ], "properties": { "data": { - "type": "object", - "nullable": true, - "properties": { - "type": { - "type": "string", - "enum": [ - "ssh-keys" - ] - }, - "id": { - "type": "string", - "nullable": true - } - } + "$ref": "#/components/schemas/plans-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" } } }, - "workspace-vars-update-document": { + "run-events-identifier": { "type": "object", - "required": [ - "data" - ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "run-events" + ] + } + } + }, + "run-events-has-many": { + "type": "object", + "nullable": true, "properties": { "data": { "type": "array", "items": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "vars" - ] - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string", - "nullable": true - }, - "sensitive": { - "type": "boolean" - }, - "category": { - "type": "string", - "enum": [ - "terraform", - "env" - ] - }, - "hcl": { - "type": "boolean" - }, - "description": { - "type": "string", - "nullable": true - } - } - } - } + "$ref": "#/components/schemas/run-events-identifier" } } } }, - "tags-create-array-document": { + "task-stages-identifier": { "type": "object", - "required": [ - "data" - ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "task-stages" + ] + } + } + }, + "task-stages-has-many": { + "type": "object", + "nullable": true, "properties": { "data": { "type": "array", "items": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "tags" - ] - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - } - } + "$ref": "#/components/schemas/task-stages-identifier" } } } }, - "tags-remove-array-document": { + "policy-checks-identifier": { "type": "object", - "required": [ - "data" - ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "policy-checks" + ] + } + } + }, + "policy-checks-has-many": { + "type": "object", + "nullable": true, "properties": { "data": { "type": "array", "items": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "tags" - ] - }, - "id": { - "type": "string" - } - } + "$ref": "#/components/schemas/policy-checks-identifier" } } } }, - "state-version-outputs": { + "workspace-comments-identifier": { "type": "object", - "description": "State version outputs are the output values from a Terraform state file for a workspace. They include the name and value of the output, as well as a sensitive boolean if the value should be hidden by default in UIs. There is an additional attribute, \"value\" that can be any type, including null if the value is sensitive and part of a list response.", "properties": { "id": { - "type": "string", - "readOnly": true + "type": "string" }, "type": { "type": "string", "enum": [ - "state-version-outputs" + "workspace-comments" ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "sensitive": { - "type": "boolean" - }, - "type": { - "type": "string", - "description": "The Terraform type of the output value (e.g. \"string\", \"number\", \"bool\", \"list\", \"map\", \"set\", \"object\", \"tuple\")." - }, - "detailed-type": { - "description": "A detailed representation of the output type. May be a string for simple types or an array for complex types such as tuples and objects." - } - } - }, - "links": { - "$ref": "#/components/schemas/self" } } }, - "current-state-version-envelope": { + "workspace-comments-has-many": { "type": "object", - "required": [ - "data" - ], + "nullable": true, "properties": { "data": { - "$ref": "#/components/schemas/state-versions" - }, - "included": { "type": "array", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/state-version-outputs" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "state-version-outputs": "#/components/schemas/state-version-outputs" - } - } + "$ref": "#/components/schemas/workspace-comments-identifier" } } } }, - "current-state-version-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/state-version-outputs" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "state-version-outputs": "#/components/schemas/state-version-outputs" - } + "tf-policy-evaluations-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "tf-policy-evaluations" + ] } } }, - "assessment-results-envelope": { + "tf-policy-evaluations-has-many": { "type": "object", - "required": [ - "data" - ], + "nullable": true, "properties": { "data": { - "$ref": "#/components/schemas/assessment-results" + "type": "array", + "items": { + "$ref": "#/components/schemas/tf-policy-evaluations-identifier" + } } } }, - "cost-estimates": { + "runs": { "type": "object", "required": [ "type", @@ -43128,44 +42105,202 @@ "type": { "type": "string", "enum": [ - "cost-estimates" + "runs" ] }, "attributes": { "type": "object", "properties": { - "error-message": { + "actions": { + "type": "object", + "properties": { + "is-cancelable": { + "type": "boolean" + }, + "is-confirmable": { + "type": "boolean" + }, + "is-discardable": { + "type": "boolean" + }, + "is-force-cancelable": { + "type": "boolean" + } + } + }, + "allow-config-generation": { + "type": "boolean" + }, + "allow-empty-apply": { + "type": "boolean" + }, + "auto-apply": { + "type": "boolean" + }, + "comment": { "type": "string", - "nullable": true + "writeOnly": true }, - "status": { + "canceled-at": { "type": "string", - "enum": [ - "pending", - "queued", - "finished", - "canceled", - "errored", - "unreachable", - "skipped_due_to_targeting" - ] + "format": "date-time", + "nullable": true, + "readOnly": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "debugging-mode": { + "type": "boolean" + }, + "has-changes": { + "type": "boolean" + }, + "is-destroy": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "minimal-refresh": { + "type": "boolean" + }, + "plan-only": { + "type": "boolean" + }, + "refresh": { + "type": "boolean" + }, + "refresh-only": { + "type": "boolean" + }, + "replace-addrs": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "save-plan": { + "type": "boolean" + }, + "source": { + "type": "string" }, "status-timestamps": { "type": "object", "properties": { - "pending-at": { + "fetching-at": { "type": "string", "format": "date-time" }, - "queued-at": { + "fetched-at": { "type": "string", "format": "date-time" }, - "finished-at": { + "pre-plan-running-at": { "type": "string", "format": "date-time" }, - "canceled-at": { + "pre-plan-completed-at": { + "type": "string", + "format": "date-time" + }, + "plan-queued-at": { + "type": "string", + "format": "date-time" + }, + "planning-at": { + "type": "string", + "format": "date-time" + }, + "planned-at": { + "type": "string", + "format": "date-time" + }, + "tf-policy-checked-at": { + "type": "string", + "format": "date-time", + "x-vis": [ + "public-beta" + ], + "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." + }, + "tf-policy-override-at": { + "type": "string", + "format": "date-time", + "x-vis": [ + "public-beta" + ], + "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." + }, + "post-plan-running-at": { + "type": "string", + "format": "date-time" + }, + "post-plan-completed-at": { + "type": "string", + "format": "date-time" + }, + "cost-estimating-at": { + "type": "string", + "format": "date-time" + }, + "cost-estimated-at": { + "type": "string", + "format": "date-time" + }, + "policy-soft-failed-at": { + "type": "string", + "format": "date-time" + }, + "policy-checked-at": { + "type": "string", + "format": "date-time" + }, + "confirmed-at": { + "type": "string", + "format": "date-time" + }, + "planned-and-finished-at": { + "type": "string", + "format": "date-time" + }, + "planned-and-saved-at": { + "type": "string", + "format": "date-time" + }, + "pre-apply-running-at": { + "type": "string", + "format": "date-time" + }, + "pre-apply-completed-at": { + "type": "string", + "format": "date-time" + }, + "apply-queued-at": { + "type": "string", + "format": "date-time" + }, + "applying-at": { + "type": "string", + "format": "date-time" + }, + "post-apply-completed-at": { + "type": "string", + "format": "date-time" + }, + "applied-at": { + "type": "string", + "format": "date-time" + }, + "post-apply-running-at": { + "type": "string", + "format": "date-time" + }, + "discarded-at": { "type": "string", "format": "date-time" }, @@ -43173,248 +42308,224 @@ "type": "string", "format": "date-time" }, - "skipped-due-to-targeting-at": { + "canceled-at": { "type": "string", "format": "date-time" - } - } - }, - "resources": { - "type": "object", - "nullable": true, - "description": "Low-level cost estimation details, only present when status is \"finished\". The keys or structure of this hash may change over time.", - "properties": { - "matched": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } }, - "unmatched": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "resources-count": { - "type": "integer", - "nullable": true, - "description": "Total number of resources. Only present when status is \"finished\"." - }, - "matched-resources-count": { - "type": "integer", - "nullable": true, - "description": "Number of matched resources. Only present when status is \"finished\"." - }, - "unmatched-resources-count": { - "type": "integer", - "nullable": true, - "description": "Number of unmatched resources. Only present when status is \"finished\"." - }, - "prior-monthly-cost": { - "type": "string", - "nullable": true, - "description": "Prior monthly cost as a decimal string. Only present when status is \"finished\"." - }, - "proposed-monthly-cost": { - "type": "string", - "nullable": true, - "description": "Proposed monthly cost as a decimal string. Only present when status is \"finished\"." + "force-canceled-at": { + "type": "string", + "format": "date-time" + }, + "assessed-at": { + "type": "string", + "format": "date-time" + }, + "queuing-at": { + "type": "string", + "format": "date-time" + }, + "queuing-apply-at": { + "type": "string", + "format": "date-time" + } + } }, - "delta-monthly-cost": { - "type": "string", - "nullable": true, - "description": "Delta monthly cost as a decimal string. Only present when status is \"finished\"." - } - } - } - } - }, - "task-results-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "task-results" - ] - } - } - }, - "task-results-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/task-results-identifier" - } - } - } - }, - "policy-evaluations-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "policy-evaluations" - ] - } - } - }, - "policy-evaluations-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/policy-evaluations-identifier" - } - } - } - }, - "task-stages": { - "type": "object", - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "task-stages" - ] - }, - "attributes": { - "type": "object", - "properties": { "status": { "type": "string", - "readOnly": true, + "description": "The current status of the run.\n\n**Note:** The following status values are in public-beta:\n- `tf_policy_checked` - Terraform Policy evaluation completed at plan stage\n- `tf_policy_override` - Terraform Policy evaluation was overridden at plan stage\n", "enum": [ "pending", - "running", - "passed", - "failed", - "awaiting_override", + "fetching", + "fetching_completed", + "pre_plan_running", + "pre_plan_completed", + "pre_plan_awaiting_decision", + "queuing", + "plan_queued", + "planning", + "planned", + "tf_policy_checked", + "tf_policy_override", + "post_plan_running", + "post_plan_completed", + "cost_estimating", + "cost_estimated", + "policy_checking", + "policy_override", + "policy_soft_failed", + "policy_checked", + "confirmed", + "pre_apply_running", + "pre_apply_completed", + "queuing_apply", + "apply_queued", + "applying", + "post_apply_running", + "post_apply_completed", + "applied", + "discarded", "errored", "canceled", - "unreachable" + "planned_and_finished", + "planned_and_saved", + "assessing", + "assessed" ] }, - "stage": { - "type": "string", - "readOnly": true, - "description": "The run stage during which this task stage executes (e.g., post_plan, pre_plan, pre_apply, post_apply)." + "target-addrs": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true }, - "status-timestamps": { - "type": "object", - "nullable": true, - "readOnly": true, - "additionalProperties": true, - "description": "A map of status names to timestamps indicating when the task stage entered each status. Keys are formatted as \"{status}-at\"." + "trigger-reason": { + "type": "string" }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true + "terraform-version": { + "type": "string" }, "updated-at": { "type": "string", "format": "date-time", "readOnly": true }, + "triggering-source-name": { + "type": "string", + "nullable": true + }, + "policy-paths": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "invoke-action-addrs": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, "permissions": { "type": "object", - "readOnly": true, "properties": { - "can-override-policy": { + "can-apply": { "type": "boolean" }, - "can-override-tasks": { + "can-cancel": { "type": "boolean" }, - "can-override": { + "can-comment": { + "type": "boolean" + }, + "can-discard": { + "type": "boolean" + }, + "can-force-execute": { + "type": "boolean" + }, + "can-force-cancel": { + "type": "boolean" + }, + "can-override-policy-check": { "type": "boolean" } } }, - "actions": { - "type": "object", - "readOnly": true, - "properties": { - "is-overridable": { - "type": "boolean" + "variables": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } } } + }, + "force-cancel-available-at": { + "type": "string", + "format": "date-time", + "readOnly": true } } }, "relationships": { "type": "object", "properties": { - "run": { + "workspace": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "triggering-source": { + "$ref": "#/components/schemas/workspaces-has-one" + }, + "triggering-run": { "$ref": "#/components/schemas/runs-has-one" }, + "apply": { + "$ref": "#/components/schemas/applies-has-one" + }, + "canceled-by": { + "$ref": "#/components/schemas/users-has-one" + }, + "configuration-version": { + "$ref": "#/components/schemas/configuration-versions-has-one" + }, + "confirmed-by": { + "$ref": "#/components/schemas/users-has-one" + }, "cost-estimate": { "$ref": "#/components/schemas/cost-estimates-has-one" }, - "task-results": { - "$ref": "#/components/schemas/task-results-has-many" + "created-by": { + "$ref": "#/components/schemas/users-has-one" }, - "policy-evaluations": { - "$ref": "#/components/schemas/policy-evaluations-has-many" + "plan": { + "$ref": "#/components/schemas/plans-has-one" + }, + "run-events": { + "$ref": "#/components/schemas/run-events-has-many" + }, + "task-stages": { + "$ref": "#/components/schemas/task-stages-has-many" + }, + "policy-checks": { + "$ref": "#/components/schemas/policy-checks-has-many" + }, + "run-trigger-snapshots": { + "$ref": "#/components/schemas/links_related" + }, + "comments": { + "$ref": "#/components/schemas/workspace-comments-has-many" + }, + "tf-policy-evaluations": { + "x-vis": [ + "public-beta" + ], + "$ref": "#/components/schemas/tf-policy-evaluations-has-many" } } - }, - "links": { - "$ref": "#/components/schemas/self" - } - } - }, - "tf-policy-set-outcomes-identifier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "tf-policy-set-outcomes" - ] } } }, - "tf-policy-set-outcomes-has-many": { + "runs-envelope": { "type": "object", - "nullable": true, + "required": [ + "data" + ], "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/tf-policy-set-outcomes-identifier" - } + "$ref": "#/components/schemas/runs" } } }, - "tf-policy-evaluation": { + "configuration-versions": { "type": "object", - "description": "Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle.", "required": [ "type", "attributes" @@ -43427,194 +42538,97 @@ "type": { "type": "string", "enum": [ - "tf-policy-evaluations" + "configuration-versions" ] }, "attributes": { "type": "object", "properties": { + "auto-queue-runs": { + "type": "boolean" + }, + "error": { + "type": "string", + "nullable": true + }, + "error-message": { + "type": "string", + "nullable": true + }, + "source": { + "type": "string", + "nullable": true + }, + "speculative": { + "type": "boolean" + }, "status": { "type": "string", - "description": "Current status of the Terraform policy evaluation. Status values:\n- `pending`: Initial state, not yet queued for evaluation\n- `queued`: Queued and waiting to be evaluated\n- `running`: Actively being evaluated\n- `awaiting_override`: Failed with overridable policies, awaiting manual override\n- `passed`: All policies passed (final state)\n- `failed`: Failed with mandatory policies (final state)\n- `overridden`: Failed evaluation manually overridden (final state)\n- `errored`: System error during processing (final state)\n- `canceled`: Canceled before completion (final state)\n- `unreachable`: Pseudo-state derived from run state\n", "enum": [ "pending", - "queued", - "running", - "awaiting_override", - "passed", - "failed", - "overridden", + "fetching", + "uploaded", + "archived", "errored", - "canceled", - "unreachable" + "backing_data_soft_deleted", + "backing_data_permanently_deleted" ] }, - "stage-type": { - "type": "string", - "description": "The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init')" - }, "status-timestamps": { "type": "object", - "description": "Timestamps for each status transition during the evaluation lifecycle", "properties": { - "pending-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation entered pending status" - }, - "queued-at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the evaluation was queued for processing" - }, - "running-at": { + "fetching-at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "When the evaluation started running" + "nullable": true }, - "awaiting-override-at": { + "uploaded-at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "When the evaluation entered awaiting override status (for failed mandatory policies)" + "nullable": true }, - "passed-at": { + "errored-at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "When the evaluation passed successfully" + "nullable": true }, - "failed-at": { + "archived-at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "When the evaluation failed" + "nullable": true }, - "overridden-at": { + "soft-delete-backing-data-at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "When a failed evaluation was overridden" + "nullable": true }, - "errored-at": { + "restore-backing-data-at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "When the evaluation encountered an error" + "nullable": true }, - "canceled-at": { + "permanently-delete-backing-data-at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "When the evaluation was canceled" + "nullable": true } } }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true, - "description": "When the evaluation was created" + "provisional": { + "type": "boolean" }, - "updated-at": { + "upload-url": { "type": "string", - "format": "date-time", - "readOnly": true, - "description": "When the evaluation was last updated" - }, - "result-count": { - "type": "object", - "description": "Aggregated counts of policy results across all policy sets in this evaluation", - "properties": { - "advisory-failed": { - "type": "integer", - "description": "Policies with advisory enforcement level that failed" - }, - "mandatory-failed": { - "type": "integer", - "description": "Policies with mandatory enforcement level that failed" - }, - "mandatory-overridable-failed": { - "type": "integer", - "description": "Policies with mandatory-overridable enforcement level that failed" - }, - "passed": { - "type": "integer", - "description": "Policies that passed" - }, - "errored": { - "type": "integer", - "description": "Policies that errored during evaluation" - }, - "unknown": { - "type": "integer", - "description": "Policies with an unknown evaluation result" - } - } - }, - "error": { - "type": "object", "nullable": true, - "description": "Error information if the entire evaluation failed (not policy-specific errors)", - "properties": { - "type": { - "type": "string", - "enum": [ - "setup_error", - "incompatible_agent_version" - ], - "description": "Error type identifier indicating the category of failure" - }, - "summary": { - "type": "string", - "description": "Brief error summary for display" - }, - "detail": { - "type": "string", - "description": "Detailed error message with additional context" - } - } - }, - "archivist-supported": { - "type": "boolean", - "readOnly": true, - "description": "Whether this evaluation supports archivist-backed outcome storage. When `true`,\nfull policy results are available via `policy-set-result-url` on each\n`tf-policy-set-outcome`. When `false`, use the `outcomes` array instead.\n" - }, - "permissions": { - "type": "object", - "description": "User permissions for this evaluation", - "properties": { - "can-override": { - "type": "boolean", - "description": "Whether the current user has permission to override failed policies" - } - } - }, - "actions": { - "type": "object", - "description": "Available actions for this evaluation", - "properties": { - "is-overridable": { - "type": "boolean", - "description": "Whether this evaluation can be overridden (based on policy enforcement levels and current status)" - } - } + "readOnly": true } } }, "relationships": { "type": "object", "properties": { - "run": { - "description": "The run that this policy evaluation belongs to", - "$ref": "#/components/schemas/runs-has-one" - }, - "tf-policy-set-outcomes": { - "description": "The Terraform policy set outcomes that are part of this evaluation", - "$ref": "#/components/schemas/tf-policy-set-outcomes-has-many" + "ingress-attributes": { + "$ref": "#/components/schemas/ingress-attributes-has-one" } } }, @@ -43623,65 +42637,9 @@ "properties": { "self": { "type": "string" - } - } - } - } - }, - "runs-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/runs" - }, - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/plans" - }, - { - "$ref": "#/components/schemas/applies" - }, - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/configuration-versions" - }, - { - "$ref": "#/components/schemas/ingress-attributes" - }, - { - "$ref": "#/components/schemas/cost-estimates" - }, - { - "$ref": "#/components/schemas/workspaces" - }, - { - "$ref": "#/components/schemas/task-stages" - }, - { - "$ref": "#/components/schemas/tf-policy-evaluation" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "plans": "#/components/schemas/plans", - "applies": "#/components/schemas/applies", - "users": "#/components/schemas/users", - "configuration-versions": "#/components/schemas/configuration-versions", - "ingress-attributes": "#/components/schemas/ingress-attributes", - "cost-estimates": "#/components/schemas/cost-estimates", - "workspaces": "#/components/schemas/workspaces", - "task-stages": "#/components/schemas/task-stages", - "tf-policy-evaluations": "#/components/schemas/tf-policy-evaluation" - } + }, + "download": { + "type": "string" } } } @@ -43843,6 +42801,284 @@ } } }, + "state-versions-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/state-versions-identifier" + } + } + } + }, + "plan-exports-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "plan-exports" + ] + } + } + }, + "plan-exports-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/plan-exports-identifier" + } + } + } + }, + "plans": { + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "example": "plan-8F5JFydVYAmtTjET" + }, + "type": { + "type": "string", + "enum": [ + "plans" + ] + }, + "attributes": { + "type": "object", + "properties": { + "execution-details": { + "type": "object", + "nullable": true, + "description": "Details about the execution of this plan. Null if plan has not started.", + "properties": { + "mode": { + "type": "string", + "description": "Execution mode of the run", + "enum": [ + "remote", + "agent", + "local" + ] + }, + "agent-id": { + "type": "string", + "example": "agent-S1Y7tcKxXPJDQAvq", + "description": "ID of the agent used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + }, + "agent-name": { + "type": "string", + "example": "agent_01", + "description": "Name of the agent used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + }, + "agent-pool-id": { + "type": "string", + "example": "apool-Zigq2VGreKq7nwph", + "description": "ID of the agent pool used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + }, + "agent-pool-name": { + "type": "string", + "example": "first-pool", + "description": "Name of the agent pool used for this run (when mode is agent)\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + } + } + }, + "generated-configuration": { + "type": "boolean", + "default": false, + "nullable": true, + "description": "Whether the plan generated new configuration as part of this run" + }, + "has-changes": { + "type": "boolean", + "description": "Whether the plan has any changes" + }, + "resource-additions": { + "type": "integer", + "description": "Number of resources that will be added", + "nullable": true + }, + "resource-changes": { + "type": "integer", + "description": "Number of resources that will be changed", + "nullable": true + }, + "resource-destructions": { + "type": "integer", + "description": "Number of resources that will be destroyed", + "nullable": true + }, + "resource-imports": { + "type": "integer", + "description": "Number of resources that will be imported", + "nullable": true + }, + "structured-run-output-enabled": { + "type": "boolean", + "nullable": true, + "description": "Whether structured run output is enabled" + }, + "status": { + "type": "string", + "description": "Current status of the plan", + "enum": [ + "pending", + "managed_queued", + "queued", + "running", + "errored", + "canceled", + "finished", + "unreachable" + ] + }, + "status-timestamps": { + "type": "object", + "description": "Timestamps for state transitions of the plan", + "properties": { + "queued-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "pending-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "started-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "finished-at": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "log-read-url": { + "type": "string", + "nullable": true, + "description": "URL to read the logs for this plan" + }, + "actions": { + "type": "object", + "description": "Actions available for this plan", + "properties": { + "is-exportable": { + "type": "boolean", + "description": "Whether the plan can be exported" + } + } + }, + "backing-data-state": { + "type": "string", + "readOnly": true, + "x-vis": [ + "tfe" + ], + "description": "Data retention lifecycle state of the plan's backing data.\n\nThis attribute is only available in Terraform Enterprise.", + "enum": [ + "backing_data_initialized", + "backing_data_available", + "backing_data_soft_deleted", + "backing_data_permanently_deleted" + ] + }, + "permissions": { + "type": "object", + "description": "Permissions for the current user related to this plan", + "nullable": true, + "properties": { + "can-export": { + "type": "boolean", + "description": "Whether the current user can export the plan" + } + } + } + } + }, + "relationships": { + "type": "object", + "properties": { + "state-versions": { + "description": "State versions associated with this plan (for TF <= 0.8)", + "$ref": "#/components/schemas/state-versions-has-many" + }, + "exports": { + "description": "Exports associated with this plan", + "$ref": "#/components/schemas/plan-exports-has-many" + }, + "hyok-encrypted-data-key": { + "description": "HYOK encrypted data key associated with this plan", + "x-vis": [ + "hcpt" + ], + "$ref": "#/components/schemas/hyok-encrypted-data-keys-has-one" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string", + "description": "API URL for this plan" + }, + "json-output": { + "type": "string", + "nullable": true, + "description": "API URL for the JSON formatted execution plan (available for Terraform 0.12+)" + }, + "json-output-redacted": { + "type": "string", + "nullable": true, + "description": "API URL for the redacted JSON formatted execution plan (available for Terraform 0.15.2+)" + }, + "json-schema": { + "type": "string", + "nullable": true, + "description": "API URL for the JSON schema of this plan (available for Terraform 0.12+)" + }, + "sanitized-plan": { + "type": "string", + "nullable": true, + "description": "API URL for the sanitized plan (available when HYOK is enabled and with compatible Terraform version)", + "x-vis": [ + "public-beta" + ] + } + } + } + } + }, "plans-envelope": { "type": "object", "required": [ @@ -44172,6 +43408,32 @@ } } }, + "tf-policy-set-outcomes-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "tf-policy-set-outcomes" + ] + } + } + }, + "tf-policy-set-outcomes-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tf-policy-set-outcomes-identifier" + } + } + } + }, "tf-policy-evaluations-envelope": { "type": "object", "required": [ @@ -44179,7 +43441,7 @@ ], "properties": { "data": { - "$ref": "#/components/schemas/tf-policy-evaluation" + "$ref": "#/components/schemas/tf-policy-evaluations" } } }, @@ -44194,7 +43456,7 @@ } } }, - "tf-policy-set-outcome": { + "tf-policy-set-outcomes": { "type": "object", "description": "Represents the outcome of evaluating a Terraform Policy set against resources in a run. Contains detailed diagnostics organized by policy and enforce block, including information about resources that passed or failed policy evaluation.", "required": [ @@ -44436,7 +43698,7 @@ ], "properties": { "data": { - "$ref": "#/components/schemas/tf-policy-set-outcome" + "$ref": "#/components/schemas/tf-policy-set-outcomes" } } }, @@ -44734,6 +43996,51 @@ } } }, + "policy-sets-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/policy-sets" + } + } + }, + "policies-identifier-array-document": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "oneOf": [ + { + "description": "Existing local policy reference, by id. Valid for both adding and removing policies from a policy set.", + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "policies" + ] + }, + "id": { + "type": "string" + } + } + } + ] + } + } + } + }, "policy-sets-has-one": { "type": "object", "properties": { @@ -44865,231 +44172,6 @@ } } }, - "ootb-policy-libraries-identifier": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "ootb-policy-libraries" - ] - }, - "id": { - "type": "string", - "description": "The slug of the library." - } - } - }, - "ootb-policy-libraries-has-many": { - "type": "object", - "description": "Libraries this policy belongs to. Only present when ?include=ootb-policy-libraries is passed on the list endpoint.", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ootb-policy-libraries-identifier" - } - } - } - }, - "ootb-policies": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The external ID of the OOTB policy.", - "example": "ootbpol-xxxxxxxxxxxxxxxx" - }, - "type": { - "type": "string", - "enum": [ - "ootb-policies" - ] - }, - "attributes": { - "type": "object", - "properties": { - "control-source": { - "type": "string", - "nullable": true, - "description": "Source location (docs/repository URL) for this policy, taken from the latest version's library policy. Null when no active library release is available." - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true, - "description": "Catalog record creation time (not policy release/publication time)." - }, - "description": { - "type": "string", - "nullable": true, - "description": "Policy description." - }, - "governed-resources": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Array of Terraform resource types this policy governs." - }, - "kind": { - "type": "string", - "enum": [ - "sentinel", - "tfpolicy" - ], - "description": "The policy engine type." - }, - "name": { - "type": "string", - "description": "The name of the policy." - }, - "provider": { - "type": "string", - "description": "Cloud provider the policy targets, stored lower-cased (e.g. `aws`, `azure`, `gcp`). Use as the value of `filter[provider]` on the list endpoint; matching is case-insensitive. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.providers`." - }, - "service": { - "type": "string", - "description": "Cloud service the policy targets (e.g. `s3`, `iam`, `compute`). Use as the value of `filter[service]` on the list endpoint. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.services`." - }, - "slug": { - "type": "string", - "description": "URL-friendly unique identifier for the policy." - } - } - }, - "relationships": { - "type": "object", - "properties": { - "ootb-policy-libraries": { - "$ref": "#/components/schemas/ootb-policy-libraries-has-many" - } - } - }, - "links": { - "type": "object", - "properties": { - "download": { - "type": "string", - "nullable": true, - "description": "URL to download the latest version of this policy's source content." - } - } - } - } - }, - "ootb-policy-library-references": { - "type": "object", - "description": "A slim reference to an OOTB policy library, returned in the `included` array when ?include=ootb-policy-libraries is passed. Contains only the name attribute.", - "properties": { - "id": { - "type": "string", - "description": "The slug of the OOTB policy library.", - "example": "nist-800-53-aws" - }, - "type": { - "type": "string", - "enum": [ - "ootb-policy-libraries" - ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Human-readable library name." - } - } - } - } - }, - "policy-sets-envelope": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/policy-sets" - }, - "included": { - "type": "array", - "description": "Sideloaded resources. `?include=policies` sideloads the full policy resources.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/policies" - }, - { - "$ref": "#/components/schemas/workspaces" - }, - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/policy-set-versions" - }, - { - "$ref": "#/components/schemas/ootb-policies" - }, - { - "$ref": "#/components/schemas/ootb-policy-library-references" - }, - { - "$ref": "#/components/schemas/stacks" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "policies": "#/components/schemas/policies", - "workspaces": "#/components/schemas/workspaces", - "projects": "#/components/schemas/projects", - "policy-set-versions": "#/components/schemas/policy-set-versions", - "ootb-policies": "#/components/schemas/ootb-policies", - "ootb-policy-libraries": "#/components/schemas/ootb-policy-library-references", - "stacks": "#/components/schemas/stacks" - } - } - } - } - } - }, - "policies-identifier-array-document": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "oneOf": [ - { - "description": "Existing local policy reference, by id. Valid for both adding and removing policies from a policy set.", - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "policies" - ] - }, - "id": { - "type": "string" - } - } - } - ] - } - } - } - }, "policy-set-versions-envelope": { "type": "object", "required": [ @@ -45285,6 +44367,20 @@ } } }, + "policy-evaluations-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "policy-evaluations" + ] + } + } + }, "policy-evaluations-has-one": { "type": "object", "properties": { @@ -45522,6 +44618,162 @@ } } }, + "applies": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "applies" + ] + }, + "attributes": { + "type": "object", + "properties": { + "execution-details": { + "type": "object", + "readOnly": true, + "nullable": true, + "properties": { + "mode": { + "type": "string", + "enum": [ + "agent", + "remote", + "local" + ] + }, + "agent-id": { + "type": "string" + }, + "agent-name": { + "type": "string" + }, + "agent-pool-id": { + "type": "string" + }, + "agent-pool-name": { + "type": "string" + } + } + }, + "status": { + "readOnly": true, + "type": "string", + "enum": [ + "created", + "pending", + "queued", + "agent_queued", + "running", + "errored", + "canceled", + "finished", + "unreachable" + ] + }, + "status-timestamps": { + "readOnly": true, + "type": "object", + "properties": { + "agent-queued-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "started-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "errored-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "canceled-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "force-canceled-at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "finished-at": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "log-read-url": { + "readOnly": true, + "type": "string" + }, + "resource-additions": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "resource-changes": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "resource-destructions": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "resource-imports": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "action-invocations": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "action-failures": { + "readOnly": true, + "type": "integer", + "nullable": true + }, + "backing-data-state": { + "type": "string", + "readOnly": true, + "x-vis": [ + "tfe" + ], + "description": "Data retention lifecycle state of the apply's backing data.\n\nThis attribute is only available in Terraform Enterprise.", + "enum": [ + "backing_data_initialized", + "backing_data_available", + "backing_data_soft_deleted", + "backing_data_permanently_deleted" + ] + } + } + }, + "relationships": { + "type": "object", + "properties": { + "state-versions": { + "$ref": "#/components/schemas/state-versions-has-many" + } + } + }, + "links": { + "$ref": "#/components/schemas/self" + } + } + }, "applies-envelope": { "type": "object", "required": [ @@ -45533,6 +44785,126 @@ } } }, + "cost-estimates": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "cost-estimates" + ] + }, + "attributes": { + "type": "object", + "properties": { + "error-message": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "pending", + "queued", + "finished", + "canceled", + "errored", + "unreachable", + "skipped_due_to_targeting" + ] + }, + "status-timestamps": { + "type": "object", + "properties": { + "pending-at": { + "type": "string", + "format": "date-time" + }, + "queued-at": { + "type": "string", + "format": "date-time" + }, + "finished-at": { + "type": "string", + "format": "date-time" + }, + "canceled-at": { + "type": "string", + "format": "date-time" + }, + "errored-at": { + "type": "string", + "format": "date-time" + }, + "skipped-due-to-targeting-at": { + "type": "string", + "format": "date-time" + } + } + }, + "resources": { + "type": "object", + "nullable": true, + "description": "Low-level cost estimation details, only present when status is \"finished\". The keys or structure of this hash may change over time.", + "properties": { + "matched": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "unmatched": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "resources-count": { + "type": "integer", + "nullable": true, + "description": "Total number of resources. Only present when status is \"finished\"." + }, + "matched-resources-count": { + "type": "integer", + "nullable": true, + "description": "Number of matched resources. Only present when status is \"finished\"." + }, + "unmatched-resources-count": { + "type": "integer", + "nullable": true, + "description": "Number of unmatched resources. Only present when status is \"finished\"." + }, + "prior-monthly-cost": { + "type": "string", + "nullable": true, + "description": "Prior monthly cost as a decimal string. Only present when status is \"finished\"." + }, + "proposed-monthly-cost": { + "type": "string", + "nullable": true, + "description": "Proposed monthly cost as a decimal string. Only present when status is \"finished\"." + }, + "delta-monthly-cost": { + "type": "string", + "nullable": true, + "description": "Delta monthly cost as a decimal string. Only present when status is \"finished\"." + } + } + } + } + }, "cost-estimates-envelope": { "type": "object", "required": [ @@ -45555,6 +44927,43 @@ } } }, + "state-version-outputs": { + "type": "object", + "description": "State version outputs are the output values from a Terraform state file for a workspace. They include the name and value of the output, as well as a sensitive boolean if the value should be hidden by default in UIs. There is an additional attribute, \"value\" that can be any type, including null if the value is sensitive and part of a list response.", + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "state-version-outputs" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "sensitive": { + "type": "boolean" + }, + "type": { + "type": "string", + "description": "The Terraform type of the output value (e.g. \"string\", \"number\", \"bool\", \"list\", \"map\", \"set\", \"object\", \"tuple\")." + }, + "detailed-type": { + "description": "A detailed representation of the output type. May be a string for simple types or an array for complex types such as tuples and objects." + } + } + }, + "links": { + "$ref": "#/components/schemas/self" + } + } + }, "state-version-outputs-envelope": { "type": "object", "required": [ @@ -46252,34 +45661,296 @@ } } }, - "teams-envelope": { + "organization-memberships-identifier": { "type": "object", - "required": [ - "data" - ], "properties": { - "data": { - "$ref": "#/components/schemas/teams" + "id": { + "type": "string" }, - "included": { + "type": { + "type": "string", + "enum": [ + "organization-memberships" + ] + } + } + }, + "organization-memberships-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { "type": "array", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/organization-memberships" + "$ref": "#/components/schemas/organization-memberships-identifier" + } + } + } + }, + "teams": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "teams" + ] + }, + "attributes": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the team, which can only include letters, numbers, `-`, and `_`." + }, + "users-count": { + "type": "integer", + "readOnly": true, + "description": "The number of active users in the team." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Team description. Can be manually entered for all teams." + }, + "sso-team-id": { + "type": "string", + "nullable": true, + "description": "The unique identifier of the team from the SAML MemberOf attribute." + }, + "visibility": { + "type": "string", + "enum": [ + "secret", + "organization" + ], + "description": "The team's visibility. Can be \"secret\" or \"organization\" (visible)." + }, + "allow-member-token-management": { + "type": "boolean", + "description": "Whether team members are allowed to manage their own authentication tokens." + }, + "scim-linked": { + "type": "boolean", + "readOnly": true, + "description": "Whether this team is linked to a SCIM group. Only available when SCIM is enabled.\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "x-vis": [ + "public-beta" + ] + }, + "scim-group-name": { + "type": "string", + "nullable": true, + "readOnly": true, + "description": "The display name of the linked SCIM group. Only available when SCIM is enabled.\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "x-vis": [ + "public-beta" + ] + }, + "scim-updated-at": { + "type": "string", + "format": "date-time", + "nullable": true, + "readOnly": true, + "description": "The timestamp of the most recent SCIM sync update for this team. Only available when SCIM is enabled.\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "x-vis": [ + "public-beta" + ] + }, + "scim-sync-paused": { + "type": "boolean", + "readOnly": true, + "description": "Whether SCIM sync is paused for this team. Only available when SCIM is enabled.\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "x-vis": [ + "public-beta" + ] + }, + "hcp-resource-name": { + "type": "string", + "nullable": true, + "readOnly": true, + "description": "The HCP resource name for unified teams.\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + }, + "is-unified": { + "type": "boolean", + "readOnly": true, + "description": "Whether this team is unified with HCP.\n\nThis attribute is only available in HCP Terraform.", + "x-vis": [ + "hcpt" + ] + }, + "non-service-users-count": { + "type": "integer", + "nullable": true, + "readOnly": true, + "description": "The number of non-service account users in the team." + }, + "permissions": { + "type": "object", + "readOnly": true, + "description": "Permissions for the current user on this team.", + "properties": { + "can-update-membership": { + "type": "boolean" + }, + "can-destroy": { + "type": "boolean" + }, + "can-update-organization-access": { + "type": "boolean" + }, + "can-update-api-token": { + "type": "boolean" + }, + "can-update-visibility": { + "type": "boolean" + }, + "can-update-name": { + "type": "boolean" + }, + "can-update-sso-team-id": { + "type": "boolean" + }, + "can-update-member-token-management": { + "type": "boolean" + }, + "can-view-api-token": { + "type": "boolean" + } } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "users": "#/components/schemas/users", - "organization-memberships": "#/components/schemas/organization-memberships" + }, + "organization-access": { + "type": "object", + "nullable": true, + "description": "Settings for the team's organization-level permissions.", + "properties": { + "manage-policies": { + "type": "boolean" + }, + "manage-workspaces": { + "type": "boolean" + }, + "manage-vcs-settings": { + "type": "boolean" + }, + "manage-policy-overrides": { + "type": "boolean" + }, + "delegate-policy-overrides": { + "type": "boolean" + }, + "manage-modules": { + "type": "boolean" + }, + "manage-providers": { + "type": "boolean" + }, + "manage-run-tasks": { + "type": "boolean" + }, + "manage-projects": { + "type": "boolean" + }, + "manage-membership": { + "type": "boolean" + }, + "manage-teams": { + "type": "boolean" + }, + "manage-organization-access": { + "type": "boolean" + }, + "access-secret-teams": { + "type": "boolean" + }, + "read-projects": { + "type": "boolean" + }, + "read-workspaces": { + "type": "boolean" + }, + "manage-agent-pools": { + "type": "boolean" + }, + "manage-public-providers": { + "type": "boolean", + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." + }, + "manage-public-modules": { + "type": "boolean", + "x-vis": [ + "hcpt" + ], + "description": "This attribute is only available in HCP Terraform." + }, + "manage-registry-components": { + "type": "boolean", + "nullable": true + }, + "manage-registry-artifact-tags": { + "type": "boolean", + "nullable": true + }, + "manage-registry-artifact-version-tags": { + "type": "boolean", + "nullable": true + } } } } + }, + "links": { + "$ref": "#/components/schemas/self" + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "users": { + "description": "Team members (active users only).", + "$ref": "#/components/schemas/users-has-many" + }, + "organization-memberships": { + "description": "Organization memberships for team members.", + "$ref": "#/components/schemas/organization-memberships-has-many" + }, + "authentication-token": { + "$ref": "#/components/schemas/links_related" + }, + "authentication-tokens": { + "$ref": "#/components/schemas/links_related" + } + } + } + } + }, + "teams-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/teams" } } }, @@ -46752,6 +46423,93 @@ "attributes" ] }, + "ingress-attributes": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "ingress-attributes" + ] + }, + "attributes": { + "type": "object", + "properties": { + "branch": { + "type": "string" + }, + "clone-url": { + "type": "string" + }, + "commit-message": { + "type": "string" + }, + "commit-sha": { + "type": "string" + }, + "commit-url": { + "type": "string" + }, + "compare-url": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "is-pull-request": { + "type": "boolean" + }, + "on-default-branch": { + "type": "boolean" + }, + "pull-request-number": { + "type": "integer" + }, + "pull-request-url": { + "type": "string" + }, + "pull-request-title": { + "type": "string" + }, + "pull-request-body": { + "type": "string" + }, + "tag": { + "type": "string", + "nullable": true + }, + "sender-username": { + "type": "string" + }, + "sender-avatar-url": { + "type": "string" + }, + "sender-html-url": { + "type": "string" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "created-by": { + "$ref": "#/components/schemas/users-has-one" + } + } + }, + "links": { + "$ref": "#/components/schemas/self" + } + } + }, "ingress-attributes-envelope": { "type": "object", "required": [ @@ -46879,153 +46637,6 @@ } } }, - "oauth-tokens-has-many": { - "type": "object", - "nullable": true, - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/oauth-tokens-identifier" - } - } - } - }, - "oauth-clients": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "oauth-clients" - ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - }, - "callback-url": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "connect-path": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "service-provider": { - "type": "string" - }, - "service-provider-display-name": { - "type": "string", - "readOnly": true - }, - "http-url": { - "type": "string", - "nullable": true - }, - "api-url": { - "type": "string", - "nullable": true - }, - "key": { - "type": "string", - "nullable": true - }, - "ado-entra-tenant-id": { - "type": "string", - "nullable": true - }, - "ado-org-name": { - "type": "string", - "nullable": true, - "description": "The Azure DevOps organization name for connections using an org-scoped Personal Access Token (PAT). Must start and end with a letter or number and may contain only letters, numbers, and hyphens (e.g. \"my-company\"). Required when using an org-scoped PAT; omit or set to null when using a globally-scoped PAT.\n" - }, - "secret": { - "type": "string", - "nullable": true - }, - "rsa-public-key": { - "type": "string", - "nullable": true - }, - "uuid": { - "type": "string", - "readOnly": true - }, - "organization-scoped": { - "type": "boolean" - }, - "affected-workspaces": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - }, - "affected-workspaces-count": { - "type": "integer", - "nullable": true - } - } - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "agent-pool": { - "$ref": "#/components/schemas/agent-pools-has-one" - }, - "projects": { - "$ref": "#/components/schemas/projects-has-many" - }, - "oauth-tokens": { - "$ref": "#/components/schemas/oauth-tokens-has-many" - } - } - } - } - }, - "vcs-events-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/oauth-clients" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "oauth-clients": "#/components/schemas/oauth-clients" - } - } - } - }, "vcs-repo-check": { "type": "object", "properties": { @@ -47577,6 +47188,137 @@ } } }, + "oauth-tokens-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/oauth-tokens-identifier" + } + } + } + }, + "oauth-clients": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "oauth-clients" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "callback-url": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "connect-path": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "service-provider": { + "type": "string" + }, + "service-provider-display-name": { + "type": "string", + "readOnly": true + }, + "http-url": { + "type": "string", + "nullable": true + }, + "api-url": { + "type": "string", + "nullable": true + }, + "key": { + "type": "string", + "nullable": true + }, + "ado-entra-tenant-id": { + "type": "string", + "nullable": true + }, + "ado-org-name": { + "type": "string", + "nullable": true, + "description": "The Azure DevOps organization name for connections using an org-scoped Personal Access Token (PAT). Must start and end with a letter or number and may contain only letters, numbers, and hyphens (e.g. \"my-company\"). Required when using an org-scoped PAT; omit or set to null when using a globally-scoped PAT.\n" + }, + "secret": { + "type": "string", + "nullable": true + }, + "rsa-public-key": { + "type": "string", + "nullable": true + }, + "uuid": { + "type": "string", + "readOnly": true + }, + "organization-scoped": { + "type": "boolean" + }, + "affected-workspaces": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "affected-workspaces-count": { + "type": "integer", + "nullable": true + } + } + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "agent-pool": { + "$ref": "#/components/schemas/agent-pools-has-one" + }, + "projects": { + "$ref": "#/components/schemas/projects-has-many" + }, + "oauth-tokens": { + "$ref": "#/components/schemas/oauth-tokens-has-many" + } + } + } + } + }, "oauth-clients-envelope": { "type": "object", "required": [ @@ -48087,26 +47829,6 @@ } } }, - "tasks-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/workspace-tasks" - }, - { - "$ref": "#/components/schemas/workspaces" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "workspace-tasks": "#/components/schemas/workspace-tasks", - "workspaces": "#/components/schemas/workspaces" - } - } - } - }, "task-config-owner-has-one": { "type": "object", "properties": { @@ -48209,34 +47931,6 @@ } } }, - "task-configs-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/tasks" - }, - { - "$ref": "#/components/schemas/organizations" - }, - { - "$ref": "#/components/schemas/workspaces" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "projects": "#/components/schemas/projects", - "tasks": "#/components/schemas/tasks", - "organizations": "#/components/schemas/organizations", - "workspaces": "#/components/schemas/workspaces" - } - } - } - }, "workspace-tasks-envelope": { "type": "object", "required": [ @@ -48248,6 +47942,144 @@ } } }, + "task-results-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "task-results" + ] + } + } + }, + "task-results-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/task-results-identifier" + } + } + } + }, + "policy-evaluations-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/policy-evaluations-identifier" + } + } + } + }, + "task-stages": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "task-stages" + ] + }, + "attributes": { + "type": "object", + "properties": { + "status": { + "type": "string", + "readOnly": true, + "enum": [ + "pending", + "running", + "passed", + "failed", + "awaiting_override", + "errored", + "canceled", + "unreachable" + ] + }, + "stage": { + "type": "string", + "readOnly": true, + "description": "The run stage during which this task stage executes (e.g., post_plan, pre_plan, pre_apply, post_apply)." + }, + "status-timestamps": { + "type": "object", + "nullable": true, + "readOnly": true, + "additionalProperties": true, + "description": "A map of status names to timestamps indicating when the task stage entered each status. Keys are formatted as \"{status}-at\"." + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "permissions": { + "type": "object", + "readOnly": true, + "properties": { + "can-override-policy": { + "type": "boolean" + }, + "can-override-tasks": { + "type": "boolean" + }, + "can-override": { + "type": "boolean" + } + } + }, + "actions": { + "type": "object", + "readOnly": true, + "properties": { + "is-overridable": { + "type": "boolean" + } + } + } + } + }, + "relationships": { + "type": "object", + "properties": { + "run": { + "$ref": "#/components/schemas/runs-has-one" + }, + "cost-estimate": { + "$ref": "#/components/schemas/cost-estimates-has-one" + }, + "task-results": { + "$ref": "#/components/schemas/task-results-has-many" + }, + "policy-evaluations": { + "$ref": "#/components/schemas/policy-evaluations-has-many" + } + } + }, + "links": { + "$ref": "#/components/schemas/self" + } + } + }, "task-stages-envelope": { "type": "object", "required": [ @@ -48442,38 +48274,6 @@ } } }, - "task-stages-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/runs" - }, - { - "$ref": "#/components/schemas/workspaces" - }, - { - "$ref": "#/components/schemas/task-results" - }, - { - "$ref": "#/components/schemas/policy-evaluations" - }, - { - "$ref": "#/components/schemas/cost-estimates" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "runs": "#/components/schemas/runs", - "workspaces": "#/components/schemas/workspaces", - "task-results": "#/components/schemas/task-results", - "policy-evaluations": "#/components/schemas/policy-evaluations", - "cost-estimates": "#/components/schemas/cost-estimates" - } - } - } - }, "task-results-envelope": { "type": "object", "required": [ @@ -48757,78 +48557,6 @@ } } }, - "workspace-transfer-events": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "workspace-transfer-events" - ] - }, - "attributes": { - "type": "object", - "properties": { - "event-type": { - "type": "string", - "enum": [ - "created", - "started", - "completed", - "failed", - "paused", - "resumed", - "canceled" - ], - "readOnly": true - }, - "operation-name": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "message": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "user-id": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "created-at": { - "type": "string", - "format": "date-time", - "readOnly": true - } - } - } - } - }, - "workspace-transfers-included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/workspace-transfer-events" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "workspace-transfer-events": "#/components/schemas/workspace-transfer-events" - } - } - } - }, "tdp-addons-has-many": { "type": "object", "properties": { @@ -49538,6 +49266,112 @@ "$ref": "#/components/schemas/tdp-addons" } } + }, + "no-code-modules-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "no-code-modules" + ] + } + } + }, + "no-code-modules-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/no-code-modules-identifier" + } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, + "variable-options-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "variable-options" + ] + } + } + }, + "variable-options-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/variable-options-identifier" + } + } + } + }, + "registry-modules-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "registry-modules" + ] + } + } + }, + "registry-modules-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/registry-modules-identifier" + } + ], + "nullable": true + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + } + }, + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer" } }, "parameters": { From 4741adbe6d9cae2e8164a6e72c4c818cb187a65b Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Mon, 28 Sep 2026 15:47:39 -0600 Subject: [PATCH 3/6] translate examples to be individually runnable --- v2/api/kiota-lock.json | 2 +- .../get_include_query_parameter_type.go | 8 +- .../item/get_include_query_parameter_type.go | 8 +- .../organizations_get_response.go | 134 ++++++++++++++++-- v2/examples/README.md | 47 ++++-- v2/examples/TODO.md | 24 ---- v2/examples/account-details/main.go | 35 +++++ v2/examples/account-password/main.go | 57 ++++++++ v2/examples/account/details.go | 64 --------- v2/examples/account/password.go | 98 ------------- v2/examples/cmd/tfe/main.go | 31 ---- v2/examples/go.mod | 20 --- v2/examples/go.sum | 68 --------- v2/examples/inspect-response-headers/main.go | 41 ++++++ .../inspectheaders/interceptheaders.go | 73 ---------- v2/examples/organizations-list/main.go | 52 +++++++ v2/examples/organizations/list.go | 76 ---------- v2/openapi/spec.json | 26 ++-- 18 files changed, 375 insertions(+), 489 deletions(-) delete mode 100644 v2/examples/TODO.md create mode 100644 v2/examples/account-details/main.go create mode 100644 v2/examples/account-password/main.go delete mode 100644 v2/examples/account/details.go delete mode 100644 v2/examples/account/password.go delete mode 100644 v2/examples/cmd/tfe/main.go create mode 100644 v2/examples/inspect-response-headers/main.go delete mode 100644 v2/examples/inspectheaders/interceptheaders.go create mode 100644 v2/examples/organizations-list/main.go delete mode 100644 v2/examples/organizations/list.go diff --git a/v2/api/kiota-lock.json b/v2/api/kiota-lock.json index 2e9086718..ed51fa91c 100644 --- a/v2/api/kiota-lock.json +++ b/v2/api/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "10D00B80088BCC559D5369EF82800FF673DD0A8249B7BC7D5CDF3ACE71F757E130177BE51481820AC99E00D70A209724D6E2927E107CA7858DC7788A0306340C", + "descriptionHash": "3CC4431AFB8321140A2F082D1840DF80BB058342ED50B6AB5788791282501FE9291A205681A1A146426F77AB2C1551048BA7310A3E7CE2CAA06677B279537ECD", "descriptionLocation": "../openapi/spec.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.31.1", diff --git a/v2/api/organizations/get_include_query_parameter_type.go b/v2/api/organizations/get_include_query_parameter_type.go index e97da2567..bc346a60d 100644 --- a/v2/api/organizations/get_include_query_parameter_type.go +++ b/v2/api/organizations/get_include_query_parameter_type.go @@ -6,16 +6,22 @@ type GetIncludeQueryParameterType int const ( SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + DEFAULT_PROJECT_GETINCLUDEQUERYPARAMETERTYPE + ENTITLEMENT_SET_GETINCLUDEQUERYPARAMETERTYPE ) func (i GetIncludeQueryParameterType) String() string { - return []string{"subscription"}[i] + return []string{"subscription", "default_project", "entitlement_set"}[i] } func ParseGetIncludeQueryParameterType(v string) (any, error) { result := SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE switch v { case "subscription": result = SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE + case "default_project": + result = DEFAULT_PROJECT_GETINCLUDEQUERYPARAMETERTYPE + case "entitlement_set": + result = ENTITLEMENT_SET_GETINCLUDEQUERYPARAMETERTYPE default: return nil, nil } diff --git a/v2/api/organizations/item/get_include_query_parameter_type.go b/v2/api/organizations/item/get_include_query_parameter_type.go index ab0f36f9b..d20cc31fb 100644 --- a/v2/api/organizations/item/get_include_query_parameter_type.go +++ b/v2/api/organizations/item/get_include_query_parameter_type.go @@ -6,22 +6,22 @@ type GetIncludeQueryParameterType int const ( SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + DEFAULT_PROJECT_GETINCLUDEQUERYPARAMETERTYPE ENTITLEMENT_SET_GETINCLUDEQUERYPARAMETERTYPE - DEFAULTPROJECT_GETINCLUDEQUERYPARAMETERTYPE ) func (i GetIncludeQueryParameterType) String() string { - return []string{"subscription", "entitlement_set", "default-project"}[i] + return []string{"subscription", "default_project", "entitlement_set"}[i] } func ParseGetIncludeQueryParameterType(v string) (any, error) { result := SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE switch v { case "subscription": result = SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE + case "default_project": + result = DEFAULT_PROJECT_GETINCLUDEQUERYPARAMETERTYPE case "entitlement_set": result = ENTITLEMENT_SET_GETINCLUDEQUERYPARAMETERTYPE - case "default-project": - result = DEFAULTPROJECT_GETINCLUDEQUERYPARAMETERTYPE default: return nil, nil } diff --git a/v2/api/organizations/organizations_get_response.go b/v2/api/organizations/organizations_get_response.go index 5684fe078..6282f10ff 100644 --- a/v2/api/organizations/organizations_get_response.go +++ b/v2/api/organizations/organizations_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -14,12 +15,127 @@ type OrganizationsGetResponse struct { // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable // The included property - included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable + included []OrganizationsGetResponse_OrganizationsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta OrganizationsGetResponse_metaable } +// OrganizationsGetResponse_OrganizationsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +type OrganizationsGetResponse_OrganizationsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable + entitlementSets i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable + subscriptions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +} +// NewOrganizationsGetResponse_OrganizationsGetResponse_included instantiates a new OrganizationsGetResponse_OrganizationsGetResponse_included and sets the default values. +func NewOrganizationsGetResponse_OrganizationsGetResponse_included()(*OrganizationsGetResponse_OrganizationsGetResponse_included) { + m := &OrganizationsGetResponse_OrganizationsGetResponse_included{ + } + return m +} +// CreateOrganizationsGetResponse_OrganizationsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationsGetResponse_OrganizationsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewOrganizationsGetResponse_OrganizationsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "entitlement-sets") { + result.SetEntitlementSets(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEntitlementSets()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "subscriptions") { + result.SetSubscriptions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewSubscriptions()) + } + } + } + } + return result, nil +} +// GetEntitlementSets gets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable +// returns a EntitlementSetsable when successful +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) { + return m.entitlementSets +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetEntitlementSets() != nil { + return m.GetEntitlementSets().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetSubscriptions() != nil { + return m.GetSubscriptions().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetSubscriptions gets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +// returns a Subscriptionsable when successful +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { + return m.subscriptions +} +// Serialize serializes information the current object +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEntitlementSets() != nil { + err := writer.WriteObjectValue("", m.GetEntitlementSets()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetSubscriptions() != nil { + err := writer.WriteObjectValue("", m.GetSubscriptions()) + if err != nil { + return err + } + } + return nil +} +// SetEntitlementSets sets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() { + m.entitlementSets = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetSubscriptions sets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() { + m.subscriptions = value +} +type OrganizationsGetResponse_OrganizationsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) + SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() +} // NewOrganizationsGetResponse instantiates a new OrganizationsGetResponse and sets the default values. func NewOrganizationsGetResponse()(*OrganizationsGetResponse) { m := &OrganizationsGetResponse{ @@ -63,15 +179,15 @@ func (m *OrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a return nil } res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSubscriptionsFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(CreateOrganizationsGetResponse_OrganizationsGetResponse_includedFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable, len(val)) + res := make([]OrganizationsGetResponse_OrganizationsGetResponse_includedable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) + res[i] = v.(OrganizationsGetResponse_OrganizationsGetResponse_includedable) } } m.SetIncluded(res) @@ -101,8 +217,8 @@ func (m *OrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a return res } // GetIncluded gets the included property value. The included property -// returns a []Subscriptionsable when successful -func (m *OrganizationsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { +// returns a []OrganizationsGetResponse_OrganizationsGetResponse_includedable when successful +func (m *OrganizationsGetResponse) GetIncluded()([]OrganizationsGetResponse_OrganizationsGetResponse_includedable) { return m.included } // GetLinks gets the links property value. The links property @@ -170,7 +286,7 @@ func (m *OrganizationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f m.data = value } // SetIncluded sets the included property value. The included property -func (m *OrganizationsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() { +func (m *OrganizationsGetResponse) SetIncluded(value []OrganizationsGetResponse_OrganizationsGetResponse_includedable)() { m.included = value } // SetLinks sets the links property value. The links property @@ -185,11 +301,11 @@ type OrganizationsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) - GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) + GetIncluded()([]OrganizationsGetResponse_OrganizationsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(OrganizationsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() - SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() + SetIncluded(value []OrganizationsGetResponse_OrganizationsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value OrganizationsGetResponse_metaable)() } diff --git a/v2/examples/README.md b/v2/examples/README.md index 62335b23f..127690d3c 100644 --- a/v2/examples/README.md +++ b/v2/examples/README.md @@ -1,21 +1,44 @@ -Examples using go-tfe 2.0 -============================== +# go-tfe v2 examples -A collection of runnable examples that illustrate the use of the SDK client. +Each directory contains a standalone example that can be run from this directory. +Set `TFE_TOKEN` to an API token. `TFE_ADDRESS` is optional and defaults to +`https://app.terraform.io`. -### Basic Usage - -Build the example client: -``` -$ go build -o tfe cmd/tfe/main.go +```sh +export TFE_TOKEN=example +export TFE_ADDRESS=https://app.eu.terraform.io ``` -All subcommands can be explored using `--help` or by browsing each package directory +## Account details + +Get details for the authenticated user: + +```sh +go run ./account-details ``` -$ ./tfe account --help + +## Account password + +Change the authenticated user's password: + +```sh +go run ./account-password \ + -old-password='current password' \ + -new-password='new password' ``` -All examples require setting the `TFE_TOKEN` and `TFE_ADDRESS` variables: +## Organizations + +List organizations, including subscription data: + +```sh +go run ./organizations-list ``` -$ TFE_TOKEN=example TFE_ADDRESS=https://app.eu.terraform.io ./tfe account details + +## Response headers + +Get account details and print the response headers: + +```sh +go run ./inspect-response-headers ``` diff --git a/v2/examples/TODO.md b/v2/examples/TODO.md deleted file mode 100644 index d5f56cb52..000000000 --- a/v2/examples/TODO.md +++ /dev/null @@ -1,24 +0,0 @@ -# go-tfe SDK Examples - -This repository is a wrapper around a code-generated API client. The examples serve as documentation -for typical client usage, and loosely reflect the tag taxonomy of the API specification. - -I'd like you to generate example client code using the operations as defined in -#FILE:openapi/spec.json - -### Requirements - -- Each tag name should take the form of a separate package under #FILE:examples/, while each operation -with that tag should take the form of a separate command, as defined in -#FILE:examples/cmd/tfe/main.go - -- If an operation has required parameters or request body attributes, the command should support named -arguments. - -### Testing - -There will be no unit tests within the examples. Test for output matching the specification using -the example command itself, along with the developer-speicific environment variables. The command -should output raw JSON: - -`TFE_ADDRESS=https://tfcdev-xxxx.ngrok.app TFE_TOKEN=bcroft go run examples/cmd/tfe/main.go account details | jq` diff --git a/v2/examples/account-details/main.go b/v2/examples/account-details/main.go new file mode 100644 index 000000000..72e731797 --- /dev/null +++ b/v2/examples/account-details/main.go @@ -0,0 +1,35 @@ +// Copyright IBM Corp. 2018, 2026 + +package main + +import ( + "context" + "fmt" + "log" + "os" + + "github.com/hashicorp/go-tfe/v2" + "github.com/microsoft/kiota-abstractions-go/serialization" +) + +func main() { + client, err := tfe.NewClient(&tfe.Config{ + Token: os.Getenv("TFE_TOKEN"), + Address: os.Getenv("TFE_ADDRESS"), + }) + if err != nil { + log.Fatalf("Error creating TFE client: %s", err) + } + + response, err := client.API.Account().Details().Get(context.Background(), nil) + if err != nil { + log.Fatalf("Error getting account details: %s", err) + } + + buffer, err := serialization.SerializeToJson(response) + if err != nil { + log.Fatalf("Error serializing response: %s", err) + } + + fmt.Println(string(buffer)) +} diff --git a/v2/examples/account-password/main.go b/v2/examples/account-password/main.go new file mode 100644 index 000000000..a9d8c8755 --- /dev/null +++ b/v2/examples/account-password/main.go @@ -0,0 +1,57 @@ +// Copyright IBM Corp. 2018, 2026 + +package main + +import ( + "context" + "flag" + "fmt" + "log" + "os" + + "github.com/hashicorp/go-tfe/v2" + "github.com/hashicorp/go-tfe/v2/api/account" + "github.com/microsoft/kiota-abstractions-go/serialization" +) + +func main() { + oldPassword := flag.String("old-password", "", "Current account password") + newPassword := flag.String("new-password", "", "New account password") + flag.Parse() + + if *oldPassword == "" || *newPassword == "" { + flag.Usage() + os.Exit(2) + } + + client, err := tfe.NewClient(&tfe.Config{ + Token: os.Getenv("TFE_TOKEN"), + Address: os.Getenv("TFE_ADDRESS"), + }) + if err != nil { + log.Fatalf("Error creating TFE client: %s", err) + } + + attributes := account.NewPasswordPatchRequestBody_data_attributes() + attributes.SetCurrentPassword(oldPassword) + attributes.SetPassword(newPassword) + attributes.SetPasswordConfirmation(newPassword) + + data := account.NewPasswordPatchRequestBody_data() + data.SetAttributes(attributes) + + body := account.NewPasswordPatchRequestBody() + body.SetData(data) + + response, err := client.API.Account().Password().Patch(context.Background(), body, nil) + if err != nil { + log.Fatalf("Error changing account password: %s", err) + } + + buffer, err := serialization.SerializeToJson(response) + if err != nil { + log.Fatalf("Error serializing response: %s", err) + } + + fmt.Println(string(buffer)) +} diff --git a/v2/examples/account/details.go b/v2/examples/account/details.go deleted file mode 100644 index 854025d98..000000000 --- a/v2/examples/account/details.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright IBM Corp. 2018, 2026 - -package account - -import ( - "context" - "errors" - "fmt" - "log" - "os" - - "github.com/hashicorp/cli" - "github.com/hashicorp/go-tfe/v2" - "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type accountDetailsCommand struct{} - -var _ cli.Command = accountDetailsCommand{} - -func AccountDetailsCommandFactory() (cli.Command, error) { - return &accountDetailsCommand{}, nil -} - -func (accountDetailsCommand) Help() string { - return "Get/Update account details or change account password" -} - -func (accountDetailsCommand) Synopsis() string { - return "Manage account details and password" -} - -func (accountDetailsCommand) Run(args []string) int { - client, err := tfe.NewClient(&tfe.Config{ - Token: os.Getenv("TFE_TOKEN"), - Address: os.Getenv("TFE_ADDRESS"), - }) - - if err != nil { - log.Fatalf("Error creating TFE client: %s", err) - return 1 - } - - ctx := context.Background() - - // nil request configuration is common and indicates no query parameters, - // headers, or special request options - response, err := client.API.Account().Details().Get(ctx, nil) - - if err != nil { - log.Fatalf("API returned an error %T status: is unauthorized? %v", err, errors.Is(err, tfe.ErrUnauthorized)) - return 1 - } - - // Serialize the response to JSON for display - buffer, err := serialization.SerializeToJson(response) - if err != nil { - log.Fatalf("Error serializing response: %s", err) - return 1 - } - - fmt.Println(string(buffer)) - return 0 -} diff --git a/v2/examples/account/password.go b/v2/examples/account/password.go deleted file mode 100644 index deb782d08..000000000 --- a/v2/examples/account/password.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright IBM Corp. 2018, 2026 - -package account - -import ( - "context" - "errors" - "flag" - "fmt" - "log" - "os" - "strings" - - "github.com/hashicorp/cli" - "github.com/hashicorp/go-tfe/v2" - "github.com/hashicorp/go-tfe/v2/api/account" - "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type accountPasswordCommand struct{} - -var _ cli.Command = accountPasswordCommand{} - -func AccountChangePasswordCommandFactory() (cli.Command, error) { - return &accountPasswordCommand{}, nil -} - -func (accountPasswordCommand) Help() string { - return "Change your account password" -} - -func (accountPasswordCommand) Synopsis() string { - return "Change your account password" -} - -func (accountPasswordCommand) changePasswordModelHelper(oldPassword, newPassword *string) *account.PasswordPatchRequestBody { - pw := account.NewPasswordPatchRequestBody() - pwd := account.NewPasswordPatchRequestBody_data() - - pwda := account.NewPasswordPatchRequestBody_data_attributes() - pwda.SetCurrentPassword(oldPassword) - pwda.SetPassword(newPassword) - pwda.SetPasswordConfirmation(newPassword) - - pwd.SetAttributes(pwda) - pw.SetData(pwd) - - return pw -} - -func (c accountPasswordCommand) Run(args []string) int { - client, err := tfe.NewClient(&tfe.Config{ - Token: os.Getenv("TFE_TOKEN"), - Address: os.Getenv("TFE_ADDRESS"), - }) - - if err != nil { - log.Fatalf("Error creating TFE client: %s", err) - return 1 - } - - passwordFlags := flag.NewFlagSet("password", flag.ContinueOnError) - oldPassword := passwordFlags.String("old-password", "", "Old password") - newPassword := passwordFlags.String("new-password", "", "New password") - - if err := passwordFlags.Parse(args); err != nil { - log.Fatalf("Error parsing flags: %s", err) - return 1 - } - - if oldPassword == nil || *oldPassword == "" || newPassword == nil || *newPassword == "" { - fmt.Println("Both --old-password and --new-password are required") - passwordFlags.Usage() - return 1 - } - - ctx := context.Background() - - response, err := client.API.Account().Password().Patch(ctx, c.changePasswordModelHelper(oldPassword, newPassword), nil) - if err != nil { - var apiErr *tfe.APIError - if errors.As(err, &apiErr) { - log.Fatalf("API returned an error status: %d, details:\n- %s", apiErr.StatusCode, strings.Join(apiErr.Details, "\n- ")) - } - log.Fatalf("API returned an error status: %s", err) - return 1 - } - - // Serialize the response to JSON for display - buffer, err := serialization.SerializeToJson(response) - if err != nil { - log.Fatalf("Error serializing response: %s", err) - return 1 - } - - fmt.Println(string(buffer)) - return 0 -} diff --git a/v2/examples/cmd/tfe/main.go b/v2/examples/cmd/tfe/main.go deleted file mode 100644 index d6dba3141..000000000 --- a/v2/examples/cmd/tfe/main.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright IBM Corp. 2018, 2026 - -package main - -import ( - "log" - "os" - - "github.com/hashicorp/cli" - "github.com/hashicorp/go-tfe/v2/examples/account" - "github.com/hashicorp/go-tfe/v2/examples/inspectheaders" - "github.com/hashicorp/go-tfe/v2/examples/organizations" -) - -func main() { - c := cli.NewCLI("app", "1.0.0") - c.Args = os.Args[1:] - c.Commands = map[string]cli.CommandFactory{ - "api headers": inspectheaders.InspectHeadersCommandFactory, - "account details": account.AccountDetailsCommandFactory, - "account password": account.AccountChangePasswordCommandFactory, - "organizations list": organizations.OrganizationListCommandFactory, - } - - exitStatus, err := c.Run() - if err != nil { - log.Println(err) - } - - os.Exit(exitStatus) -} diff --git a/v2/examples/go.mod b/v2/examples/go.mod index 206a99a73..c3747ba52 100644 --- a/v2/examples/go.mod +++ b/v2/examples/go.mod @@ -3,45 +3,25 @@ module github.com/hashicorp/go-tfe/v2/examples go 1.26.4 require ( - github.com/hashicorp/cli v1.1.7 github.com/hashicorp/go-tfe/v2 v2.0.0-20260612235816-9bfa139b53fb github.com/microsoft/kiota-abstractions-go v1.9.4 github.com/microsoft/kiota-http-go v1.5.6 ) require ( - dario.cat/mergo v1.0.2 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.5.0 // indirect - github.com/Masterminds/sprig/v3 v3.3.0 // indirect - github.com/armon/go-radix v1.0.0 // indirect - github.com/bgentry/speakeasy v0.2.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/fatih/color v1.19.0 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/huandu/xstrings v1.5.0 // indirect - github.com/mattn/go-colorable v0.1.15 // indirect - github.com/mattn/go-isatty v0.0.22 // indirect github.com/microsoft/kiota-serialization-form-go v1.1.3 // indirect github.com/microsoft/kiota-serialization-json-go v1.1.2 // indirect github.com/microsoft/kiota-serialization-multipart-go v1.1.2 // indirect github.com/microsoft/kiota-serialization-text-go v1.1.3 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/posener/complete v1.2.3 // indirect - github.com/shopspring/decimal v1.4.0 // indirect - github.com/spf13/cast v1.10.0 // indirect github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.10 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/otel v1.44.0 // indirect go.opentelemetry.io/otel/metric v1.44.0 // indirect go.opentelemetry.io/otel/trace v1.44.0 // indirect - golang.org/x/crypto v0.53.0 // indirect - golang.org/x/sys v0.46.0 // indirect ) replace github.com/hashicorp/go-tfe/v2 => ../ diff --git a/v2/examples/go.sum b/v2/examples/go.sum index a13abe73e..4051abcac 100644 --- a/v2/examples/go.sum +++ b/v2/examples/go.sum @@ -1,28 +1,7 @@ -dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= -dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= -github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= -github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE= -github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= -github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= -github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= -github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= -github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= -github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w= -github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE= -github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -32,28 +11,6 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/cli v1.1.7 h1:/fZJ+hNdwfTSfsxMBa9WWMlfjUZbX8/LnUxgAd7lCVU= -github.com/hashicorp/cli v1.1.7/go.mod h1:e6Mfpga9OCT1vqzFuoGZiiF/KaG9CbUfO5s3ghU3YgU= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= -github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= -github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= -github.com/mattn/go-colorable v0.1.15 h1:+u9SLTRGnXv73cEsnsmoZBom+dMU88B2M0aDcWy0/jY= -github.com/mattn/go-colorable v0.1.15/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4= -github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4= github.com/microsoft/kiota-abstractions-go v1.9.4 h1:VI3UVzSCQHHhRswe3jyaAQHUQWIFhUMp0z5mtZbTbcs= github.com/microsoft/kiota-abstractions-go v1.9.4/go.mod h1:f06pl3qSyvUHEfVNkiRpXPkafx7khZqQEb71hN/pmuU= github.com/microsoft/kiota-http-go v1.5.6 h1:KBdk7sxWYXZnRRExLjIcNt4I7LoOfh/XQJWWid4zBKE= @@ -66,24 +23,10 @@ github.com/microsoft/kiota-serialization-multipart-go v1.1.2 h1:1pUyA1QgIeKslQwb github.com/microsoft/kiota-serialization-multipart-go v1.1.2/go.mod h1:j2K7ZyYErloDu7Kuuk993DsvfoP7LPWvAo7rfDpdPio= github.com/microsoft/kiota-serialization-text-go v1.1.3 h1:8z7Cebn0YAAr++xswVgfdxZjnAZ4GOB9O7XP4+r5r/M= github.com/microsoft/kiota-serialization-text-go v1.1.3/go.mod h1:NDSvz4A3QalGMjNboKKQI9wR+8k+ih8UuagNmzIRgTQ= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= -github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= -github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= -github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.10 h1:8sNWJ4i8eORl8gu97a8EcpRT/y0oapwjddxrf/fbj7w= github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.10/go.mod h1:Z5KcoM0YLC7INlNhEezeIZ0TZNYf7WSNO0Lvah4DSeQ= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= @@ -94,16 +37,5 @@ go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSY go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= -golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= -golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= -golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= -golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= -golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= -golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/v2/examples/inspect-response-headers/main.go b/v2/examples/inspect-response-headers/main.go new file mode 100644 index 000000000..3e901a446 --- /dev/null +++ b/v2/examples/inspect-response-headers/main.go @@ -0,0 +1,41 @@ +// Copyright IBM Corp. 2018, 2026 + +package main + +import ( + "context" + "fmt" + "log" + "os" + + "github.com/hashicorp/go-tfe/v2" + "github.com/hashicorp/go-tfe/v2/api/account" + abstractions "github.com/microsoft/kiota-abstractions-go" + khttp "github.com/microsoft/kiota-http-go" +) + +func main() { + client, err := tfe.NewClient(&tfe.Config{ + Token: os.Getenv("TFE_TOKEN"), + Address: os.Getenv("TFE_ADDRESS"), + }) + if err != nil { + log.Fatalf("Error creating TFE client: %s", err) + } + + inspection := khttp.NewHeadersInspectionOptions() + inspection.InspectResponseHeaders = true + configuration := abstractions.RequestConfiguration[account.DetailsRequestBuilderGetQueryParameters]{ + Options: []abstractions.RequestOption{inspection}, + } + + _, err = client.API.Account().Details().Get(context.Background(), &configuration) + if err != nil { + log.Fatalf("Error getting account details: %s", err) + } + + headers := inspection.GetResponseHeaders() + for _, name := range headers.ListKeys() { + fmt.Printf("%s: %v\n", name, headers.Get(name)) + } +} diff --git a/v2/examples/inspectheaders/interceptheaders.go b/v2/examples/inspectheaders/interceptheaders.go deleted file mode 100644 index 836bd908f..000000000 --- a/v2/examples/inspectheaders/interceptheaders.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright IBM Corp. 2018, 2026 - -package inspectheaders - -import ( - "context" - "log" - "os" - - "github.com/hashicorp/cli" - "github.com/hashicorp/go-tfe/v2" - - abstractions "github.com/microsoft/kiota-abstractions-go" - khttp "github.com/microsoft/kiota-http-go" -) - -type inspectHeadersCommand struct{} - -var _ cli.Command = inspectHeadersCommand{} - -func InspectHeadersCommandFactory() (cli.Command, error) { - return &inspectHeadersCommand{}, nil -} - -func (inspectHeadersCommand) Help() string { - return "Intercept response headers from the TFE API example" -} - -func (inspectHeadersCommand) Synopsis() string { - return "Intercept response headers from the TFE API example" -} - -func (inspectHeadersCommand) Run(args []string) int { - client, err := tfe.NewClient(&tfe.Config{ - Token: os.Getenv("TFE_TOKEN"), - Address: os.Getenv("TFE_ADDRESS"), - }) - - if err != nil { - log.Fatalf("Error creating TFE client: %s", err) - return 1 - } - - ctx := context.Background() - - // 1. Create the HeadersInspectionRequestOption - inspectionOptions := khttp.NewHeadersInspectionOptions() - inspectionOptions.InspectResponseHeaders = true - - // 2. Create/add the option to the RequestInformation object for the request - req := abstractions.RequestConfiguration[abstractions.DefaultQueryParameters]{ - Options: []abstractions.RequestOption{inspectionOptions}, - } - if err != nil { - log.Fatalf("Error creating request: %s", err) - return 1 - } - - // 3. Execute the request - _, err = client.API.Account().Details().Get(ctx, &req) - if err != nil { - log.Fatalf("Error getting account details: %s", err) - return 1 - } - - // 4. Access the response headers from the HeadersInspectionRequestOption - headers := inspectionOptions.GetResponseHeaders() - for _, key := range headers.ListKeys() { - log.Printf("%s: %v", key, headers.Get(key)) - } - - return 0 -} diff --git a/v2/examples/organizations-list/main.go b/v2/examples/organizations-list/main.go new file mode 100644 index 000000000..f2e22afdc --- /dev/null +++ b/v2/examples/organizations-list/main.go @@ -0,0 +1,52 @@ +// Copyright IBM Corp. 2018, 2026 + +package main + +import ( + "context" + "fmt" + "log" + "os" + + "github.com/hashicorp/go-tfe/v2" + "github.com/hashicorp/go-tfe/v2/api/organizations" + abstractions "github.com/microsoft/kiota-abstractions-go" +) + +func main() { + client, err := tfe.NewClient(&tfe.Config{ + Token: os.Getenv("TFE_TOKEN"), + Address: os.Getenv("TFE_ADDRESS"), + }) + if err != nil { + log.Fatalf("Error creating TFE client: %s", err) + } + + includeSubscriptions := organizations.SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE + includeDefaultProject := organizations.DEFAULT_PROJECT_GETINCLUDEQUERYPARAMETERTYPE + configuration := abstractions.RequestConfiguration[organizations.OrganizationsRequestBuilderGetQueryParameters]{ + QueryParameters: &organizations.OrganizationsRequestBuilderGetQueryParameters{ + Include: []organizations.GetIncludeQueryParameterType{ + includeSubscriptions, + includeDefaultProject, + }, + }, + } + + response, err := client.API.Organizations().Get(context.Background(), &configuration) + if err != nil { + log.Fatalf("Error listing organizations: %s", err) + } + + for _, record := range response.GetIncluded() { + if record.GetProjects() != nil { + project := record.GetProjects() + fmt.Printf("Included project: %s\n", *project.GetId()) + } else if record.GetSubscriptions() != nil { + subscription := record.GetSubscriptions() + fmt.Printf("Included subscription: %s\n", *subscription.GetId()) + } else { + panic("This shouldn't happen") + } + } +} diff --git a/v2/examples/organizations/list.go b/v2/examples/organizations/list.go deleted file mode 100644 index bf3266628..000000000 --- a/v2/examples/organizations/list.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright IBM Corp. 2018, 2026 - -package organizations - -import ( - "context" - "fmt" - "log" - "os" - - "github.com/hashicorp/cli" - "github.com/hashicorp/go-tfe/v2" - "github.com/hashicorp/go-tfe/v2/api/organizations" - abstractions "github.com/microsoft/kiota-abstractions-go" - "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type organizationListCommand struct{} - -var _ cli.Command = organizationListCommand{} - -func OrganizationListCommandFactory() (cli.Command, error) { - return &organizationListCommand{}, nil -} - -func (organizationListCommand) Help() string { - return "List Organizations" -} - -func (organizationListCommand) Synopsis() string { - return "List Organizations" -} - -func (organizationListCommand) Run(args []string) int { - client, err := tfe.NewClient(&tfe.Config{ - Token: os.Getenv("TFE_TOKEN"), - Address: os.Getenv("TFE_ADDRESS"), - }) - - if err != nil { - log.Fatalf("Error creating TFE client: %s", err) - return 1 - } - - ctx := context.Background() - - // Include subscriptions in the response by setting the include query parameter - includeSubscriptions := organizations.SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE - c := abstractions.RequestConfiguration[organizations.OrganizationsRequestBuilderGetQueryParameters]{ - QueryParameters: &organizations.OrganizationsRequestBuilderGetQueryParameters{ - Include: &includeSubscriptions, - }, - } - - response, err := client.API.Organizations().Get(ctx, &c) - if err != nil { - if apiErr, ok := err.(*tfe.APIError); ok { - log.Fatalf("API returned an error status: %d - %s", apiErr.StatusCode, apiErr.Message) - } else { - log.Fatalf("Error making API request: %s", err) - } - return 1 - } - - fmt.Fprintf(os.Stderr, "[LOG] Fetched %d organizations\n", len(response.GetData())) - - // Serialize the response to JSON for display - buffer, err := serialization.SerializeToJson(response) - if err != nil { - log.Fatalf("Error serializing response: %s", err) - } - - fmt.Fprintln(os.Stdout, string(buffer)) - - return 0 -} diff --git a/v2/openapi/spec.json b/v2/openapi/spec.json index 4c719366e..33130acef 100644 --- a/v2/openapi/spec.json +++ b/v2/openapi/spec.json @@ -7019,7 +7019,9 @@ "items": { "type": "string", "enum": [ - "subscription" + "subscription", + "default_project", + "entitlement_set" ] } } @@ -7059,12 +7061,20 @@ "oneOf": [ { "$ref": "#/components/schemas/subscriptions" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/entitlement-sets" } ], "discriminator": { "propertyName": "type", "mapping": { - "subscriptions": "#/components/schemas/subscriptions" + "subscriptions": "#/components/schemas/subscriptions", + "projects": "#/components/schemas/projects", + "entitlement-sets": "#/components/schemas/entitlement-sets" } } } @@ -7171,8 +7181,8 @@ "type": "string", "enum": [ "subscription", - "entitlement_set", - "default-project" + "default_project", + "entitlement_set" ] } } @@ -7194,18 +7204,18 @@ "$ref": "#/components/schemas/subscriptions" }, { - "$ref": "#/components/schemas/entitlement-sets" + "$ref": "#/components/schemas/projects" }, { - "$ref": "#/components/schemas/projects" + "$ref": "#/components/schemas/entitlement-sets" } ], "discriminator": { "propertyName": "type", "mapping": { "subscriptions": "#/components/schemas/subscriptions", - "entitlement-sets": "#/components/schemas/entitlement-sets", - "projects": "#/components/schemas/projects" + "projects": "#/components/schemas/projects", + "entitlement-sets": "#/components/schemas/entitlement-sets" } } } From 523432bc2666089cc5a43cf303e11dae32c0404b Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Wed, 30 Sep 2026 10:30:29 -0600 Subject: [PATCH 4/6] Update generated API client --- v2/api/.kiota.log | 2 - .../tfpolicy_versions_request_builder.go | 10 +- ..._tfpolicy_versions_item_request_builder.go | 14 +- .../item/get_include_query_parameter_type.go | 75 + ...caped_pool_escaped_item_request_builder.go | 5 +- v2/api/api_client.go | 10 + ...hentication_tokens_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 33 + .../item/get_include_query_parameter_type.go | 36 + ...caped_list_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 33 + ...ed_version_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 36 + ...figuration_escaped_item_request_builder.go | 5 +- v2/api/kiota-lock.json | 2 +- v2/api/models/agent_pools_envelope.go | 267 + .../models/authentication_tokens_envelope.go | 41 + v2/api/models/cidr_range_list_envelope.go | 135 + .../models/configuration_versions_envelope.go | 41 + .../models/current_state_version_envelope.go | 41 + v2/api/models/hyok_configurations_envelope.go | 201 + v2/api/models/oauth_clients_envelope.go | 157 + v2/api/models/ootb_policy_libraries.go | 143 + ...otb_policy_libraries_escaped_attributes.go | 83 + .../ootb_policy_libraries_escaped_type.go | 33 + .../organization_memberships_envelope.go | 157 + v2/api/models/organizations_envelope.go | 179 + v2/api/models/policies_envelope.go | 41 + v2/api/models/policy_checks_envelope.go | 135 + v2/api/models/policy_set_versions_envelope.go | 41 + v2/api/models/policy_sets_envelope.go | 245 + .../models/policy_sets_escaped_attributes.go | 47 +- ...escaped_attributes_escaped_scoping_type.go | 2 +- ...tes_escaped_tag_selector_matching_logic.go | 2 +- .../policy_sets_escaped_relationships.go | 58 + v2/api/models/projects_envelope.go | 41 + v2/api/models/provider_sets_envelope.go | 135 + v2/api/models/registry_modules_envelope.go | 157 + v2/api/models/run_triggers_envelope.go | 41 + v2/api/models/runs_envelope.go | 289 + v2/api/models/runs_escaped_attributes.go | 9 +- .../runs_escaped_attributes_escaped_status.go | 2 +- v2/api/models/stack_approvals_envelope.go | 41 + .../models/stack_configurations_envelope.go | 179 + .../stack_deployment_groups_envelope.go | 41 + .../models/stack_deployment_runs_envelope.go | 245 + .../models/stack_deployment_steps_envelope.go | 201 + ..._deployment_steps_escaped_relationships.go | 29 + .../models/stack_operation_allow_imports.go | 129 + ...ration_allow_imports_escaped_attributes.go | 101 + ...ck_operation_allow_imports_escaped_type.go | 33 + v2/api/models/stack_operation_applies.go | 158 + ...ck_operation_applies_escaped_attributes.go | 101 + .../stack_operation_applies_escaped_links.go | 112 + .../stack_operation_applies_escaped_type.go | 33 + v2/api/models/stack_operation_has_one.go | 112 + v2/api/models/stack_operation_identifier.go | 113 + ...stack_operation_identifier_escaped_type.go | 42 + .../models/stack_operation_import_states.go | 158 + ...ration_import_states_escaped_attributes.go | 101 + ...k_operation_import_states_escaped_links.go | 83 + ...ck_operation_import_states_escaped_type.go | 33 + v2/api/models/stack_operation_plans.go | 187 + ...tack_operation_plans_escaped_attributes.go | 124 + ...caped_attributes_escaped_change_summary.go | 147 + .../stack_operation_plans_escaped_links.go | 112 + ...k_operation_plans_escaped_relationships.go | 83 + .../stack_operation_plans_escaped_type.go | 33 + v2/api/models/stack_policy_evaluations.go | 195 + .../stack_policy_evaluations_envelope.go | 124 + ...k_policy_evaluations_escaped_attributes.go | 235 + ...ations_escaped_attributes_escaped_error.go | 143 + ...d_attributes_escaped_error_escaped_type.go | 46 + ...tributes_escaped_policy_attachable_type.go | 34 + ...escaped_attributes_escaped_result_count.go | 229 + ...tions_escaped_attributes_escaped_status.go | 46 + .../stack_policy_evaluations_escaped_links.go | 112 + ...olicy_evaluations_escaped_relationships.go | 83 + .../stack_policy_evaluations_escaped_type.go | 33 + .../stack_policy_evaluations_has_one.go | 112 + ...policy_evaluations_has_one_escaped_data.go | 42 + ...policy_evaluations_has_one_escaped_meta.go | 54 + .../stack_policy_evaluations_identifier.go | 113 + ...icy_evaluations_identifier_escaped_type.go | 33 + v2/api/models/stack_policy_set_outcomes.go | 166 + ..._policy_set_outcomes_escaped_attributes.go | 152 + ...escaped_attributes_escaped_result_count.go | 229 + ...licy_set_outcomes_escaped_relationships.go | 83 + .../stack_policy_set_outcomes_escaped_type.go | 33 + .../stack_policy_set_outcomes_has_many.go | 124 + ...licy_set_outcomes_has_many_escaped_meta.go | 54 + .../stack_policy_set_outcomes_identifier.go | 113 + ...cy_set_outcomes_identifier_escaped_type.go | 33 + v2/api/models/stacks_envelope.go | 179 + v2/api/models/stacks_escaped_attributes.go | 23 + .../stacks_identifier_array_document.go | 95 + ..._identifier_array_document_escaped_data.go | 113 + ...rray_document_escaped_data_escaped_type.go | 33 + v2/api/models/state_versions_envelope.go | 223 + v2/api/models/subscriptions_envelope.go | 41 + v2/api/models/task_configs_envelope.go | 179 + v2/api/models/task_stages_envelope.go | 201 + v2/api/models/tasks_envelope.go | 135 + v2/api/models/team_projects_envelope.go | 41 + v2/api/models/team_workspaces_envelope.go | 41 + v2/api/models/teams_envelope.go | 135 + v2/api/models/test_runs.go | 165 + v2/api/models/test_runs_escaped_attributes.go | 523 ++ ...ed_attributes_escaped_status_timestamps.go | 54 + ...ns_escaped_attributes_escaped_variables.go | 54 + .../models/test_runs_escaped_relationships.go | 112 + v2/api/models/test_runs_escaped_type.go | 33 + v2/api/models/tf_policy_evaluations.go | 2 +- .../models/tf_policy_evaluations_envelope.go | 47 +- ...f_policy_evaluations_escaped_attributes.go | 27 +- ...d_attributes_escaped_error_escaped_type.go | 8 +- ...escaped_attributes_escaped_result_count.go | 6 +- ...s_escaped_attributes_escaped_stage_type.go | 40 + ..._policy_set_outcomes_escaped_attributes.go | 47 +- ...escaped_attributes_escaped_result_count.go | 7 +- v2/api/models/vars_envelope.go | 41 + v2/api/models/varsets_envelope.go | 179 + v2/api/models/workspace_transfers_envelope.go | 41 + v2/api/models/workspaces_envelope.go | 465 ++ .../item/get_include_query_parameter_type.go | 39 + ...ped_client_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 5 +- ...escaped_membership_escaped_get_response.go | 262 +- .../get_include_query_parameter_type.go | 5 +- .../get_include_query_parameter_type.go | 75 + .../get_include_query_parameter_type.go | 36 + .../item/get_include_query_parameter_type.go | 5 +- .../get_include_query_parameter_type.go | 36 + .../get_include_query_parameter_type.go | 39 + .../get_include_query_parameter_type.go | 33 + .../get_include_query_parameter_type.go | 63 + .../get_include_query_parameter_type.go | 33 + .../item/get_include_query_parameter_type.go | 39 + .../runs/get_include_query_parameter_type.go | 42 + .../get_include_query_parameter_type.go | 45 + .../get_include_query_parameter_type.go | 45 + .../get_include_query_parameter_type.go | 33 + .../get_include_query_parameter_type.go | 42 + .../item_agent_pools_get_response.go | 267 + .../item_agent_pools_request_builder.go | 5 +- .../item_cidr_range_lists_get_response.go | 135 + .../item_cidr_range_lists_request_builder.go | 5 +- .../item_hyok_configurations_get_response.go | 201 + ...tem_hyok_configurations_request_builder.go | 5 +- .../item_oauth_clients_get_response.go | 157 + .../item_oauth_clients_request_builder.go | 5 +- .../item_policies_get_response.go | 41 + .../item_policies_request_builder.go | 4 +- .../item_policy_sets_get_response.go | 245 + .../item_policy_sets_request_builder.go | 4 +- .../item_projects_get_response.go | 41 + .../item_projects_request_builder.go | 5 +- ...r_escaped_set_escaped_name_get_response.go | 262 +- ...item_with_provider_item_request_builder.go | 5 +- .../organizations/item_runs_get_response.go | 179 + .../item_runs_request_builder.go | 5 +- ..._task_configs_for_owner_request_builder.go | 4 +- .../item_task_configs_get_response.go | 179 + .../item_task_configs_request_builder.go | 4 +- .../item_team_tokens_get_response.go | 41 + .../item_team_tokens_request_builder.go | 5 +- .../item_varsets_get_response.go | 179 + .../item_varsets_request_builder.go | 4 +- ..._organization_escaped_name_get_response.go | 334 +- ...ith_workspace_escaped_name_get_response.go | 802 +-- .../organizations_get_response.go | 24 +- .../item/get_include_query_parameter_type.go | 33 + ...ith_policy_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 36 + .../policy_checks_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 44 +- .../get_include_query_parameter_type.go | 33 + .../item_relationships_request_builder.go | 10 + ...nships_stack_exclusions_request_builder.go | 89 + ...em_relationships_stacks_request_builder.go | 89 + .../item_tag_selectors_request_builder.go | 8 +- .../policysets/item_versions_get_response.go | 41 + .../item_versions_request_builder.go | 5 +- ...scaped_set_escaped_item_request_builder.go | 2 +- .../item/get_include_query_parameter_type.go | 33 + ...ed_version_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 33 + .../get_include_query_parameter_type.go | 36 + .../get_include_query_parameter_type.go | 42 + .../item_provider_sets_get_response.go | 135 + .../item_provider_sets_request_builder.go | 5 +- v2/api/projects/item_varsets_get_response.go | 179 + .../projects/item_varsets_request_builder.go | 4 +- ...th_project_escaped_item_request_builder.go | 5 +- ...ovider_escaped_set_escaped_get_response.go | 262 +- .../item/get_include_query_parameter_type.go | 39 + .../item_with_query_escaped_get_response.go | 157 + ...with_query_escaped_item_request_builder.go | 13 +- .../get_include_query_parameter_type.go | 36 + .../get_include_query_parameter_type.go | 45 + .../runs/item_policy_checks_get_response.go | 135 + .../item_policy_checks_request_builder.go | 5 +- v2/api/runs/item_task_stages_get_response.go | 201 + .../runs/item_task_stages_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 36 + .../run_triggers_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 33 + ...d_approval_escaped_item_request_builder.go | 5 +- ...c69d737e023aec758e4a6e3d71ac8991ad9025a.go | 5 +- .../get_include_query_parameter_type.go | 13 +- .../item/get_include_query_parameter_type.go | 36 + .../get_include_query_parameter_type.go | 42 + ...item_stack_deployment_runs_get_response.go | 179 + ...m_stack_deployment_runs_request_builder.go | 4 +- ...aped_configuration_escaped_get_response.go | 334 +- .../item/get_include_query_parameter_type.go | 13 +- .../get_include_query_parameter_type.go | 45 + ...item_stack_deployment_runs_get_response.go | 179 + ...m_stack_deployment_runs_request_builder.go | 4 +- .../item/get_include_query_parameter_type.go | 54 + .../get_include_query_parameter_type.go | 45 + ...tem_stack_deployment_steps_get_response.go | 201 + ..._stack_deployment_steps_request_builder.go | 4 +- ...scaped_run_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 45 + ...caped_step_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 33 + ...escaped_diagnostic_escaped_get_response.go | 41 + ...diagnostic_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 33 + .../item_request_builder.go | 74 + ..._stack_policy_set_outcomes_get_response.go | 154 + ..._set_outcomes_get_response_escaped_meta.go | 84 + ...ack_policy_set_outcomes_request_builder.go | 74 + ...tack_policy_evaluations_request_builder.go | 38 + .../item/get_include_query_parameter_type.go | 42 + .../get_include_query_parameter_type.go | 33 + .../get_include_query_parameter_type.go | 36 + .../get_include_query_parameter_type.go | 36 + ...ck_configuration_summaries_get_response.go | 41 + ...configuration_summaries_request_builder.go | 5 +- .../item_stack_deployments_get_response.go | 135 + ...item_stack_deployment_runs_get_response.go | 135 + ...m_stack_deployment_runs_request_builder.go | 5 +- .../item_stack_deployments_request_builder.go | 4 +- ...with_stack_escaped_item_request_builder.go | 5 +- .../get_include_query_parameter_type.go | 51 + .../item/get_include_query_parameter_type.go | 51 + .../state_versions_get_response.go | 223 + .../state_versions_request_builder.go | 4 +- ...ed_version_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 33 + .../subscriptions_item_request_builder.go | 5 +- ...item_with_external_escaped_get_response.go | 334 +- .../get_include_query_parameter_type.go | 33 + ...ationships_workspace_tasks_get_response.go | 41 + ...onships_workspace_tasks_request_builder.go | 5 +- v2/api/tasks/item_tasks_get_response.go | 262 +- ...task_escaped_stage_escaped_get_response.go | 370 +- .../get_include_query_parameter_type.go | 33 + .../item/get_include_query_parameter_type.go | 33 + .../team_projects_get_response.go | 41 + .../team_projects_request_builder.go | 4 +- ...ed_project_escaped_item_request_builder.go | 5 +- .../get_include_query_parameter_type.go | 33 + .../item/get_include_query_parameter_type.go | 33 + .../team_workspaces_get_response.go | 41 + .../team_workspaces_request_builder.go | 4 +- ..._workspace_escaped_item_request_builder.go | 5 +- .../tfpolicyevaluations/item_get_response.go | 119 +- .../get_include_query_parameter_type.go | 33 + ...item_authentication_tokens_get_response.go | 41 + ...m_authentication_tokens_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 42 + .../vars/get_include_query_parameter_type.go | 36 + .../item/get_include_query_parameter_type.go | 36 + .../item_relationships_vars_get_response.go | 41 + ...item_relationships_vars_request_builder.go | 5 +- ...ionships_vars_vars_item_request_builder.go | 5 +- ...ith_varset_escaped_item_request_builder.go | 5 +- .../get_include_query_parameter_type.go | 36 + .../get_include_query_parameter_type.go | 33 + .../get_include_query_parameter_type.go | 36 + .../get_include_query_parameter_type.go | 39 + .../runs/get_include_query_parameter_type.go | 57 + .../get_include_query_parameter_type.go | 36 + .../vars/get_include_query_parameter_type.go | 36 + .../item/get_include_query_parameter_type.go | 36 + .../get_include_query_parameter_type.go | 42 + .../vars/get_include_query_parameter_type.go | 36 + .../item/get_include_query_parameter_type.go | 36 + .../workspaces/item_all_vars_get_response.go | 41 + .../item_all_vars_request_builder.go | 5 +- ...tem_configuration_versions_get_response.go | 41 + ..._configuration_versions_request_builder.go | 5 +- .../item_provider_sets_get_response.go | 135 + .../item_provider_sets_request_builder.go | 5 +- .../workspaces/item_queries_get_response.go | 157 + .../item_queries_request_builder.go | 5 +- .../item_run_triggers_get_response.go | 41 + .../item_run_triggers_request_builder.go | 4 +- v2/api/workspaces/item_runs_get_response.go | 289 + .../workspaces/item_runs_request_builder.go | 5 +- v2/api/workspaces/item_vars_get_response.go | 41 + .../workspaces/item_vars_request_builder.go | 5 +- .../item_vars_vars_item_request_builder.go | 5 +- .../workspaces/item_varsets_get_response.go | 179 + ...ts_item_relationships_vars_get_response.go | 41 + ...item_relationships_vars_request_builder.go | 5 +- ...ionships_vars_vars_item_request_builder.go | 5 +- .../item_varsets_request_builder.go | 5 +- ...tem_with_workspace_escaped_get_response.go | 802 +-- .../get_include_query_parameter_type.go | 33 + .../workspace_transfers_get_response.go | 41 + .../workspace_transfers_request_builder.go | 4 +- v2/openapi/spec.json | 6030 ++++++++++++++--- 316 files changed, 27001 insertions(+), 3118 deletions(-) create mode 100644 v2/api/agentpools/item/get_include_query_parameter_type.go create mode 100644 v2/api/authenticationtokens/item/get_include_query_parameter_type.go create mode 100644 v2/api/cidrrangelists/item/get_include_query_parameter_type.go create mode 100644 v2/api/configurationversions/item/get_include_query_parameter_type.go create mode 100644 v2/api/hyokconfigurations/item/get_include_query_parameter_type.go create mode 100644 v2/api/models/ootb_policy_libraries.go create mode 100644 v2/api/models/ootb_policy_libraries_escaped_attributes.go create mode 100644 v2/api/models/ootb_policy_libraries_escaped_type.go create mode 100644 v2/api/models/stack_operation_allow_imports.go create mode 100644 v2/api/models/stack_operation_allow_imports_escaped_attributes.go create mode 100644 v2/api/models/stack_operation_allow_imports_escaped_type.go create mode 100644 v2/api/models/stack_operation_applies.go create mode 100644 v2/api/models/stack_operation_applies_escaped_attributes.go create mode 100644 v2/api/models/stack_operation_applies_escaped_links.go create mode 100644 v2/api/models/stack_operation_applies_escaped_type.go create mode 100644 v2/api/models/stack_operation_has_one.go create mode 100644 v2/api/models/stack_operation_identifier.go create mode 100644 v2/api/models/stack_operation_identifier_escaped_type.go create mode 100644 v2/api/models/stack_operation_import_states.go create mode 100644 v2/api/models/stack_operation_import_states_escaped_attributes.go create mode 100644 v2/api/models/stack_operation_import_states_escaped_links.go create mode 100644 v2/api/models/stack_operation_import_states_escaped_type.go create mode 100644 v2/api/models/stack_operation_plans.go create mode 100644 v2/api/models/stack_operation_plans_escaped_attributes.go create mode 100644 v2/api/models/stack_operation_plans_escaped_attributes_escaped_change_summary.go create mode 100644 v2/api/models/stack_operation_plans_escaped_links.go create mode 100644 v2/api/models/stack_operation_plans_escaped_relationships.go create mode 100644 v2/api/models/stack_operation_plans_escaped_type.go create mode 100644 v2/api/models/stack_policy_evaluations.go create mode 100644 v2/api/models/stack_policy_evaluations_envelope.go create mode 100644 v2/api/models/stack_policy_evaluations_escaped_attributes.go create mode 100644 v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_error.go create mode 100644 v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go create mode 100644 v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_policy_attachable_type.go create mode 100644 v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_result_count.go create mode 100644 v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_status.go create mode 100644 v2/api/models/stack_policy_evaluations_escaped_links.go create mode 100644 v2/api/models/stack_policy_evaluations_escaped_relationships.go create mode 100644 v2/api/models/stack_policy_evaluations_escaped_type.go create mode 100644 v2/api/models/stack_policy_evaluations_has_one.go create mode 100644 v2/api/models/stack_policy_evaluations_has_one_escaped_data.go create mode 100644 v2/api/models/stack_policy_evaluations_has_one_escaped_meta.go create mode 100644 v2/api/models/stack_policy_evaluations_identifier.go create mode 100644 v2/api/models/stack_policy_evaluations_identifier_escaped_type.go create mode 100644 v2/api/models/stack_policy_set_outcomes.go create mode 100644 v2/api/models/stack_policy_set_outcomes_escaped_attributes.go create mode 100644 v2/api/models/stack_policy_set_outcomes_escaped_attributes_escaped_result_count.go create mode 100644 v2/api/models/stack_policy_set_outcomes_escaped_relationships.go create mode 100644 v2/api/models/stack_policy_set_outcomes_escaped_type.go create mode 100644 v2/api/models/stack_policy_set_outcomes_has_many.go create mode 100644 v2/api/models/stack_policy_set_outcomes_has_many_escaped_meta.go create mode 100644 v2/api/models/stack_policy_set_outcomes_identifier.go create mode 100644 v2/api/models/stack_policy_set_outcomes_identifier_escaped_type.go create mode 100644 v2/api/models/stacks_identifier_array_document.go create mode 100644 v2/api/models/stacks_identifier_array_document_escaped_data.go create mode 100644 v2/api/models/stacks_identifier_array_document_escaped_data_escaped_type.go create mode 100644 v2/api/models/test_runs.go create mode 100644 v2/api/models/test_runs_escaped_attributes.go create mode 100644 v2/api/models/test_runs_escaped_attributes_escaped_status_timestamps.go create mode 100644 v2/api/models/test_runs_escaped_attributes_escaped_variables.go create mode 100644 v2/api/models/test_runs_escaped_relationships.go create mode 100644 v2/api/models/test_runs_escaped_type.go create mode 100644 v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_stage_type.go create mode 100644 v2/api/oauthclients/item/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/agentpools/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/cidrrangelists/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/hyokconfigurations/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/oauthclients/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/policies/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/policysets/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/projects/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/registrymodules/item/item/item/item/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/runs/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/taskconfigs/forowner/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/taskconfigs/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/teamtokens/get_include_query_parameter_type.go create mode 100644 v2/api/organizations/item/varsets/get_include_query_parameter_type.go create mode 100644 v2/api/policies/item/get_include_query_parameter_type.go create mode 100644 v2/api/policychecks/item/get_include_query_parameter_type.go create mode 100644 v2/api/policysets/item/versions/get_include_query_parameter_type.go create mode 100644 v2/api/policysets/item_relationships_stack_exclusions_request_builder.go create mode 100644 v2/api/policysets/item_relationships_stacks_request_builder.go create mode 100644 v2/api/policysetversions/item/get_include_query_parameter_type.go create mode 100644 v2/api/projects/item/get_include_query_parameter_type.go create mode 100644 v2/api/projects/item/providersets/get_include_query_parameter_type.go create mode 100644 v2/api/projects/item/varsets/get_include_query_parameter_type.go create mode 100644 v2/api/queries/item/get_include_query_parameter_type.go create mode 100644 v2/api/runs/item/policychecks/get_include_query_parameter_type.go create mode 100644 v2/api/runs/item/taskstages/get_include_query_parameter_type.go create mode 100644 v2/api/runtriggers/item/get_include_query_parameter_type.go create mode 100644 v2/api/stackapprovals/item/get_include_query_parameter_type.go create mode 100644 v2/api/stackconfigurations/item/stackdeploymentgroups/item/get_include_query_parameter_type.go create mode 100644 v2/api/stackconfigurations/item/stackdeploymentruns/get_include_query_parameter_type.go create mode 100644 v2/api/stackdeploymentgroups/item/stackdeploymentruns/get_include_query_parameter_type.go create mode 100644 v2/api/stackdeploymentruns/item/get_include_query_parameter_type.go create mode 100644 v2/api/stackdeploymentruns/item/stackdeploymentsteps/get_include_query_parameter_type.go create mode 100644 v2/api/stackdeploymentsteps/item/get_include_query_parameter_type.go create mode 100644 v2/api/stackdiagnostics/item/get_include_query_parameter_type.go create mode 100644 v2/api/stackpolicyevaluations/item/get_include_query_parameter_type.go create mode 100644 v2/api/stackpolicyevaluations/item_request_builder.go create mode 100644 v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_get_response.go create mode 100644 v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_get_response_escaped_meta.go create mode 100644 v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_request_builder.go create mode 100644 v2/api/stackpolicyevaluations/stack_policy_evaluations_request_builder.go create mode 100644 v2/api/stacks/item/get_include_query_parameter_type.go create mode 100644 v2/api/stacks/item/stackconfigurationsummaries/get_include_query_parameter_type.go create mode 100644 v2/api/stacks/item/stackdeployments/get_include_query_parameter_type.go create mode 100644 v2/api/stacks/item/stackdeployments/item/stackdeploymentruns/get_include_query_parameter_type.go create mode 100644 v2/api/stateversions/get_include_query_parameter_type.go create mode 100644 v2/api/stateversions/item/get_include_query_parameter_type.go create mode 100644 v2/api/subscriptions/item/get_include_query_parameter_type.go create mode 100644 v2/api/tasks/item/relationships/workspacetasks/get_include_query_parameter_type.go create mode 100644 v2/api/teamprojects/get_include_query_parameter_type.go create mode 100644 v2/api/teamprojects/item/get_include_query_parameter_type.go create mode 100644 v2/api/teamworkspaces/get_include_query_parameter_type.go create mode 100644 v2/api/teamworkspaces/item/get_include_query_parameter_type.go create mode 100644 v2/api/users/item/authenticationtokens/get_include_query_parameter_type.go create mode 100644 v2/api/varsets/item/get_include_query_parameter_type.go create mode 100644 v2/api/varsets/item/relationships/vars/get_include_query_parameter_type.go create mode 100644 v2/api/varsets/item/relationships/vars/item/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/allvars/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/configurationversions/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/providersets/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/queries/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/runs/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/runtriggers/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/vars/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/vars/item/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/varsets/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/varsets/item/relationships/vars/get_include_query_parameter_type.go create mode 100644 v2/api/workspaces/item/varsets/item/relationships/vars/item/get_include_query_parameter_type.go create mode 100644 v2/api/workspacetransfers/get_include_query_parameter_type.go diff --git a/v2/api/.kiota.log b/v2/api/.kiota.log index bbd8d40c3..41f34fbcc 100644 --- a/v2/api/.kiota.log +++ b/v2/api/.kiota.log @@ -1,7 +1,5 @@ -Warning: KiotaBuilder OpenAPI warning: #/ - A servers entry (v3) or host + basePath + schemes properties (v2) was not present in the OpenAPI description. The root URL will need to be set manually with the request adapter. Warning: KiotaBuilder OpenAPI warning: #/paths/~1organizations~1{organization_name}~1organization-memberships/get/parameters/3/schema - The format email is not supported by Kiota and the string type will be used. Warning: KiotaBuilder OpenAPI warning: #/components/schemas/admin-tfpolicy-version-architecture/properties/url - The format uri is not supported by Kiota and the string type will be used. Warning: KiotaBuilder OpenAPI warning: #/components/schemas/admin-tfpolicy-versions/properties/attributes/properties/url - The format uri is not supported by Kiota and the string type will be used. Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-memberships/properties/attributes/properties/email - The format email is not supported by Kiota and the string type will be used. -Warning: KiotaBuilder No server url found in the OpenAPI document. The base url will need to be set when using the client. Warning: KiotaBuilder Discriminator projects-identifier is not inherited from inheritedFromHasOne_data. diff --git a/v2/api/admin/tfpolicy_versions_request_builder.go b/v2/api/admin/tfpolicy_versions_request_builder.go index bddbacea9..52c03466e 100644 --- a/v2/api/admin/tfpolicy_versions_request_builder.go +++ b/v2/api/admin/tfpolicy_versions_request_builder.go @@ -14,7 +14,7 @@ import ( type TfpolicyVersionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// TfpolicyVersionsRequestBuilderGetQueryParameters lists the TFPolicy versions registered on this installation. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// TfpolicyVersionsRequestBuilderGetQueryParameters lists the TFPolicy versions registered on this installation. Requires administrator access.This operation is only available in Terraform Enterprise version 2.1.0 or later. type TfpolicyVersionsRequestBuilderGetQueryParameters struct { // Return only the specified fields for tfpolicy-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldstfpolicyVersions []string "uriparametername:\"fields%5Btfpolicy%2Dversions%5D\"" @@ -54,7 +54,7 @@ func NewTfpolicyVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewTfpolicyVersionsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the TFPolicy versions registered on this installation. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// Get lists the TFPolicy versions registered on this installation. Requires administrator access.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a AdminTfpolicyVersionsCollectionEnvelopeable when successful // returns a Errors error when the service returns a 400 status code // returns a Errors error when the service returns a 4XX or 5XX status code @@ -76,7 +76,7 @@ func (m *TfpolicyVersionsRequestBuilder) Get(ctx context.Context, requestConfigu } return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsCollectionEnvelopeable), nil } -// Post registers a new TFPolicy version. Requires administrator access. Provide at least one entry in `archs`, or both top-level `url` and `sha` fields. We recommend using `archs` to specify binary URLs and SHA-256 checksums. If both forms are given and include a linux/amd64 architecture, their `url`/`sha` values must match exactly or the request returns 422 Unprocessable Content. Omitting both `archs` and `url`/`sha` returns 400 Bad Request.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// Post registers a new TFPolicy version. Requires administrator access. Provide at least one entry in `archs`, or both top-level `url` and `sha` fields. We recommend using `archs` to specify binary URLs and SHA-256 checksums. If both forms are given and include a linux/amd64 architecture, their `url`/`sha` values must match exactly or the request returns 422 Unprocessable Content. Omitting both `archs` and `url`/`sha` returns 400 Bad Request.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a AdminTfpolicyVersionsEnvelopeable when successful // returns a Errors error when the service returns a 400 status code // returns a Errors error when the service returns a 422 status code @@ -100,7 +100,7 @@ func (m *TfpolicyVersionsRequestBuilder) Post(ctx context.Context, body i05d5aa6 } return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable), nil } -// ToGetRequestInformation lists the TFPolicy versions registered on this installation. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// ToGetRequestInformation lists the TFPolicy versions registered on this installation. Requires administrator access.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a *RequestInformation when successful func (m *TfpolicyVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TfpolicyVersionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -108,7 +108,7 @@ func (m *TfpolicyVersionsRequestBuilder) ToGetRequestInformation(ctx context.Con requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") return requestInfo, nil } -// ToPostRequestInformation registers a new TFPolicy version. Requires administrator access. Provide at least one entry in `archs`, or both top-level `url` and `sha` fields. We recommend using `archs` to specify binary URLs and SHA-256 checksums. If both forms are given and include a linux/amd64 architecture, their `url`/`sha` values must match exactly or the request returns 422 Unprocessable Content. Omitting both `archs` and `url`/`sha` returns 400 Bad Request.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// ToPostRequestInformation registers a new TFPolicy version. Requires administrator access. Provide at least one entry in `archs`, or both top-level `url` and `sha` fields. We recommend using `archs` to specify binary URLs and SHA-256 checksums. If both forms are given and include a linux/amd64 architecture, their `url`/`sha` values must match exactly or the request returns 422 Unprocessable Content. Omitting both `archs` and `url`/`sha` returns 400 Bad Request.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a *RequestInformation when successful func (m *TfpolicyVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionCreateEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/v2/api/admin/tfpolicy_versions_tfpolicy_versions_item_request_builder.go b/v2/api/admin/tfpolicy_versions_tfpolicy_versions_item_request_builder.go index a044a8f56..690b1a6cb 100644 --- a/v2/api/admin/tfpolicy_versions_tfpolicy_versions_item_request_builder.go +++ b/v2/api/admin/tfpolicy_versions_tfpolicy_versions_item_request_builder.go @@ -13,7 +13,7 @@ import ( type TfpolicyVersionsTfpolicyVersionsItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// TfpolicyVersionsTfpolicyVersionsItemRequestBuilderGetQueryParameters returns a single TFPolicy version by its external ID. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// TfpolicyVersionsTfpolicyVersionsItemRequestBuilderGetQueryParameters returns a single TFPolicy version by its external ID. Requires administrator access.This operation is only available in Terraform Enterprise version 2.1.0 or later. type TfpolicyVersionsTfpolicyVersionsItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for tfpolicy-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldstfpolicyVersions []string "uriparametername:\"fields%5Btfpolicy%2Dversions%5D\"" @@ -31,7 +31,7 @@ func NewTfpolicyVersionsTfpolicyVersionsItemRequestBuilder(rawUrl string, reques urlParams["request-raw-url"] = rawUrl return NewTfpolicyVersionsTfpolicyVersionsItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes a TFPolicy version. Official or in-use versions cannot be destroyed. Requires administrator access. Returns 204 No Content on success.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// Delete deletes a TFPolicy version. Official or in-use versions cannot be destroyed. Requires administrator access. Returns 204 No Content on success.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { @@ -49,7 +49,7 @@ func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) Delete(ctx context. } return nil } -// Get returns a single TFPolicy version by its external ID. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// Get returns a single TFPolicy version by its external ID. Requires administrator access.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a AdminTfpolicyVersionsEnvelopeable when successful // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code @@ -71,7 +71,7 @@ func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) Get(ctx context.Con } return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable), nil } -// Patch partially updates an existing TFPolicy version. Only attributes present in the request body are modified. Requires administrator access. Setting `enabled` to `false` while the version is in use returns 409 Conflict. Providing `archs` as an empty array returns 422 Unprocessable Content, since a TFPolicy version must always have at least one architecture; omitting `archs` leaves existing architectures unchanged.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// Patch partially updates an existing TFPolicy version. Only attributes present in the request body are modified. Requires administrator access. Setting `enabled` to `false` while the version is in use returns 409 Conflict. Providing `archs` as an empty array returns 422 Unprocessable Content, since a TFPolicy version must always have at least one architecture; omitting `archs` leaves existing architectures unchanged.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a AdminTfpolicyVersionsEnvelopeable when successful // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 409 status code @@ -97,7 +97,7 @@ func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) Patch(ctx context.C } return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable), nil } -// ToDeleteRequestInformation deletes a TFPolicy version. Official or in-use versions cannot be destroyed. Requires administrator access. Returns 204 No Content on success.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// ToDeleteRequestInformation deletes a TFPolicy version. Official or in-use versions cannot be destroyed. Requires administrator access. Returns 204 No Content on success.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a *RequestInformation when successful func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -105,7 +105,7 @@ func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) ToDeleteRequestInfo requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") return requestInfo, nil } -// ToGetRequestInformation returns a single TFPolicy version by its external ID. Requires administrator access.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// ToGetRequestInformation returns a single TFPolicy version by its external ID. Requires administrator access.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a *RequestInformation when successful func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TfpolicyVersionsTfpolicyVersionsItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -113,7 +113,7 @@ func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) ToGetRequestInforma requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") return requestInfo, nil } -// ToPatchRequestInformation partially updates an existing TFPolicy version. Only attributes present in the request body are modified. Requires administrator access. Setting `enabled` to `false` while the version is in use returns 409 Conflict. Providing `archs` as an empty array returns 422 Unprocessable Content, since a TFPolicy version must always have at least one architecture; omitting `archs` leaves existing architectures unchanged.This operation is only available in Terraform Enterprise.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// ToPatchRequestInformation partially updates an existing TFPolicy version. Only attributes present in the request body are modified. Requires administrator access. Setting `enabled` to `false` while the version is in use returns 409 Conflict. Providing `archs` as an empty array returns 422 Unprocessable Content, since a TFPolicy version must always have at least one architecture; omitting `archs` leaves existing architectures unchanged.This operation is only available in Terraform Enterprise version 2.1.0 or later. // returns a *RequestInformation when successful func (m *TfpolicyVersionsTfpolicyVersionsItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AdminTfpolicyVersionsEnvelopeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/v2/api/agentpools/item/get_include_query_parameter_type.go b/v2/api/agentpools/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..5a4432f43 --- /dev/null +++ b/v2/api/agentpools/item/get_include_query_parameter_type.go @@ -0,0 +1,75 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + OAUTH_CLIENTS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + HYOK_CONFIGURATIONS_GETINCLUDEQUERYPARAMETERTYPE + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + STACKS_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + ALLOWED_PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + ALLOWED_STACKS_GETINCLUDEQUERYPARAMETERTYPE + ALLOWED_WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + EXCLUDED_STACKS_GETINCLUDEQUERYPARAMETERTYPE + EXCLUDED_WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + MODULES_GETINCLUDEQUERYPARAMETERTYPE + ALLOWED_MODULES_GETINCLUDEQUERYPARAMETERTYPE + EXCLUDED_MODULES_GETINCLUDEQUERYPARAMETERTYPE + CIDR_RANGE_LISTS_GETINCLUDEQUERYPARAMETERTYPE + CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"oauth_clients", "hyok_configurations", "projects", "stacks", "workspaces", "allowed_projects", "allowed_stacks", "allowed_workspaces", "excluded_stacks", "excluded_workspaces", "modules", "allowed_modules", "excluded_modules", "cidr_range_lists", "cidr_ranges"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OAUTH_CLIENTS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "oauth_clients": + result = OAUTH_CLIENTS_GETINCLUDEQUERYPARAMETERTYPE + case "hyok_configurations": + result = HYOK_CONFIGURATIONS_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "stacks": + result = STACKS_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "allowed_projects": + result = ALLOWED_PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "allowed_stacks": + result = ALLOWED_STACKS_GETINCLUDEQUERYPARAMETERTYPE + case "allowed_workspaces": + result = ALLOWED_WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "excluded_stacks": + result = EXCLUDED_STACKS_GETINCLUDEQUERYPARAMETERTYPE + case "excluded_workspaces": + result = EXCLUDED_WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "modules": + result = MODULES_GETINCLUDEQUERYPARAMETERTYPE + case "allowed_modules": + result = ALLOWED_MODULES_GETINCLUDEQUERYPARAMETERTYPE + case "excluded_modules": + result = EXCLUDED_MODULES_GETINCLUDEQUERYPARAMETERTYPE + case "cidr_range_lists": + result = CIDR_RANGE_LISTS_GETINCLUDEQUERYPARAMETERTYPE + case "cidr_ranges": + result = CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/agentpools/with_agent_escaped_pool_escaped_item_request_builder.go b/v2/api/agentpools/with_agent_escaped_pool_escaped_item_request_builder.go index c2bc44880..ba31fe0b3 100644 --- a/v2/api/agentpools/with_agent_escaped_pool_escaped_item_request_builder.go +++ b/v2/api/agentpools/with_agent_escaped_pool_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ic137be8a5e75ec616f0b09953984e7eba8a829ecdb0b3c53d02faf36cb79a913 "github.com/hashicorp/go-tfe/v2/api/agentpools/item" ) // WithAgent_pool_ItemRequestBuilder builds and executes requests for operations under \agent-pools\{agent_pool_id} @@ -17,6 +18,8 @@ type WithAgent_pool_ItemRequestBuilder struct { type WithAgent_pool_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for agent-pools resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsagentPools []string "uriparametername:\"fields%5Bagent%2Dpools%5D\"" + // Optionally side-load the specified relationships. + Include []ic137be8a5e75ec616f0b09953984e7eba8a829ecdb0b3c53d02faf36cb79a913.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Agents the agents property // returns a *ItemAgentsRequestBuilder when successful @@ -31,7 +34,7 @@ func (m *WithAgent_pool_ItemRequestBuilder) AuthenticationTokens()(*ItemAuthenti // NewWithAgent_pool_ItemRequestBuilderInternal instantiates a new WithAgent_pool_ItemRequestBuilder and sets the default values. func NewWithAgent_pool_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithAgent_pool_ItemRequestBuilder) { m := &WithAgent_pool_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/agent-pools/{agent_pool_id}{?fields%5Bagent%2Dpools%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/agent-pools/{agent_pool_id}{?fields%5Bagent%2Dpools%5D,include}", pathParameters), } return m } diff --git a/v2/api/api_client.go b/v2/api/api_client.go index 4e27ed7a0..ad02ddbca 100644 --- a/v2/api/api_client.go +++ b/v2/api/api_client.go @@ -60,6 +60,7 @@ import ( ibf7fd1fa2ca0bf7fb12935559937de9677520241442b7cdbac8246a8cd14147d "github.com/hashicorp/go-tfe/v2/api/plans" ic7d637b0cea32015f6fe8fdda69f69b83f2bfb9c9db69ebd650f42d7037fccf7 "github.com/hashicorp/go-tfe/v2/api/projects" icb14f7803522f70670dfb51a8f10d6fe7cf82358c4fcfbd434ce7b83bc7fa67f "github.com/hashicorp/go-tfe/v2/api/emailrecipientstatuses" + icb6dd076d83cbc04bd2b9b36bb31809cf9d30789d2cb530a59a6a0363b7d4aa9 "github.com/hashicorp/go-tfe/v2/api/stackpolicyevaluations" icbcddf85972cc20a622a9d6c94202891e7df60ee16895ccd937c26fe9c9bc6c7 "github.com/hashicorp/go-tfe/v2/api/stackdeploymentruns" ice175c2bc5dca7fd242eaf5d94389218212237a00a32175e232d6873e8576627 "github.com/hashicorp/go-tfe/v2/api/oauthtokens" id37f321ec9d929c628c7d6b68b52c0895a210904bdfe553054b3b8144f73ba73 "github.com/hashicorp/go-tfe/v2/api/assessmentresults" @@ -169,6 +170,10 @@ func NewApiClient(requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa52901 i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i25911dc319edd61cbac496af7eab5ef20b6069a42515e22ec6a9bc97bf598488.NewJsonParseNodeFactory() }) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i7294a22093d408fdca300f11b81a887d89c47b764af06c8b803e2323973fdb83.NewTextParseNodeFactory() }) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i4bcdc892e61ac17e2afc10b5e2b536b29f4fd6c1ad30f4a5a68df47495db3347.NewFormParseNodeFactory() }) + if m.BaseRequestBuilder.RequestAdapter.GetBaseUrl() == "" { + m.BaseRequestBuilder.RequestAdapter.SetBaseUrl("https://app.terraform.io") + } + m.BaseRequestBuilder.PathParameters["baseurl"] = m.BaseRequestBuilder.RequestAdapter.GetBaseUrl() return m } // CostEstimates the costEstimates property @@ -361,6 +366,11 @@ func (m *ApiClient) StackDeploymentSteps()(*i6f30b1c546be9fdd86fa13ffd486beba48d func (m *ApiClient) StackDiagnostics()(*i463ffeb54eeae51cb0c3aeff51adc1e34e91b5ef2ed5d2a48191f6e34ce6ffb8.StackDiagnosticsRequestBuilder) { return i463ffeb54eeae51cb0c3aeff51adc1e34e91b5ef2ed5d2a48191f6e34ce6ffb8.NewStackDiagnosticsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// StackPolicyEvaluations the stackPolicyEvaluations property +// returns a *StackPolicyEvaluationsRequestBuilder when successful +func (m *ApiClient) StackPolicyEvaluations()(*icb6dd076d83cbc04bd2b9b36bb31809cf9d30789d2cb530a59a6a0363b7d4aa9.StackPolicyEvaluationsRequestBuilder) { + return icb6dd076d83cbc04bd2b9b36bb31809cf9d30789d2cb530a59a6a0363b7d4aa9.NewStackPolicyEvaluationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Stacks the stacks property // returns a *StacksRequestBuilder when successful func (m *ApiClient) Stacks()(*iea5097442934a1157207be9849ca51a8424fd810c26b13a889ff3d2e03b1c666.StacksRequestBuilder) { diff --git a/v2/api/authenticationtokens/authentication_tokens_item_request_builder.go b/v2/api/authenticationtokens/authentication_tokens_item_request_builder.go index 617d81c17..17a7a3462 100644 --- a/v2/api/authenticationtokens/authentication_tokens_item_request_builder.go +++ b/v2/api/authenticationtokens/authentication_tokens_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ic2a2d04c3c75910a8e47e22dd5413145827191627e495a2871d674304e5aa9d7 "github.com/hashicorp/go-tfe/v2/api/authenticationtokens/item" ) // AuthenticationTokensItemRequestBuilder builds and executes requests for operations under \authentication-tokens\{id} @@ -17,11 +18,13 @@ type AuthenticationTokensItemRequestBuilder struct { type AuthenticationTokensItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for authentication-tokens resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsauthenticationTokens []string "uriparametername:\"fields%5Bauthentication%2Dtokens%5D\"" + // Optionally side-load the specified relationships. + Include []ic2a2d04c3c75910a8e47e22dd5413145827191627e495a2871d674304e5aa9d7.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewAuthenticationTokensItemRequestBuilderInternal instantiates a new AuthenticationTokensItemRequestBuilder and sets the default values. func NewAuthenticationTokensItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AuthenticationTokensItemRequestBuilder) { m := &AuthenticationTokensItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/authentication-tokens/{id}{?fields%5Bauthentication%2Dtokens%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/authentication-tokens/{id}{?fields%5Bauthentication%2Dtokens%5D,include}", pathParameters), } return m } diff --git a/v2/api/authenticationtokens/item/get_include_query_parameter_type.go b/v2/api/authenticationtokens/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..cc6c00bf5 --- /dev/null +++ b/v2/api/authenticationtokens/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + TEAM_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"team"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := TEAM_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "team": + result = TEAM_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/cidrrangelists/item/get_include_query_parameter_type.go b/v2/api/cidrrangelists/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..5b5e7aed7 --- /dev/null +++ b/v2/api/cidrrangelists/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + AGENT_POOLS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"cidr_ranges", "agent_pools"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "cidr_ranges": + result = CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE + case "agent_pools": + result = AGENT_POOLS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/cidrrangelists/with_cidr_escaped_range_escaped_list_escaped_item_request_builder.go b/v2/api/cidrrangelists/with_cidr_escaped_range_escaped_list_escaped_item_request_builder.go index 3e9a20540..ebc2493f6 100644 --- a/v2/api/cidrrangelists/with_cidr_escaped_range_escaped_list_escaped_item_request_builder.go +++ b/v2/api/cidrrangelists/with_cidr_escaped_range_escaped_list_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i37c93b1d1a78c9c03a992ad59d53bdf5bd9c0c17243c5d1c9b7384e7c6f430c2 "github.com/hashicorp/go-tfe/v2/api/cidrrangelists/item" ) // WithCidr_range_list_ItemRequestBuilder builds and executes requests for operations under \cidr-range-lists\{cidr_range_list_id} @@ -17,11 +18,13 @@ type WithCidr_range_list_ItemRequestBuilder struct { type WithCidr_range_list_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for cidr-range-lists resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldscidrRangeLists []string "uriparametername:\"fields%5Bcidr%2Drange%2Dlists%5D\"" + // Optionally side-load the specified relationships. + Include []i37c93b1d1a78c9c03a992ad59d53bdf5bd9c0c17243c5d1c9b7384e7c6f430c2.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithCidr_range_list_ItemRequestBuilderInternal instantiates a new WithCidr_range_list_ItemRequestBuilder and sets the default values. func NewWithCidr_range_list_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithCidr_range_list_ItemRequestBuilder) { m := &WithCidr_range_list_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/cidr-range-lists/{cidr_range_list_id}{?fields%5Bcidr%2Drange%2Dlists%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/cidr-range-lists/{cidr_range_list_id}{?fields%5Bcidr%2Drange%2Dlists%5D,include}", pathParameters), } return m } diff --git a/v2/api/configurationversions/item/get_include_query_parameter_type.go b/v2/api/configurationversions/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..1b5969f1a --- /dev/null +++ b/v2/api/configurationversions/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + INGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"ingress_attributes"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := INGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "ingress_attributes": + result = INGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/configurationversions/with_configuration_escaped_version_escaped_item_request_builder.go b/v2/api/configurationversions/with_configuration_escaped_version_escaped_item_request_builder.go index a8be3f9bd..bac9610c0 100644 --- a/v2/api/configurationversions/with_configuration_escaped_version_escaped_item_request_builder.go +++ b/v2/api/configurationversions/with_configuration_escaped_version_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i0af5ebbd7f197414b605ccdac2cd192ac7075f72a1cd47006c23b0bd5388b7a2 "github.com/hashicorp/go-tfe/v2/api/configurationversions/item" ) // WithConfiguration_version_ItemRequestBuilder builds and executes requests for operations under \configuration-versions\{configuration_version_id} @@ -17,6 +18,8 @@ type WithConfiguration_version_ItemRequestBuilder struct { type WithConfiguration_version_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for configuration-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsconfigurationVersions []string "uriparametername:\"fields%5Bconfiguration%2Dversions%5D\"" + // Optionally side-load the specified relationships. + Include []i0af5ebbd7f197414b605ccdac2cd192ac7075f72a1cd47006c23b0bd5388b7a2.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property // returns a *ItemActionsRequestBuilder when successful @@ -26,7 +29,7 @@ func (m *WithConfiguration_version_ItemRequestBuilder) Actions()(*ItemActionsReq // NewWithConfiguration_version_ItemRequestBuilderInternal instantiates a new WithConfiguration_version_ItemRequestBuilder and sets the default values. func NewWithConfiguration_version_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithConfiguration_version_ItemRequestBuilder) { m := &WithConfiguration_version_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/configuration-versions/{configuration_version_id}{?fields%5Bconfiguration%2Dversions%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/configuration-versions/{configuration_version_id}{?fields%5Bconfiguration%2Dversions%5D,include}", pathParameters), } return m } diff --git a/v2/api/hyokconfigurations/item/get_include_query_parameter_type.go b/v2/api/hyokconfigurations/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..eb54a344e --- /dev/null +++ b/v2/api/hyokconfigurations/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + HYOK_CUSTOMER_KEY_VERSIONS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OIDC_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"hyok_customer_key_versions", "oidc_configuration"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := HYOK_CUSTOMER_KEY_VERSIONS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "hyok_customer_key_versions": + result = HYOK_CUSTOMER_KEY_VERSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "oidc_configuration": + result = OIDC_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/hyokconfigurations/with_hyok_escaped_configuration_escaped_item_request_builder.go b/v2/api/hyokconfigurations/with_hyok_escaped_configuration_escaped_item_request_builder.go index bc614a689..e626cd063 100644 --- a/v2/api/hyokconfigurations/with_hyok_escaped_configuration_escaped_item_request_builder.go +++ b/v2/api/hyokconfigurations/with_hyok_escaped_configuration_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i4aee24525e266de214f653c27191a780652208ec30ae4820f9f4abfd16b13d88 "github.com/hashicorp/go-tfe/v2/api/hyokconfigurations/item" ) // WithHyok_configuration_ItemRequestBuilder builds and executes requests for operations under \hyok-configurations\{hyok_configuration_id} @@ -17,6 +18,8 @@ type WithHyok_configuration_ItemRequestBuilder struct { type WithHyok_configuration_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for hyok-configurations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldshyokConfigurations []string "uriparametername:\"fields%5Bhyok%2Dconfigurations%5D\"" + // Optionally side-load the specified relationships. + Include []i4aee24525e266de214f653c27191a780652208ec30ae4820f9f4abfd16b13d88.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property // returns a *ItemActionsRequestBuilder when successful @@ -26,7 +29,7 @@ func (m *WithHyok_configuration_ItemRequestBuilder) Actions()(*ItemActionsReques // NewWithHyok_configuration_ItemRequestBuilderInternal instantiates a new WithHyok_configuration_ItemRequestBuilder and sets the default values. func NewWithHyok_configuration_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithHyok_configuration_ItemRequestBuilder) { m := &WithHyok_configuration_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/hyok-configurations/{hyok_configuration_id}{?fields%5Bhyok%2Dconfigurations%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/hyok-configurations/{hyok_configuration_id}{?fields%5Bhyok%2Dconfigurations%5D,include}", pathParameters), } return m } diff --git a/v2/api/kiota-lock.json b/v2/api/kiota-lock.json index ed51fa91c..409c62b82 100644 --- a/v2/api/kiota-lock.json +++ b/v2/api/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "3CC4431AFB8321140A2F082D1840DF80BB058342ED50B6AB5788791282501FE9291A205681A1A146426F77AB2C1551048BA7310A3E7CE2CAA06677B279537ECD", + "descriptionHash": "66B55ECF9AA57CD25D739CF951A71377E797BAC17AFCBEC29CF9003E50529D58AACAF30CDCAE3A740C943B7A1A630CDF8035A2ABB5A018C1F71031450BD2BDEA", "descriptionLocation": "../openapi/spec.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.31.1", diff --git a/v2/api/models/agent_pools_envelope.go b/v2/api/models/agent_pools_envelope.go index 135692ed2..369ef3312 100644 --- a/v2/api/models/agent_pools_envelope.go +++ b/v2/api/models/agent_pools_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,233 @@ type AgentPoolsEnvelope struct { additionalData map[string]any // The data property data AgentPoolsable + // The included property + included []AgentPoolsEnvelope_AgentPoolsEnvelope_includedable +} +// AgentPoolsEnvelope_AgentPoolsEnvelope_included composed type wrapper for classes CidrRangeListsable, CidrRangesable, HyokConfigurationsable, OauthClientsable, Projectsable, RegistryModulesable, Stacksable, Workspacesable +type AgentPoolsEnvelope_AgentPoolsEnvelope_included struct { + // Composed type representation for type CidrRangeListsable + cidrRangeLists CidrRangeListsable + // Composed type representation for type CidrRangesable + cidrRanges CidrRangesable + // Composed type representation for type HyokConfigurationsable + hyokConfigurations HyokConfigurationsable + // Composed type representation for type OauthClientsable + oauthClients OauthClientsable + // Composed type representation for type Projectsable + projects Projectsable + // Composed type representation for type RegistryModulesable + registryModules RegistryModulesable + // Composed type representation for type Stacksable + stacks Stacksable + // Composed type representation for type Workspacesable + workspaces Workspacesable +} +// NewAgentPoolsEnvelope_AgentPoolsEnvelope_included instantiates a new AgentPoolsEnvelope_AgentPoolsEnvelope_included and sets the default values. +func NewAgentPoolsEnvelope_AgentPoolsEnvelope_included()(*AgentPoolsEnvelope_AgentPoolsEnvelope_included) { + m := &AgentPoolsEnvelope_AgentPoolsEnvelope_included{ + } + return m +} +// CreateAgentPoolsEnvelope_AgentPoolsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAgentPoolsEnvelope_AgentPoolsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewAgentPoolsEnvelope_AgentPoolsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cidr-range-lists") { + result.SetCidrRangeLists(NewCidrRangeLists()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cidr-ranges") { + result.SetCidrRanges(NewCidrRanges()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "hyok-configurations") { + result.SetHyokConfigurations(NewHyokConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "oauth-clients") { + result.SetOauthClients(NewOauthClients()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "registry-modules") { + result.SetRegistryModules(NewRegistryModules()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(NewStacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetCidrRangeLists gets the cidrRangeLists property value. Composed type representation for type CidrRangeListsable +// returns a CidrRangeListsable when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetCidrRangeLists()(CidrRangeListsable) { + return m.cidrRangeLists +} +// GetCidrRanges gets the cidrRanges property value. Composed type representation for type CidrRangesable +// returns a CidrRangesable when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetCidrRanges()(CidrRangesable) { + return m.cidrRanges +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetCidrRangeLists() != nil { + return m.GetCidrRangeLists().GetFieldDeserializers() + } else if m.GetCidrRanges() != nil { + return m.GetCidrRanges().GetFieldDeserializers() + } else if m.GetHyokConfigurations() != nil { + return m.GetHyokConfigurations().GetFieldDeserializers() + } else if m.GetOauthClients() != nil { + return m.GetOauthClients().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetRegistryModules() != nil { + return m.GetRegistryModules().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetHyokConfigurations gets the hyokConfigurations property value. Composed type representation for type HyokConfigurationsable +// returns a HyokConfigurationsable when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetHyokConfigurations()(HyokConfigurationsable) { + return m.hyokConfigurations +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOauthClients gets the oauthClients property value. Composed type representation for type OauthClientsable +// returns a OauthClientsable when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetOauthClients()(OauthClientsable) { + return m.oauthClients +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// GetRegistryModules gets the registryModules property value. Composed type representation for type RegistryModulesable +// returns a RegistryModulesable when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetRegistryModules()(RegistryModulesable) { + return m.registryModules +} +// GetStacks gets the stacks property value. Composed type representation for type Stacksable +// returns a Stacksable when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetStacks()(Stacksable) { + return m.stacks +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type Workspacesable +// returns a Workspacesable when successful +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) GetWorkspaces()(Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCidrRangeLists() != nil { + err := writer.WriteObjectValue("", m.GetCidrRangeLists()) + if err != nil { + return err + } + } else if m.GetCidrRanges() != nil { + err := writer.WriteObjectValue("", m.GetCidrRanges()) + if err != nil { + return err + } + } else if m.GetHyokConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetHyokConfigurations()) + if err != nil { + return err + } + } else if m.GetOauthClients() != nil { + err := writer.WriteObjectValue("", m.GetOauthClients()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetRegistryModules() != nil { + err := writer.WriteObjectValue("", m.GetRegistryModules()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetCidrRangeLists sets the cidrRangeLists property value. Composed type representation for type CidrRangeListsable +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) SetCidrRangeLists(value CidrRangeListsable)() { + m.cidrRangeLists = value +} +// SetCidrRanges sets the cidrRanges property value. Composed type representation for type CidrRangesable +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) SetCidrRanges(value CidrRangesable)() { + m.cidrRanges = value +} +// SetHyokConfigurations sets the hyokConfigurations property value. Composed type representation for type HyokConfigurationsable +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) SetHyokConfigurations(value HyokConfigurationsable)() { + m.hyokConfigurations = value +} +// SetOauthClients sets the oauthClients property value. Composed type representation for type OauthClientsable +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) SetOauthClients(value OauthClientsable)() { + m.oauthClients = value +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +// SetRegistryModules sets the registryModules property value. Composed type representation for type RegistryModulesable +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) SetRegistryModules(value RegistryModulesable)() { + m.registryModules = value +} +// SetStacks sets the stacks property value. Composed type representation for type Stacksable +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) SetStacks(value Stacksable)() { + m.stacks = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type Workspacesable +func (m *AgentPoolsEnvelope_AgentPoolsEnvelope_included) SetWorkspaces(value Workspacesable)() { + m.workspaces = value +} +type AgentPoolsEnvelope_AgentPoolsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCidrRangeLists()(CidrRangeListsable) + GetCidrRanges()(CidrRangesable) + GetHyokConfigurations()(HyokConfigurationsable) + GetOauthClients()(OauthClientsable) + GetProjects()(Projectsable) + GetRegistryModules()(RegistryModulesable) + GetStacks()(Stacksable) + GetWorkspaces()(Workspacesable) + SetCidrRangeLists(value CidrRangeListsable)() + SetCidrRanges(value CidrRangesable)() + SetHyokConfigurations(value HyokConfigurationsable)() + SetOauthClients(value OauthClientsable)() + SetProjects(value Projectsable)() + SetRegistryModules(value RegistryModulesable)() + SetStacks(value Stacksable)() + SetWorkspaces(value Workspacesable)() } // NewAgentPoolsEnvelope instantiates a new AgentPoolsEnvelope and sets the default values. func NewAgentPoolsEnvelope()(*AgentPoolsEnvelope) { @@ -49,8 +277,29 @@ func (m *AgentPoolsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgentPoolsEnvelope_AgentPoolsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgentPoolsEnvelope_AgentPoolsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AgentPoolsEnvelope_AgentPoolsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []AgentPoolsEnvelope_AgentPoolsEnvelope_includedable when successful +func (m *AgentPoolsEnvelope) GetIncluded()([]AgentPoolsEnvelope_AgentPoolsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *AgentPoolsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +308,18 @@ func (m *AgentPoolsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +336,15 @@ func (m *AgentPoolsEnvelope) SetAdditionalData(value map[string]any)() { func (m *AgentPoolsEnvelope) SetData(value AgentPoolsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *AgentPoolsEnvelope) SetIncluded(value []AgentPoolsEnvelope_AgentPoolsEnvelope_includedable)() { + m.included = value +} type AgentPoolsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(AgentPoolsable) + GetIncluded()([]AgentPoolsEnvelope_AgentPoolsEnvelope_includedable) SetData(value AgentPoolsable)() + SetIncluded(value []AgentPoolsEnvelope_AgentPoolsEnvelope_includedable)() } diff --git a/v2/api/models/authentication_tokens_envelope.go b/v2/api/models/authentication_tokens_envelope.go index efb293e70..a896767aa 100644 --- a/v2/api/models/authentication_tokens_envelope.go +++ b/v2/api/models/authentication_tokens_envelope.go @@ -12,6 +12,8 @@ type AuthenticationTokensEnvelope struct { additionalData map[string]any // The data property data AuthenticationTokensable + // The included property + included []Teamsable } // NewAuthenticationTokensEnvelope instantiates a new AuthenticationTokensEnvelope and sets the default values. func NewAuthenticationTokensEnvelope()(*AuthenticationTokensEnvelope) { @@ -49,8 +51,29 @@ func (m *AuthenticationTokensEnvelope) GetFieldDeserializers()(map[string]func(i } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []Teamsable when successful +func (m *AuthenticationTokensEnvelope) GetIncluded()([]Teamsable) { + return m.included +} // Serialize serializes information the current object func (m *AuthenticationTokensEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *AuthenticationTokensEnvelope) Serialize(writer i878a80d2330e89d26896388 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *AuthenticationTokensEnvelope) SetAdditionalData(value map[string]any)() func (m *AuthenticationTokensEnvelope) SetData(value AuthenticationTokensable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *AuthenticationTokensEnvelope) SetIncluded(value []Teamsable)() { + m.included = value +} type AuthenticationTokensEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(AuthenticationTokensable) + GetIncluded()([]Teamsable) SetData(value AuthenticationTokensable)() + SetIncluded(value []Teamsable)() } diff --git a/v2/api/models/cidr_range_list_envelope.go b/v2/api/models/cidr_range_list_envelope.go index 540e6fd3d..8c7d1ac95 100644 --- a/v2/api/models/cidr_range_list_envelope.go +++ b/v2/api/models/cidr_range_list_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,101 @@ type CidrRangeListEnvelope struct { additionalData map[string]any // The data property data CidrRangeListsable + // The included property + included []CidrRangeListEnvelope_CidrRangeListEnvelope_includedable +} +// CidrRangeListEnvelope_CidrRangeListEnvelope_included composed type wrapper for classes AgentPoolsable, CidrRangesable +type CidrRangeListEnvelope_CidrRangeListEnvelope_included struct { + // Composed type representation for type AgentPoolsable + agentPools AgentPoolsable + // Composed type representation for type CidrRangesable + cidrRanges CidrRangesable +} +// NewCidrRangeListEnvelope_CidrRangeListEnvelope_included instantiates a new CidrRangeListEnvelope_CidrRangeListEnvelope_included and sets the default values. +func NewCidrRangeListEnvelope_CidrRangeListEnvelope_included()(*CidrRangeListEnvelope_CidrRangeListEnvelope_included) { + m := &CidrRangeListEnvelope_CidrRangeListEnvelope_included{ + } + return m +} +// CreateCidrRangeListEnvelope_CidrRangeListEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCidrRangeListEnvelope_CidrRangeListEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCidrRangeListEnvelope_CidrRangeListEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cidr-ranges") { + result.SetCidrRanges(NewCidrRanges()) + } + } + } + } + return result, nil +} +// GetAgentPools gets the agentPools property value. Composed type representation for type AgentPoolsable +// returns a AgentPoolsable when successful +func (m *CidrRangeListEnvelope_CidrRangeListEnvelope_included) GetAgentPools()(AgentPoolsable) { + return m.agentPools +} +// GetCidrRanges gets the cidrRanges property value. Composed type representation for type CidrRangesable +// returns a CidrRangesable when successful +func (m *CidrRangeListEnvelope_CidrRangeListEnvelope_included) GetCidrRanges()(CidrRangesable) { + return m.cidrRanges +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CidrRangeListEnvelope_CidrRangeListEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetCidrRanges() != nil { + return m.GetCidrRanges().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *CidrRangeListEnvelope_CidrRangeListEnvelope_included) GetIsComposedType()(bool) { + return true +} +// Serialize serializes information the current object +func (m *CidrRangeListEnvelope_CidrRangeListEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetCidrRanges() != nil { + err := writer.WriteObjectValue("", m.GetCidrRanges()) + if err != nil { + return err + } + } + return nil +} +// SetAgentPools sets the agentPools property value. Composed type representation for type AgentPoolsable +func (m *CidrRangeListEnvelope_CidrRangeListEnvelope_included) SetAgentPools(value AgentPoolsable)() { + m.agentPools = value +} +// SetCidrRanges sets the cidrRanges property value. Composed type representation for type CidrRangesable +func (m *CidrRangeListEnvelope_CidrRangeListEnvelope_included) SetCidrRanges(value CidrRangesable)() { + m.cidrRanges = value +} +type CidrRangeListEnvelope_CidrRangeListEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools()(AgentPoolsable) + GetCidrRanges()(CidrRangesable) + SetAgentPools(value AgentPoolsable)() + SetCidrRanges(value CidrRangesable)() } // NewCidrRangeListEnvelope instantiates a new CidrRangeListEnvelope and sets the default values. func NewCidrRangeListEnvelope()(*CidrRangeListEnvelope) { @@ -49,8 +145,29 @@ func (m *CidrRangeListEnvelope) GetFieldDeserializers()(map[string]func(i878a80d } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCidrRangeListEnvelope_CidrRangeListEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CidrRangeListEnvelope_CidrRangeListEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CidrRangeListEnvelope_CidrRangeListEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []CidrRangeListEnvelope_CidrRangeListEnvelope_includedable when successful +func (m *CidrRangeListEnvelope) GetIncluded()([]CidrRangeListEnvelope_CidrRangeListEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *CidrRangeListEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +176,18 @@ func (m *CidrRangeListEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487e return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +204,15 @@ func (m *CidrRangeListEnvelope) SetAdditionalData(value map[string]any)() { func (m *CidrRangeListEnvelope) SetData(value CidrRangeListsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *CidrRangeListEnvelope) SetIncluded(value []CidrRangeListEnvelope_CidrRangeListEnvelope_includedable)() { + m.included = value +} type CidrRangeListEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(CidrRangeListsable) + GetIncluded()([]CidrRangeListEnvelope_CidrRangeListEnvelope_includedable) SetData(value CidrRangeListsable)() + SetIncluded(value []CidrRangeListEnvelope_CidrRangeListEnvelope_includedable)() } diff --git a/v2/api/models/configuration_versions_envelope.go b/v2/api/models/configuration_versions_envelope.go index 471753f5d..7cb8b38fe 100644 --- a/v2/api/models/configuration_versions_envelope.go +++ b/v2/api/models/configuration_versions_envelope.go @@ -12,6 +12,8 @@ type ConfigurationVersionsEnvelope struct { additionalData map[string]any // The data property data ConfigurationVersionsable + // The included property + included []IngressAttributesable } // NewConfigurationVersionsEnvelope instantiates a new ConfigurationVersionsEnvelope and sets the default values. func NewConfigurationVersionsEnvelope()(*ConfigurationVersionsEnvelope) { @@ -49,8 +51,29 @@ func (m *ConfigurationVersionsEnvelope) GetFieldDeserializers()(map[string]func( } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIngressAttributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IngressAttributesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(IngressAttributesable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []IngressAttributesable when successful +func (m *ConfigurationVersionsEnvelope) GetIncluded()([]IngressAttributesable) { + return m.included +} // Serialize serializes information the current object func (m *ConfigurationVersionsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *ConfigurationVersionsEnvelope) Serialize(writer i878a80d2330e89d2689638 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *ConfigurationVersionsEnvelope) SetAdditionalData(value map[string]any)( func (m *ConfigurationVersionsEnvelope) SetData(value ConfigurationVersionsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ConfigurationVersionsEnvelope) SetIncluded(value []IngressAttributesable)() { + m.included = value +} type ConfigurationVersionsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(ConfigurationVersionsable) + GetIncluded()([]IngressAttributesable) SetData(value ConfigurationVersionsable)() + SetIncluded(value []IngressAttributesable)() } diff --git a/v2/api/models/current_state_version_envelope.go b/v2/api/models/current_state_version_envelope.go index 4bcbf0bd5..44470e03c 100644 --- a/v2/api/models/current_state_version_envelope.go +++ b/v2/api/models/current_state_version_envelope.go @@ -12,6 +12,8 @@ type CurrentStateVersionEnvelope struct { additionalData map[string]any // The data property data StateVersionsable + // The included property + included []StateVersionOutputsable } // NewCurrentStateVersionEnvelope instantiates a new CurrentStateVersionEnvelope and sets the default values. func NewCurrentStateVersionEnvelope()(*CurrentStateVersionEnvelope) { @@ -49,8 +51,29 @@ func (m *CurrentStateVersionEnvelope) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStateVersionOutputsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StateVersionOutputsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StateVersionOutputsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []StateVersionOutputsable when successful +func (m *CurrentStateVersionEnvelope) GetIncluded()([]StateVersionOutputsable) { + return m.included +} // Serialize serializes information the current object func (m *CurrentStateVersionEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *CurrentStateVersionEnvelope) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *CurrentStateVersionEnvelope) SetAdditionalData(value map[string]any)() func (m *CurrentStateVersionEnvelope) SetData(value StateVersionsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *CurrentStateVersionEnvelope) SetIncluded(value []StateVersionOutputsable)() { + m.included = value +} type CurrentStateVersionEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(StateVersionsable) + GetIncluded()([]StateVersionOutputsable) SetData(value StateVersionsable)() + SetIncluded(value []StateVersionOutputsable)() } diff --git a/v2/api/models/hyok_configurations_envelope.go b/v2/api/models/hyok_configurations_envelope.go index 840fed5a5..56dd7d707 100644 --- a/v2/api/models/hyok_configurations_envelope.go +++ b/v2/api/models/hyok_configurations_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,167 @@ type HyokConfigurationsEnvelope struct { additionalData map[string]any // The data property data HyokConfigurationsable + // The included property + included []HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedable +} +// HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included composed type wrapper for classes AwsOidcConfigurationsable, AzureOidcConfigurationsable, GcpOidcConfigurationsable, HyokCustomerKeyVersionsable, VaultOidcConfigurationsable +type HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included struct { + // Composed type representation for type AwsOidcConfigurationsable + awsOidcConfigurations AwsOidcConfigurationsable + // Composed type representation for type AzureOidcConfigurationsable + azureOidcConfigurations AzureOidcConfigurationsable + // Composed type representation for type GcpOidcConfigurationsable + gcpOidcConfigurations GcpOidcConfigurationsable + // Composed type representation for type HyokCustomerKeyVersionsable + hyokCustomerKeyVersions HyokCustomerKeyVersionsable + // Composed type representation for type VaultOidcConfigurationsable + vaultOidcConfigurations VaultOidcConfigurationsable +} +// NewHyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included instantiates a new HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included and sets the default values. +func NewHyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included()(*HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) { + m := &HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included{ + } + return m +} +// CreateHyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewHyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "aws-oidc-configurations") { + result.SetAwsOidcConfigurations(NewAwsOidcConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "azure-oidc-configurations") { + result.SetAzureOidcConfigurations(NewAzureOidcConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "gcp-oidc-configurations") { + result.SetGcpOidcConfigurations(NewGcpOidcConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "hyok-customer-key-versions") { + result.SetHyokCustomerKeyVersions(NewHyokCustomerKeyVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vault-oidc-configurations") { + result.SetVaultOidcConfigurations(NewVaultOidcConfigurations()) + } + } + } + } + return result, nil +} +// GetAwsOidcConfigurations gets the awsOidcConfigurations property value. Composed type representation for type AwsOidcConfigurationsable +// returns a AwsOidcConfigurationsable when successful +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) GetAwsOidcConfigurations()(AwsOidcConfigurationsable) { + return m.awsOidcConfigurations +} +// GetAzureOidcConfigurations gets the azureOidcConfigurations property value. Composed type representation for type AzureOidcConfigurationsable +// returns a AzureOidcConfigurationsable when successful +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) GetAzureOidcConfigurations()(AzureOidcConfigurationsable) { + return m.azureOidcConfigurations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAwsOidcConfigurations() != nil { + return m.GetAwsOidcConfigurations().GetFieldDeserializers() + } else if m.GetAzureOidcConfigurations() != nil { + return m.GetAzureOidcConfigurations().GetFieldDeserializers() + } else if m.GetGcpOidcConfigurations() != nil { + return m.GetGcpOidcConfigurations().GetFieldDeserializers() + } else if m.GetHyokCustomerKeyVersions() != nil { + return m.GetHyokCustomerKeyVersions().GetFieldDeserializers() + } else if m.GetVaultOidcConfigurations() != nil { + return m.GetVaultOidcConfigurations().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetGcpOidcConfigurations gets the gcpOidcConfigurations property value. Composed type representation for type GcpOidcConfigurationsable +// returns a GcpOidcConfigurationsable when successful +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) GetGcpOidcConfigurations()(GcpOidcConfigurationsable) { + return m.gcpOidcConfigurations +} +// GetHyokCustomerKeyVersions gets the hyokCustomerKeyVersions property value. Composed type representation for type HyokCustomerKeyVersionsable +// returns a HyokCustomerKeyVersionsable when successful +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) GetHyokCustomerKeyVersions()(HyokCustomerKeyVersionsable) { + return m.hyokCustomerKeyVersions +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetVaultOidcConfigurations gets the vaultOidcConfigurations property value. Composed type representation for type VaultOidcConfigurationsable +// returns a VaultOidcConfigurationsable when successful +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) GetVaultOidcConfigurations()(VaultOidcConfigurationsable) { + return m.vaultOidcConfigurations +} +// Serialize serializes information the current object +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAwsOidcConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetAwsOidcConfigurations()) + if err != nil { + return err + } + } else if m.GetAzureOidcConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetAzureOidcConfigurations()) + if err != nil { + return err + } + } else if m.GetGcpOidcConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetGcpOidcConfigurations()) + if err != nil { + return err + } + } else if m.GetHyokCustomerKeyVersions() != nil { + err := writer.WriteObjectValue("", m.GetHyokCustomerKeyVersions()) + if err != nil { + return err + } + } else if m.GetVaultOidcConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetVaultOidcConfigurations()) + if err != nil { + return err + } + } + return nil +} +// SetAwsOidcConfigurations sets the awsOidcConfigurations property value. Composed type representation for type AwsOidcConfigurationsable +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) SetAwsOidcConfigurations(value AwsOidcConfigurationsable)() { + m.awsOidcConfigurations = value +} +// SetAzureOidcConfigurations sets the azureOidcConfigurations property value. Composed type representation for type AzureOidcConfigurationsable +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) SetAzureOidcConfigurations(value AzureOidcConfigurationsable)() { + m.azureOidcConfigurations = value +} +// SetGcpOidcConfigurations sets the gcpOidcConfigurations property value. Composed type representation for type GcpOidcConfigurationsable +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) SetGcpOidcConfigurations(value GcpOidcConfigurationsable)() { + m.gcpOidcConfigurations = value +} +// SetHyokCustomerKeyVersions sets the hyokCustomerKeyVersions property value. Composed type representation for type HyokCustomerKeyVersionsable +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) SetHyokCustomerKeyVersions(value HyokCustomerKeyVersionsable)() { + m.hyokCustomerKeyVersions = value +} +// SetVaultOidcConfigurations sets the vaultOidcConfigurations property value. Composed type representation for type VaultOidcConfigurationsable +func (m *HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_included) SetVaultOidcConfigurations(value VaultOidcConfigurationsable)() { + m.vaultOidcConfigurations = value +} +type HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAwsOidcConfigurations()(AwsOidcConfigurationsable) + GetAzureOidcConfigurations()(AzureOidcConfigurationsable) + GetGcpOidcConfigurations()(GcpOidcConfigurationsable) + GetHyokCustomerKeyVersions()(HyokCustomerKeyVersionsable) + GetVaultOidcConfigurations()(VaultOidcConfigurationsable) + SetAwsOidcConfigurations(value AwsOidcConfigurationsable)() + SetAzureOidcConfigurations(value AzureOidcConfigurationsable)() + SetGcpOidcConfigurations(value GcpOidcConfigurationsable)() + SetHyokCustomerKeyVersions(value HyokCustomerKeyVersionsable)() + SetVaultOidcConfigurations(value VaultOidcConfigurationsable)() } // NewHyokConfigurationsEnvelope instantiates a new HyokConfigurationsEnvelope and sets the default values. func NewHyokConfigurationsEnvelope()(*HyokConfigurationsEnvelope) { @@ -49,8 +211,29 @@ func (m *HyokConfigurationsEnvelope) GetFieldDeserializers()(map[string]func(i87 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedable when successful +func (m *HyokConfigurationsEnvelope) GetIncluded()([]HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *HyokConfigurationsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +242,18 @@ func (m *HyokConfigurationsEnvelope) Serialize(writer i878a80d2330e89d26896388a3 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +270,15 @@ func (m *HyokConfigurationsEnvelope) SetAdditionalData(value map[string]any)() { func (m *HyokConfigurationsEnvelope) SetData(value HyokConfigurationsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *HyokConfigurationsEnvelope) SetIncluded(value []HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedable)() { + m.included = value +} type HyokConfigurationsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(HyokConfigurationsable) + GetIncluded()([]HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedable) SetData(value HyokConfigurationsable)() + SetIncluded(value []HyokConfigurationsEnvelope_HyokConfigurationsEnvelope_includedable)() } diff --git a/v2/api/models/oauth_clients_envelope.go b/v2/api/models/oauth_clients_envelope.go index 9dcf08825..bc054b52b 100644 --- a/v2/api/models/oauth_clients_envelope.go +++ b/v2/api/models/oauth_clients_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,123 @@ type OauthClientsEnvelope struct { additionalData map[string]any // The data property data OauthClientsable + // The included property + included []OauthClientsEnvelope_OauthClientsEnvelope_includedable +} +// OauthClientsEnvelope_OauthClientsEnvelope_included composed type wrapper for classes AgentPoolsable, OauthTokensable, Projectsable +type OauthClientsEnvelope_OauthClientsEnvelope_included struct { + // Composed type representation for type AgentPoolsable + agentPools AgentPoolsable + // Composed type representation for type OauthTokensable + oauthTokens OauthTokensable + // Composed type representation for type Projectsable + projects Projectsable +} +// NewOauthClientsEnvelope_OauthClientsEnvelope_included instantiates a new OauthClientsEnvelope_OauthClientsEnvelope_included and sets the default values. +func NewOauthClientsEnvelope_OauthClientsEnvelope_included()(*OauthClientsEnvelope_OauthClientsEnvelope_included) { + m := &OauthClientsEnvelope_OauthClientsEnvelope_included{ + } + return m +} +// CreateOauthClientsEnvelope_OauthClientsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOauthClientsEnvelope_OauthClientsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewOauthClientsEnvelope_OauthClientsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "oauth-tokens") { + result.SetOauthTokens(NewOauthTokens()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } + } + } + } + return result, nil +} +// GetAgentPools gets the agentPools property value. Composed type representation for type AgentPoolsable +// returns a AgentPoolsable when successful +func (m *OauthClientsEnvelope_OauthClientsEnvelope_included) GetAgentPools()(AgentPoolsable) { + return m.agentPools +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OauthClientsEnvelope_OauthClientsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetOauthTokens() != nil { + return m.GetOauthTokens().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *OauthClientsEnvelope_OauthClientsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOauthTokens gets the oauthTokens property value. Composed type representation for type OauthTokensable +// returns a OauthTokensable when successful +func (m *OauthClientsEnvelope_OauthClientsEnvelope_included) GetOauthTokens()(OauthTokensable) { + return m.oauthTokens +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *OauthClientsEnvelope_OauthClientsEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// Serialize serializes information the current object +func (m *OauthClientsEnvelope_OauthClientsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetOauthTokens() != nil { + err := writer.WriteObjectValue("", m.GetOauthTokens()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } + return nil +} +// SetAgentPools sets the agentPools property value. Composed type representation for type AgentPoolsable +func (m *OauthClientsEnvelope_OauthClientsEnvelope_included) SetAgentPools(value AgentPoolsable)() { + m.agentPools = value +} +// SetOauthTokens sets the oauthTokens property value. Composed type representation for type OauthTokensable +func (m *OauthClientsEnvelope_OauthClientsEnvelope_included) SetOauthTokens(value OauthTokensable)() { + m.oauthTokens = value +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *OauthClientsEnvelope_OauthClientsEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +type OauthClientsEnvelope_OauthClientsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools()(AgentPoolsable) + GetOauthTokens()(OauthTokensable) + GetProjects()(Projectsable) + SetAgentPools(value AgentPoolsable)() + SetOauthTokens(value OauthTokensable)() + SetProjects(value Projectsable)() } // NewOauthClientsEnvelope instantiates a new OauthClientsEnvelope and sets the default values. func NewOauthClientsEnvelope()(*OauthClientsEnvelope) { @@ -49,8 +167,29 @@ func (m *OauthClientsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOauthClientsEnvelope_OauthClientsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OauthClientsEnvelope_OauthClientsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(OauthClientsEnvelope_OauthClientsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []OauthClientsEnvelope_OauthClientsEnvelope_includedable when successful +func (m *OauthClientsEnvelope) GetIncluded()([]OauthClientsEnvelope_OauthClientsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *OauthClientsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +198,18 @@ func (m *OauthClientsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487ee return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +226,15 @@ func (m *OauthClientsEnvelope) SetAdditionalData(value map[string]any)() { func (m *OauthClientsEnvelope) SetData(value OauthClientsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *OauthClientsEnvelope) SetIncluded(value []OauthClientsEnvelope_OauthClientsEnvelope_includedable)() { + m.included = value +} type OauthClientsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(OauthClientsable) + GetIncluded()([]OauthClientsEnvelope_OauthClientsEnvelope_includedable) SetData(value OauthClientsable)() + SetIncluded(value []OauthClientsEnvelope_OauthClientsEnvelope_includedable)() } diff --git a/v2/api/models/ootb_policy_libraries.go b/v2/api/models/ootb_policy_libraries.go new file mode 100644 index 000000000..546c17a64 --- /dev/null +++ b/v2/api/models/ootb_policy_libraries.go @@ -0,0 +1,143 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OotbPolicyLibraries a slim reference to an OOTB policy library, returned in the `included` array when ?include=ootb-policy-libraries is passed. Contains only the name attribute. +type OotbPolicyLibraries struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes OotbPolicyLibraries_attributesable + // The slug of the OOTB policy library. + id *string + // The type property + typeEscaped *OotbPolicyLibraries_type +} +// NewOotbPolicyLibraries instantiates a new OotbPolicyLibraries and sets the default values. +func NewOotbPolicyLibraries()(*OotbPolicyLibraries) { + m := &OotbPolicyLibraries{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPolicyLibrariesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPolicyLibrariesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicyLibraries(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicyLibraries) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a OotbPolicyLibraries_attributesable when successful +func (m *OotbPolicyLibraries) GetAttributes()(OotbPolicyLibraries_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicyLibraries) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOotbPolicyLibraries_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(OotbPolicyLibraries_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOotbPolicyLibraries_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*OotbPolicyLibraries_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The slug of the OOTB policy library. +// returns a *string when successful +func (m *OotbPolicyLibraries) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *OotbPolicyLibraries_type when successful +func (m *OotbPolicyLibraries) GetTypeEscaped()(*OotbPolicyLibraries_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *OotbPolicyLibraries) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicyLibraries) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *OotbPolicyLibraries) SetAttributes(value OotbPolicyLibraries_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The slug of the OOTB policy library. +func (m *OotbPolicyLibraries) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *OotbPolicyLibraries) SetTypeEscaped(value *OotbPolicyLibraries_type)() { + m.typeEscaped = value +} +type OotbPolicyLibrariesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(OotbPolicyLibraries_attributesable) + GetId()(*string) + GetTypeEscaped()(*OotbPolicyLibraries_type) + SetAttributes(value OotbPolicyLibraries_attributesable)() + SetId(value *string)() + SetTypeEscaped(value *OotbPolicyLibraries_type)() +} diff --git a/v2/api/models/ootb_policy_libraries_escaped_attributes.go b/v2/api/models/ootb_policy_libraries_escaped_attributes.go new file mode 100644 index 000000000..511179813 --- /dev/null +++ b/v2/api/models/ootb_policy_libraries_escaped_attributes.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OotbPolicyLibraries_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Human-readable library name. + name *string +} +// NewOotbPolicyLibraries_attributes instantiates a new OotbPolicyLibraries_attributes and sets the default values. +func NewOotbPolicyLibraries_attributes()(*OotbPolicyLibraries_attributes) { + m := &OotbPolicyLibraries_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOotbPolicyLibraries_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOotbPolicyLibraries_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOotbPolicyLibraries_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OotbPolicyLibraries_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OotbPolicyLibraries_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Human-readable library name. +// returns a *string when successful +func (m *OotbPolicyLibraries_attributes) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *OotbPolicyLibraries_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OotbPolicyLibraries_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. Human-readable library name. +func (m *OotbPolicyLibraries_attributes) SetName(value *string)() { + m.name = value +} +type OotbPolicyLibraries_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + SetName(value *string)() +} diff --git a/v2/api/models/ootb_policy_libraries_escaped_type.go b/v2/api/models/ootb_policy_libraries_escaped_type.go new file mode 100644 index 000000000..30a86633d --- /dev/null +++ b/v2/api/models/ootb_policy_libraries_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type OotbPolicyLibraries_type int + +const ( + OOTBPOLICYLIBRARIES_OOTBPOLICYLIBRARIES_TYPE OotbPolicyLibraries_type = iota +) + +func (i OotbPolicyLibraries_type) String() string { + return []string{"ootb-policy-libraries"}[i] +} +func ParseOotbPolicyLibraries_type(v string) (any, error) { + result := OOTBPOLICYLIBRARIES_OOTBPOLICYLIBRARIES_TYPE + switch v { + case "ootb-policy-libraries": + result = OOTBPOLICYLIBRARIES_OOTBPOLICYLIBRARIES_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeOotbPolicyLibraries_type(values []OotbPolicyLibraries_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OotbPolicyLibraries_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/organization_memberships_envelope.go b/v2/api/models/organization_memberships_envelope.go index 207e074ae..3a0b860ca 100644 --- a/v2/api/models/organization_memberships_envelope.go +++ b/v2/api/models/organization_memberships_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,123 @@ type OrganizationMembershipsEnvelope struct { additionalData map[string]any // The data property data OrganizationMembershipsable + // The included property + included []OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedable +} +// OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included composed type wrapper for classes Organizationsable, Teamsable, Usersable +type OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included struct { + // Composed type representation for type Organizationsable + organizations Organizationsable + // Composed type representation for type Teamsable + teams Teamsable + // Composed type representation for type Usersable + users Usersable +} +// NewOrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included instantiates a new OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included and sets the default values. +func NewOrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included()(*OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) { + m := &OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included{ + } + return m +} +// CreateOrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewOrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(NewOrganizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "teams") { + result.SetTeams(NewTeams()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(NewUsers()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetTeams() != nil { + return m.GetTeams().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOrganizations gets the organizations property value. Composed type representation for type Organizationsable +// returns a Organizationsable when successful +func (m *OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) GetOrganizations()(Organizationsable) { + return m.organizations +} +// GetTeams gets the teams property value. Composed type representation for type Teamsable +// returns a Teamsable when successful +func (m *OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) GetTeams()(Teamsable) { + return m.teams +} +// GetUsers gets the users property value. Composed type representation for type Usersable +// returns a Usersable when successful +func (m *OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) GetUsers()(Usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetTeams() != nil { + err := writer.WriteObjectValue("", m.GetTeams()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil +} +// SetOrganizations sets the organizations property value. Composed type representation for type Organizationsable +func (m *OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) SetOrganizations(value Organizationsable)() { + m.organizations = value +} +// SetTeams sets the teams property value. Composed type representation for type Teamsable +func (m *OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) SetTeams(value Teamsable)() { + m.teams = value +} +// SetUsers sets the users property value. Composed type representation for type Usersable +func (m *OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_included) SetUsers(value Usersable)() { + m.users = value +} +type OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizations()(Organizationsable) + GetTeams()(Teamsable) + GetUsers()(Usersable) + SetOrganizations(value Organizationsable)() + SetTeams(value Teamsable)() + SetUsers(value Usersable)() } // NewOrganizationMembershipsEnvelope instantiates a new OrganizationMembershipsEnvelope and sets the default values. func NewOrganizationMembershipsEnvelope()(*OrganizationMembershipsEnvelope) { @@ -49,8 +167,29 @@ func (m *OrganizationMembershipsEnvelope) GetFieldDeserializers()(map[string]fun } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedable when successful +func (m *OrganizationMembershipsEnvelope) GetIncluded()([]OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *OrganizationMembershipsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +198,18 @@ func (m *OrganizationMembershipsEnvelope) Serialize(writer i878a80d2330e89d26896 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +226,15 @@ func (m *OrganizationMembershipsEnvelope) SetAdditionalData(value map[string]any func (m *OrganizationMembershipsEnvelope) SetData(value OrganizationMembershipsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *OrganizationMembershipsEnvelope) SetIncluded(value []OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedable)() { + m.included = value +} type OrganizationMembershipsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(OrganizationMembershipsable) + GetIncluded()([]OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedable) SetData(value OrganizationMembershipsable)() + SetIncluded(value []OrganizationMembershipsEnvelope_OrganizationMembershipsEnvelope_includedable)() } diff --git a/v2/api/models/organizations_envelope.go b/v2/api/models/organizations_envelope.go index ff1046687..6edc572cf 100644 --- a/v2/api/models/organizations_envelope.go +++ b/v2/api/models/organizations_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,145 @@ type OrganizationsEnvelope struct { additionalData map[string]any // The data property data Organizationsable + // The included property + included []OrganizationsEnvelope_OrganizationsEnvelope_includedable +} +// OrganizationsEnvelope_OrganizationsEnvelope_included composed type wrapper for classes EntitlementSetsable, OnboardingTaskListsable, Projectsable, Subscriptionsable +type OrganizationsEnvelope_OrganizationsEnvelope_included struct { + // Composed type representation for type EntitlementSetsable + entitlementSets EntitlementSetsable + // Composed type representation for type OnboardingTaskListsable + onboardingTaskLists OnboardingTaskListsable + // Composed type representation for type Projectsable + projects Projectsable + // Composed type representation for type Subscriptionsable + subscriptions Subscriptionsable +} +// NewOrganizationsEnvelope_OrganizationsEnvelope_included instantiates a new OrganizationsEnvelope_OrganizationsEnvelope_included and sets the default values. +func NewOrganizationsEnvelope_OrganizationsEnvelope_included()(*OrganizationsEnvelope_OrganizationsEnvelope_included) { + m := &OrganizationsEnvelope_OrganizationsEnvelope_included{ + } + return m +} +// CreateOrganizationsEnvelope_OrganizationsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationsEnvelope_OrganizationsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewOrganizationsEnvelope_OrganizationsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "entitlement-sets") { + result.SetEntitlementSets(NewEntitlementSets()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "onboarding-task-lists") { + result.SetOnboardingTaskLists(NewOnboardingTaskLists()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "subscriptions") { + result.SetSubscriptions(NewSubscriptions()) + } + } + } + } + return result, nil +} +// GetEntitlementSets gets the entitlementSets property value. Composed type representation for type EntitlementSetsable +// returns a EntitlementSetsable when successful +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) GetEntitlementSets()(EntitlementSetsable) { + return m.entitlementSets +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetEntitlementSets() != nil { + return m.GetEntitlementSets().GetFieldDeserializers() + } else if m.GetOnboardingTaskLists() != nil { + return m.GetOnboardingTaskLists().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetSubscriptions() != nil { + return m.GetSubscriptions().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOnboardingTaskLists gets the onboardingTaskLists property value. Composed type representation for type OnboardingTaskListsable +// returns a OnboardingTaskListsable when successful +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) GetOnboardingTaskLists()(OnboardingTaskListsable) { + return m.onboardingTaskLists +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// GetSubscriptions gets the subscriptions property value. Composed type representation for type Subscriptionsable +// returns a Subscriptionsable when successful +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) GetSubscriptions()(Subscriptionsable) { + return m.subscriptions +} +// Serialize serializes information the current object +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEntitlementSets() != nil { + err := writer.WriteObjectValue("", m.GetEntitlementSets()) + if err != nil { + return err + } + } else if m.GetOnboardingTaskLists() != nil { + err := writer.WriteObjectValue("", m.GetOnboardingTaskLists()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetSubscriptions() != nil { + err := writer.WriteObjectValue("", m.GetSubscriptions()) + if err != nil { + return err + } + } + return nil +} +// SetEntitlementSets sets the entitlementSets property value. Composed type representation for type EntitlementSetsable +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) SetEntitlementSets(value EntitlementSetsable)() { + m.entitlementSets = value +} +// SetOnboardingTaskLists sets the onboardingTaskLists property value. Composed type representation for type OnboardingTaskListsable +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) SetOnboardingTaskLists(value OnboardingTaskListsable)() { + m.onboardingTaskLists = value +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +// SetSubscriptions sets the subscriptions property value. Composed type representation for type Subscriptionsable +func (m *OrganizationsEnvelope_OrganizationsEnvelope_included) SetSubscriptions(value Subscriptionsable)() { + m.subscriptions = value +} +type OrganizationsEnvelope_OrganizationsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEntitlementSets()(EntitlementSetsable) + GetOnboardingTaskLists()(OnboardingTaskListsable) + GetProjects()(Projectsable) + GetSubscriptions()(Subscriptionsable) + SetEntitlementSets(value EntitlementSetsable)() + SetOnboardingTaskLists(value OnboardingTaskListsable)() + SetProjects(value Projectsable)() + SetSubscriptions(value Subscriptionsable)() } // NewOrganizationsEnvelope instantiates a new OrganizationsEnvelope and sets the default values. func NewOrganizationsEnvelope()(*OrganizationsEnvelope) { @@ -49,8 +189,29 @@ func (m *OrganizationsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOrganizationsEnvelope_OrganizationsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OrganizationsEnvelope_OrganizationsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(OrganizationsEnvelope_OrganizationsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []OrganizationsEnvelope_OrganizationsEnvelope_includedable when successful +func (m *OrganizationsEnvelope) GetIncluded()([]OrganizationsEnvelope_OrganizationsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *OrganizationsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +220,18 @@ func (m *OrganizationsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487e return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +248,15 @@ func (m *OrganizationsEnvelope) SetAdditionalData(value map[string]any)() { func (m *OrganizationsEnvelope) SetData(value Organizationsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *OrganizationsEnvelope) SetIncluded(value []OrganizationsEnvelope_OrganizationsEnvelope_includedable)() { + m.included = value +} type OrganizationsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Organizationsable) + GetIncluded()([]OrganizationsEnvelope_OrganizationsEnvelope_includedable) SetData(value Organizationsable)() + SetIncluded(value []OrganizationsEnvelope_OrganizationsEnvelope_includedable)() } diff --git a/v2/api/models/policies_envelope.go b/v2/api/models/policies_envelope.go index eb8cc0f65..b8141a877 100644 --- a/v2/api/models/policies_envelope.go +++ b/v2/api/models/policies_envelope.go @@ -12,6 +12,8 @@ type PoliciesEnvelope struct { additionalData map[string]any // The data property data Policiesable + // The included property + included []PolicySetsable } // NewPoliciesEnvelope instantiates a new PoliciesEnvelope and sets the default values. func NewPoliciesEnvelope()(*PoliciesEnvelope) { @@ -49,8 +51,29 @@ func (m *PoliciesEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicySetsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicySetsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PolicySetsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []PolicySetsable when successful +func (m *PoliciesEnvelope) GetIncluded()([]PolicySetsable) { + return m.included +} // Serialize serializes information the current object func (m *PoliciesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *PoliciesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *PoliciesEnvelope) SetAdditionalData(value map[string]any)() { func (m *PoliciesEnvelope) SetData(value Policiesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *PoliciesEnvelope) SetIncluded(value []PolicySetsable)() { + m.included = value +} type PoliciesEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Policiesable) + GetIncluded()([]PolicySetsable) SetData(value Policiesable)() + SetIncluded(value []PolicySetsable)() } diff --git a/v2/api/models/policy_checks_envelope.go b/v2/api/models/policy_checks_envelope.go index 5b9ae7bc3..6b505fe64 100644 --- a/v2/api/models/policy_checks_envelope.go +++ b/v2/api/models/policy_checks_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,101 @@ type PolicyChecksEnvelope struct { additionalData map[string]any // The data property data PolicyChecksable + // The included property + included []PolicyChecksEnvelope_PolicyChecksEnvelope_includedable +} +// PolicyChecksEnvelope_PolicyChecksEnvelope_included composed type wrapper for classes Runsable, Workspacesable +type PolicyChecksEnvelope_PolicyChecksEnvelope_included struct { + // Composed type representation for type Runsable + runs Runsable + // Composed type representation for type Workspacesable + workspaces Workspacesable +} +// NewPolicyChecksEnvelope_PolicyChecksEnvelope_included instantiates a new PolicyChecksEnvelope_PolicyChecksEnvelope_included and sets the default values. +func NewPolicyChecksEnvelope_PolicyChecksEnvelope_included()(*PolicyChecksEnvelope_PolicyChecksEnvelope_included) { + m := &PolicyChecksEnvelope_PolicyChecksEnvelope_included{ + } + return m +} +// CreatePolicyChecksEnvelope_PolicyChecksEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePolicyChecksEnvelope_PolicyChecksEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewPolicyChecksEnvelope_PolicyChecksEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PolicyChecksEnvelope_PolicyChecksEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *PolicyChecksEnvelope_PolicyChecksEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetRuns gets the runs property value. Composed type representation for type Runsable +// returns a Runsable when successful +func (m *PolicyChecksEnvelope_PolicyChecksEnvelope_included) GetRuns()(Runsable) { + return m.runs +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type Workspacesable +// returns a Workspacesable when successful +func (m *PolicyChecksEnvelope_PolicyChecksEnvelope_included) GetWorkspaces()(Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *PolicyChecksEnvelope_PolicyChecksEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetRuns sets the runs property value. Composed type representation for type Runsable +func (m *PolicyChecksEnvelope_PolicyChecksEnvelope_included) SetRuns(value Runsable)() { + m.runs = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type Workspacesable +func (m *PolicyChecksEnvelope_PolicyChecksEnvelope_included) SetWorkspaces(value Workspacesable)() { + m.workspaces = value +} +type PolicyChecksEnvelope_PolicyChecksEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRuns()(Runsable) + GetWorkspaces()(Workspacesable) + SetRuns(value Runsable)() + SetWorkspaces(value Workspacesable)() } // NewPolicyChecksEnvelope instantiates a new PolicyChecksEnvelope and sets the default values. func NewPolicyChecksEnvelope()(*PolicyChecksEnvelope) { @@ -49,8 +145,29 @@ func (m *PolicyChecksEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicyChecksEnvelope_PolicyChecksEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicyChecksEnvelope_PolicyChecksEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PolicyChecksEnvelope_PolicyChecksEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []PolicyChecksEnvelope_PolicyChecksEnvelope_includedable when successful +func (m *PolicyChecksEnvelope) GetIncluded()([]PolicyChecksEnvelope_PolicyChecksEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *PolicyChecksEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +176,18 @@ func (m *PolicyChecksEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487ee return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +204,15 @@ func (m *PolicyChecksEnvelope) SetAdditionalData(value map[string]any)() { func (m *PolicyChecksEnvelope) SetData(value PolicyChecksable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *PolicyChecksEnvelope) SetIncluded(value []PolicyChecksEnvelope_PolicyChecksEnvelope_includedable)() { + m.included = value +} type PolicyChecksEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(PolicyChecksable) + GetIncluded()([]PolicyChecksEnvelope_PolicyChecksEnvelope_includedable) SetData(value PolicyChecksable)() + SetIncluded(value []PolicyChecksEnvelope_PolicyChecksEnvelope_includedable)() } diff --git a/v2/api/models/policy_set_versions_envelope.go b/v2/api/models/policy_set_versions_envelope.go index be4853727..7683a082f 100644 --- a/v2/api/models/policy_set_versions_envelope.go +++ b/v2/api/models/policy_set_versions_envelope.go @@ -12,6 +12,8 @@ type PolicySetVersionsEnvelope struct { additionalData map[string]any // The data property data PolicySetVersionsable + // The included property + included []PolicySetsable } // NewPolicySetVersionsEnvelope instantiates a new PolicySetVersionsEnvelope and sets the default values. func NewPolicySetVersionsEnvelope()(*PolicySetVersionsEnvelope) { @@ -49,8 +51,29 @@ func (m *PolicySetVersionsEnvelope) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicySetsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicySetsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PolicySetsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []PolicySetsable when successful +func (m *PolicySetVersionsEnvelope) GetIncluded()([]PolicySetsable) { + return m.included +} // Serialize serializes information the current object func (m *PolicySetVersionsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *PolicySetVersionsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *PolicySetVersionsEnvelope) SetAdditionalData(value map[string]any)() { func (m *PolicySetVersionsEnvelope) SetData(value PolicySetVersionsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *PolicySetVersionsEnvelope) SetIncluded(value []PolicySetsable)() { + m.included = value +} type PolicySetVersionsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(PolicySetVersionsable) + GetIncluded()([]PolicySetsable) SetData(value PolicySetVersionsable)() + SetIncluded(value []PolicySetsable)() } diff --git a/v2/api/models/policy_sets_envelope.go b/v2/api/models/policy_sets_envelope.go index 1d30c3176..af76751ef 100644 --- a/v2/api/models/policy_sets_envelope.go +++ b/v2/api/models/policy_sets_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,211 @@ type PolicySetsEnvelope struct { additionalData map[string]any // The data property data PolicySetsable + // The included property + included []PolicySetsEnvelope_PolicySetsEnvelope_includedable +} +// PolicySetsEnvelope_PolicySetsEnvelope_included composed type wrapper for classes OotbPoliciesable, OotbPolicyLibrariesable, Policiesable, PolicySetVersionsable, Projectsable, Stacksable, Workspacesable +type PolicySetsEnvelope_PolicySetsEnvelope_included struct { + // Composed type representation for type OotbPoliciesable + ootbPolicies OotbPoliciesable + // Composed type representation for type OotbPolicyLibrariesable + ootbPolicyLibraries OotbPolicyLibrariesable + // Composed type representation for type Policiesable + policies Policiesable + // Composed type representation for type PolicySetVersionsable + policySetVersions PolicySetVersionsable + // Composed type representation for type Projectsable + projects Projectsable + // Composed type representation for type Stacksable + stacks Stacksable + // Composed type representation for type Workspacesable + workspaces Workspacesable +} +// NewPolicySetsEnvelope_PolicySetsEnvelope_included instantiates a new PolicySetsEnvelope_PolicySetsEnvelope_included and sets the default values. +func NewPolicySetsEnvelope_PolicySetsEnvelope_included()(*PolicySetsEnvelope_PolicySetsEnvelope_included) { + m := &PolicySetsEnvelope_PolicySetsEnvelope_included{ + } + return m +} +// CreatePolicySetsEnvelope_PolicySetsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePolicySetsEnvelope_PolicySetsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewPolicySetsEnvelope_PolicySetsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ootb-policies") { + result.SetOotbPolicies(NewOotbPolicies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ootb-policy-libraries") { + result.SetOotbPolicyLibraries(NewOotbPolicyLibraries()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policies") { + result.SetPolicies(NewPolicies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policy-set-versions") { + result.SetPolicySetVersions(NewPolicySetVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(NewStacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOotbPolicies() != nil { + return m.GetOotbPolicies().GetFieldDeserializers() + } else if m.GetOotbPolicyLibraries() != nil { + return m.GetOotbPolicyLibraries().GetFieldDeserializers() + } else if m.GetPolicies() != nil { + return m.GetPolicies().GetFieldDeserializers() + } else if m.GetPolicySetVersions() != nil { + return m.GetPolicySetVersions().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOotbPolicies gets the ootbPolicies property value. Composed type representation for type OotbPoliciesable +// returns a OotbPoliciesable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetOotbPolicies()(OotbPoliciesable) { + return m.ootbPolicies +} +// GetOotbPolicyLibraries gets the ootbPolicyLibraries property value. Composed type representation for type OotbPolicyLibrariesable +// returns a OotbPolicyLibrariesable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetOotbPolicyLibraries()(OotbPolicyLibrariesable) { + return m.ootbPolicyLibraries +} +// GetPolicies gets the policies property value. Composed type representation for type Policiesable +// returns a Policiesable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetPolicies()(Policiesable) { + return m.policies +} +// GetPolicySetVersions gets the policySetVersions property value. Composed type representation for type PolicySetVersionsable +// returns a PolicySetVersionsable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetPolicySetVersions()(PolicySetVersionsable) { + return m.policySetVersions +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// GetStacks gets the stacks property value. Composed type representation for type Stacksable +// returns a Stacksable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetStacks()(Stacksable) { + return m.stacks +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type Workspacesable +// returns a Workspacesable when successful +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) GetWorkspaces()(Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOotbPolicies() != nil { + err := writer.WriteObjectValue("", m.GetOotbPolicies()) + if err != nil { + return err + } + } else if m.GetOotbPolicyLibraries() != nil { + err := writer.WriteObjectValue("", m.GetOotbPolicyLibraries()) + if err != nil { + return err + } + } else if m.GetPolicies() != nil { + err := writer.WriteObjectValue("", m.GetPolicies()) + if err != nil { + return err + } + } else if m.GetPolicySetVersions() != nil { + err := writer.WriteObjectValue("", m.GetPolicySetVersions()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetOotbPolicies sets the ootbPolicies property value. Composed type representation for type OotbPoliciesable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetOotbPolicies(value OotbPoliciesable)() { + m.ootbPolicies = value +} +// SetOotbPolicyLibraries sets the ootbPolicyLibraries property value. Composed type representation for type OotbPolicyLibrariesable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetOotbPolicyLibraries(value OotbPolicyLibrariesable)() { + m.ootbPolicyLibraries = value +} +// SetPolicies sets the policies property value. Composed type representation for type Policiesable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetPolicies(value Policiesable)() { + m.policies = value +} +// SetPolicySetVersions sets the policySetVersions property value. Composed type representation for type PolicySetVersionsable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetPolicySetVersions(value PolicySetVersionsable)() { + m.policySetVersions = value +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +// SetStacks sets the stacks property value. Composed type representation for type Stacksable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetStacks(value Stacksable)() { + m.stacks = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type Workspacesable +func (m *PolicySetsEnvelope_PolicySetsEnvelope_included) SetWorkspaces(value Workspacesable)() { + m.workspaces = value +} +type PolicySetsEnvelope_PolicySetsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOotbPolicies()(OotbPoliciesable) + GetOotbPolicyLibraries()(OotbPolicyLibrariesable) + GetPolicies()(Policiesable) + GetPolicySetVersions()(PolicySetVersionsable) + GetProjects()(Projectsable) + GetStacks()(Stacksable) + GetWorkspaces()(Workspacesable) + SetOotbPolicies(value OotbPoliciesable)() + SetOotbPolicyLibraries(value OotbPolicyLibrariesable)() + SetPolicies(value Policiesable)() + SetPolicySetVersions(value PolicySetVersionsable)() + SetProjects(value Projectsable)() + SetStacks(value Stacksable)() + SetWorkspaces(value Workspacesable)() } // NewPolicySetsEnvelope instantiates a new PolicySetsEnvelope and sets the default values. func NewPolicySetsEnvelope()(*PolicySetsEnvelope) { @@ -49,8 +255,29 @@ func (m *PolicySetsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicySetsEnvelope_PolicySetsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicySetsEnvelope_PolicySetsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PolicySetsEnvelope_PolicySetsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []PolicySetsEnvelope_PolicySetsEnvelope_includedable when successful +func (m *PolicySetsEnvelope) GetIncluded()([]PolicySetsEnvelope_PolicySetsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *PolicySetsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +286,18 @@ func (m *PolicySetsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +314,15 @@ func (m *PolicySetsEnvelope) SetAdditionalData(value map[string]any)() { func (m *PolicySetsEnvelope) SetData(value PolicySetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *PolicySetsEnvelope) SetIncluded(value []PolicySetsEnvelope_PolicySetsEnvelope_includedable)() { + m.included = value +} type PolicySetsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(PolicySetsable) + GetIncluded()([]PolicySetsEnvelope_PolicySetsEnvelope_includedable) SetData(value PolicySetsable)() + SetIncluded(value []PolicySetsEnvelope_PolicySetsEnvelope_includedable)() } diff --git a/v2/api/models/policy_sets_escaped_attributes.go b/v2/api/models/policy_sets_escaped_attributes.go index 3511dcba1..bdf86621f 100644 --- a/v2/api/models/policy_sets_escaped_attributes.go +++ b/v2/api/models/policy_sets_escaped_attributes.go @@ -29,17 +29,19 @@ type PolicySets_attributes struct { policiesPath *string // The policyCount property policyCount *int32 - // The policyToolVersion property + // The version of the policy tool used to evaluate this policy set. Accepts aversion or version constraint. Only applies to `opa`, `tfpolicy`, andagent-enabled `sentinel` policy sets; for other policy sets it is ignored inrequests and omitted from responses.For `tfpolicy` policy sets, the following special values are also supported:- `latest` - Always use the latest available Terraform Policy version. This is the default when no value is provided.- `managed` - The Terraform Policy version is managed by the policy set's configuration. Only supported for versioned policy sets whose policies come from a VCS connection or an API upload; it cannot be used with individually managed policies. While set, the policy set's `kind` cannot be changed. policyToolVersion *string // The policyUpdatePatterns property policyUpdatePatterns []string // The projectCount property projectCount *int32 - // Scoping mode for the policy set. "tag" is dynamic tag-based scoping. "explicit" uses explicit workspace/project associations.This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. + // Scoping mode for the policy set. "tag" is dynamic tag-based scoping. "explicit" uses explicit workspace/project associations. scopingType *PolicySets_attributes_scopingType - // Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. - tagSelectorMatchingLogic *PolicySets_attributes_tagSelectorMatchingLogic // This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. + stackCount *int32 + // Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.Must be set explicitly when using tag-based scoping. + tagSelectorMatchingLogic *PolicySets_attributes_tagSelectorMatchingLogic + // The tagSelectors property tagSelectors []PolicySets_attributes_tagSelectorsable // The updatedAt property updatedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time @@ -222,6 +224,16 @@ func (m *PolicySets_attributes) GetFieldDeserializers()(map[string]func(i878a80d } return nil } + res["stack-count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStackCount(val) + } + return nil + } res["tag-selector-matching-logic"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParsePolicySets_attributes_tagSelectorMatchingLogic) if err != nil { @@ -320,7 +332,7 @@ func (m *PolicySets_attributes) GetPoliciesPath()(*string) { func (m *PolicySets_attributes) GetPolicyCount()(*int32) { return m.policyCount } -// GetPolicyToolVersion gets the policy-tool-version property value. The policyToolVersion property +// GetPolicyToolVersion gets the policy-tool-version property value. The version of the policy tool used to evaluate this policy set. Accepts aversion or version constraint. Only applies to `opa`, `tfpolicy`, andagent-enabled `sentinel` policy sets; for other policy sets it is ignored inrequests and omitted from responses.For `tfpolicy` policy sets, the following special values are also supported:- `latest` - Always use the latest available Terraform Policy version. This is the default when no value is provided.- `managed` - The Terraform Policy version is managed by the policy set's configuration. Only supported for versioned policy sets whose policies come from a VCS connection or an API upload; it cannot be used with individually managed policies. While set, the policy set's `kind` cannot be changed. // returns a *string when successful func (m *PolicySets_attributes) GetPolicyToolVersion()(*string) { return m.policyToolVersion @@ -335,17 +347,22 @@ func (m *PolicySets_attributes) GetPolicyUpdatePatterns()([]string) { func (m *PolicySets_attributes) GetProjectCount()(*int32) { return m.projectCount } -// GetScopingType gets the scoping-type property value. Scoping mode for the policy set. "tag" is dynamic tag-based scoping. "explicit" uses explicit workspace/project associations.This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// GetScopingType gets the scoping-type property value. Scoping mode for the policy set. "tag" is dynamic tag-based scoping. "explicit" uses explicit workspace/project associations. // returns a *PolicySets_attributes_scopingType when successful func (m *PolicySets_attributes) GetScopingType()(*PolicySets_attributes_scopingType) { return m.scopingType } -// GetTagSelectorMatchingLogic gets the tag-selector-matching-logic property value. Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// GetStackCount gets the stack-count property value. This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *int32 when successful +func (m *PolicySets_attributes) GetStackCount()(*int32) { + return m.stackCount +} +// GetTagSelectorMatchingLogic gets the tag-selector-matching-logic property value. Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.Must be set explicitly when using tag-based scoping. // returns a *PolicySets_attributes_tagSelectorMatchingLogic when successful func (m *PolicySets_attributes) GetTagSelectorMatchingLogic()(*PolicySets_attributes_tagSelectorMatchingLogic) { return m.tagSelectorMatchingLogic } -// GetTagSelectors gets the tag-selectors property value. This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// GetTagSelectors gets the tag-selectors property value. The tagSelectors property // returns a []PolicySets_attributes_tagSelectorsable when successful func (m *PolicySets_attributes) GetTagSelectors()([]PolicySets_attributes_tagSelectorsable) { return m.tagSelectors @@ -507,7 +524,7 @@ func (m *PolicySets_attributes) SetPoliciesPath(value *string)() { func (m *PolicySets_attributes) SetPolicyCount(value *int32)() { m.policyCount = value } -// SetPolicyToolVersion sets the policy-tool-version property value. The policyToolVersion property +// SetPolicyToolVersion sets the policy-tool-version property value. The version of the policy tool used to evaluate this policy set. Accepts aversion or version constraint. Only applies to `opa`, `tfpolicy`, andagent-enabled `sentinel` policy sets; for other policy sets it is ignored inrequests and omitted from responses.For `tfpolicy` policy sets, the following special values are also supported:- `latest` - Always use the latest available Terraform Policy version. This is the default when no value is provided.- `managed` - The Terraform Policy version is managed by the policy set's configuration. Only supported for versioned policy sets whose policies come from a VCS connection or an API upload; it cannot be used with individually managed policies. While set, the policy set's `kind` cannot be changed. func (m *PolicySets_attributes) SetPolicyToolVersion(value *string)() { m.policyToolVersion = value } @@ -519,15 +536,19 @@ func (m *PolicySets_attributes) SetPolicyUpdatePatterns(value []string)() { func (m *PolicySets_attributes) SetProjectCount(value *int32)() { m.projectCount = value } -// SetScopingType sets the scoping-type property value. Scoping mode for the policy set. "tag" is dynamic tag-based scoping. "explicit" uses explicit workspace/project associations.This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// SetScopingType sets the scoping-type property value. Scoping mode for the policy set. "tag" is dynamic tag-based scoping. "explicit" uses explicit workspace/project associations. func (m *PolicySets_attributes) SetScopingType(value *PolicySets_attributes_scopingType)() { m.scopingType = value } -// SetTagSelectorMatchingLogic sets the tag-selector-matching-logic property value. Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// SetStackCount sets the stack-count property value. This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +func (m *PolicySets_attributes) SetStackCount(value *int32)() { + m.stackCount = value +} +// SetTagSelectorMatchingLogic sets the tag-selector-matching-logic property value. Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.Must be set explicitly when using tag-based scoping. func (m *PolicySets_attributes) SetTagSelectorMatchingLogic(value *PolicySets_attributes_tagSelectorMatchingLogic)() { m.tagSelectorMatchingLogic = value } -// SetTagSelectors sets the tag-selectors property value. This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// SetTagSelectors sets the tag-selectors property value. The tagSelectors property func (m *PolicySets_attributes) SetTagSelectors(value []PolicySets_attributes_tagSelectorsable)() { m.tagSelectors = value } @@ -563,6 +584,7 @@ type PolicySets_attributesable interface { GetPolicyUpdatePatterns()([]string) GetProjectCount()(*int32) GetScopingType()(*PolicySets_attributes_scopingType) + GetStackCount()(*int32) GetTagSelectorMatchingLogic()(*PolicySets_attributes_tagSelectorMatchingLogic) GetTagSelectors()([]PolicySets_attributes_tagSelectorsable) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -582,6 +604,7 @@ type PolicySets_attributesable interface { SetPolicyUpdatePatterns(value []string)() SetProjectCount(value *int32)() SetScopingType(value *PolicySets_attributes_scopingType)() + SetStackCount(value *int32)() SetTagSelectorMatchingLogic(value *PolicySets_attributes_tagSelectorMatchingLogic)() SetTagSelectors(value []PolicySets_attributes_tagSelectorsable)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/v2/api/models/policy_sets_escaped_attributes_escaped_scoping_type.go b/v2/api/models/policy_sets_escaped_attributes_escaped_scoping_type.go index a1211fd5d..8d0d9341a 100644 --- a/v2/api/models/policy_sets_escaped_attributes_escaped_scoping_type.go +++ b/v2/api/models/policy_sets_escaped_attributes_escaped_scoping_type.go @@ -2,7 +2,7 @@ // Changes may cause incorrect behavior and will be lost if the code is regenerated. package models -// Scoping mode for the policy set. "tag" is dynamic tag-based scoping. "explicit" uses explicit workspace/project associations.This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// Scoping mode for the policy set. "tag" is dynamic tag-based scoping. "explicit" uses explicit workspace/project associations. type PolicySets_attributes_scopingType int const ( diff --git a/v2/api/models/policy_sets_escaped_attributes_escaped_tag_selector_matching_logic.go b/v2/api/models/policy_sets_escaped_attributes_escaped_tag_selector_matching_logic.go index f73dfa839..69f869d01 100644 --- a/v2/api/models/policy_sets_escaped_attributes_escaped_tag_selector_matching_logic.go +++ b/v2/api/models/policy_sets_escaped_attributes_escaped_tag_selector_matching_logic.go @@ -2,7 +2,7 @@ // Changes may cause incorrect behavior and will be lost if the code is regenerated. package models -// Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.Must be set explicitly when using tag-based scoping. type PolicySets_attributes_tagSelectorMatchingLogic int const ( diff --git a/v2/api/models/policy_sets_escaped_relationships.go b/v2/api/models/policy_sets_escaped_relationships.go index eedd6a0ab..7b6771bc7 100644 --- a/v2/api/models/policy_sets_escaped_relationships.go +++ b/v2/api/models/policy_sets_escaped_relationships.go @@ -22,6 +22,10 @@ type PolicySets_relationships struct { projectExclusions ProjectsHasManyable // The projects property projects ProjectsHasManyable + // The stackExclusions property + stackExclusions StacksHasManyable + // The stacks property + stacks StacksHasManyable // The workspaceExclusions property workspaceExclusions WorkspacesHasManyable // The workspaces property @@ -113,6 +117,26 @@ func (m *PolicySets_relationships) GetFieldDeserializers()(map[string]func(i878a } return nil } + res["stack-exclusions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStacksHasManyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStackExclusions(val.(StacksHasManyable)) + } + return nil + } + res["stacks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStacksHasManyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStacks(val.(StacksHasManyable)) + } + return nil + } res["workspace-exclusions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateWorkspacesHasManyFromDiscriminatorValue) if err != nil { @@ -160,6 +184,16 @@ func (m *PolicySets_relationships) GetProjectExclusions()(ProjectsHasManyable) { func (m *PolicySets_relationships) GetProjects()(ProjectsHasManyable) { return m.projects } +// GetStackExclusions gets the stack-exclusions property value. The stackExclusions property +// returns a StacksHasManyable when successful +func (m *PolicySets_relationships) GetStackExclusions()(StacksHasManyable) { + return m.stackExclusions +} +// GetStacks gets the stacks property value. The stacks property +// returns a StacksHasManyable when successful +func (m *PolicySets_relationships) GetStacks()(StacksHasManyable) { + return m.stacks +} // GetWorkspaceExclusions gets the workspace-exclusions property value. The workspaceExclusions property // returns a WorkspacesHasManyable when successful func (m *PolicySets_relationships) GetWorkspaceExclusions()(WorkspacesHasManyable) { @@ -208,6 +242,18 @@ func (m *PolicySets_relationships) Serialize(writer i878a80d2330e89d26896388a3f4 return err } } + { + err := writer.WriteObjectValue("stack-exclusions", m.GetStackExclusions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("stacks", m.GetStacks()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("workspace-exclusions", m.GetWorkspaceExclusions()) if err != nil { @@ -256,6 +302,14 @@ func (m *PolicySets_relationships) SetProjectExclusions(value ProjectsHasManyabl func (m *PolicySets_relationships) SetProjects(value ProjectsHasManyable)() { m.projects = value } +// SetStackExclusions sets the stack-exclusions property value. The stackExclusions property +func (m *PolicySets_relationships) SetStackExclusions(value StacksHasManyable)() { + m.stackExclusions = value +} +// SetStacks sets the stacks property value. The stacks property +func (m *PolicySets_relationships) SetStacks(value StacksHasManyable)() { + m.stacks = value +} // SetWorkspaceExclusions sets the workspace-exclusions property value. The workspaceExclusions property func (m *PolicySets_relationships) SetWorkspaceExclusions(value WorkspacesHasManyable)() { m.workspaceExclusions = value @@ -273,6 +327,8 @@ type PolicySets_relationshipsable interface { GetPolicies()(PoliciesHasManyable) GetProjectExclusions()(ProjectsHasManyable) GetProjects()(ProjectsHasManyable) + GetStackExclusions()(StacksHasManyable) + GetStacks()(StacksHasManyable) GetWorkspaceExclusions()(WorkspacesHasManyable) GetWorkspaces()(WorkspacesHasManyable) SetCurrentVersion(value PolicySetVersionsHasOneable)() @@ -281,6 +337,8 @@ type PolicySets_relationshipsable interface { SetPolicies(value PoliciesHasManyable)() SetProjectExclusions(value ProjectsHasManyable)() SetProjects(value ProjectsHasManyable)() + SetStackExclusions(value StacksHasManyable)() + SetStacks(value StacksHasManyable)() SetWorkspaceExclusions(value WorkspacesHasManyable)() SetWorkspaces(value WorkspacesHasManyable)() } diff --git a/v2/api/models/projects_envelope.go b/v2/api/models/projects_envelope.go index a600c5e19..08ccdd304 100644 --- a/v2/api/models/projects_envelope.go +++ b/v2/api/models/projects_envelope.go @@ -12,6 +12,8 @@ type ProjectsEnvelope struct { additionalData map[string]any // The data property data Projectsable + // The included property + included []EffectiveTagBindingsable } // NewProjectsEnvelope instantiates a new ProjectsEnvelope and sets the default values. func NewProjectsEnvelope()(*ProjectsEnvelope) { @@ -49,8 +51,29 @@ func (m *ProjectsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEffectiveTagBindingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EffectiveTagBindingsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(EffectiveTagBindingsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []EffectiveTagBindingsable when successful +func (m *ProjectsEnvelope) GetIncluded()([]EffectiveTagBindingsable) { + return m.included +} // Serialize serializes information the current object func (m *ProjectsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *ProjectsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *ProjectsEnvelope) SetAdditionalData(value map[string]any)() { func (m *ProjectsEnvelope) SetData(value Projectsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ProjectsEnvelope) SetIncluded(value []EffectiveTagBindingsable)() { + m.included = value +} type ProjectsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Projectsable) + GetIncluded()([]EffectiveTagBindingsable) SetData(value Projectsable)() + SetIncluded(value []EffectiveTagBindingsable)() } diff --git a/v2/api/models/provider_sets_envelope.go b/v2/api/models/provider_sets_envelope.go index f18f32687..0220463ec 100644 --- a/v2/api/models/provider_sets_envelope.go +++ b/v2/api/models/provider_sets_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,101 @@ type ProviderSetsEnvelope struct { additionalData map[string]any // The data property data ProviderSetsable + // The included property + included []ProviderSetsEnvelope_ProviderSetsEnvelope_includedable +} +// ProviderSetsEnvelope_ProviderSetsEnvelope_included composed type wrapper for classes Projectsable, Workspacesable +type ProviderSetsEnvelope_ProviderSetsEnvelope_included struct { + // Composed type representation for type Projectsable + projects Projectsable + // Composed type representation for type Workspacesable + workspaces Workspacesable +} +// NewProviderSetsEnvelope_ProviderSetsEnvelope_included instantiates a new ProviderSetsEnvelope_ProviderSetsEnvelope_included and sets the default values. +func NewProviderSetsEnvelope_ProviderSetsEnvelope_included()(*ProviderSetsEnvelope_ProviderSetsEnvelope_included) { + m := &ProviderSetsEnvelope_ProviderSetsEnvelope_included{ + } + return m +} +// CreateProviderSetsEnvelope_ProviderSetsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProviderSetsEnvelope_ProviderSetsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewProviderSetsEnvelope_ProviderSetsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProviderSetsEnvelope_ProviderSetsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ProviderSetsEnvelope_ProviderSetsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *ProviderSetsEnvelope_ProviderSetsEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type Workspacesable +// returns a Workspacesable when successful +func (m *ProviderSetsEnvelope_ProviderSetsEnvelope_included) GetWorkspaces()(Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ProviderSetsEnvelope_ProviderSetsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *ProviderSetsEnvelope_ProviderSetsEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type Workspacesable +func (m *ProviderSetsEnvelope_ProviderSetsEnvelope_included) SetWorkspaces(value Workspacesable)() { + m.workspaces = value +} +type ProviderSetsEnvelope_ProviderSetsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(Projectsable) + GetWorkspaces()(Workspacesable) + SetProjects(value Projectsable)() + SetWorkspaces(value Workspacesable)() } // NewProviderSetsEnvelope instantiates a new ProviderSetsEnvelope and sets the default values. func NewProviderSetsEnvelope()(*ProviderSetsEnvelope) { @@ -49,8 +145,29 @@ func (m *ProviderSetsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProviderSetsEnvelope_ProviderSetsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProviderSetsEnvelope_ProviderSetsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ProviderSetsEnvelope_ProviderSetsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []ProviderSetsEnvelope_ProviderSetsEnvelope_includedable when successful +func (m *ProviderSetsEnvelope) GetIncluded()([]ProviderSetsEnvelope_ProviderSetsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *ProviderSetsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +176,18 @@ func (m *ProviderSetsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487ee return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +204,15 @@ func (m *ProviderSetsEnvelope) SetAdditionalData(value map[string]any)() { func (m *ProviderSetsEnvelope) SetData(value ProviderSetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ProviderSetsEnvelope) SetIncluded(value []ProviderSetsEnvelope_ProviderSetsEnvelope_includedable)() { + m.included = value +} type ProviderSetsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(ProviderSetsable) + GetIncluded()([]ProviderSetsEnvelope_ProviderSetsEnvelope_includedable) SetData(value ProviderSetsable)() + SetIncluded(value []ProviderSetsEnvelope_ProviderSetsEnvelope_includedable)() } diff --git a/v2/api/models/registry_modules_envelope.go b/v2/api/models/registry_modules_envelope.go index 020b6af74..0150267c2 100644 --- a/v2/api/models/registry_modules_envelope.go +++ b/v2/api/models/registry_modules_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,123 @@ type RegistryModulesEnvelope struct { additionalData map[string]any // The data property data RegistryModulesable + // The included property + included []RegistryModulesEnvelope_RegistryModulesEnvelope_includedable +} +// RegistryModulesEnvelope_RegistryModulesEnvelope_included composed type wrapper for classes NoCodeModulesable, TestRunCleanupsable, TestRunsable +type RegistryModulesEnvelope_RegistryModulesEnvelope_included struct { + // Composed type representation for type NoCodeModulesable + noCodeModules NoCodeModulesable + // Composed type representation for type TestRunCleanupsable + testRunCleanups TestRunCleanupsable + // Composed type representation for type TestRunsable + testRuns TestRunsable +} +// NewRegistryModulesEnvelope_RegistryModulesEnvelope_included instantiates a new RegistryModulesEnvelope_RegistryModulesEnvelope_included and sets the default values. +func NewRegistryModulesEnvelope_RegistryModulesEnvelope_included()(*RegistryModulesEnvelope_RegistryModulesEnvelope_included) { + m := &RegistryModulesEnvelope_RegistryModulesEnvelope_included{ + } + return m +} +// CreateRegistryModulesEnvelope_RegistryModulesEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRegistryModulesEnvelope_RegistryModulesEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewRegistryModulesEnvelope_RegistryModulesEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-modules") { + result.SetNoCodeModules(NewNoCodeModules()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "test-run-cleanups") { + result.SetTestRunCleanups(NewTestRunCleanups()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "test-runs") { + result.SetTestRuns(NewTestRuns()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RegistryModulesEnvelope_RegistryModulesEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetNoCodeModules() != nil { + return m.GetNoCodeModules().GetFieldDeserializers() + } else if m.GetTestRunCleanups() != nil { + return m.GetTestRunCleanups().GetFieldDeserializers() + } else if m.GetTestRuns() != nil { + return m.GetTestRuns().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *RegistryModulesEnvelope_RegistryModulesEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetNoCodeModules gets the noCodeModules property value. Composed type representation for type NoCodeModulesable +// returns a NoCodeModulesable when successful +func (m *RegistryModulesEnvelope_RegistryModulesEnvelope_included) GetNoCodeModules()(NoCodeModulesable) { + return m.noCodeModules +} +// GetTestRunCleanups gets the testRunCleanups property value. Composed type representation for type TestRunCleanupsable +// returns a TestRunCleanupsable when successful +func (m *RegistryModulesEnvelope_RegistryModulesEnvelope_included) GetTestRunCleanups()(TestRunCleanupsable) { + return m.testRunCleanups +} +// GetTestRuns gets the testRuns property value. Composed type representation for type TestRunsable +// returns a TestRunsable when successful +func (m *RegistryModulesEnvelope_RegistryModulesEnvelope_included) GetTestRuns()(TestRunsable) { + return m.testRuns +} +// Serialize serializes information the current object +func (m *RegistryModulesEnvelope_RegistryModulesEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetNoCodeModules() != nil { + err := writer.WriteObjectValue("", m.GetNoCodeModules()) + if err != nil { + return err + } + } else if m.GetTestRunCleanups() != nil { + err := writer.WriteObjectValue("", m.GetTestRunCleanups()) + if err != nil { + return err + } + } else if m.GetTestRuns() != nil { + err := writer.WriteObjectValue("", m.GetTestRuns()) + if err != nil { + return err + } + } + return nil +} +// SetNoCodeModules sets the noCodeModules property value. Composed type representation for type NoCodeModulesable +func (m *RegistryModulesEnvelope_RegistryModulesEnvelope_included) SetNoCodeModules(value NoCodeModulesable)() { + m.noCodeModules = value +} +// SetTestRunCleanups sets the testRunCleanups property value. Composed type representation for type TestRunCleanupsable +func (m *RegistryModulesEnvelope_RegistryModulesEnvelope_included) SetTestRunCleanups(value TestRunCleanupsable)() { + m.testRunCleanups = value +} +// SetTestRuns sets the testRuns property value. Composed type representation for type TestRunsable +func (m *RegistryModulesEnvelope_RegistryModulesEnvelope_included) SetTestRuns(value TestRunsable)() { + m.testRuns = value +} +type RegistryModulesEnvelope_RegistryModulesEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNoCodeModules()(NoCodeModulesable) + GetTestRunCleanups()(TestRunCleanupsable) + GetTestRuns()(TestRunsable) + SetNoCodeModules(value NoCodeModulesable)() + SetTestRunCleanups(value TestRunCleanupsable)() + SetTestRuns(value TestRunsable)() } // NewRegistryModulesEnvelope instantiates a new RegistryModulesEnvelope and sets the default values. func NewRegistryModulesEnvelope()(*RegistryModulesEnvelope) { @@ -49,8 +167,29 @@ func (m *RegistryModulesEnvelope) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRegistryModulesEnvelope_RegistryModulesEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RegistryModulesEnvelope_RegistryModulesEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RegistryModulesEnvelope_RegistryModulesEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []RegistryModulesEnvelope_RegistryModulesEnvelope_includedable when successful +func (m *RegistryModulesEnvelope) GetIncluded()([]RegistryModulesEnvelope_RegistryModulesEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *RegistryModulesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +198,18 @@ func (m *RegistryModulesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +226,15 @@ func (m *RegistryModulesEnvelope) SetAdditionalData(value map[string]any)() { func (m *RegistryModulesEnvelope) SetData(value RegistryModulesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *RegistryModulesEnvelope) SetIncluded(value []RegistryModulesEnvelope_RegistryModulesEnvelope_includedable)() { + m.included = value +} type RegistryModulesEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(RegistryModulesable) + GetIncluded()([]RegistryModulesEnvelope_RegistryModulesEnvelope_includedable) SetData(value RegistryModulesable)() + SetIncluded(value []RegistryModulesEnvelope_RegistryModulesEnvelope_includedable)() } diff --git a/v2/api/models/run_triggers_envelope.go b/v2/api/models/run_triggers_envelope.go index caa679019..2b92cf4b9 100644 --- a/v2/api/models/run_triggers_envelope.go +++ b/v2/api/models/run_triggers_envelope.go @@ -12,6 +12,8 @@ type RunTriggersEnvelope struct { additionalData map[string]any // The data property data RunTriggersable + // The included property + included []Workspacesable } // NewRunTriggersEnvelope instantiates a new RunTriggersEnvelope and sets the default values. func NewRunTriggersEnvelope()(*RunTriggersEnvelope) { @@ -49,8 +51,29 @@ func (m *RunTriggersEnvelope) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkspacesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Workspacesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Workspacesable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []Workspacesable when successful +func (m *RunTriggersEnvelope) GetIncluded()([]Workspacesable) { + return m.included +} // Serialize serializes information the current object func (m *RunTriggersEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *RunTriggersEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *RunTriggersEnvelope) SetAdditionalData(value map[string]any)() { func (m *RunTriggersEnvelope) SetData(value RunTriggersable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *RunTriggersEnvelope) SetIncluded(value []Workspacesable)() { + m.included = value +} type RunTriggersEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(RunTriggersable) + GetIncluded()([]Workspacesable) SetData(value RunTriggersable)() + SetIncluded(value []Workspacesable)() } diff --git a/v2/api/models/runs_envelope.go b/v2/api/models/runs_envelope.go index 7b4085768..3f95dbf35 100644 --- a/v2/api/models/runs_envelope.go +++ b/v2/api/models/runs_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,255 @@ type RunsEnvelope struct { additionalData map[string]any // The data property data Runsable + // The included property + included []RunsEnvelope_RunsEnvelope_includedable +} +// RunsEnvelope_RunsEnvelope_included composed type wrapper for classes Appliesable, ConfigurationVersionsable, CostEstimatesable, IngressAttributesable, Plansable, TaskStagesable, TfPolicyEvaluationsable, Usersable, Workspacesable +type RunsEnvelope_RunsEnvelope_included struct { + // Composed type representation for type Appliesable + applies Appliesable + // Composed type representation for type ConfigurationVersionsable + configurationVersions ConfigurationVersionsable + // Composed type representation for type CostEstimatesable + costEstimates CostEstimatesable + // Composed type representation for type IngressAttributesable + ingressAttributes IngressAttributesable + // Composed type representation for type Plansable + plans Plansable + // Composed type representation for type TaskStagesable + taskStages TaskStagesable + // Composed type representation for type TfPolicyEvaluationsable + tfPolicyEvaluations TfPolicyEvaluationsable + // Composed type representation for type Usersable + users Usersable + // Composed type representation for type Workspacesable + workspaces Workspacesable +} +// NewRunsEnvelope_RunsEnvelope_included instantiates a new RunsEnvelope_RunsEnvelope_included and sets the default values. +func NewRunsEnvelope_RunsEnvelope_included()(*RunsEnvelope_RunsEnvelope_included) { + m := &RunsEnvelope_RunsEnvelope_included{ + } + return m +} +// CreateRunsEnvelope_RunsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRunsEnvelope_RunsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewRunsEnvelope_RunsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { + result.SetCostEstimates(NewCostEstimates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-stages") { + result.SetTaskStages(NewTaskStages()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tf-policy-evaluations") { + result.SetTfPolicyEvaluations(NewTfPolicyEvaluations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetApplies gets the applies property value. Composed type representation for type Appliesable +// returns a Appliesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetApplies()(Appliesable) { + return m.applies +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetConfigurationVersions()(ConfigurationVersionsable) { + return m.configurationVersions +} +// GetCostEstimates gets the costEstimates property value. Composed type representation for type CostEstimatesable +// returns a CostEstimatesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetCostEstimates()(CostEstimatesable) { + return m.costEstimates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetCostEstimates() != nil { + return m.GetCostEstimates().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetTaskStages() != nil { + return m.GetTaskStages().GetFieldDeserializers() + } else if m.GetTfPolicyEvaluations() != nil { + return m.GetTfPolicyEvaluations().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type IngressAttributesable +// returns a IngressAttributesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetIngressAttributes()(IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetPlans gets the plans property value. Composed type representation for type Plansable +// returns a Plansable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetPlans()(Plansable) { + return m.plans +} +// GetTaskStages gets the taskStages property value. Composed type representation for type TaskStagesable +// returns a TaskStagesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetTaskStages()(TaskStagesable) { + return m.taskStages +} +// GetTfPolicyEvaluations gets the tfPolicyEvaluations property value. Composed type representation for type TfPolicyEvaluationsable +// returns a TfPolicyEvaluationsable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetTfPolicyEvaluations()(TfPolicyEvaluationsable) { + return m.tfPolicyEvaluations +} +// GetUsers gets the users property value. Composed type representation for type Usersable +// returns a Usersable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetUsers()(Usersable) { + return m.users +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type Workspacesable +// returns a Workspacesable when successful +func (m *RunsEnvelope_RunsEnvelope_included) GetWorkspaces()(Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *RunsEnvelope_RunsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetCostEstimates() != nil { + err := writer.WriteObjectValue("", m.GetCostEstimates()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetTaskStages() != nil { + err := writer.WriteObjectValue("", m.GetTaskStages()) + if err != nil { + return err + } + } else if m.GetTfPolicyEvaluations() != nil { + err := writer.WriteObjectValue("", m.GetTfPolicyEvaluations()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetApplies sets the applies property value. Composed type representation for type Appliesable +func (m *RunsEnvelope_RunsEnvelope_included) SetApplies(value Appliesable)() { + m.applies = value +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable +func (m *RunsEnvelope_RunsEnvelope_included) SetConfigurationVersions(value ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetCostEstimates sets the costEstimates property value. Composed type representation for type CostEstimatesable +func (m *RunsEnvelope_RunsEnvelope_included) SetCostEstimates(value CostEstimatesable)() { + m.costEstimates = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type IngressAttributesable +func (m *RunsEnvelope_RunsEnvelope_included) SetIngressAttributes(value IngressAttributesable)() { + m.ingressAttributes = value +} +// SetPlans sets the plans property value. Composed type representation for type Plansable +func (m *RunsEnvelope_RunsEnvelope_included) SetPlans(value Plansable)() { + m.plans = value +} +// SetTaskStages sets the taskStages property value. Composed type representation for type TaskStagesable +func (m *RunsEnvelope_RunsEnvelope_included) SetTaskStages(value TaskStagesable)() { + m.taskStages = value +} +// SetTfPolicyEvaluations sets the tfPolicyEvaluations property value. Composed type representation for type TfPolicyEvaluationsable +func (m *RunsEnvelope_RunsEnvelope_included) SetTfPolicyEvaluations(value TfPolicyEvaluationsable)() { + m.tfPolicyEvaluations = value +} +// SetUsers sets the users property value. Composed type representation for type Usersable +func (m *RunsEnvelope_RunsEnvelope_included) SetUsers(value Usersable)() { + m.users = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type Workspacesable +func (m *RunsEnvelope_RunsEnvelope_included) SetWorkspaces(value Workspacesable)() { + m.workspaces = value +} +type RunsEnvelope_RunsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplies()(Appliesable) + GetConfigurationVersions()(ConfigurationVersionsable) + GetCostEstimates()(CostEstimatesable) + GetIngressAttributes()(IngressAttributesable) + GetPlans()(Plansable) + GetTaskStages()(TaskStagesable) + GetTfPolicyEvaluations()(TfPolicyEvaluationsable) + GetUsers()(Usersable) + GetWorkspaces()(Workspacesable) + SetApplies(value Appliesable)() + SetConfigurationVersions(value ConfigurationVersionsable)() + SetCostEstimates(value CostEstimatesable)() + SetIngressAttributes(value IngressAttributesable)() + SetPlans(value Plansable)() + SetTaskStages(value TaskStagesable)() + SetTfPolicyEvaluations(value TfPolicyEvaluationsable)() + SetUsers(value Usersable)() + SetWorkspaces(value Workspacesable)() } // NewRunsEnvelope instantiates a new RunsEnvelope and sets the default values. func NewRunsEnvelope()(*RunsEnvelope) { @@ -49,8 +299,29 @@ func (m *RunsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRunsEnvelope_RunsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RunsEnvelope_RunsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RunsEnvelope_RunsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []RunsEnvelope_RunsEnvelope_includedable when successful +func (m *RunsEnvelope) GetIncluded()([]RunsEnvelope_RunsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *RunsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +330,18 @@ func (m *RunsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +358,15 @@ func (m *RunsEnvelope) SetAdditionalData(value map[string]any)() { func (m *RunsEnvelope) SetData(value Runsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *RunsEnvelope) SetIncluded(value []RunsEnvelope_RunsEnvelope_includedable)() { + m.included = value +} type RunsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Runsable) + GetIncluded()([]RunsEnvelope_RunsEnvelope_includedable) SetData(value Runsable)() + SetIncluded(value []RunsEnvelope_RunsEnvelope_includedable)() } diff --git a/v2/api/models/runs_escaped_attributes.go b/v2/api/models/runs_escaped_attributes.go index 14aff0ca1..cd8ff5451 100644 --- a/v2/api/models/runs_escaped_attributes.go +++ b/v2/api/models/runs_escaped_attributes.go @@ -44,6 +44,7 @@ type Runs_attributes struct { // The planOnly property planOnly *bool // The policyPaths property + // Deprecated: policyPaths []string // The refresh property refresh *bool @@ -55,7 +56,7 @@ type Runs_attributes struct { savePlan *bool // The source property source *string - // The current status of the run.**Note:** The following status values are in public-beta:- `tf_policy_checked` - Terraform Policy evaluation completed at plan stage- `tf_policy_override` - Terraform Policy evaluation was overridden at plan stage + // The current status of the run.Terraform Policy evaluation status values at plan stage:- `tf_policy_checked` - Terraform Policy evaluation completed- `tf_policy_override` - Terraform Policy evaluation was overridden status *Runs_attributes_status // The statusTimestamps property statusTimestamps Runs_attributes_statusTimestampsable @@ -506,6 +507,7 @@ func (m *Runs_attributes) GetPlanOnly()(*bool) { return m.planOnly } // GetPolicyPaths gets the policy-paths property value. The policyPaths property +// Deprecated: // returns a []string when successful func (m *Runs_attributes) GetPolicyPaths()([]string) { return m.policyPaths @@ -535,7 +537,7 @@ func (m *Runs_attributes) GetSavePlan()(*bool) { func (m *Runs_attributes) GetSource()(*string) { return m.source } -// GetStatus gets the status property value. The current status of the run.**Note:** The following status values are in public-beta:- `tf_policy_checked` - Terraform Policy evaluation completed at plan stage- `tf_policy_override` - Terraform Policy evaluation was overridden at plan stage +// GetStatus gets the status property value. The current status of the run.Terraform Policy evaluation status values at plan stage:- `tf_policy_checked` - Terraform Policy evaluation completed- `tf_policy_override` - Terraform Policy evaluation was overridden // returns a *Runs_attributes_status when successful func (m *Runs_attributes) GetStatus()(*Runs_attributes_status) { return m.status @@ -817,6 +819,7 @@ func (m *Runs_attributes) SetPlanOnly(value *bool)() { m.planOnly = value } // SetPolicyPaths sets the policy-paths property value. The policyPaths property +// Deprecated: func (m *Runs_attributes) SetPolicyPaths(value []string)() { m.policyPaths = value } @@ -840,7 +843,7 @@ func (m *Runs_attributes) SetSavePlan(value *bool)() { func (m *Runs_attributes) SetSource(value *string)() { m.source = value } -// SetStatus sets the status property value. The current status of the run.**Note:** The following status values are in public-beta:- `tf_policy_checked` - Terraform Policy evaluation completed at plan stage- `tf_policy_override` - Terraform Policy evaluation was overridden at plan stage +// SetStatus sets the status property value. The current status of the run.Terraform Policy evaluation status values at plan stage:- `tf_policy_checked` - Terraform Policy evaluation completed- `tf_policy_override` - Terraform Policy evaluation was overridden func (m *Runs_attributes) SetStatus(value *Runs_attributes_status)() { m.status = value } diff --git a/v2/api/models/runs_escaped_attributes_escaped_status.go b/v2/api/models/runs_escaped_attributes_escaped_status.go index b59ba6ecd..9c3db0e7c 100644 --- a/v2/api/models/runs_escaped_attributes_escaped_status.go +++ b/v2/api/models/runs_escaped_attributes_escaped_status.go @@ -2,7 +2,7 @@ // Changes may cause incorrect behavior and will be lost if the code is regenerated. package models -// The current status of the run.**Note:** The following status values are in public-beta:- `tf_policy_checked` - Terraform Policy evaluation completed at plan stage- `tf_policy_override` - Terraform Policy evaluation was overridden at plan stage +// The current status of the run.Terraform Policy evaluation status values at plan stage:- `tf_policy_checked` - Terraform Policy evaluation completed- `tf_policy_override` - Terraform Policy evaluation was overridden type Runs_attributes_status int const ( diff --git a/v2/api/models/stack_approvals_envelope.go b/v2/api/models/stack_approvals_envelope.go index 3c42605c4..6a928821e 100644 --- a/v2/api/models/stack_approvals_envelope.go +++ b/v2/api/models/stack_approvals_envelope.go @@ -12,6 +12,8 @@ type StackApprovalsEnvelope struct { additionalData map[string]any // The data property data StackApprovalsable + // The included property + included []Usersable } // NewStackApprovalsEnvelope instantiates a new StackApprovalsEnvelope and sets the default values. func NewStackApprovalsEnvelope()(*StackApprovalsEnvelope) { @@ -49,8 +51,29 @@ func (m *StackApprovalsEnvelope) GetFieldDeserializers()(map[string]func(i878a80 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUsersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Usersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Usersable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []Usersable when successful +func (m *StackApprovalsEnvelope) GetIncluded()([]Usersable) { + return m.included +} // Serialize serializes information the current object func (m *StackApprovalsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *StackApprovalsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *StackApprovalsEnvelope) SetAdditionalData(value map[string]any)() { func (m *StackApprovalsEnvelope) SetData(value StackApprovalsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *StackApprovalsEnvelope) SetIncluded(value []Usersable)() { + m.included = value +} type StackApprovalsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(StackApprovalsable) + GetIncluded()([]Usersable) SetData(value StackApprovalsable)() + SetIncluded(value []Usersable)() } diff --git a/v2/api/models/stack_configurations_envelope.go b/v2/api/models/stack_configurations_envelope.go index f93fa8ad9..2a37b263d 100644 --- a/v2/api/models/stack_configurations_envelope.go +++ b/v2/api/models/stack_configurations_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,145 @@ type StackConfigurationsEnvelope struct { additionalData map[string]any // The data property data StackConfigurationsable + // The included property + included []StackConfigurationsEnvelope_StackConfigurationsEnvelope_includedable +} +// StackConfigurationsEnvelope_StackConfigurationsEnvelope_included composed type wrapper for classes IngressAttributesable, StackAggregateOutputsable, StackConfigurationSummariesable, StackDiagnosticsable +type StackConfigurationsEnvelope_StackConfigurationsEnvelope_included struct { + // Composed type representation for type IngressAttributesable + ingressAttributes IngressAttributesable + // Composed type representation for type StackAggregateOutputsable + stackAggregateOutputs StackAggregateOutputsable + // Composed type representation for type StackConfigurationSummariesable + stackConfigurationSummaries StackConfigurationSummariesable + // Composed type representation for type StackDiagnosticsable + stackDiagnostics StackDiagnosticsable +} +// NewStackConfigurationsEnvelope_StackConfigurationsEnvelope_included instantiates a new StackConfigurationsEnvelope_StackConfigurationsEnvelope_included and sets the default values. +func NewStackConfigurationsEnvelope_StackConfigurationsEnvelope_included()(*StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) { + m := &StackConfigurationsEnvelope_StackConfigurationsEnvelope_included{ + } + return m +} +// CreateStackConfigurationsEnvelope_StackConfigurationsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackConfigurationsEnvelope_StackConfigurationsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewStackConfigurationsEnvelope_StackConfigurationsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-aggregate-outputs") { + result.SetStackAggregateOutputs(NewStackAggregateOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configuration-summaries") { + result.SetStackConfigurationSummaries(NewStackConfigurationSummaries()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-diagnostics") { + result.SetStackDiagnostics(NewStackDiagnostics()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetStackAggregateOutputs() != nil { + return m.GetStackAggregateOutputs().GetFieldDeserializers() + } else if m.GetStackConfigurationSummaries() != nil { + return m.GetStackConfigurationSummaries().GetFieldDeserializers() + } else if m.GetStackDiagnostics() != nil { + return m.GetStackDiagnostics().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type IngressAttributesable +// returns a IngressAttributesable when successful +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) GetIngressAttributes()(IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetStackAggregateOutputs gets the stackAggregateOutputs property value. Composed type representation for type StackAggregateOutputsable +// returns a StackAggregateOutputsable when successful +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) GetStackAggregateOutputs()(StackAggregateOutputsable) { + return m.stackAggregateOutputs +} +// GetStackConfigurationSummaries gets the stackConfigurationSummaries property value. Composed type representation for type StackConfigurationSummariesable +// returns a StackConfigurationSummariesable when successful +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) GetStackConfigurationSummaries()(StackConfigurationSummariesable) { + return m.stackConfigurationSummaries +} +// GetStackDiagnostics gets the stackDiagnostics property value. Composed type representation for type StackDiagnosticsable +// returns a StackDiagnosticsable when successful +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) GetStackDiagnostics()(StackDiagnosticsable) { + return m.stackDiagnostics +} +// Serialize serializes information the current object +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetStackAggregateOutputs() != nil { + err := writer.WriteObjectValue("", m.GetStackAggregateOutputs()) + if err != nil { + return err + } + } else if m.GetStackConfigurationSummaries() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurationSummaries()) + if err != nil { + return err + } + } else if m.GetStackDiagnostics() != nil { + err := writer.WriteObjectValue("", m.GetStackDiagnostics()) + if err != nil { + return err + } + } + return nil +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type IngressAttributesable +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) SetIngressAttributes(value IngressAttributesable)() { + m.ingressAttributes = value +} +// SetStackAggregateOutputs sets the stackAggregateOutputs property value. Composed type representation for type StackAggregateOutputsable +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) SetStackAggregateOutputs(value StackAggregateOutputsable)() { + m.stackAggregateOutputs = value +} +// SetStackConfigurationSummaries sets the stackConfigurationSummaries property value. Composed type representation for type StackConfigurationSummariesable +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) SetStackConfigurationSummaries(value StackConfigurationSummariesable)() { + m.stackConfigurationSummaries = value +} +// SetStackDiagnostics sets the stackDiagnostics property value. Composed type representation for type StackDiagnosticsable +func (m *StackConfigurationsEnvelope_StackConfigurationsEnvelope_included) SetStackDiagnostics(value StackDiagnosticsable)() { + m.stackDiagnostics = value +} +type StackConfigurationsEnvelope_StackConfigurationsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIngressAttributes()(IngressAttributesable) + GetStackAggregateOutputs()(StackAggregateOutputsable) + GetStackConfigurationSummaries()(StackConfigurationSummariesable) + GetStackDiagnostics()(StackDiagnosticsable) + SetIngressAttributes(value IngressAttributesable)() + SetStackAggregateOutputs(value StackAggregateOutputsable)() + SetStackConfigurationSummaries(value StackConfigurationSummariesable)() + SetStackDiagnostics(value StackDiagnosticsable)() } // NewStackConfigurationsEnvelope instantiates a new StackConfigurationsEnvelope and sets the default values. func NewStackConfigurationsEnvelope()(*StackConfigurationsEnvelope) { @@ -49,8 +189,29 @@ func (m *StackConfigurationsEnvelope) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStackConfigurationsEnvelope_StackConfigurationsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StackConfigurationsEnvelope_StackConfigurationsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StackConfigurationsEnvelope_StackConfigurationsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []StackConfigurationsEnvelope_StackConfigurationsEnvelope_includedable when successful +func (m *StackConfigurationsEnvelope) GetIncluded()([]StackConfigurationsEnvelope_StackConfigurationsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *StackConfigurationsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +220,18 @@ func (m *StackConfigurationsEnvelope) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +248,15 @@ func (m *StackConfigurationsEnvelope) SetAdditionalData(value map[string]any)() func (m *StackConfigurationsEnvelope) SetData(value StackConfigurationsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *StackConfigurationsEnvelope) SetIncluded(value []StackConfigurationsEnvelope_StackConfigurationsEnvelope_includedable)() { + m.included = value +} type StackConfigurationsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(StackConfigurationsable) + GetIncluded()([]StackConfigurationsEnvelope_StackConfigurationsEnvelope_includedable) SetData(value StackConfigurationsable)() + SetIncluded(value []StackConfigurationsEnvelope_StackConfigurationsEnvelope_includedable)() } diff --git a/v2/api/models/stack_deployment_groups_envelope.go b/v2/api/models/stack_deployment_groups_envelope.go index e550eb857..9a03e30c8 100644 --- a/v2/api/models/stack_deployment_groups_envelope.go +++ b/v2/api/models/stack_deployment_groups_envelope.go @@ -12,6 +12,8 @@ type StackDeploymentGroupsEnvelope struct { additionalData map[string]any // The data property data StackDeploymentGroupsable + // The included property + included []StackDeploymentGroupSummariesable } // NewStackDeploymentGroupsEnvelope instantiates a new StackDeploymentGroupsEnvelope and sets the default values. func NewStackDeploymentGroupsEnvelope()(*StackDeploymentGroupsEnvelope) { @@ -49,8 +51,29 @@ func (m *StackDeploymentGroupsEnvelope) GetFieldDeserializers()(map[string]func( } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStackDeploymentGroupSummariesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StackDeploymentGroupSummariesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StackDeploymentGroupSummariesable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []StackDeploymentGroupSummariesable when successful +func (m *StackDeploymentGroupsEnvelope) GetIncluded()([]StackDeploymentGroupSummariesable) { + return m.included +} // Serialize serializes information the current object func (m *StackDeploymentGroupsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *StackDeploymentGroupsEnvelope) Serialize(writer i878a80d2330e89d2689638 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *StackDeploymentGroupsEnvelope) SetAdditionalData(value map[string]any)( func (m *StackDeploymentGroupsEnvelope) SetData(value StackDeploymentGroupsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *StackDeploymentGroupsEnvelope) SetIncluded(value []StackDeploymentGroupSummariesable)() { + m.included = value +} type StackDeploymentGroupsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(StackDeploymentGroupsable) + GetIncluded()([]StackDeploymentGroupSummariesable) SetData(value StackDeploymentGroupsable)() + SetIncluded(value []StackDeploymentGroupSummariesable)() } diff --git a/v2/api/models/stack_deployment_runs_envelope.go b/v2/api/models/stack_deployment_runs_envelope.go index 993e9ba20..90e9e1859 100644 --- a/v2/api/models/stack_deployment_runs_envelope.go +++ b/v2/api/models/stack_deployment_runs_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,211 @@ type StackDeploymentRunsEnvelope struct { additionalData map[string]any // The data property data StackDeploymentRunsable + // The included property + included []StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedable +} +// StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included composed type wrapper for classes StackApprovalsable, StackConfigurationsable, StackDeploymentGroupsable, StackDeploymentRunsable, StackDeploymentStepsable, StackStatesable, Usersable +type StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included struct { + // Composed type representation for type StackApprovalsable + stackApprovals StackApprovalsable + // Composed type representation for type StackConfigurationsable + stackConfigurations StackConfigurationsable + // Composed type representation for type StackDeploymentGroupsable + stackDeploymentGroups StackDeploymentGroupsable + // Composed type representation for type StackDeploymentRunsable + stackDeploymentRuns StackDeploymentRunsable + // Composed type representation for type StackDeploymentStepsable + stackDeploymentSteps StackDeploymentStepsable + // Composed type representation for type StackStatesable + stackStates StackStatesable + // Composed type representation for type Usersable + users Usersable +} +// NewStackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included instantiates a new StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included and sets the default values. +func NewStackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included()(*StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) { + m := &StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included{ + } + return m +} +// CreateStackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewStackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-approvals") { + result.SetStackApprovals(NewStackApprovals()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configurations") { + result.SetStackConfigurations(NewStackConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-deployment-groups") { + result.SetStackDeploymentGroups(NewStackDeploymentGroups()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-deployment-runs") { + result.SetStackDeploymentRuns(NewStackDeploymentRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-deployment-steps") { + result.SetStackDeploymentSteps(NewStackDeploymentSteps()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-states") { + result.SetStackStates(NewStackStates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(NewUsers()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetStackApprovals() != nil { + return m.GetStackApprovals().GetFieldDeserializers() + } else if m.GetStackConfigurations() != nil { + return m.GetStackConfigurations().GetFieldDeserializers() + } else if m.GetStackDeploymentGroups() != nil { + return m.GetStackDeploymentGroups().GetFieldDeserializers() + } else if m.GetStackDeploymentRuns() != nil { + return m.GetStackDeploymentRuns().GetFieldDeserializers() + } else if m.GetStackDeploymentSteps() != nil { + return m.GetStackDeploymentSteps().GetFieldDeserializers() + } else if m.GetStackStates() != nil { + return m.GetStackStates().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetStackApprovals gets the stackApprovals property value. Composed type representation for type StackApprovalsable +// returns a StackApprovalsable when successful +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) GetStackApprovals()(StackApprovalsable) { + return m.stackApprovals +} +// GetStackConfigurations gets the stackConfigurations property value. Composed type representation for type StackConfigurationsable +// returns a StackConfigurationsable when successful +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) GetStackConfigurations()(StackConfigurationsable) { + return m.stackConfigurations +} +// GetStackDeploymentGroups gets the stackDeploymentGroups property value. Composed type representation for type StackDeploymentGroupsable +// returns a StackDeploymentGroupsable when successful +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) GetStackDeploymentGroups()(StackDeploymentGroupsable) { + return m.stackDeploymentGroups +} +// GetStackDeploymentRuns gets the stackDeploymentRuns property value. Composed type representation for type StackDeploymentRunsable +// returns a StackDeploymentRunsable when successful +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) GetStackDeploymentRuns()(StackDeploymentRunsable) { + return m.stackDeploymentRuns +} +// GetStackDeploymentSteps gets the stackDeploymentSteps property value. Composed type representation for type StackDeploymentStepsable +// returns a StackDeploymentStepsable when successful +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) GetStackDeploymentSteps()(StackDeploymentStepsable) { + return m.stackDeploymentSteps +} +// GetStackStates gets the stackStates property value. Composed type representation for type StackStatesable +// returns a StackStatesable when successful +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) GetStackStates()(StackStatesable) { + return m.stackStates +} +// GetUsers gets the users property value. Composed type representation for type Usersable +// returns a Usersable when successful +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) GetUsers()(Usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStackApprovals() != nil { + err := writer.WriteObjectValue("", m.GetStackApprovals()) + if err != nil { + return err + } + } else if m.GetStackConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurations()) + if err != nil { + return err + } + } else if m.GetStackDeploymentGroups() != nil { + err := writer.WriteObjectValue("", m.GetStackDeploymentGroups()) + if err != nil { + return err + } + } else if m.GetStackDeploymentRuns() != nil { + err := writer.WriteObjectValue("", m.GetStackDeploymentRuns()) + if err != nil { + return err + } + } else if m.GetStackDeploymentSteps() != nil { + err := writer.WriteObjectValue("", m.GetStackDeploymentSteps()) + if err != nil { + return err + } + } else if m.GetStackStates() != nil { + err := writer.WriteObjectValue("", m.GetStackStates()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil +} +// SetStackApprovals sets the stackApprovals property value. Composed type representation for type StackApprovalsable +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) SetStackApprovals(value StackApprovalsable)() { + m.stackApprovals = value +} +// SetStackConfigurations sets the stackConfigurations property value. Composed type representation for type StackConfigurationsable +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) SetStackConfigurations(value StackConfigurationsable)() { + m.stackConfigurations = value +} +// SetStackDeploymentGroups sets the stackDeploymentGroups property value. Composed type representation for type StackDeploymentGroupsable +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) SetStackDeploymentGroups(value StackDeploymentGroupsable)() { + m.stackDeploymentGroups = value +} +// SetStackDeploymentRuns sets the stackDeploymentRuns property value. Composed type representation for type StackDeploymentRunsable +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) SetStackDeploymentRuns(value StackDeploymentRunsable)() { + m.stackDeploymentRuns = value +} +// SetStackDeploymentSteps sets the stackDeploymentSteps property value. Composed type representation for type StackDeploymentStepsable +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) SetStackDeploymentSteps(value StackDeploymentStepsable)() { + m.stackDeploymentSteps = value +} +// SetStackStates sets the stackStates property value. Composed type representation for type StackStatesable +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) SetStackStates(value StackStatesable)() { + m.stackStates = value +} +// SetUsers sets the users property value. Composed type representation for type Usersable +func (m *StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_included) SetUsers(value Usersable)() { + m.users = value +} +type StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackApprovals()(StackApprovalsable) + GetStackConfigurations()(StackConfigurationsable) + GetStackDeploymentGroups()(StackDeploymentGroupsable) + GetStackDeploymentRuns()(StackDeploymentRunsable) + GetStackDeploymentSteps()(StackDeploymentStepsable) + GetStackStates()(StackStatesable) + GetUsers()(Usersable) + SetStackApprovals(value StackApprovalsable)() + SetStackConfigurations(value StackConfigurationsable)() + SetStackDeploymentGroups(value StackDeploymentGroupsable)() + SetStackDeploymentRuns(value StackDeploymentRunsable)() + SetStackDeploymentSteps(value StackDeploymentStepsable)() + SetStackStates(value StackStatesable)() + SetUsers(value Usersable)() } // NewStackDeploymentRunsEnvelope instantiates a new StackDeploymentRunsEnvelope and sets the default values. func NewStackDeploymentRunsEnvelope()(*StackDeploymentRunsEnvelope) { @@ -49,8 +255,29 @@ func (m *StackDeploymentRunsEnvelope) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedable when successful +func (m *StackDeploymentRunsEnvelope) GetIncluded()([]StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *StackDeploymentRunsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +286,18 @@ func (m *StackDeploymentRunsEnvelope) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +314,15 @@ func (m *StackDeploymentRunsEnvelope) SetAdditionalData(value map[string]any)() func (m *StackDeploymentRunsEnvelope) SetData(value StackDeploymentRunsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *StackDeploymentRunsEnvelope) SetIncluded(value []StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedable)() { + m.included = value +} type StackDeploymentRunsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(StackDeploymentRunsable) + GetIncluded()([]StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedable) SetData(value StackDeploymentRunsable)() + SetIncluded(value []StackDeploymentRunsEnvelope_StackDeploymentRunsEnvelope_includedable)() } diff --git a/v2/api/models/stack_deployment_steps_envelope.go b/v2/api/models/stack_deployment_steps_envelope.go index 8ff5a8d5a..10328c128 100644 --- a/v2/api/models/stack_deployment_steps_envelope.go +++ b/v2/api/models/stack_deployment_steps_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,167 @@ type StackDeploymentStepsEnvelope struct { additionalData map[string]any // The data property data StackDeploymentStepsable + // The included property + included []StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedable +} +// StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included composed type wrapper for classes StackOperationAllowImportsable, StackOperationAppliesable, StackOperationImportStatesable, StackOperationPlansable, StackPolicyEvaluationsable +type StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included struct { + // Composed type representation for type StackOperationAllowImportsable + stackOperationAllowImports StackOperationAllowImportsable + // Composed type representation for type StackOperationAppliesable + stackOperationApplies StackOperationAppliesable + // Composed type representation for type StackOperationImportStatesable + stackOperationImportStates StackOperationImportStatesable + // Composed type representation for type StackOperationPlansable + stackOperationPlans StackOperationPlansable + // Composed type representation for type StackPolicyEvaluationsable + stackPolicyEvaluations StackPolicyEvaluationsable +} +// NewStackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included instantiates a new StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included and sets the default values. +func NewStackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included()(*StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) { + m := &StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included{ + } + return m +} +// CreateStackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewStackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-operation-allow-imports") { + result.SetStackOperationAllowImports(NewStackOperationAllowImports()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-operation-applies") { + result.SetStackOperationApplies(NewStackOperationApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-operation-import-states") { + result.SetStackOperationImportStates(NewStackOperationImportStates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-operation-plans") { + result.SetStackOperationPlans(NewStackOperationPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-policy-evaluations") { + result.SetStackPolicyEvaluations(NewStackPolicyEvaluations()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetStackOperationAllowImports() != nil { + return m.GetStackOperationAllowImports().GetFieldDeserializers() + } else if m.GetStackOperationApplies() != nil { + return m.GetStackOperationApplies().GetFieldDeserializers() + } else if m.GetStackOperationImportStates() != nil { + return m.GetStackOperationImportStates().GetFieldDeserializers() + } else if m.GetStackOperationPlans() != nil { + return m.GetStackOperationPlans().GetFieldDeserializers() + } else if m.GetStackPolicyEvaluations() != nil { + return m.GetStackPolicyEvaluations().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetStackOperationAllowImports gets the stackOperationAllowImports property value. Composed type representation for type StackOperationAllowImportsable +// returns a StackOperationAllowImportsable when successful +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) GetStackOperationAllowImports()(StackOperationAllowImportsable) { + return m.stackOperationAllowImports +} +// GetStackOperationApplies gets the stackOperationApplies property value. Composed type representation for type StackOperationAppliesable +// returns a StackOperationAppliesable when successful +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) GetStackOperationApplies()(StackOperationAppliesable) { + return m.stackOperationApplies +} +// GetStackOperationImportStates gets the stackOperationImportStates property value. Composed type representation for type StackOperationImportStatesable +// returns a StackOperationImportStatesable when successful +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) GetStackOperationImportStates()(StackOperationImportStatesable) { + return m.stackOperationImportStates +} +// GetStackOperationPlans gets the stackOperationPlans property value. Composed type representation for type StackOperationPlansable +// returns a StackOperationPlansable when successful +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) GetStackOperationPlans()(StackOperationPlansable) { + return m.stackOperationPlans +} +// GetStackPolicyEvaluations gets the stackPolicyEvaluations property value. Composed type representation for type StackPolicyEvaluationsable +// returns a StackPolicyEvaluationsable when successful +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) GetStackPolicyEvaluations()(StackPolicyEvaluationsable) { + return m.stackPolicyEvaluations +} +// Serialize serializes information the current object +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStackOperationAllowImports() != nil { + err := writer.WriteObjectValue("", m.GetStackOperationAllowImports()) + if err != nil { + return err + } + } else if m.GetStackOperationApplies() != nil { + err := writer.WriteObjectValue("", m.GetStackOperationApplies()) + if err != nil { + return err + } + } else if m.GetStackOperationImportStates() != nil { + err := writer.WriteObjectValue("", m.GetStackOperationImportStates()) + if err != nil { + return err + } + } else if m.GetStackOperationPlans() != nil { + err := writer.WriteObjectValue("", m.GetStackOperationPlans()) + if err != nil { + return err + } + } else if m.GetStackPolicyEvaluations() != nil { + err := writer.WriteObjectValue("", m.GetStackPolicyEvaluations()) + if err != nil { + return err + } + } + return nil +} +// SetStackOperationAllowImports sets the stackOperationAllowImports property value. Composed type representation for type StackOperationAllowImportsable +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) SetStackOperationAllowImports(value StackOperationAllowImportsable)() { + m.stackOperationAllowImports = value +} +// SetStackOperationApplies sets the stackOperationApplies property value. Composed type representation for type StackOperationAppliesable +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) SetStackOperationApplies(value StackOperationAppliesable)() { + m.stackOperationApplies = value +} +// SetStackOperationImportStates sets the stackOperationImportStates property value. Composed type representation for type StackOperationImportStatesable +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) SetStackOperationImportStates(value StackOperationImportStatesable)() { + m.stackOperationImportStates = value +} +// SetStackOperationPlans sets the stackOperationPlans property value. Composed type representation for type StackOperationPlansable +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) SetStackOperationPlans(value StackOperationPlansable)() { + m.stackOperationPlans = value +} +// SetStackPolicyEvaluations sets the stackPolicyEvaluations property value. Composed type representation for type StackPolicyEvaluationsable +func (m *StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_included) SetStackPolicyEvaluations(value StackPolicyEvaluationsable)() { + m.stackPolicyEvaluations = value +} +type StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackOperationAllowImports()(StackOperationAllowImportsable) + GetStackOperationApplies()(StackOperationAppliesable) + GetStackOperationImportStates()(StackOperationImportStatesable) + GetStackOperationPlans()(StackOperationPlansable) + GetStackPolicyEvaluations()(StackPolicyEvaluationsable) + SetStackOperationAllowImports(value StackOperationAllowImportsable)() + SetStackOperationApplies(value StackOperationAppliesable)() + SetStackOperationImportStates(value StackOperationImportStatesable)() + SetStackOperationPlans(value StackOperationPlansable)() + SetStackPolicyEvaluations(value StackPolicyEvaluationsable)() } // NewStackDeploymentStepsEnvelope instantiates a new StackDeploymentStepsEnvelope and sets the default values. func NewStackDeploymentStepsEnvelope()(*StackDeploymentStepsEnvelope) { @@ -49,8 +211,29 @@ func (m *StackDeploymentStepsEnvelope) GetFieldDeserializers()(map[string]func(i } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedable when successful +func (m *StackDeploymentStepsEnvelope) GetIncluded()([]StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *StackDeploymentStepsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +242,18 @@ func (m *StackDeploymentStepsEnvelope) Serialize(writer i878a80d2330e89d26896388 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +270,15 @@ func (m *StackDeploymentStepsEnvelope) SetAdditionalData(value map[string]any)() func (m *StackDeploymentStepsEnvelope) SetData(value StackDeploymentStepsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *StackDeploymentStepsEnvelope) SetIncluded(value []StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedable)() { + m.included = value +} type StackDeploymentStepsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(StackDeploymentStepsable) + GetIncluded()([]StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedable) SetData(value StackDeploymentStepsable)() + SetIncluded(value []StackDeploymentStepsEnvelope_StackDeploymentStepsEnvelope_includedable)() } diff --git a/v2/api/models/stack_deployment_steps_escaped_relationships.go b/v2/api/models/stack_deployment_steps_escaped_relationships.go index 2842f3362..0fbd2b389 100644 --- a/v2/api/models/stack_deployment_steps_escaped_relationships.go +++ b/v2/api/models/stack_deployment_steps_escaped_relationships.go @@ -16,6 +16,8 @@ type StackDeploymentSteps_relationships struct { stackDeploymentRun StackDeploymentRunsHasOneable // The stackDiagnostics property stackDiagnostics StackDeploymentSteps_relationships_stackDiagnosticsable + // The stackOperation property + stackOperation StackOperationHasOneable // The stackState property stackState StackStatesHasOneable } @@ -70,6 +72,16 @@ func (m *StackDeploymentSteps_relationships) GetFieldDeserializers()(map[string] } return nil } + res["stack-operation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationHasOneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStackOperation(val.(StackOperationHasOneable)) + } + return nil + } res["stack-state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateStackStatesHasOneFromDiscriminatorValue) if err != nil { @@ -97,6 +109,11 @@ func (m *StackDeploymentSteps_relationships) GetStackDeploymentRun()(StackDeploy func (m *StackDeploymentSteps_relationships) GetStackDiagnostics()(StackDeploymentSteps_relationships_stackDiagnosticsable) { return m.stackDiagnostics } +// GetStackOperation gets the stack-operation property value. The stackOperation property +// returns a StackOperationHasOneable when successful +func (m *StackDeploymentSteps_relationships) GetStackOperation()(StackOperationHasOneable) { + return m.stackOperation +} // GetStackState gets the stack-state property value. The stackState property // returns a StackStatesHasOneable when successful func (m *StackDeploymentSteps_relationships) GetStackState()(StackStatesHasOneable) { @@ -122,6 +139,12 @@ func (m *StackDeploymentSteps_relationships) Serialize(writer i878a80d2330e89d26 return err } } + { + err := writer.WriteObjectValue("stack-operation", m.GetStackOperation()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("stack-state", m.GetStackState()) if err != nil { @@ -152,6 +175,10 @@ func (m *StackDeploymentSteps_relationships) SetStackDeploymentRun(value StackDe func (m *StackDeploymentSteps_relationships) SetStackDiagnostics(value StackDeploymentSteps_relationships_stackDiagnosticsable)() { m.stackDiagnostics = value } +// SetStackOperation sets the stack-operation property value. The stackOperation property +func (m *StackDeploymentSteps_relationships) SetStackOperation(value StackOperationHasOneable)() { + m.stackOperation = value +} // SetStackState sets the stack-state property value. The stackState property func (m *StackDeploymentSteps_relationships) SetStackState(value StackStatesHasOneable)() { m.stackState = value @@ -162,9 +189,11 @@ type StackDeploymentSteps_relationshipsable interface { GetStackApproval()(StackApprovalsHasOneable) GetStackDeploymentRun()(StackDeploymentRunsHasOneable) GetStackDiagnostics()(StackDeploymentSteps_relationships_stackDiagnosticsable) + GetStackOperation()(StackOperationHasOneable) GetStackState()(StackStatesHasOneable) SetStackApproval(value StackApprovalsHasOneable)() SetStackDeploymentRun(value StackDeploymentRunsHasOneable)() SetStackDiagnostics(value StackDeploymentSteps_relationships_stackDiagnosticsable)() + SetStackOperation(value StackOperationHasOneable)() SetStackState(value StackStatesHasOneable)() } diff --git a/v2/api/models/stack_operation_allow_imports.go b/v2/api/models/stack_operation_allow_imports.go new file mode 100644 index 000000000..abf6a87b0 --- /dev/null +++ b/v2/api/models/stack_operation_allow_imports.go @@ -0,0 +1,129 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationAllowImports struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes StackOperationAllowImports_attributesable + // The id property + id *string + // The type property + typeEscaped *StackOperationAllowImports_type +} +// NewStackOperationAllowImports instantiates a new StackOperationAllowImports and sets the default values. +func NewStackOperationAllowImports()(*StackOperationAllowImports) { + m := &StackOperationAllowImports{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationAllowImportsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationAllowImportsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationAllowImports(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationAllowImports) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a StackOperationAllowImports_attributesable when successful +func (m *StackOperationAllowImports) GetAttributes()(StackOperationAllowImports_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationAllowImports) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationAllowImports_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(StackOperationAllowImports_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackOperationAllowImports_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackOperationAllowImports_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackOperationAllowImports) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackOperationAllowImports_type when successful +func (m *StackOperationAllowImports) GetTypeEscaped()(*StackOperationAllowImports_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackOperationAllowImports) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationAllowImports) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *StackOperationAllowImports) SetAttributes(value StackOperationAllowImports_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *StackOperationAllowImports) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackOperationAllowImports) SetTypeEscaped(value *StackOperationAllowImports_type)() { + m.typeEscaped = value +} +type StackOperationAllowImportsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(StackOperationAllowImports_attributesable) + GetId()(*string) + GetTypeEscaped()(*StackOperationAllowImports_type) + SetAttributes(value StackOperationAllowImports_attributesable)() + SetId(value *string)() + SetTypeEscaped(value *StackOperationAllowImports_type)() +} diff --git a/v2/api/models/stack_operation_allow_imports_escaped_attributes.go b/v2/api/models/stack_operation_allow_imports_escaped_attributes.go new file mode 100644 index 000000000..7c03b072c --- /dev/null +++ b/v2/api/models/stack_operation_allow_imports_escaped_attributes.go @@ -0,0 +1,101 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationAllowImports_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The createdAt property + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The updatedAt property + updatedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewStackOperationAllowImports_attributes instantiates a new StackOperationAllowImports_attributes and sets the default values. +func NewStackOperationAllowImports_attributes()(*StackOperationAllowImports_attributes) { + m := &StackOperationAllowImports_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationAllowImports_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationAllowImports_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationAllowImports_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationAllowImports_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created-at property value. The createdAt property +// returns a *Time when successful +func (m *StackOperationAllowImports_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationAllowImports_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["updated-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetUpdatedAt gets the updated-at property value. The updatedAt property +// returns a *Time when successful +func (m *StackOperationAllowImports_attributes) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedAt +} +// Serialize serializes information the current object +func (m *StackOperationAllowImports_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationAllowImports_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created-at property value. The createdAt property +func (m *StackOperationAllowImports_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetUpdatedAt sets the updated-at property value. The updatedAt property +func (m *StackOperationAllowImports_attributes) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedAt = value +} +type StackOperationAllowImports_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/v2/api/models/stack_operation_allow_imports_escaped_type.go b/v2/api/models/stack_operation_allow_imports_escaped_type.go new file mode 100644 index 000000000..449e64a08 --- /dev/null +++ b/v2/api/models/stack_operation_allow_imports_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackOperationAllowImports_type int + +const ( + STACKOPERATIONALLOWIMPORTS_STACKOPERATIONALLOWIMPORTS_TYPE StackOperationAllowImports_type = iota +) + +func (i StackOperationAllowImports_type) String() string { + return []string{"stack-operation-allow-imports"}[i] +} +func ParseStackOperationAllowImports_type(v string) (any, error) { + result := STACKOPERATIONALLOWIMPORTS_STACKOPERATIONALLOWIMPORTS_TYPE + switch v { + case "stack-operation-allow-imports": + result = STACKOPERATIONALLOWIMPORTS_STACKOPERATIONALLOWIMPORTS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackOperationAllowImports_type(values []StackOperationAllowImports_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackOperationAllowImports_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_operation_applies.go b/v2/api/models/stack_operation_applies.go new file mode 100644 index 000000000..de1df5654 --- /dev/null +++ b/v2/api/models/stack_operation_applies.go @@ -0,0 +1,158 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationApplies struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes StackOperationApplies_attributesable + // The id property + id *string + // The links property + links StackOperationApplies_linksable + // The type property + typeEscaped *StackOperationApplies_type +} +// NewStackOperationApplies instantiates a new StackOperationApplies and sets the default values. +func NewStackOperationApplies()(*StackOperationApplies) { + m := &StackOperationApplies{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationAppliesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationAppliesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationApplies(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationApplies) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a StackOperationApplies_attributesable when successful +func (m *StackOperationApplies) GetAttributes()(StackOperationApplies_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationApplies) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationApplies_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(StackOperationApplies_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationApplies_linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(StackOperationApplies_linksable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackOperationApplies_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackOperationApplies_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackOperationApplies) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a StackOperationApplies_linksable when successful +func (m *StackOperationApplies) GetLinks()(StackOperationApplies_linksable) { + return m.links +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackOperationApplies_type when successful +func (m *StackOperationApplies) GetTypeEscaped()(*StackOperationApplies_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackOperationApplies) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationApplies) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *StackOperationApplies) SetAttributes(value StackOperationApplies_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *StackOperationApplies) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *StackOperationApplies) SetLinks(value StackOperationApplies_linksable)() { + m.links = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackOperationApplies) SetTypeEscaped(value *StackOperationApplies_type)() { + m.typeEscaped = value +} +type StackOperationAppliesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(StackOperationApplies_attributesable) + GetId()(*string) + GetLinks()(StackOperationApplies_linksable) + GetTypeEscaped()(*StackOperationApplies_type) + SetAttributes(value StackOperationApplies_attributesable)() + SetId(value *string)() + SetLinks(value StackOperationApplies_linksable)() + SetTypeEscaped(value *StackOperationApplies_type)() +} diff --git a/v2/api/models/stack_operation_applies_escaped_attributes.go b/v2/api/models/stack_operation_applies_escaped_attributes.go new file mode 100644 index 000000000..9951a891c --- /dev/null +++ b/v2/api/models/stack_operation_applies_escaped_attributes.go @@ -0,0 +1,101 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationApplies_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The createdAt property + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The updatedAt property + updatedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewStackOperationApplies_attributes instantiates a new StackOperationApplies_attributes and sets the default values. +func NewStackOperationApplies_attributes()(*StackOperationApplies_attributes) { + m := &StackOperationApplies_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationApplies_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationApplies_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationApplies_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationApplies_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created-at property value. The createdAt property +// returns a *Time when successful +func (m *StackOperationApplies_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationApplies_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["updated-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetUpdatedAt gets the updated-at property value. The updatedAt property +// returns a *Time when successful +func (m *StackOperationApplies_attributes) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedAt +} +// Serialize serializes information the current object +func (m *StackOperationApplies_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationApplies_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created-at property value. The createdAt property +func (m *StackOperationApplies_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetUpdatedAt sets the updated-at property value. The updatedAt property +func (m *StackOperationApplies_attributes) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedAt = value +} +type StackOperationApplies_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/v2/api/models/stack_operation_applies_escaped_links.go b/v2/api/models/stack_operation_applies_escaped_links.go new file mode 100644 index 000000000..1091ccb67 --- /dev/null +++ b/v2/api/models/stack_operation_applies_escaped_links.go @@ -0,0 +1,112 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationApplies_links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The applyDebugLog property + applyDebugLog *string + // The applyDescription property + applyDescription *string +} +// NewStackOperationApplies_links instantiates a new StackOperationApplies_links and sets the default values. +func NewStackOperationApplies_links()(*StackOperationApplies_links) { + m := &StackOperationApplies_links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationApplies_linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationApplies_linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationApplies_links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationApplies_links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApplyDebugLog gets the apply-debug-log property value. The applyDebugLog property +// returns a *string when successful +func (m *StackOperationApplies_links) GetApplyDebugLog()(*string) { + return m.applyDebugLog +} +// GetApplyDescription gets the apply-description property value. The applyDescription property +// returns a *string when successful +func (m *StackOperationApplies_links) GetApplyDescription()(*string) { + return m.applyDescription +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationApplies_links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apply-debug-log"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplyDebugLog(val) + } + return nil + } + res["apply-description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplyDescription(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *StackOperationApplies_links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("apply-debug-log", m.GetApplyDebugLog()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("apply-description", m.GetApplyDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationApplies_links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApplyDebugLog sets the apply-debug-log property value. The applyDebugLog property +func (m *StackOperationApplies_links) SetApplyDebugLog(value *string)() { + m.applyDebugLog = value +} +// SetApplyDescription sets the apply-description property value. The applyDescription property +func (m *StackOperationApplies_links) SetApplyDescription(value *string)() { + m.applyDescription = value +} +type StackOperationApplies_linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplyDebugLog()(*string) + GetApplyDescription()(*string) + SetApplyDebugLog(value *string)() + SetApplyDescription(value *string)() +} diff --git a/v2/api/models/stack_operation_applies_escaped_type.go b/v2/api/models/stack_operation_applies_escaped_type.go new file mode 100644 index 000000000..8ee418269 --- /dev/null +++ b/v2/api/models/stack_operation_applies_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackOperationApplies_type int + +const ( + STACKOPERATIONAPPLIES_STACKOPERATIONAPPLIES_TYPE StackOperationApplies_type = iota +) + +func (i StackOperationApplies_type) String() string { + return []string{"stack-operation-applies"}[i] +} +func ParseStackOperationApplies_type(v string) (any, error) { + result := STACKOPERATIONAPPLIES_STACKOPERATIONAPPLIES_TYPE + switch v { + case "stack-operation-applies": + result = STACKOPERATIONAPPLIES_STACKOPERATIONAPPLIES_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackOperationApplies_type(values []StackOperationApplies_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackOperationApplies_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_operation_has_one.go b/v2/api/models/stack_operation_has_one.go new file mode 100644 index 000000000..47ecaccd1 --- /dev/null +++ b/v2/api/models/stack_operation_has_one.go @@ -0,0 +1,112 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationHasOne struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data StackOperationIdentifierable + // The links property + links Relatedable +} +// NewStackOperationHasOne instantiates a new StackOperationHasOne and sets the default values. +func NewStackOperationHasOne()(*StackOperationHasOne) { + m := &StackOperationHasOne{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationHasOneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationHasOneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationHasOne(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationHasOne) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a StackOperationIdentifierable when successful +func (m *StackOperationHasOne) GetData()(StackOperationIdentifierable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationHasOne) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationIdentifierFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetData(val.(StackOperationIdentifierable)) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRelatedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(Relatedable)) + } + return nil + } + return res +} +// GetLinks gets the links property value. The links property +// returns a Relatedable when successful +func (m *StackOperationHasOne) GetLinks()(Relatedable) { + return m.links +} +// Serialize serializes information the current object +func (m *StackOperationHasOne) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationHasOne) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *StackOperationHasOne) SetData(value StackOperationIdentifierable)() { + m.data = value +} +// SetLinks sets the links property value. The links property +func (m *StackOperationHasOne) SetLinks(value Relatedable)() { + m.links = value +} +type StackOperationHasOneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()(StackOperationIdentifierable) + GetLinks()(Relatedable) + SetData(value StackOperationIdentifierable)() + SetLinks(value Relatedable)() +} diff --git a/v2/api/models/stack_operation_identifier.go b/v2/api/models/stack_operation_identifier.go new file mode 100644 index 000000000..73e7bd693 --- /dev/null +++ b/v2/api/models/stack_operation_identifier.go @@ -0,0 +1,113 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationIdentifier struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *string + // The type property + typeEscaped *StackOperationIdentifier_type +} +// NewStackOperationIdentifier instantiates a new StackOperationIdentifier and sets the default values. +func NewStackOperationIdentifier()(*StackOperationIdentifier) { + m := &StackOperationIdentifier{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationIdentifierFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationIdentifierFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationIdentifier(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationIdentifier) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationIdentifier) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackOperationIdentifier_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackOperationIdentifier_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackOperationIdentifier) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackOperationIdentifier_type when successful +func (m *StackOperationIdentifier) GetTypeEscaped()(*StackOperationIdentifier_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackOperationIdentifier) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationIdentifier) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *StackOperationIdentifier) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackOperationIdentifier) SetTypeEscaped(value *StackOperationIdentifier_type)() { + m.typeEscaped = value +} +type StackOperationIdentifierable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetTypeEscaped()(*StackOperationIdentifier_type) + SetId(value *string)() + SetTypeEscaped(value *StackOperationIdentifier_type)() +} diff --git a/v2/api/models/stack_operation_identifier_escaped_type.go b/v2/api/models/stack_operation_identifier_escaped_type.go new file mode 100644 index 000000000..f5e384f7a --- /dev/null +++ b/v2/api/models/stack_operation_identifier_escaped_type.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackOperationIdentifier_type int + +const ( + STACKOPERATIONPLANS_STACKOPERATIONIDENTIFIER_TYPE StackOperationIdentifier_type = iota + STACKOPERATIONAPPLIES_STACKOPERATIONIDENTIFIER_TYPE + STACKOPERATIONIMPORTSTATES_STACKOPERATIONIDENTIFIER_TYPE + STACKOPERATIONALLOWIMPORTS_STACKOPERATIONIDENTIFIER_TYPE +) + +func (i StackOperationIdentifier_type) String() string { + return []string{"stack-operation-plans", "stack-operation-applies", "stack-operation-import-states", "stack-operation-allow-imports"}[i] +} +func ParseStackOperationIdentifier_type(v string) (any, error) { + result := STACKOPERATIONPLANS_STACKOPERATIONIDENTIFIER_TYPE + switch v { + case "stack-operation-plans": + result = STACKOPERATIONPLANS_STACKOPERATIONIDENTIFIER_TYPE + case "stack-operation-applies": + result = STACKOPERATIONAPPLIES_STACKOPERATIONIDENTIFIER_TYPE + case "stack-operation-import-states": + result = STACKOPERATIONIMPORTSTATES_STACKOPERATIONIDENTIFIER_TYPE + case "stack-operation-allow-imports": + result = STACKOPERATIONALLOWIMPORTS_STACKOPERATIONIDENTIFIER_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackOperationIdentifier_type(values []StackOperationIdentifier_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackOperationIdentifier_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_operation_import_states.go b/v2/api/models/stack_operation_import_states.go new file mode 100644 index 000000000..1c8e10fcb --- /dev/null +++ b/v2/api/models/stack_operation_import_states.go @@ -0,0 +1,158 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationImportStates struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes StackOperationImportStates_attributesable + // The id property + id *string + // The links property + links StackOperationImportStates_linksable + // The type property + typeEscaped *StackOperationImportStates_type +} +// NewStackOperationImportStates instantiates a new StackOperationImportStates and sets the default values. +func NewStackOperationImportStates()(*StackOperationImportStates) { + m := &StackOperationImportStates{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationImportStatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationImportStatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationImportStates(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationImportStates) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a StackOperationImportStates_attributesable when successful +func (m *StackOperationImportStates) GetAttributes()(StackOperationImportStates_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationImportStates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationImportStates_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(StackOperationImportStates_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationImportStates_linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(StackOperationImportStates_linksable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackOperationImportStates_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackOperationImportStates_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackOperationImportStates) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a StackOperationImportStates_linksable when successful +func (m *StackOperationImportStates) GetLinks()(StackOperationImportStates_linksable) { + return m.links +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackOperationImportStates_type when successful +func (m *StackOperationImportStates) GetTypeEscaped()(*StackOperationImportStates_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackOperationImportStates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationImportStates) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *StackOperationImportStates) SetAttributes(value StackOperationImportStates_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *StackOperationImportStates) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *StackOperationImportStates) SetLinks(value StackOperationImportStates_linksable)() { + m.links = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackOperationImportStates) SetTypeEscaped(value *StackOperationImportStates_type)() { + m.typeEscaped = value +} +type StackOperationImportStatesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(StackOperationImportStates_attributesable) + GetId()(*string) + GetLinks()(StackOperationImportStates_linksable) + GetTypeEscaped()(*StackOperationImportStates_type) + SetAttributes(value StackOperationImportStates_attributesable)() + SetId(value *string)() + SetLinks(value StackOperationImportStates_linksable)() + SetTypeEscaped(value *StackOperationImportStates_type)() +} diff --git a/v2/api/models/stack_operation_import_states_escaped_attributes.go b/v2/api/models/stack_operation_import_states_escaped_attributes.go new file mode 100644 index 000000000..9ec859160 --- /dev/null +++ b/v2/api/models/stack_operation_import_states_escaped_attributes.go @@ -0,0 +1,101 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationImportStates_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The createdAt property + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The updatedAt property + updatedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewStackOperationImportStates_attributes instantiates a new StackOperationImportStates_attributes and sets the default values. +func NewStackOperationImportStates_attributes()(*StackOperationImportStates_attributes) { + m := &StackOperationImportStates_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationImportStates_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationImportStates_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationImportStates_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationImportStates_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created-at property value. The createdAt property +// returns a *Time when successful +func (m *StackOperationImportStates_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationImportStates_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["updated-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetUpdatedAt gets the updated-at property value. The updatedAt property +// returns a *Time when successful +func (m *StackOperationImportStates_attributes) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedAt +} +// Serialize serializes information the current object +func (m *StackOperationImportStates_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationImportStates_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created-at property value. The createdAt property +func (m *StackOperationImportStates_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetUpdatedAt sets the updated-at property value. The updatedAt property +func (m *StackOperationImportStates_attributes) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedAt = value +} +type StackOperationImportStates_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/v2/api/models/stack_operation_import_states_escaped_links.go b/v2/api/models/stack_operation_import_states_escaped_links.go new file mode 100644 index 000000000..d85fe214f --- /dev/null +++ b/v2/api/models/stack_operation_import_states_escaped_links.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationImportStates_links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The uploadUrl property + uploadUrl *string +} +// NewStackOperationImportStates_links instantiates a new StackOperationImportStates_links and sets the default values. +func NewStackOperationImportStates_links()(*StackOperationImportStates_links) { + m := &StackOperationImportStates_links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationImportStates_linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationImportStates_linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationImportStates_links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationImportStates_links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationImportStates_links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["upload-url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUploadUrl(val) + } + return nil + } + return res +} +// GetUploadUrl gets the upload-url property value. The uploadUrl property +// returns a *string when successful +func (m *StackOperationImportStates_links) GetUploadUrl()(*string) { + return m.uploadUrl +} +// Serialize serializes information the current object +func (m *StackOperationImportStates_links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("upload-url", m.GetUploadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationImportStates_links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUploadUrl sets the upload-url property value. The uploadUrl property +func (m *StackOperationImportStates_links) SetUploadUrl(value *string)() { + m.uploadUrl = value +} +type StackOperationImportStates_linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUploadUrl()(*string) + SetUploadUrl(value *string)() +} diff --git a/v2/api/models/stack_operation_import_states_escaped_type.go b/v2/api/models/stack_operation_import_states_escaped_type.go new file mode 100644 index 000000000..54d5bca42 --- /dev/null +++ b/v2/api/models/stack_operation_import_states_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackOperationImportStates_type int + +const ( + STACKOPERATIONIMPORTSTATES_STACKOPERATIONIMPORTSTATES_TYPE StackOperationImportStates_type = iota +) + +func (i StackOperationImportStates_type) String() string { + return []string{"stack-operation-import-states"}[i] +} +func ParseStackOperationImportStates_type(v string) (any, error) { + result := STACKOPERATIONIMPORTSTATES_STACKOPERATIONIMPORTSTATES_TYPE + switch v { + case "stack-operation-import-states": + result = STACKOPERATIONIMPORTSTATES_STACKOPERATIONIMPORTSTATES_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackOperationImportStates_type(values []StackOperationImportStates_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackOperationImportStates_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_operation_plans.go b/v2/api/models/stack_operation_plans.go new file mode 100644 index 000000000..d0d3e9d83 --- /dev/null +++ b/v2/api/models/stack_operation_plans.go @@ -0,0 +1,187 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationPlans struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes StackOperationPlans_attributesable + // The id property + id *string + // The links property + links StackOperationPlans_linksable + // The relationships property + relationships StackOperationPlans_relationshipsable + // The type property + typeEscaped *StackOperationPlans_type +} +// NewStackOperationPlans instantiates a new StackOperationPlans and sets the default values. +func NewStackOperationPlans()(*StackOperationPlans) { + m := &StackOperationPlans{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationPlansFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationPlansFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationPlans(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationPlans) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a StackOperationPlans_attributesable when successful +func (m *StackOperationPlans) GetAttributes()(StackOperationPlans_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationPlans) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationPlans_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(StackOperationPlans_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationPlans_linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(StackOperationPlans_linksable)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationPlans_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(StackOperationPlans_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackOperationPlans_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackOperationPlans_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackOperationPlans) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a StackOperationPlans_linksable when successful +func (m *StackOperationPlans) GetLinks()(StackOperationPlans_linksable) { + return m.links +} +// GetRelationships gets the relationships property value. The relationships property +// returns a StackOperationPlans_relationshipsable when successful +func (m *StackOperationPlans) GetRelationships()(StackOperationPlans_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackOperationPlans_type when successful +func (m *StackOperationPlans) GetTypeEscaped()(*StackOperationPlans_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackOperationPlans) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationPlans) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *StackOperationPlans) SetAttributes(value StackOperationPlans_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *StackOperationPlans) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *StackOperationPlans) SetLinks(value StackOperationPlans_linksable)() { + m.links = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *StackOperationPlans) SetRelationships(value StackOperationPlans_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackOperationPlans) SetTypeEscaped(value *StackOperationPlans_type)() { + m.typeEscaped = value +} +type StackOperationPlansable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(StackOperationPlans_attributesable) + GetId()(*string) + GetLinks()(StackOperationPlans_linksable) + GetRelationships()(StackOperationPlans_relationshipsable) + GetTypeEscaped()(*StackOperationPlans_type) + SetAttributes(value StackOperationPlans_attributesable)() + SetId(value *string)() + SetLinks(value StackOperationPlans_linksable)() + SetRelationships(value StackOperationPlans_relationshipsable)() + SetTypeEscaped(value *StackOperationPlans_type)() +} diff --git a/v2/api/models/stack_operation_plans_escaped_attributes.go b/v2/api/models/stack_operation_plans_escaped_attributes.go new file mode 100644 index 000000000..b996f0efe --- /dev/null +++ b/v2/api/models/stack_operation_plans_escaped_attributes.go @@ -0,0 +1,124 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationPlans_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Summary of the resource changes detected by the plan operation. + changeSummary StackOperationPlans_attributes_changeSummaryable + // The createdAt property + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The updatedAt property + updatedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewStackOperationPlans_attributes instantiates a new StackOperationPlans_attributes and sets the default values. +func NewStackOperationPlans_attributes()(*StackOperationPlans_attributes) { + m := &StackOperationPlans_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationPlans_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationPlans_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationPlans_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationPlans_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChangeSummary gets the change-summary property value. Summary of the resource changes detected by the plan operation. +// returns a StackOperationPlans_attributes_changeSummaryable when successful +func (m *StackOperationPlans_attributes) GetChangeSummary()(StackOperationPlans_attributes_changeSummaryable) { + return m.changeSummary +} +// GetCreatedAt gets the created-at property value. The createdAt property +// returns a *Time when successful +func (m *StackOperationPlans_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationPlans_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["change-summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackOperationPlans_attributes_changeSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChangeSummary(val.(StackOperationPlans_attributes_changeSummaryable)) + } + return nil + } + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["updated-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetUpdatedAt gets the updated-at property value. The updatedAt property +// returns a *Time when successful +func (m *StackOperationPlans_attributes) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedAt +} +// Serialize serializes information the current object +func (m *StackOperationPlans_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationPlans_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChangeSummary sets the change-summary property value. Summary of the resource changes detected by the plan operation. +func (m *StackOperationPlans_attributes) SetChangeSummary(value StackOperationPlans_attributes_changeSummaryable)() { + m.changeSummary = value +} +// SetCreatedAt sets the created-at property value. The createdAt property +func (m *StackOperationPlans_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetUpdatedAt sets the updated-at property value. The updatedAt property +func (m *StackOperationPlans_attributes) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedAt = value +} +type StackOperationPlans_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChangeSummary()(StackOperationPlans_attributes_changeSummaryable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetChangeSummary(value StackOperationPlans_attributes_changeSummaryable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/v2/api/models/stack_operation_plans_escaped_attributes_escaped_change_summary.go b/v2/api/models/stack_operation_plans_escaped_attributes_escaped_change_summary.go new file mode 100644 index 000000000..92afce2c1 --- /dev/null +++ b/v2/api/models/stack_operation_plans_escaped_attributes_escaped_change_summary.go @@ -0,0 +1,147 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StackOperationPlans_attributes_changeSummary summary of the resource changes detected by the plan operation. +type StackOperationPlans_attributes_changeSummary struct { + // The add property + add *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The change property + change *int32 + // The remove property + remove *int32 + // The total property + total *int32 +} +// NewStackOperationPlans_attributes_changeSummary instantiates a new StackOperationPlans_attributes_changeSummary and sets the default values. +func NewStackOperationPlans_attributes_changeSummary()(*StackOperationPlans_attributes_changeSummary) { + m := &StackOperationPlans_attributes_changeSummary{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationPlans_attributes_changeSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationPlans_attributes_changeSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationPlans_attributes_changeSummary(), nil +} +// GetAdd gets the add property value. The add property +// returns a *int32 when successful +func (m *StackOperationPlans_attributes_changeSummary) GetAdd()(*int32) { + return m.add +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationPlans_attributes_changeSummary) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChange gets the change property value. The change property +// returns a *int32 when successful +func (m *StackOperationPlans_attributes_changeSummary) GetChange()(*int32) { + return m.change +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationPlans_attributes_changeSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["add"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdd(val) + } + return nil + } + res["change"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetChange(val) + } + return nil + } + res["remove"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemove(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetRemove gets the remove property value. The remove property +// returns a *int32 when successful +func (m *StackOperationPlans_attributes_changeSummary) GetRemove()(*int32) { + return m.remove +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *StackOperationPlans_attributes_changeSummary) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *StackOperationPlans_attributes_changeSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdd sets the add property value. The add property +func (m *StackOperationPlans_attributes_changeSummary) SetAdd(value *int32)() { + m.add = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationPlans_attributes_changeSummary) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChange sets the change property value. The change property +func (m *StackOperationPlans_attributes_changeSummary) SetChange(value *int32)() { + m.change = value +} +// SetRemove sets the remove property value. The remove property +func (m *StackOperationPlans_attributes_changeSummary) SetRemove(value *int32)() { + m.remove = value +} +// SetTotal sets the total property value. The total property +func (m *StackOperationPlans_attributes_changeSummary) SetTotal(value *int32)() { + m.total = value +} +type StackOperationPlans_attributes_changeSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdd()(*int32) + GetChange()(*int32) + GetRemove()(*int32) + GetTotal()(*int32) + SetAdd(value *int32)() + SetChange(value *int32)() + SetRemove(value *int32)() + SetTotal(value *int32)() +} diff --git a/v2/api/models/stack_operation_plans_escaped_links.go b/v2/api/models/stack_operation_plans_escaped_links.go new file mode 100644 index 000000000..61d16c8f7 --- /dev/null +++ b/v2/api/models/stack_operation_plans_escaped_links.go @@ -0,0 +1,112 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationPlans_links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The planDebugLog property + planDebugLog *string + // The planDescription property + planDescription *string +} +// NewStackOperationPlans_links instantiates a new StackOperationPlans_links and sets the default values. +func NewStackOperationPlans_links()(*StackOperationPlans_links) { + m := &StackOperationPlans_links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationPlans_linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationPlans_linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationPlans_links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationPlans_links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationPlans_links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["plan-debug-log"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlanDebugLog(val) + } + return nil + } + res["plan-description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlanDescription(val) + } + return nil + } + return res +} +// GetPlanDebugLog gets the plan-debug-log property value. The planDebugLog property +// returns a *string when successful +func (m *StackOperationPlans_links) GetPlanDebugLog()(*string) { + return m.planDebugLog +} +// GetPlanDescription gets the plan-description property value. The planDescription property +// returns a *string when successful +func (m *StackOperationPlans_links) GetPlanDescription()(*string) { + return m.planDescription +} +// Serialize serializes information the current object +func (m *StackOperationPlans_links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("plan-debug-log", m.GetPlanDebugLog()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("plan-description", m.GetPlanDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationPlans_links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPlanDebugLog sets the plan-debug-log property value. The planDebugLog property +func (m *StackOperationPlans_links) SetPlanDebugLog(value *string)() { + m.planDebugLog = value +} +// SetPlanDescription sets the plan-description property value. The planDescription property +func (m *StackOperationPlans_links) SetPlanDescription(value *string)() { + m.planDescription = value +} +type StackOperationPlans_linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPlanDebugLog()(*string) + GetPlanDescription()(*string) + SetPlanDebugLog(value *string)() + SetPlanDescription(value *string)() +} diff --git a/v2/api/models/stack_operation_plans_escaped_relationships.go b/v2/api/models/stack_operation_plans_escaped_relationships.go new file mode 100644 index 000000000..eb9df03a3 --- /dev/null +++ b/v2/api/models/stack_operation_plans_escaped_relationships.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackOperationPlans_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The policyEvaluation property + policyEvaluation StackPolicyEvaluationsHasOneable +} +// NewStackOperationPlans_relationships instantiates a new StackOperationPlans_relationships and sets the default values. +func NewStackOperationPlans_relationships()(*StackOperationPlans_relationships) { + m := &StackOperationPlans_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackOperationPlans_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackOperationPlans_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackOperationPlans_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackOperationPlans_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackOperationPlans_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["policy-evaluation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluationsHasOneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPolicyEvaluation(val.(StackPolicyEvaluationsHasOneable)) + } + return nil + } + return res +} +// GetPolicyEvaluation gets the policy-evaluation property value. The policyEvaluation property +// returns a StackPolicyEvaluationsHasOneable when successful +func (m *StackOperationPlans_relationships) GetPolicyEvaluation()(StackPolicyEvaluationsHasOneable) { + return m.policyEvaluation +} +// Serialize serializes information the current object +func (m *StackOperationPlans_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("policy-evaluation", m.GetPolicyEvaluation()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackOperationPlans_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPolicyEvaluation sets the policy-evaluation property value. The policyEvaluation property +func (m *StackOperationPlans_relationships) SetPolicyEvaluation(value StackPolicyEvaluationsHasOneable)() { + m.policyEvaluation = value +} +type StackOperationPlans_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPolicyEvaluation()(StackPolicyEvaluationsHasOneable) + SetPolicyEvaluation(value StackPolicyEvaluationsHasOneable)() +} diff --git a/v2/api/models/stack_operation_plans_escaped_type.go b/v2/api/models/stack_operation_plans_escaped_type.go new file mode 100644 index 000000000..68a05b683 --- /dev/null +++ b/v2/api/models/stack_operation_plans_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackOperationPlans_type int + +const ( + STACKOPERATIONPLANS_STACKOPERATIONPLANS_TYPE StackOperationPlans_type = iota +) + +func (i StackOperationPlans_type) String() string { + return []string{"stack-operation-plans"}[i] +} +func ParseStackOperationPlans_type(v string) (any, error) { + result := STACKOPERATIONPLANS_STACKOPERATIONPLANS_TYPE + switch v { + case "stack-operation-plans": + result = STACKOPERATIONPLANS_STACKOPERATIONPLANS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackOperationPlans_type(values []StackOperationPlans_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackOperationPlans_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_policy_evaluations.go b/v2/api/models/stack_policy_evaluations.go new file mode 100644 index 000000000..4aa168bbf --- /dev/null +++ b/v2/api/models/stack_policy_evaluations.go @@ -0,0 +1,195 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StackPolicyEvaluations represents a Terraform Policy evaluation for a Stacks plan operation. +type StackPolicyEvaluations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes StackPolicyEvaluations_attributesable + // The id property + id *string + // The links property + links StackPolicyEvaluations_linksable + // The relationships property + relationships StackPolicyEvaluations_relationshipsable + // The type property + typeEscaped *StackPolicyEvaluations_type +} +// NewStackPolicyEvaluations instantiates a new StackPolicyEvaluations and sets the default values. +func NewStackPolicyEvaluations()(*StackPolicyEvaluations) { + m := &StackPolicyEvaluations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a StackPolicyEvaluations_attributesable when successful +func (m *StackPolicyEvaluations) GetAttributes()(StackPolicyEvaluations_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluations_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(StackPolicyEvaluations_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluations_linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(StackPolicyEvaluations_linksable)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluations_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(StackPolicyEvaluations_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackPolicyEvaluations_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackPolicyEvaluations_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackPolicyEvaluations) GetId()(*string) { + return m.id +} +// GetLinks gets the links property value. The links property +// returns a StackPolicyEvaluations_linksable when successful +func (m *StackPolicyEvaluations) GetLinks()(StackPolicyEvaluations_linksable) { + return m.links +} +// GetRelationships gets the relationships property value. The relationships property +// returns a StackPolicyEvaluations_relationshipsable when successful +func (m *StackPolicyEvaluations) GetRelationships()(StackPolicyEvaluations_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackPolicyEvaluations_type when successful +func (m *StackPolicyEvaluations) GetTypeEscaped()(*StackPolicyEvaluations_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *StackPolicyEvaluations) SetAttributes(value StackPolicyEvaluations_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *StackPolicyEvaluations) SetId(value *string)() { + m.id = value +} +// SetLinks sets the links property value. The links property +func (m *StackPolicyEvaluations) SetLinks(value StackPolicyEvaluations_linksable)() { + m.links = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *StackPolicyEvaluations) SetRelationships(value StackPolicyEvaluations_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackPolicyEvaluations) SetTypeEscaped(value *StackPolicyEvaluations_type)() { + m.typeEscaped = value +} +type StackPolicyEvaluationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(StackPolicyEvaluations_attributesable) + GetId()(*string) + GetLinks()(StackPolicyEvaluations_linksable) + GetRelationships()(StackPolicyEvaluations_relationshipsable) + GetTypeEscaped()(*StackPolicyEvaluations_type) + SetAttributes(value StackPolicyEvaluations_attributesable)() + SetId(value *string)() + SetLinks(value StackPolicyEvaluations_linksable)() + SetRelationships(value StackPolicyEvaluations_relationshipsable)() + SetTypeEscaped(value *StackPolicyEvaluations_type)() +} diff --git a/v2/api/models/stack_policy_evaluations_envelope.go b/v2/api/models/stack_policy_evaluations_envelope.go new file mode 100644 index 000000000..c9fcbd8b2 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_envelope.go @@ -0,0 +1,124 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicyEvaluationsEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Represents a Terraform Policy evaluation for a Stacks plan operation. + data StackPolicyEvaluationsable + // The included property + included []StackPolicySetOutcomesable +} +// NewStackPolicyEvaluationsEnvelope instantiates a new StackPolicyEvaluationsEnvelope and sets the default values. +func NewStackPolicyEvaluationsEnvelope()(*StackPolicyEvaluationsEnvelope) { + m := &StackPolicyEvaluationsEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluationsEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluationsEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluationsEnvelope(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluationsEnvelope) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. Represents a Terraform Policy evaluation for a Stacks plan operation. +// returns a StackPolicyEvaluationsable when successful +func (m *StackPolicyEvaluationsEnvelope) GetData()(StackPolicyEvaluationsable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluationsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetData(val.(StackPolicyEvaluationsable)) + } + return nil + } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStackPolicySetOutcomesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StackPolicySetOutcomesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StackPolicySetOutcomesable) + } + } + m.SetIncluded(res) + } + return nil + } + return res +} +// GetIncluded gets the included property value. The included property +// returns a []StackPolicySetOutcomesable when successful +func (m *StackPolicyEvaluationsEnvelope) GetIncluded()([]StackPolicySetOutcomesable) { + return m.included +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluationsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("data", m.GetData()) + if err != nil { + return err + } + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluationsEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. Represents a Terraform Policy evaluation for a Stacks plan operation. +func (m *StackPolicyEvaluationsEnvelope) SetData(value StackPolicyEvaluationsable)() { + m.data = value +} +// SetIncluded sets the included property value. The included property +func (m *StackPolicyEvaluationsEnvelope) SetIncluded(value []StackPolicySetOutcomesable)() { + m.included = value +} +type StackPolicyEvaluationsEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()(StackPolicyEvaluationsable) + GetIncluded()([]StackPolicySetOutcomesable) + SetData(value StackPolicyEvaluationsable)() + SetIncluded(value []StackPolicySetOutcomesable)() +} diff --git a/v2/api/models/stack_policy_evaluations_escaped_attributes.go b/v2/api/models/stack_policy_evaluations_escaped_attributes.go new file mode 100644 index 000000000..664447ea0 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_escaped_attributes.go @@ -0,0 +1,235 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicyEvaluations_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The createdAt property + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Error information if the entire evaluation failed + error StackPolicyEvaluations_attributes_errorable + // External ID of the attachable resource (typically a stack plan operation) + policyAttachableId *string + // Type of the attachable resource. Currently only stack plan operations (`plan`) are supported. + policyAttachableType *StackPolicyEvaluations_attributes_policyAttachableType + // Aggregated counts of policy results across all policy sets in this evaluation + resultCount StackPolicyEvaluations_attributes_resultCountable + // Current status of the stack policy evaluation. Status values:- `pending`: Initial state, not yet evaluated- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `errored`: System error during processing (final state)- `unknown`: Unknown evaluation state + status *StackPolicyEvaluations_attributes_status + // The updatedAt property + updatedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewStackPolicyEvaluations_attributes instantiates a new StackPolicyEvaluations_attributes and sets the default values. +func NewStackPolicyEvaluations_attributes()(*StackPolicyEvaluations_attributes) { + m := &StackPolicyEvaluations_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluations_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluations_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluations_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluations_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created-at property value. The createdAt property +// returns a *Time when successful +func (m *StackPolicyEvaluations_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetError gets the error property value. Error information if the entire evaluation failed +// returns a StackPolicyEvaluations_attributes_errorable when successful +func (m *StackPolicyEvaluations_attributes) GetError()(StackPolicyEvaluations_attributes_errorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluations_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluations_attributes_errorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(StackPolicyEvaluations_attributes_errorable)) + } + return nil + } + res["policy-attachable-id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyAttachableId(val) + } + return nil + } + res["policy-attachable-type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackPolicyEvaluations_attributes_policyAttachableType) + if err != nil { + return err + } + if val != nil { + m.SetPolicyAttachableType(val.(*StackPolicyEvaluations_attributes_policyAttachableType)) + } + return nil + } + res["result-count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluations_attributes_resultCountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResultCount(val.(StackPolicyEvaluations_attributes_resultCountable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackPolicyEvaluations_attributes_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*StackPolicyEvaluations_attributes_status)) + } + return nil + } + res["updated-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetPolicyAttachableId gets the policy-attachable-id property value. External ID of the attachable resource (typically a stack plan operation) +// returns a *string when successful +func (m *StackPolicyEvaluations_attributes) GetPolicyAttachableId()(*string) { + return m.policyAttachableId +} +// GetPolicyAttachableType gets the policy-attachable-type property value. Type of the attachable resource. Currently only stack plan operations (`plan`) are supported. +// returns a *StackPolicyEvaluations_attributes_policyAttachableType when successful +func (m *StackPolicyEvaluations_attributes) GetPolicyAttachableType()(*StackPolicyEvaluations_attributes_policyAttachableType) { + return m.policyAttachableType +} +// GetResultCount gets the result-count property value. Aggregated counts of policy results across all policy sets in this evaluation +// returns a StackPolicyEvaluations_attributes_resultCountable when successful +func (m *StackPolicyEvaluations_attributes) GetResultCount()(StackPolicyEvaluations_attributes_resultCountable) { + return m.resultCount +} +// GetStatus gets the status property value. Current status of the stack policy evaluation. Status values:- `pending`: Initial state, not yet evaluated- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `errored`: System error during processing (final state)- `unknown`: Unknown evaluation state +// returns a *StackPolicyEvaluations_attributes_status when successful +func (m *StackPolicyEvaluations_attributes) GetStatus()(*StackPolicyEvaluations_attributes_status) { + return m.status +} +// GetUpdatedAt gets the updated-at property value. The updatedAt property +// returns a *Time when successful +func (m *StackPolicyEvaluations_attributes) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedAt +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluations_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("result-count", m.GetResultCount()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluations_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created-at property value. The createdAt property +func (m *StackPolicyEvaluations_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetError sets the error property value. Error information if the entire evaluation failed +func (m *StackPolicyEvaluations_attributes) SetError(value StackPolicyEvaluations_attributes_errorable)() { + m.error = value +} +// SetPolicyAttachableId sets the policy-attachable-id property value. External ID of the attachable resource (typically a stack plan operation) +func (m *StackPolicyEvaluations_attributes) SetPolicyAttachableId(value *string)() { + m.policyAttachableId = value +} +// SetPolicyAttachableType sets the policy-attachable-type property value. Type of the attachable resource. Currently only stack plan operations (`plan`) are supported. +func (m *StackPolicyEvaluations_attributes) SetPolicyAttachableType(value *StackPolicyEvaluations_attributes_policyAttachableType)() { + m.policyAttachableType = value +} +// SetResultCount sets the result-count property value. Aggregated counts of policy results across all policy sets in this evaluation +func (m *StackPolicyEvaluations_attributes) SetResultCount(value StackPolicyEvaluations_attributes_resultCountable)() { + m.resultCount = value +} +// SetStatus sets the status property value. Current status of the stack policy evaluation. Status values:- `pending`: Initial state, not yet evaluated- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `errored`: System error during processing (final state)- `unknown`: Unknown evaluation state +func (m *StackPolicyEvaluations_attributes) SetStatus(value *StackPolicyEvaluations_attributes_status)() { + m.status = value +} +// SetUpdatedAt sets the updated-at property value. The updatedAt property +func (m *StackPolicyEvaluations_attributes) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedAt = value +} +type StackPolicyEvaluations_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetError()(StackPolicyEvaluations_attributes_errorable) + GetPolicyAttachableId()(*string) + GetPolicyAttachableType()(*StackPolicyEvaluations_attributes_policyAttachableType) + GetResultCount()(StackPolicyEvaluations_attributes_resultCountable) + GetStatus()(*StackPolicyEvaluations_attributes_status) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetError(value StackPolicyEvaluations_attributes_errorable)() + SetPolicyAttachableId(value *string)() + SetPolicyAttachableType(value *StackPolicyEvaluations_attributes_policyAttachableType)() + SetResultCount(value StackPolicyEvaluations_attributes_resultCountable)() + SetStatus(value *StackPolicyEvaluations_attributes_status)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_error.go b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_error.go new file mode 100644 index 000000000..b376f17b3 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_error.go @@ -0,0 +1,143 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StackPolicyEvaluations_attributes_error error information if the entire evaluation failed +type StackPolicyEvaluations_attributes_error struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The detail property + detail *string + // The summary property + summary *string + // Error type identifier + typeEscaped *StackPolicyEvaluations_attributes_error_type +} +// NewStackPolicyEvaluations_attributes_error instantiates a new StackPolicyEvaluations_attributes_error and sets the default values. +func NewStackPolicyEvaluations_attributes_error()(*StackPolicyEvaluations_attributes_error) { + m := &StackPolicyEvaluations_attributes_error{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluations_attributes_errorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluations_attributes_errorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluations_attributes_error(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluations_attributes_error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDetail gets the detail property value. The detail property +// returns a *string when successful +func (m *StackPolicyEvaluations_attributes_error) GetDetail()(*string) { + return m.detail +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluations_attributes_error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetail(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackPolicyEvaluations_attributes_error_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackPolicyEvaluations_attributes_error_type)) + } + return nil + } + return res +} +// GetSummary gets the summary property value. The summary property +// returns a *string when successful +func (m *StackPolicyEvaluations_attributes_error) GetSummary()(*string) { + return m.summary +} +// GetTypeEscaped gets the type property value. Error type identifier +// returns a *StackPolicyEvaluations_attributes_error_type when successful +func (m *StackPolicyEvaluations_attributes_error) GetTypeEscaped()(*StackPolicyEvaluations_attributes_error_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluations_attributes_error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluations_attributes_error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDetail sets the detail property value. The detail property +func (m *StackPolicyEvaluations_attributes_error) SetDetail(value *string)() { + m.detail = value +} +// SetSummary sets the summary property value. The summary property +func (m *StackPolicyEvaluations_attributes_error) SetSummary(value *string)() { + m.summary = value +} +// SetTypeEscaped sets the type property value. Error type identifier +func (m *StackPolicyEvaluations_attributes_error) SetTypeEscaped(value *StackPolicyEvaluations_attributes_error_type)() { + m.typeEscaped = value +} +type StackPolicyEvaluations_attributes_errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(*string) + GetSummary()(*string) + GetTypeEscaped()(*StackPolicyEvaluations_attributes_error_type) + SetDetail(value *string)() + SetSummary(value *string)() + SetTypeEscaped(value *StackPolicyEvaluations_attributes_error_type)() +} diff --git a/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go new file mode 100644 index 000000000..32e42bac2 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go @@ -0,0 +1,46 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// Error type identifier +type StackPolicyEvaluations_attributes_error_type int + +const ( + SETUP_ERROR_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE StackPolicyEvaluations_attributes_error_type = iota + TOOL_VERSION_ERROR_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + INCOMPATIBLE_AGENT_VERSION_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + INCOMPATIBLE_TERRAFORM_VERSION_ERROR_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + MISSING_STACK_CONFIGURATION_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE +) + +func (i StackPolicyEvaluations_attributes_error_type) String() string { + return []string{"setup_error", "tool_version_error", "incompatible_agent_version", "incompatible_terraform_version_error", "missing_stack_configuration"}[i] +} +func ParseStackPolicyEvaluations_attributes_error_type(v string) (any, error) { + result := SETUP_ERROR_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + switch v { + case "setup_error": + result = SETUP_ERROR_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + case "tool_version_error": + result = TOOL_VERSION_ERROR_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + case "incompatible_agent_version": + result = INCOMPATIBLE_AGENT_VERSION_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + case "incompatible_terraform_version_error": + result = INCOMPATIBLE_TERRAFORM_VERSION_ERROR_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + case "missing_stack_configuration": + result = MISSING_STACK_CONFIGURATION_STACKPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackPolicyEvaluations_attributes_error_type(values []StackPolicyEvaluations_attributes_error_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackPolicyEvaluations_attributes_error_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_policy_attachable_type.go b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_policy_attachable_type.go new file mode 100644 index 000000000..e86462b68 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_policy_attachable_type.go @@ -0,0 +1,34 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// Type of the attachable resource. Currently only stack plan operations (`plan`) are supported. +type StackPolicyEvaluations_attributes_policyAttachableType int + +const ( + PLAN_STACKPOLICYEVALUATIONS_ATTRIBUTES_POLICYATTACHABLETYPE StackPolicyEvaluations_attributes_policyAttachableType = iota +) + +func (i StackPolicyEvaluations_attributes_policyAttachableType) String() string { + return []string{"plan"}[i] +} +func ParseStackPolicyEvaluations_attributes_policyAttachableType(v string) (any, error) { + result := PLAN_STACKPOLICYEVALUATIONS_ATTRIBUTES_POLICYATTACHABLETYPE + switch v { + case "plan": + result = PLAN_STACKPOLICYEVALUATIONS_ATTRIBUTES_POLICYATTACHABLETYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackPolicyEvaluations_attributes_policyAttachableType(values []StackPolicyEvaluations_attributes_policyAttachableType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackPolicyEvaluations_attributes_policyAttachableType) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_result_count.go b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_result_count.go new file mode 100644 index 000000000..773a3bffb --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_result_count.go @@ -0,0 +1,229 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StackPolicyEvaluations_attributes_resultCount aggregated counts of policy results across all policy sets in this evaluation +type StackPolicyEvaluations_attributes_resultCount struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The advisoryFailed property + advisoryFailed *int32 + // The errored property + errored *int32 + // The mandatoryFailed property + mandatoryFailed *int32 + // The mandatoryOverridableFailed property + mandatoryOverridableFailed *int32 + // The passed property + passed *int32 + // The unknown property + unknown *int32 +} +// NewStackPolicyEvaluations_attributes_resultCount instantiates a new StackPolicyEvaluations_attributes_resultCount and sets the default values. +func NewStackPolicyEvaluations_attributes_resultCount()(*StackPolicyEvaluations_attributes_resultCount) { + m := &StackPolicyEvaluations_attributes_resultCount{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluations_attributes_resultCountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluations_attributes_resultCountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluations_attributes_resultCount(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluations_attributes_resultCount) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvisoryFailed gets the advisory-failed property value. The advisoryFailed property +// returns a *int32 when successful +func (m *StackPolicyEvaluations_attributes_resultCount) GetAdvisoryFailed()(*int32) { + return m.advisoryFailed +} +// GetErrored gets the errored property value. The errored property +// returns a *int32 when successful +func (m *StackPolicyEvaluations_attributes_resultCount) GetErrored()(*int32) { + return m.errored +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluations_attributes_resultCount) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advisory-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdvisoryFailed(val) + } + return nil + } + res["errored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrored(val) + } + return nil + } + res["mandatory-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMandatoryFailed(val) + } + return nil + } + res["mandatory-overridable-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMandatoryOverridableFailed(val) + } + return nil + } + res["passed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPassed(val) + } + return nil + } + res["unknown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknown(val) + } + return nil + } + return res +} +// GetMandatoryFailed gets the mandatory-failed property value. The mandatoryFailed property +// returns a *int32 when successful +func (m *StackPolicyEvaluations_attributes_resultCount) GetMandatoryFailed()(*int32) { + return m.mandatoryFailed +} +// GetMandatoryOverridableFailed gets the mandatory-overridable-failed property value. The mandatoryOverridableFailed property +// returns a *int32 when successful +func (m *StackPolicyEvaluations_attributes_resultCount) GetMandatoryOverridableFailed()(*int32) { + return m.mandatoryOverridableFailed +} +// GetPassed gets the passed property value. The passed property +// returns a *int32 when successful +func (m *StackPolicyEvaluations_attributes_resultCount) GetPassed()(*int32) { + return m.passed +} +// GetUnknown gets the unknown property value. The unknown property +// returns a *int32 when successful +func (m *StackPolicyEvaluations_attributes_resultCount) GetUnknown()(*int32) { + return m.unknown +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluations_attributes_resultCount) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("advisory-failed", m.GetAdvisoryFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("errored", m.GetErrored()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mandatory-failed", m.GetMandatoryFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mandatory-overridable-failed", m.GetMandatoryOverridableFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("passed", m.GetPassed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unknown", m.GetUnknown()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluations_attributes_resultCount) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvisoryFailed sets the advisory-failed property value. The advisoryFailed property +func (m *StackPolicyEvaluations_attributes_resultCount) SetAdvisoryFailed(value *int32)() { + m.advisoryFailed = value +} +// SetErrored sets the errored property value. The errored property +func (m *StackPolicyEvaluations_attributes_resultCount) SetErrored(value *int32)() { + m.errored = value +} +// SetMandatoryFailed sets the mandatory-failed property value. The mandatoryFailed property +func (m *StackPolicyEvaluations_attributes_resultCount) SetMandatoryFailed(value *int32)() { + m.mandatoryFailed = value +} +// SetMandatoryOverridableFailed sets the mandatory-overridable-failed property value. The mandatoryOverridableFailed property +func (m *StackPolicyEvaluations_attributes_resultCount) SetMandatoryOverridableFailed(value *int32)() { + m.mandatoryOverridableFailed = value +} +// SetPassed sets the passed property value. The passed property +func (m *StackPolicyEvaluations_attributes_resultCount) SetPassed(value *int32)() { + m.passed = value +} +// SetUnknown sets the unknown property value. The unknown property +func (m *StackPolicyEvaluations_attributes_resultCount) SetUnknown(value *int32)() { + m.unknown = value +} +type StackPolicyEvaluations_attributes_resultCountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvisoryFailed()(*int32) + GetErrored()(*int32) + GetMandatoryFailed()(*int32) + GetMandatoryOverridableFailed()(*int32) + GetPassed()(*int32) + GetUnknown()(*int32) + SetAdvisoryFailed(value *int32)() + SetErrored(value *int32)() + SetMandatoryFailed(value *int32)() + SetMandatoryOverridableFailed(value *int32)() + SetPassed(value *int32)() + SetUnknown(value *int32)() +} diff --git a/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_status.go b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_status.go new file mode 100644 index 000000000..7017cd6ae --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_escaped_attributes_escaped_status.go @@ -0,0 +1,46 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// Current status of the stack policy evaluation. Status values:- `pending`: Initial state, not yet evaluated- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `errored`: System error during processing (final state)- `unknown`: Unknown evaluation state +type StackPolicyEvaluations_attributes_status int + +const ( + PENDING_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS StackPolicyEvaluations_attributes_status = iota + PASSED_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS + FAILED_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS + ERRORED_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS + UNKNOWN_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS +) + +func (i StackPolicyEvaluations_attributes_status) String() string { + return []string{"pending", "passed", "failed", "errored", "unknown"}[i] +} +func ParseStackPolicyEvaluations_attributes_status(v string) (any, error) { + result := PENDING_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS + switch v { + case "pending": + result = PENDING_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "passed": + result = PASSED_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "failed": + result = FAILED_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "errored": + result = ERRORED_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS + case "unknown": + result = UNKNOWN_STACKPOLICYEVALUATIONS_ATTRIBUTES_STATUS + default: + return nil, nil + } + return &result, nil +} +func SerializeStackPolicyEvaluations_attributes_status(values []StackPolicyEvaluations_attributes_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackPolicyEvaluations_attributes_status) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_policy_evaluations_escaped_links.go b/v2/api/models/stack_policy_evaluations_escaped_links.go new file mode 100644 index 000000000..92f652c39 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_escaped_links.go @@ -0,0 +1,112 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicyEvaluations_links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The self property + self *string + // The stackPolicySetOutcomes property + stackPolicySetOutcomes *string +} +// NewStackPolicyEvaluations_links instantiates a new StackPolicyEvaluations_links and sets the default values. +func NewStackPolicyEvaluations_links()(*StackPolicyEvaluations_links) { + m := &StackPolicyEvaluations_links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluations_linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluations_linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluations_links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluations_links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluations_links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + res["stack-policy-set-outcomes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStackPolicySetOutcomes(val) + } + return nil + } + return res +} +// GetSelf gets the self property value. The self property +// returns a *string when successful +func (m *StackPolicyEvaluations_links) GetSelf()(*string) { + return m.self +} +// GetStackPolicySetOutcomes gets the stack-policy-set-outcomes property value. The stackPolicySetOutcomes property +// returns a *string when successful +func (m *StackPolicyEvaluations_links) GetStackPolicySetOutcomes()(*string) { + return m.stackPolicySetOutcomes +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluations_links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("self", m.GetSelf()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stack-policy-set-outcomes", m.GetStackPolicySetOutcomes()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluations_links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelf sets the self property value. The self property +func (m *StackPolicyEvaluations_links) SetSelf(value *string)() { + m.self = value +} +// SetStackPolicySetOutcomes sets the stack-policy-set-outcomes property value. The stackPolicySetOutcomes property +func (m *StackPolicyEvaluations_links) SetStackPolicySetOutcomes(value *string)() { + m.stackPolicySetOutcomes = value +} +type StackPolicyEvaluations_linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelf()(*string) + GetStackPolicySetOutcomes()(*string) + SetSelf(value *string)() + SetStackPolicySetOutcomes(value *string)() +} diff --git a/v2/api/models/stack_policy_evaluations_escaped_relationships.go b/v2/api/models/stack_policy_evaluations_escaped_relationships.go new file mode 100644 index 000000000..a89ede2f3 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_escaped_relationships.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicyEvaluations_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The stackPolicySetOutcomes property + stackPolicySetOutcomes StackPolicySetOutcomesHasManyable +} +// NewStackPolicyEvaluations_relationships instantiates a new StackPolicyEvaluations_relationships and sets the default values. +func NewStackPolicyEvaluations_relationships()(*StackPolicyEvaluations_relationships) { + m := &StackPolicyEvaluations_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluations_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluations_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluations_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluations_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluations_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["stack-policy-set-outcomes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicySetOutcomesHasManyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStackPolicySetOutcomes(val.(StackPolicySetOutcomesHasManyable)) + } + return nil + } + return res +} +// GetStackPolicySetOutcomes gets the stack-policy-set-outcomes property value. The stackPolicySetOutcomes property +// returns a StackPolicySetOutcomesHasManyable when successful +func (m *StackPolicyEvaluations_relationships) GetStackPolicySetOutcomes()(StackPolicySetOutcomesHasManyable) { + return m.stackPolicySetOutcomes +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluations_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("stack-policy-set-outcomes", m.GetStackPolicySetOutcomes()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluations_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStackPolicySetOutcomes sets the stack-policy-set-outcomes property value. The stackPolicySetOutcomes property +func (m *StackPolicyEvaluations_relationships) SetStackPolicySetOutcomes(value StackPolicySetOutcomesHasManyable)() { + m.stackPolicySetOutcomes = value +} +type StackPolicyEvaluations_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackPolicySetOutcomes()(StackPolicySetOutcomesHasManyable) + SetStackPolicySetOutcomes(value StackPolicySetOutcomesHasManyable)() +} diff --git a/v2/api/models/stack_policy_evaluations_escaped_type.go b/v2/api/models/stack_policy_evaluations_escaped_type.go new file mode 100644 index 000000000..9525f517e --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackPolicyEvaluations_type int + +const ( + STACKPOLICYEVALUATIONS_STACKPOLICYEVALUATIONS_TYPE StackPolicyEvaluations_type = iota +) + +func (i StackPolicyEvaluations_type) String() string { + return []string{"stack-policy-evaluations"}[i] +} +func ParseStackPolicyEvaluations_type(v string) (any, error) { + result := STACKPOLICYEVALUATIONS_STACKPOLICYEVALUATIONS_TYPE + switch v { + case "stack-policy-evaluations": + result = STACKPOLICYEVALUATIONS_STACKPOLICYEVALUATIONS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackPolicyEvaluations_type(values []StackPolicyEvaluations_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackPolicyEvaluations_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_policy_evaluations_has_one.go b/v2/api/models/stack_policy_evaluations_has_one.go new file mode 100644 index 000000000..c0ca6b8b7 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_has_one.go @@ -0,0 +1,112 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicyEvaluationsHasOne struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data StackPolicyEvaluationsHasOne_dataable + // The meta property + meta StackPolicyEvaluationsHasOne_metaable +} +// NewStackPolicyEvaluationsHasOne instantiates a new StackPolicyEvaluationsHasOne and sets the default values. +func NewStackPolicyEvaluationsHasOne()(*StackPolicyEvaluationsHasOne) { + m := &StackPolicyEvaluationsHasOne{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluationsHasOneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluationsHasOneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluationsHasOne(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluationsHasOne) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a StackPolicyEvaluationsHasOne_dataable when successful +func (m *StackPolicyEvaluationsHasOne) GetData()(StackPolicyEvaluationsHasOne_dataable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluationsHasOne) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluationsHasOne_dataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetData(val.(StackPolicyEvaluationsHasOne_dataable)) + } + return nil + } + res["meta"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluationsHasOne_metaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeta(val.(StackPolicyEvaluationsHasOne_metaable)) + } + return nil + } + return res +} +// GetMeta gets the meta property value. The meta property +// returns a StackPolicyEvaluationsHasOne_metaable when successful +func (m *StackPolicyEvaluationsHasOne) GetMeta()(StackPolicyEvaluationsHasOne_metaable) { + return m.meta +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluationsHasOne) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("meta", m.GetMeta()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluationsHasOne) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *StackPolicyEvaluationsHasOne) SetData(value StackPolicyEvaluationsHasOne_dataable)() { + m.data = value +} +// SetMeta sets the meta property value. The meta property +func (m *StackPolicyEvaluationsHasOne) SetMeta(value StackPolicyEvaluationsHasOne_metaable)() { + m.meta = value +} +type StackPolicyEvaluationsHasOneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()(StackPolicyEvaluationsHasOne_dataable) + GetMeta()(StackPolicyEvaluationsHasOne_metaable) + SetData(value StackPolicyEvaluationsHasOne_dataable)() + SetMeta(value StackPolicyEvaluationsHasOne_metaable)() +} diff --git a/v2/api/models/stack_policy_evaluations_has_one_escaped_data.go b/v2/api/models/stack_policy_evaluations_has_one_escaped_data.go new file mode 100644 index 000000000..b85c99cb1 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_has_one_escaped_data.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicyEvaluationsHasOne_data struct { + StackPolicyEvaluationsIdentifier +} +// NewStackPolicyEvaluationsHasOne_data instantiates a new StackPolicyEvaluationsHasOne_data and sets the default values. +func NewStackPolicyEvaluationsHasOne_data()(*StackPolicyEvaluationsHasOne_data) { + m := &StackPolicyEvaluationsHasOne_data{ + StackPolicyEvaluationsIdentifier: *NewStackPolicyEvaluationsIdentifier(), + } + return m +} +// CreateStackPolicyEvaluationsHasOne_dataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluationsHasOne_dataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluationsHasOne_data(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluationsHasOne_data) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.StackPolicyEvaluationsIdentifier.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluationsHasOne_data) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.StackPolicyEvaluationsIdentifier.Serialize(writer) + if err != nil { + return err + } + return nil +} +type StackPolicyEvaluationsHasOne_dataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + StackPolicyEvaluationsIdentifierable +} diff --git a/v2/api/models/stack_policy_evaluations_has_one_escaped_meta.go b/v2/api/models/stack_policy_evaluations_has_one_escaped_meta.go new file mode 100644 index 000000000..9229cfd17 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_has_one_escaped_meta.go @@ -0,0 +1,54 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicyEvaluationsHasOne_meta struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewStackPolicyEvaluationsHasOne_meta instantiates a new StackPolicyEvaluationsHasOne_meta and sets the default values. +func NewStackPolicyEvaluationsHasOne_meta()(*StackPolicyEvaluationsHasOne_meta) { + m := &StackPolicyEvaluationsHasOne_meta{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluationsHasOne_metaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluationsHasOne_metaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluationsHasOne_meta(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluationsHasOne_meta) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluationsHasOne_meta) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluationsHasOne_meta) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluationsHasOne_meta) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type StackPolicyEvaluationsHasOne_metaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/v2/api/models/stack_policy_evaluations_identifier.go b/v2/api/models/stack_policy_evaluations_identifier.go new file mode 100644 index 000000000..d813b6668 --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_identifier.go @@ -0,0 +1,113 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicyEvaluationsIdentifier struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *string + // The type property + typeEscaped *StackPolicyEvaluationsIdentifier_type +} +// NewStackPolicyEvaluationsIdentifier instantiates a new StackPolicyEvaluationsIdentifier and sets the default values. +func NewStackPolicyEvaluationsIdentifier()(*StackPolicyEvaluationsIdentifier) { + m := &StackPolicyEvaluationsIdentifier{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicyEvaluationsIdentifierFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicyEvaluationsIdentifierFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicyEvaluationsIdentifier(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicyEvaluationsIdentifier) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicyEvaluationsIdentifier) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackPolicyEvaluationsIdentifier_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackPolicyEvaluationsIdentifier_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackPolicyEvaluationsIdentifier) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackPolicyEvaluationsIdentifier_type when successful +func (m *StackPolicyEvaluationsIdentifier) GetTypeEscaped()(*StackPolicyEvaluationsIdentifier_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackPolicyEvaluationsIdentifier) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicyEvaluationsIdentifier) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *StackPolicyEvaluationsIdentifier) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackPolicyEvaluationsIdentifier) SetTypeEscaped(value *StackPolicyEvaluationsIdentifier_type)() { + m.typeEscaped = value +} +type StackPolicyEvaluationsIdentifierable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetTypeEscaped()(*StackPolicyEvaluationsIdentifier_type) + SetId(value *string)() + SetTypeEscaped(value *StackPolicyEvaluationsIdentifier_type)() +} diff --git a/v2/api/models/stack_policy_evaluations_identifier_escaped_type.go b/v2/api/models/stack_policy_evaluations_identifier_escaped_type.go new file mode 100644 index 000000000..ab492bd6b --- /dev/null +++ b/v2/api/models/stack_policy_evaluations_identifier_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackPolicyEvaluationsIdentifier_type int + +const ( + STACKPOLICYEVALUATIONS_STACKPOLICYEVALUATIONSIDENTIFIER_TYPE StackPolicyEvaluationsIdentifier_type = iota +) + +func (i StackPolicyEvaluationsIdentifier_type) String() string { + return []string{"stack-policy-evaluations"}[i] +} +func ParseStackPolicyEvaluationsIdentifier_type(v string) (any, error) { + result := STACKPOLICYEVALUATIONS_STACKPOLICYEVALUATIONSIDENTIFIER_TYPE + switch v { + case "stack-policy-evaluations": + result = STACKPOLICYEVALUATIONS_STACKPOLICYEVALUATIONSIDENTIFIER_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackPolicyEvaluationsIdentifier_type(values []StackPolicyEvaluationsIdentifier_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackPolicyEvaluationsIdentifier_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_policy_set_outcomes.go b/v2/api/models/stack_policy_set_outcomes.go new file mode 100644 index 000000000..a9dd10ecc --- /dev/null +++ b/v2/api/models/stack_policy_set_outcomes.go @@ -0,0 +1,166 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StackPolicySetOutcomes represents the outcome of evaluating a Terraform Policy set against a Stacks plan. +type StackPolicySetOutcomes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes StackPolicySetOutcomes_attributesable + // The id property + id *string + // The relationships property + relationships StackPolicySetOutcomes_relationshipsable + // The type property + typeEscaped *StackPolicySetOutcomes_type +} +// NewStackPolicySetOutcomes instantiates a new StackPolicySetOutcomes and sets the default values. +func NewStackPolicySetOutcomes()(*StackPolicySetOutcomes) { + m := &StackPolicySetOutcomes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicySetOutcomesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicySetOutcomesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicySetOutcomes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicySetOutcomes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a StackPolicySetOutcomes_attributesable when successful +func (m *StackPolicySetOutcomes) GetAttributes()(StackPolicySetOutcomes_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicySetOutcomes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicySetOutcomes_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(StackPolicySetOutcomes_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicySetOutcomes_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(StackPolicySetOutcomes_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackPolicySetOutcomes_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackPolicySetOutcomes_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackPolicySetOutcomes) GetId()(*string) { + return m.id +} +// GetRelationships gets the relationships property value. The relationships property +// returns a StackPolicySetOutcomes_relationshipsable when successful +func (m *StackPolicySetOutcomes) GetRelationships()(StackPolicySetOutcomes_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackPolicySetOutcomes_type when successful +func (m *StackPolicySetOutcomes) GetTypeEscaped()(*StackPolicySetOutcomes_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackPolicySetOutcomes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicySetOutcomes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *StackPolicySetOutcomes) SetAttributes(value StackPolicySetOutcomes_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *StackPolicySetOutcomes) SetId(value *string)() { + m.id = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *StackPolicySetOutcomes) SetRelationships(value StackPolicySetOutcomes_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackPolicySetOutcomes) SetTypeEscaped(value *StackPolicySetOutcomes_type)() { + m.typeEscaped = value +} +type StackPolicySetOutcomesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(StackPolicySetOutcomes_attributesable) + GetId()(*string) + GetRelationships()(StackPolicySetOutcomes_relationshipsable) + GetTypeEscaped()(*StackPolicySetOutcomes_type) + SetAttributes(value StackPolicySetOutcomes_attributesable)() + SetId(value *string)() + SetRelationships(value StackPolicySetOutcomes_relationshipsable)() + SetTypeEscaped(value *StackPolicySetOutcomes_type)() +} diff --git a/v2/api/models/stack_policy_set_outcomes_escaped_attributes.go b/v2/api/models/stack_policy_set_outcomes_escaped_attributes.go new file mode 100644 index 000000000..6e83fdc7c --- /dev/null +++ b/v2/api/models/stack_policy_set_outcomes_escaped_attributes.go @@ -0,0 +1,152 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicySetOutcomes_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Description of the policy set that was evaluated + policySetDescription *string + // Name of the policy set that was evaluated + policySetName *string + // Temporary download URL for the detailed policy set result artifact + policySetResultUrl *string + // Aggregated counts of policy results for this policy set + resultCount StackPolicySetOutcomes_attributes_resultCountable +} +// NewStackPolicySetOutcomes_attributes instantiates a new StackPolicySetOutcomes_attributes and sets the default values. +func NewStackPolicySetOutcomes_attributes()(*StackPolicySetOutcomes_attributes) { + m := &StackPolicySetOutcomes_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicySetOutcomes_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicySetOutcomes_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicySetOutcomes_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicySetOutcomes_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicySetOutcomes_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["policy-set-description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicySetDescription(val) + } + return nil + } + res["policy-set-name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicySetName(val) + } + return nil + } + res["policy-set-result-url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicySetResultUrl(val) + } + return nil + } + res["result-count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicySetOutcomes_attributes_resultCountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResultCount(val.(StackPolicySetOutcomes_attributes_resultCountable)) + } + return nil + } + return res +} +// GetPolicySetDescription gets the policy-set-description property value. Description of the policy set that was evaluated +// returns a *string when successful +func (m *StackPolicySetOutcomes_attributes) GetPolicySetDescription()(*string) { + return m.policySetDescription +} +// GetPolicySetName gets the policy-set-name property value. Name of the policy set that was evaluated +// returns a *string when successful +func (m *StackPolicySetOutcomes_attributes) GetPolicySetName()(*string) { + return m.policySetName +} +// GetPolicySetResultUrl gets the policy-set-result-url property value. Temporary download URL for the detailed policy set result artifact +// returns a *string when successful +func (m *StackPolicySetOutcomes_attributes) GetPolicySetResultUrl()(*string) { + return m.policySetResultUrl +} +// GetResultCount gets the result-count property value. Aggregated counts of policy results for this policy set +// returns a StackPolicySetOutcomes_attributes_resultCountable when successful +func (m *StackPolicySetOutcomes_attributes) GetResultCount()(StackPolicySetOutcomes_attributes_resultCountable) { + return m.resultCount +} +// Serialize serializes information the current object +func (m *StackPolicySetOutcomes_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("result-count", m.GetResultCount()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicySetOutcomes_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPolicySetDescription sets the policy-set-description property value. Description of the policy set that was evaluated +func (m *StackPolicySetOutcomes_attributes) SetPolicySetDescription(value *string)() { + m.policySetDescription = value +} +// SetPolicySetName sets the policy-set-name property value. Name of the policy set that was evaluated +func (m *StackPolicySetOutcomes_attributes) SetPolicySetName(value *string)() { + m.policySetName = value +} +// SetPolicySetResultUrl sets the policy-set-result-url property value. Temporary download URL for the detailed policy set result artifact +func (m *StackPolicySetOutcomes_attributes) SetPolicySetResultUrl(value *string)() { + m.policySetResultUrl = value +} +// SetResultCount sets the result-count property value. Aggregated counts of policy results for this policy set +func (m *StackPolicySetOutcomes_attributes) SetResultCount(value StackPolicySetOutcomes_attributes_resultCountable)() { + m.resultCount = value +} +type StackPolicySetOutcomes_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPolicySetDescription()(*string) + GetPolicySetName()(*string) + GetPolicySetResultUrl()(*string) + GetResultCount()(StackPolicySetOutcomes_attributes_resultCountable) + SetPolicySetDescription(value *string)() + SetPolicySetName(value *string)() + SetPolicySetResultUrl(value *string)() + SetResultCount(value StackPolicySetOutcomes_attributes_resultCountable)() +} diff --git a/v2/api/models/stack_policy_set_outcomes_escaped_attributes_escaped_result_count.go b/v2/api/models/stack_policy_set_outcomes_escaped_attributes_escaped_result_count.go new file mode 100644 index 000000000..9f59040c2 --- /dev/null +++ b/v2/api/models/stack_policy_set_outcomes_escaped_attributes_escaped_result_count.go @@ -0,0 +1,229 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StackPolicySetOutcomes_attributes_resultCount aggregated counts of policy results for this policy set +type StackPolicySetOutcomes_attributes_resultCount struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The advisoryFailed property + advisoryFailed *int32 + // The errored property + errored *int32 + // The mandatoryFailed property + mandatoryFailed *int32 + // The mandatoryOverridableFailed property + mandatoryOverridableFailed *int32 + // The passed property + passed *int32 + // The unknown property + unknown *int32 +} +// NewStackPolicySetOutcomes_attributes_resultCount instantiates a new StackPolicySetOutcomes_attributes_resultCount and sets the default values. +func NewStackPolicySetOutcomes_attributes_resultCount()(*StackPolicySetOutcomes_attributes_resultCount) { + m := &StackPolicySetOutcomes_attributes_resultCount{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicySetOutcomes_attributes_resultCountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicySetOutcomes_attributes_resultCountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicySetOutcomes_attributes_resultCount(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicySetOutcomes_attributes_resultCount) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvisoryFailed gets the advisory-failed property value. The advisoryFailed property +// returns a *int32 when successful +func (m *StackPolicySetOutcomes_attributes_resultCount) GetAdvisoryFailed()(*int32) { + return m.advisoryFailed +} +// GetErrored gets the errored property value. The errored property +// returns a *int32 when successful +func (m *StackPolicySetOutcomes_attributes_resultCount) GetErrored()(*int32) { + return m.errored +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicySetOutcomes_attributes_resultCount) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advisory-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdvisoryFailed(val) + } + return nil + } + res["errored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrored(val) + } + return nil + } + res["mandatory-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMandatoryFailed(val) + } + return nil + } + res["mandatory-overridable-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMandatoryOverridableFailed(val) + } + return nil + } + res["passed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPassed(val) + } + return nil + } + res["unknown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknown(val) + } + return nil + } + return res +} +// GetMandatoryFailed gets the mandatory-failed property value. The mandatoryFailed property +// returns a *int32 when successful +func (m *StackPolicySetOutcomes_attributes_resultCount) GetMandatoryFailed()(*int32) { + return m.mandatoryFailed +} +// GetMandatoryOverridableFailed gets the mandatory-overridable-failed property value. The mandatoryOverridableFailed property +// returns a *int32 when successful +func (m *StackPolicySetOutcomes_attributes_resultCount) GetMandatoryOverridableFailed()(*int32) { + return m.mandatoryOverridableFailed +} +// GetPassed gets the passed property value. The passed property +// returns a *int32 when successful +func (m *StackPolicySetOutcomes_attributes_resultCount) GetPassed()(*int32) { + return m.passed +} +// GetUnknown gets the unknown property value. The unknown property +// returns a *int32 when successful +func (m *StackPolicySetOutcomes_attributes_resultCount) GetUnknown()(*int32) { + return m.unknown +} +// Serialize serializes information the current object +func (m *StackPolicySetOutcomes_attributes_resultCount) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("advisory-failed", m.GetAdvisoryFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("errored", m.GetErrored()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mandatory-failed", m.GetMandatoryFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mandatory-overridable-failed", m.GetMandatoryOverridableFailed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("passed", m.GetPassed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unknown", m.GetUnknown()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicySetOutcomes_attributes_resultCount) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvisoryFailed sets the advisory-failed property value. The advisoryFailed property +func (m *StackPolicySetOutcomes_attributes_resultCount) SetAdvisoryFailed(value *int32)() { + m.advisoryFailed = value +} +// SetErrored sets the errored property value. The errored property +func (m *StackPolicySetOutcomes_attributes_resultCount) SetErrored(value *int32)() { + m.errored = value +} +// SetMandatoryFailed sets the mandatory-failed property value. The mandatoryFailed property +func (m *StackPolicySetOutcomes_attributes_resultCount) SetMandatoryFailed(value *int32)() { + m.mandatoryFailed = value +} +// SetMandatoryOverridableFailed sets the mandatory-overridable-failed property value. The mandatoryOverridableFailed property +func (m *StackPolicySetOutcomes_attributes_resultCount) SetMandatoryOverridableFailed(value *int32)() { + m.mandatoryOverridableFailed = value +} +// SetPassed sets the passed property value. The passed property +func (m *StackPolicySetOutcomes_attributes_resultCount) SetPassed(value *int32)() { + m.passed = value +} +// SetUnknown sets the unknown property value. The unknown property +func (m *StackPolicySetOutcomes_attributes_resultCount) SetUnknown(value *int32)() { + m.unknown = value +} +type StackPolicySetOutcomes_attributes_resultCountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvisoryFailed()(*int32) + GetErrored()(*int32) + GetMandatoryFailed()(*int32) + GetMandatoryOverridableFailed()(*int32) + GetPassed()(*int32) + GetUnknown()(*int32) + SetAdvisoryFailed(value *int32)() + SetErrored(value *int32)() + SetMandatoryFailed(value *int32)() + SetMandatoryOverridableFailed(value *int32)() + SetPassed(value *int32)() + SetUnknown(value *int32)() +} diff --git a/v2/api/models/stack_policy_set_outcomes_escaped_relationships.go b/v2/api/models/stack_policy_set_outcomes_escaped_relationships.go new file mode 100644 index 000000000..a4336c181 --- /dev/null +++ b/v2/api/models/stack_policy_set_outcomes_escaped_relationships.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicySetOutcomes_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The stackPolicyEvaluation property + stackPolicyEvaluation StackPolicyEvaluationsHasOneable +} +// NewStackPolicySetOutcomes_relationships instantiates a new StackPolicySetOutcomes_relationships and sets the default values. +func NewStackPolicySetOutcomes_relationships()(*StackPolicySetOutcomes_relationships) { + m := &StackPolicySetOutcomes_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicySetOutcomes_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicySetOutcomes_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicySetOutcomes_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicySetOutcomes_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicySetOutcomes_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["stack-policy-evaluation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicyEvaluationsHasOneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStackPolicyEvaluation(val.(StackPolicyEvaluationsHasOneable)) + } + return nil + } + return res +} +// GetStackPolicyEvaluation gets the stack-policy-evaluation property value. The stackPolicyEvaluation property +// returns a StackPolicyEvaluationsHasOneable when successful +func (m *StackPolicySetOutcomes_relationships) GetStackPolicyEvaluation()(StackPolicyEvaluationsHasOneable) { + return m.stackPolicyEvaluation +} +// Serialize serializes information the current object +func (m *StackPolicySetOutcomes_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("stack-policy-evaluation", m.GetStackPolicyEvaluation()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicySetOutcomes_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStackPolicyEvaluation sets the stack-policy-evaluation property value. The stackPolicyEvaluation property +func (m *StackPolicySetOutcomes_relationships) SetStackPolicyEvaluation(value StackPolicyEvaluationsHasOneable)() { + m.stackPolicyEvaluation = value +} +type StackPolicySetOutcomes_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackPolicyEvaluation()(StackPolicyEvaluationsHasOneable) + SetStackPolicyEvaluation(value StackPolicyEvaluationsHasOneable)() +} diff --git a/v2/api/models/stack_policy_set_outcomes_escaped_type.go b/v2/api/models/stack_policy_set_outcomes_escaped_type.go new file mode 100644 index 000000000..3f03b1d65 --- /dev/null +++ b/v2/api/models/stack_policy_set_outcomes_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackPolicySetOutcomes_type int + +const ( + STACKPOLICYSETOUTCOMES_STACKPOLICYSETOUTCOMES_TYPE StackPolicySetOutcomes_type = iota +) + +func (i StackPolicySetOutcomes_type) String() string { + return []string{"stack-policy-set-outcomes"}[i] +} +func ParseStackPolicySetOutcomes_type(v string) (any, error) { + result := STACKPOLICYSETOUTCOMES_STACKPOLICYSETOUTCOMES_TYPE + switch v { + case "stack-policy-set-outcomes": + result = STACKPOLICYSETOUTCOMES_STACKPOLICYSETOUTCOMES_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackPolicySetOutcomes_type(values []StackPolicySetOutcomes_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackPolicySetOutcomes_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stack_policy_set_outcomes_has_many.go b/v2/api/models/stack_policy_set_outcomes_has_many.go new file mode 100644 index 000000000..e476f4fff --- /dev/null +++ b/v2/api/models/stack_policy_set_outcomes_has_many.go @@ -0,0 +1,124 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicySetOutcomesHasMany struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data []StackPolicySetOutcomesIdentifierable + // The meta property + meta StackPolicySetOutcomesHasMany_metaable +} +// NewStackPolicySetOutcomesHasMany instantiates a new StackPolicySetOutcomesHasMany and sets the default values. +func NewStackPolicySetOutcomesHasMany()(*StackPolicySetOutcomesHasMany) { + m := &StackPolicySetOutcomesHasMany{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicySetOutcomesHasManyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicySetOutcomesHasManyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicySetOutcomesHasMany(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicySetOutcomesHasMany) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a []StackPolicySetOutcomesIdentifierable when successful +func (m *StackPolicySetOutcomesHasMany) GetData()([]StackPolicySetOutcomesIdentifierable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicySetOutcomesHasMany) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStackPolicySetOutcomesIdentifierFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StackPolicySetOutcomesIdentifierable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StackPolicySetOutcomesIdentifierable) + } + } + m.SetData(res) + } + return nil + } + res["meta"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStackPolicySetOutcomesHasMany_metaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeta(val.(StackPolicySetOutcomesHasMany_metaable)) + } + return nil + } + return res +} +// GetMeta gets the meta property value. The meta property +// returns a StackPolicySetOutcomesHasMany_metaable when successful +func (m *StackPolicySetOutcomesHasMany) GetMeta()(StackPolicySetOutcomesHasMany_metaable) { + return m.meta +} +// Serialize serializes information the current object +func (m *StackPolicySetOutcomesHasMany) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetData())) + for i, v := range m.GetData() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("data", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("meta", m.GetMeta()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicySetOutcomesHasMany) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *StackPolicySetOutcomesHasMany) SetData(value []StackPolicySetOutcomesIdentifierable)() { + m.data = value +} +// SetMeta sets the meta property value. The meta property +func (m *StackPolicySetOutcomesHasMany) SetMeta(value StackPolicySetOutcomesHasMany_metaable)() { + m.meta = value +} +type StackPolicySetOutcomesHasManyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()([]StackPolicySetOutcomesIdentifierable) + GetMeta()(StackPolicySetOutcomesHasMany_metaable) + SetData(value []StackPolicySetOutcomesIdentifierable)() + SetMeta(value StackPolicySetOutcomesHasMany_metaable)() +} diff --git a/v2/api/models/stack_policy_set_outcomes_has_many_escaped_meta.go b/v2/api/models/stack_policy_set_outcomes_has_many_escaped_meta.go new file mode 100644 index 000000000..4dfe52b31 --- /dev/null +++ b/v2/api/models/stack_policy_set_outcomes_has_many_escaped_meta.go @@ -0,0 +1,54 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicySetOutcomesHasMany_meta struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewStackPolicySetOutcomesHasMany_meta instantiates a new StackPolicySetOutcomesHasMany_meta and sets the default values. +func NewStackPolicySetOutcomesHasMany_meta()(*StackPolicySetOutcomesHasMany_meta) { + m := &StackPolicySetOutcomesHasMany_meta{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicySetOutcomesHasMany_metaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicySetOutcomesHasMany_metaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicySetOutcomesHasMany_meta(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicySetOutcomesHasMany_meta) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicySetOutcomesHasMany_meta) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *StackPolicySetOutcomesHasMany_meta) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicySetOutcomesHasMany_meta) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type StackPolicySetOutcomesHasMany_metaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/v2/api/models/stack_policy_set_outcomes_identifier.go b/v2/api/models/stack_policy_set_outcomes_identifier.go new file mode 100644 index 000000000..544de9b49 --- /dev/null +++ b/v2/api/models/stack_policy_set_outcomes_identifier.go @@ -0,0 +1,113 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StackPolicySetOutcomesIdentifier struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *string + // The type property + typeEscaped *StackPolicySetOutcomesIdentifier_type +} +// NewStackPolicySetOutcomesIdentifier instantiates a new StackPolicySetOutcomesIdentifier and sets the default values. +func NewStackPolicySetOutcomesIdentifier()(*StackPolicySetOutcomesIdentifier) { + m := &StackPolicySetOutcomesIdentifier{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStackPolicySetOutcomesIdentifierFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStackPolicySetOutcomesIdentifierFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStackPolicySetOutcomesIdentifier(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StackPolicySetOutcomesIdentifier) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StackPolicySetOutcomesIdentifier) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStackPolicySetOutcomesIdentifier_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StackPolicySetOutcomesIdentifier_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StackPolicySetOutcomesIdentifier) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StackPolicySetOutcomesIdentifier_type when successful +func (m *StackPolicySetOutcomesIdentifier) GetTypeEscaped()(*StackPolicySetOutcomesIdentifier_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StackPolicySetOutcomesIdentifier) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StackPolicySetOutcomesIdentifier) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *StackPolicySetOutcomesIdentifier) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StackPolicySetOutcomesIdentifier) SetTypeEscaped(value *StackPolicySetOutcomesIdentifier_type)() { + m.typeEscaped = value +} +type StackPolicySetOutcomesIdentifierable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetTypeEscaped()(*StackPolicySetOutcomesIdentifier_type) + SetId(value *string)() + SetTypeEscaped(value *StackPolicySetOutcomesIdentifier_type)() +} diff --git a/v2/api/models/stack_policy_set_outcomes_identifier_escaped_type.go b/v2/api/models/stack_policy_set_outcomes_identifier_escaped_type.go new file mode 100644 index 000000000..fcc3c9949 --- /dev/null +++ b/v2/api/models/stack_policy_set_outcomes_identifier_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StackPolicySetOutcomesIdentifier_type int + +const ( + STACKPOLICYSETOUTCOMES_STACKPOLICYSETOUTCOMESIDENTIFIER_TYPE StackPolicySetOutcomesIdentifier_type = iota +) + +func (i StackPolicySetOutcomesIdentifier_type) String() string { + return []string{"stack-policy-set-outcomes"}[i] +} +func ParseStackPolicySetOutcomesIdentifier_type(v string) (any, error) { + result := STACKPOLICYSETOUTCOMES_STACKPOLICYSETOUTCOMESIDENTIFIER_TYPE + switch v { + case "stack-policy-set-outcomes": + result = STACKPOLICYSETOUTCOMES_STACKPOLICYSETOUTCOMESIDENTIFIER_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStackPolicySetOutcomesIdentifier_type(values []StackPolicySetOutcomesIdentifier_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StackPolicySetOutcomesIdentifier_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/stacks_envelope.go b/v2/api/models/stacks_envelope.go index d46c44137..a3ca6409f 100644 --- a/v2/api/models/stacks_envelope.go +++ b/v2/api/models/stacks_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,145 @@ type StacksEnvelope struct { additionalData map[string]any // The data property data Stacksable + // The included property + included []StacksEnvelope_StacksEnvelope_includedable +} +// StacksEnvelope_StacksEnvelope_included composed type wrapper for classes Organizationsable, Projectsable, StackConfigurationsable, StackDiagnosticsable +type StacksEnvelope_StacksEnvelope_included struct { + // Composed type representation for type Organizationsable + organizations Organizationsable + // Composed type representation for type Projectsable + projects Projectsable + // Composed type representation for type StackConfigurationsable + stackConfigurations StackConfigurationsable + // Composed type representation for type StackDiagnosticsable + stackDiagnostics StackDiagnosticsable +} +// NewStacksEnvelope_StacksEnvelope_included instantiates a new StacksEnvelope_StacksEnvelope_included and sets the default values. +func NewStacksEnvelope_StacksEnvelope_included()(*StacksEnvelope_StacksEnvelope_included) { + m := &StacksEnvelope_StacksEnvelope_included{ + } + return m +} +// CreateStacksEnvelope_StacksEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStacksEnvelope_StacksEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewStacksEnvelope_StacksEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(NewOrganizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configurations") { + result.SetStackConfigurations(NewStackConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-diagnostics") { + result.SetStackDiagnostics(NewStackDiagnostics()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StacksEnvelope_StacksEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStackConfigurations() != nil { + return m.GetStackConfigurations().GetFieldDeserializers() + } else if m.GetStackDiagnostics() != nil { + return m.GetStackDiagnostics().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *StacksEnvelope_StacksEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOrganizations gets the organizations property value. Composed type representation for type Organizationsable +// returns a Organizationsable when successful +func (m *StacksEnvelope_StacksEnvelope_included) GetOrganizations()(Organizationsable) { + return m.organizations +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *StacksEnvelope_StacksEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// GetStackConfigurations gets the stackConfigurations property value. Composed type representation for type StackConfigurationsable +// returns a StackConfigurationsable when successful +func (m *StacksEnvelope_StacksEnvelope_included) GetStackConfigurations()(StackConfigurationsable) { + return m.stackConfigurations +} +// GetStackDiagnostics gets the stackDiagnostics property value. Composed type representation for type StackDiagnosticsable +// returns a StackDiagnosticsable when successful +func (m *StacksEnvelope_StacksEnvelope_included) GetStackDiagnostics()(StackDiagnosticsable) { + return m.stackDiagnostics +} +// Serialize serializes information the current object +func (m *StacksEnvelope_StacksEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStackConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurations()) + if err != nil { + return err + } + } else if m.GetStackDiagnostics() != nil { + err := writer.WriteObjectValue("", m.GetStackDiagnostics()) + if err != nil { + return err + } + } + return nil +} +// SetOrganizations sets the organizations property value. Composed type representation for type Organizationsable +func (m *StacksEnvelope_StacksEnvelope_included) SetOrganizations(value Organizationsable)() { + m.organizations = value +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *StacksEnvelope_StacksEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +// SetStackConfigurations sets the stackConfigurations property value. Composed type representation for type StackConfigurationsable +func (m *StacksEnvelope_StacksEnvelope_included) SetStackConfigurations(value StackConfigurationsable)() { + m.stackConfigurations = value +} +// SetStackDiagnostics sets the stackDiagnostics property value. Composed type representation for type StackDiagnosticsable +func (m *StacksEnvelope_StacksEnvelope_included) SetStackDiagnostics(value StackDiagnosticsable)() { + m.stackDiagnostics = value +} +type StacksEnvelope_StacksEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizations()(Organizationsable) + GetProjects()(Projectsable) + GetStackConfigurations()(StackConfigurationsable) + GetStackDiagnostics()(StackDiagnosticsable) + SetOrganizations(value Organizationsable)() + SetProjects(value Projectsable)() + SetStackConfigurations(value StackConfigurationsable)() + SetStackDiagnostics(value StackDiagnosticsable)() } // NewStacksEnvelope instantiates a new StacksEnvelope and sets the default values. func NewStacksEnvelope()(*StacksEnvelope) { @@ -49,8 +189,29 @@ func (m *StacksEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStacksEnvelope_StacksEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StacksEnvelope_StacksEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StacksEnvelope_StacksEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []StacksEnvelope_StacksEnvelope_includedable when successful +func (m *StacksEnvelope) GetIncluded()([]StacksEnvelope_StacksEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *StacksEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +220,18 @@ func (m *StacksEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +248,15 @@ func (m *StacksEnvelope) SetAdditionalData(value map[string]any)() { func (m *StacksEnvelope) SetData(value Stacksable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *StacksEnvelope) SetIncluded(value []StacksEnvelope_StacksEnvelope_includedable)() { + m.included = value +} type StacksEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Stacksable) + GetIncluded()([]StacksEnvelope_StacksEnvelope_includedable) SetData(value Stacksable)() + SetIncluded(value []StacksEnvelope_StacksEnvelope_includedable)() } diff --git a/v2/api/models/stacks_escaped_attributes.go b/v2/api/models/stacks_escaped_attributes.go index 5d4bc38ba..084e11ec4 100644 --- a/v2/api/models/stacks_escaped_attributes.go +++ b/v2/api/models/stacks_escaped_attributes.go @@ -27,6 +27,8 @@ type Stacks_attributes struct { name *string // The outputsCount property outputsCount *int32 + // The resourceCount property + resourceCount *int32 // The settingOverwrites property settingOverwrites Stacks_attributes_settingOverwritesable // The speculativeEnabled property @@ -166,6 +168,16 @@ func (m *Stacks_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330 } return nil } + res["resource-count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetResourceCount(val) + } + return nil + } res["setting-overwrites"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateStacks_attributes_settingOverwritesFromDiscriminatorValue) if err != nil { @@ -243,6 +255,11 @@ func (m *Stacks_attributes) GetName()(*string) { func (m *Stacks_attributes) GetOutputsCount()(*int32) { return m.outputsCount } +// GetResourceCount gets the resource-count property value. The resourceCount property +// returns a *int32 when successful +func (m *Stacks_attributes) GetResourceCount()(*int32) { + return m.resourceCount +} // GetSettingOverwrites gets the setting-overwrites property value. The settingOverwrites property // returns a Stacks_attributes_settingOverwritesable when successful func (m *Stacks_attributes) GetSettingOverwrites()(Stacks_attributes_settingOverwritesable) { @@ -362,6 +379,10 @@ func (m *Stacks_attributes) SetName(value *string)() { func (m *Stacks_attributes) SetOutputsCount(value *int32)() { m.outputsCount = value } +// SetResourceCount sets the resource-count property value. The resourceCount property +func (m *Stacks_attributes) SetResourceCount(value *int32)() { + m.resourceCount = value +} // SetSettingOverwrites sets the setting-overwrites property value. The settingOverwrites property func (m *Stacks_attributes) SetSettingOverwrites(value Stacks_attributes_settingOverwritesable)() { m.settingOverwrites = value @@ -397,6 +418,7 @@ type Stacks_attributesable interface { GetInputsCount()(*int32) GetName()(*string) GetOutputsCount()(*int32) + GetResourceCount()(*int32) GetSettingOverwrites()(Stacks_attributes_settingOverwritesable) GetSpeculativeEnabled()(*bool) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -411,6 +433,7 @@ type Stacks_attributesable interface { SetInputsCount(value *int32)() SetName(value *string)() SetOutputsCount(value *int32)() + SetResourceCount(value *int32)() SetSettingOverwrites(value Stacks_attributes_settingOverwritesable)() SetSpeculativeEnabled(value *bool)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/v2/api/models/stacks_identifier_array_document.go b/v2/api/models/stacks_identifier_array_document.go new file mode 100644 index 000000000..749002e3b --- /dev/null +++ b/v2/api/models/stacks_identifier_array_document.go @@ -0,0 +1,95 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StacksIdentifierArrayDocument struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data []StacksIdentifierArrayDocument_dataable +} +// NewStacksIdentifierArrayDocument instantiates a new StacksIdentifierArrayDocument and sets the default values. +func NewStacksIdentifierArrayDocument()(*StacksIdentifierArrayDocument) { + m := &StacksIdentifierArrayDocument{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStacksIdentifierArrayDocumentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStacksIdentifierArrayDocumentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStacksIdentifierArrayDocument(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StacksIdentifierArrayDocument) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a []StacksIdentifierArrayDocument_dataable when successful +func (m *StacksIdentifierArrayDocument) GetData()([]StacksIdentifierArrayDocument_dataable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StacksIdentifierArrayDocument) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStacksIdentifierArrayDocument_dataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StacksIdentifierArrayDocument_dataable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StacksIdentifierArrayDocument_dataable) + } + } + m.SetData(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *StacksIdentifierArrayDocument) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetData())) + for i, v := range m.GetData() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("data", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StacksIdentifierArrayDocument) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *StacksIdentifierArrayDocument) SetData(value []StacksIdentifierArrayDocument_dataable)() { + m.data = value +} +type StacksIdentifierArrayDocumentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()([]StacksIdentifierArrayDocument_dataable) + SetData(value []StacksIdentifierArrayDocument_dataable)() +} diff --git a/v2/api/models/stacks_identifier_array_document_escaped_data.go b/v2/api/models/stacks_identifier_array_document_escaped_data.go new file mode 100644 index 000000000..1437516e7 --- /dev/null +++ b/v2/api/models/stacks_identifier_array_document_escaped_data.go @@ -0,0 +1,113 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StacksIdentifierArrayDocument_data struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *string + // The type property + typeEscaped *StacksIdentifierArrayDocument_data_type +} +// NewStacksIdentifierArrayDocument_data instantiates a new StacksIdentifierArrayDocument_data and sets the default values. +func NewStacksIdentifierArrayDocument_data()(*StacksIdentifierArrayDocument_data) { + m := &StacksIdentifierArrayDocument_data{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStacksIdentifierArrayDocument_dataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStacksIdentifierArrayDocument_dataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStacksIdentifierArrayDocument_data(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StacksIdentifierArrayDocument_data) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StacksIdentifierArrayDocument_data) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStacksIdentifierArrayDocument_data_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*StacksIdentifierArrayDocument_data_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *StacksIdentifierArrayDocument_data) GetId()(*string) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *StacksIdentifierArrayDocument_data_type when successful +func (m *StacksIdentifierArrayDocument_data) GetTypeEscaped()(*StacksIdentifierArrayDocument_data_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *StacksIdentifierArrayDocument_data) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StacksIdentifierArrayDocument_data) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *StacksIdentifierArrayDocument_data) SetId(value *string)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *StacksIdentifierArrayDocument_data) SetTypeEscaped(value *StacksIdentifierArrayDocument_data_type)() { + m.typeEscaped = value +} +type StacksIdentifierArrayDocument_dataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetTypeEscaped()(*StacksIdentifierArrayDocument_data_type) + SetId(value *string)() + SetTypeEscaped(value *StacksIdentifierArrayDocument_data_type)() +} diff --git a/v2/api/models/stacks_identifier_array_document_escaped_data_escaped_type.go b/v2/api/models/stacks_identifier_array_document_escaped_data_escaped_type.go new file mode 100644 index 000000000..3d657f7e9 --- /dev/null +++ b/v2/api/models/stacks_identifier_array_document_escaped_data_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type StacksIdentifierArrayDocument_data_type int + +const ( + STACKS_STACKSIDENTIFIERARRAYDOCUMENT_DATA_TYPE StacksIdentifierArrayDocument_data_type = iota +) + +func (i StacksIdentifierArrayDocument_data_type) String() string { + return []string{"stacks"}[i] +} +func ParseStacksIdentifierArrayDocument_data_type(v string) (any, error) { + result := STACKS_STACKSIDENTIFIERARRAYDOCUMENT_DATA_TYPE + switch v { + case "stacks": + result = STACKS_STACKSIDENTIFIERARRAYDOCUMENT_DATA_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeStacksIdentifierArrayDocument_data_type(values []StacksIdentifierArrayDocument_data_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StacksIdentifierArrayDocument_data_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/state_versions_envelope.go b/v2/api/models/state_versions_envelope.go index 99a30d241..8262aa620 100644 --- a/v2/api/models/state_versions_envelope.go +++ b/v2/api/models/state_versions_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,189 @@ type StateVersionsEnvelope struct { additionalData map[string]any // The data property data StateVersionsable + // The included property + included []StateVersionsEnvelope_StateVersionsEnvelope_includedable +} +// StateVersionsEnvelope_StateVersionsEnvelope_included composed type wrapper for classes ConfigurationVersionsable, HyokCustomerKeyVersionsable, HyokEncryptedDataKeysable, Runsable, StateVersionOutputsable, Usersable +type StateVersionsEnvelope_StateVersionsEnvelope_included struct { + // Composed type representation for type ConfigurationVersionsable + configurationVersions ConfigurationVersionsable + // Composed type representation for type HyokCustomerKeyVersionsable + hyokCustomerKeyVersions HyokCustomerKeyVersionsable + // Composed type representation for type HyokEncryptedDataKeysable + hyokEncryptedDataKeys HyokEncryptedDataKeysable + // Composed type representation for type Runsable + runs Runsable + // Composed type representation for type StateVersionOutputsable + stateVersionOutputs StateVersionOutputsable + // Composed type representation for type Usersable + users Usersable +} +// NewStateVersionsEnvelope_StateVersionsEnvelope_included instantiates a new StateVersionsEnvelope_StateVersionsEnvelope_included and sets the default values. +func NewStateVersionsEnvelope_StateVersionsEnvelope_included()(*StateVersionsEnvelope_StateVersionsEnvelope_included) { + m := &StateVersionsEnvelope_StateVersionsEnvelope_included{ + } + return m +} +// CreateStateVersionsEnvelope_StateVersionsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStateVersionsEnvelope_StateVersionsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewStateVersionsEnvelope_StateVersionsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "hyok-customer-key-versions") { + result.SetHyokCustomerKeyVersions(NewHyokCustomerKeyVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "hyok-encrypted-data-keys") { + result.SetHyokEncryptedDataKeys(NewHyokEncryptedDataKeys()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-version-outputs") { + result.SetStateVersionOutputs(NewStateVersionOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(NewUsers()) + } + } + } + } + return result, nil +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) GetConfigurationVersions()(ConfigurationVersionsable) { + return m.configurationVersions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetHyokCustomerKeyVersions() != nil { + return m.GetHyokCustomerKeyVersions().GetFieldDeserializers() + } else if m.GetHyokEncryptedDataKeys() != nil { + return m.GetHyokEncryptedDataKeys().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetStateVersionOutputs() != nil { + return m.GetStateVersionOutputs().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetHyokCustomerKeyVersions gets the hyokCustomerKeyVersions property value. Composed type representation for type HyokCustomerKeyVersionsable +// returns a HyokCustomerKeyVersionsable when successful +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) GetHyokCustomerKeyVersions()(HyokCustomerKeyVersionsable) { + return m.hyokCustomerKeyVersions +} +// GetHyokEncryptedDataKeys gets the hyokEncryptedDataKeys property value. Composed type representation for type HyokEncryptedDataKeysable +// returns a HyokEncryptedDataKeysable when successful +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) GetHyokEncryptedDataKeys()(HyokEncryptedDataKeysable) { + return m.hyokEncryptedDataKeys +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetRuns gets the runs property value. Composed type representation for type Runsable +// returns a Runsable when successful +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) GetRuns()(Runsable) { + return m.runs +} +// GetStateVersionOutputs gets the stateVersionOutputs property value. Composed type representation for type StateVersionOutputsable +// returns a StateVersionOutputsable when successful +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) GetStateVersionOutputs()(StateVersionOutputsable) { + return m.stateVersionOutputs +} +// GetUsers gets the users property value. Composed type representation for type Usersable +// returns a Usersable when successful +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) GetUsers()(Usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetHyokCustomerKeyVersions() != nil { + err := writer.WriteObjectValue("", m.GetHyokCustomerKeyVersions()) + if err != nil { + return err + } + } else if m.GetHyokEncryptedDataKeys() != nil { + err := writer.WriteObjectValue("", m.GetHyokEncryptedDataKeys()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetStateVersionOutputs() != nil { + err := writer.WriteObjectValue("", m.GetStateVersionOutputs()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) SetConfigurationVersions(value ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetHyokCustomerKeyVersions sets the hyokCustomerKeyVersions property value. Composed type representation for type HyokCustomerKeyVersionsable +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) SetHyokCustomerKeyVersions(value HyokCustomerKeyVersionsable)() { + m.hyokCustomerKeyVersions = value +} +// SetHyokEncryptedDataKeys sets the hyokEncryptedDataKeys property value. Composed type representation for type HyokEncryptedDataKeysable +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) SetHyokEncryptedDataKeys(value HyokEncryptedDataKeysable)() { + m.hyokEncryptedDataKeys = value +} +// SetRuns sets the runs property value. Composed type representation for type Runsable +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) SetRuns(value Runsable)() { + m.runs = value +} +// SetStateVersionOutputs sets the stateVersionOutputs property value. Composed type representation for type StateVersionOutputsable +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) SetStateVersionOutputs(value StateVersionOutputsable)() { + m.stateVersionOutputs = value +} +// SetUsers sets the users property value. Composed type representation for type Usersable +func (m *StateVersionsEnvelope_StateVersionsEnvelope_included) SetUsers(value Usersable)() { + m.users = value +} +type StateVersionsEnvelope_StateVersionsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersions()(ConfigurationVersionsable) + GetHyokCustomerKeyVersions()(HyokCustomerKeyVersionsable) + GetHyokEncryptedDataKeys()(HyokEncryptedDataKeysable) + GetRuns()(Runsable) + GetStateVersionOutputs()(StateVersionOutputsable) + GetUsers()(Usersable) + SetConfigurationVersions(value ConfigurationVersionsable)() + SetHyokCustomerKeyVersions(value HyokCustomerKeyVersionsable)() + SetHyokEncryptedDataKeys(value HyokEncryptedDataKeysable)() + SetRuns(value Runsable)() + SetStateVersionOutputs(value StateVersionOutputsable)() + SetUsers(value Usersable)() } // NewStateVersionsEnvelope instantiates a new StateVersionsEnvelope and sets the default values. func NewStateVersionsEnvelope()(*StateVersionsEnvelope) { @@ -49,8 +233,29 @@ func (m *StateVersionsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStateVersionsEnvelope_StateVersionsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StateVersionsEnvelope_StateVersionsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StateVersionsEnvelope_StateVersionsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []StateVersionsEnvelope_StateVersionsEnvelope_includedable when successful +func (m *StateVersionsEnvelope) GetIncluded()([]StateVersionsEnvelope_StateVersionsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *StateVersionsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +264,18 @@ func (m *StateVersionsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487e return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +292,15 @@ func (m *StateVersionsEnvelope) SetAdditionalData(value map[string]any)() { func (m *StateVersionsEnvelope) SetData(value StateVersionsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *StateVersionsEnvelope) SetIncluded(value []StateVersionsEnvelope_StateVersionsEnvelope_includedable)() { + m.included = value +} type StateVersionsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(StateVersionsable) + GetIncluded()([]StateVersionsEnvelope_StateVersionsEnvelope_includedable) SetData(value StateVersionsable)() + SetIncluded(value []StateVersionsEnvelope_StateVersionsEnvelope_includedable)() } diff --git a/v2/api/models/subscriptions_envelope.go b/v2/api/models/subscriptions_envelope.go index e45699c9f..08f45586b 100644 --- a/v2/api/models/subscriptions_envelope.go +++ b/v2/api/models/subscriptions_envelope.go @@ -12,6 +12,8 @@ type SubscriptionsEnvelope struct { additionalData map[string]any // The data property data Subscriptionsable + // The included property + included []FeatureSetsable } // NewSubscriptionsEnvelope instantiates a new SubscriptionsEnvelope and sets the default values. func NewSubscriptionsEnvelope()(*SubscriptionsEnvelope) { @@ -49,8 +51,29 @@ func (m *SubscriptionsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFeatureSetsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FeatureSetsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(FeatureSetsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []FeatureSetsable when successful +func (m *SubscriptionsEnvelope) GetIncluded()([]FeatureSetsable) { + return m.included +} // Serialize serializes information the current object func (m *SubscriptionsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *SubscriptionsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487e return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *SubscriptionsEnvelope) SetAdditionalData(value map[string]any)() { func (m *SubscriptionsEnvelope) SetData(value Subscriptionsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *SubscriptionsEnvelope) SetIncluded(value []FeatureSetsable)() { + m.included = value +} type SubscriptionsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Subscriptionsable) + GetIncluded()([]FeatureSetsable) SetData(value Subscriptionsable)() + SetIncluded(value []FeatureSetsable)() } diff --git a/v2/api/models/task_configs_envelope.go b/v2/api/models/task_configs_envelope.go index 3841a94fc..7ca4b78c1 100644 --- a/v2/api/models/task_configs_envelope.go +++ b/v2/api/models/task_configs_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,145 @@ type TaskConfigsEnvelope struct { additionalData map[string]any // The data property data TaskConfigsable + // The included property + included []TaskConfigsEnvelope_TaskConfigsEnvelope_includedable +} +// TaskConfigsEnvelope_TaskConfigsEnvelope_included composed type wrapper for classes Organizationsable, Projectsable, Tasksable, Workspacesable +type TaskConfigsEnvelope_TaskConfigsEnvelope_included struct { + // Composed type representation for type Organizationsable + organizations Organizationsable + // Composed type representation for type Projectsable + projects Projectsable + // Composed type representation for type Tasksable + tasks Tasksable + // Composed type representation for type Workspacesable + workspaces Workspacesable +} +// NewTaskConfigsEnvelope_TaskConfigsEnvelope_included instantiates a new TaskConfigsEnvelope_TaskConfigsEnvelope_included and sets the default values. +func NewTaskConfigsEnvelope_TaskConfigsEnvelope_included()(*TaskConfigsEnvelope_TaskConfigsEnvelope_included) { + m := &TaskConfigsEnvelope_TaskConfigsEnvelope_included{ + } + return m +} +// CreateTaskConfigsEnvelope_TaskConfigsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTaskConfigsEnvelope_TaskConfigsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewTaskConfigsEnvelope_TaskConfigsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(NewOrganizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tasks") { + result.SetTasks(NewTasks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetTasks() != nil { + return m.GetTasks().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOrganizations gets the organizations property value. Composed type representation for type Organizationsable +// returns a Organizationsable when successful +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) GetOrganizations()(Organizationsable) { + return m.organizations +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// GetTasks gets the tasks property value. Composed type representation for type Tasksable +// returns a Tasksable when successful +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) GetTasks()(Tasksable) { + return m.tasks +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type Workspacesable +// returns a Workspacesable when successful +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) GetWorkspaces()(Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetTasks() != nil { + err := writer.WriteObjectValue("", m.GetTasks()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetOrganizations sets the organizations property value. Composed type representation for type Organizationsable +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) SetOrganizations(value Organizationsable)() { + m.organizations = value +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +// SetTasks sets the tasks property value. Composed type representation for type Tasksable +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) SetTasks(value Tasksable)() { + m.tasks = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type Workspacesable +func (m *TaskConfigsEnvelope_TaskConfigsEnvelope_included) SetWorkspaces(value Workspacesable)() { + m.workspaces = value +} +type TaskConfigsEnvelope_TaskConfigsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizations()(Organizationsable) + GetProjects()(Projectsable) + GetTasks()(Tasksable) + GetWorkspaces()(Workspacesable) + SetOrganizations(value Organizationsable)() + SetProjects(value Projectsable)() + SetTasks(value Tasksable)() + SetWorkspaces(value Workspacesable)() } // NewTaskConfigsEnvelope instantiates a new TaskConfigsEnvelope and sets the default values. func NewTaskConfigsEnvelope()(*TaskConfigsEnvelope) { @@ -49,8 +189,29 @@ func (m *TaskConfigsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskConfigsEnvelope_TaskConfigsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskConfigsEnvelope_TaskConfigsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TaskConfigsEnvelope_TaskConfigsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []TaskConfigsEnvelope_TaskConfigsEnvelope_includedable when successful +func (m *TaskConfigsEnvelope) GetIncluded()([]TaskConfigsEnvelope_TaskConfigsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *TaskConfigsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +220,18 @@ func (m *TaskConfigsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +248,15 @@ func (m *TaskConfigsEnvelope) SetAdditionalData(value map[string]any)() { func (m *TaskConfigsEnvelope) SetData(value TaskConfigsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TaskConfigsEnvelope) SetIncluded(value []TaskConfigsEnvelope_TaskConfigsEnvelope_includedable)() { + m.included = value +} type TaskConfigsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(TaskConfigsable) + GetIncluded()([]TaskConfigsEnvelope_TaskConfigsEnvelope_includedable) SetData(value TaskConfigsable)() + SetIncluded(value []TaskConfigsEnvelope_TaskConfigsEnvelope_includedable)() } diff --git a/v2/api/models/task_stages_envelope.go b/v2/api/models/task_stages_envelope.go index 14ae24720..fc967d083 100644 --- a/v2/api/models/task_stages_envelope.go +++ b/v2/api/models/task_stages_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,167 @@ type TaskStagesEnvelope struct { additionalData map[string]any // The data property data TaskStagesable + // The included property + included []TaskStagesEnvelope_TaskStagesEnvelope_includedable +} +// TaskStagesEnvelope_TaskStagesEnvelope_included composed type wrapper for classes CostEstimatesable, PolicyEvaluationsable, Runsable, TaskResultsable, Workspacesable +type TaskStagesEnvelope_TaskStagesEnvelope_included struct { + // Composed type representation for type CostEstimatesable + costEstimates CostEstimatesable + // Composed type representation for type PolicyEvaluationsable + policyEvaluations PolicyEvaluationsable + // Composed type representation for type Runsable + runs Runsable + // Composed type representation for type TaskResultsable + taskResults TaskResultsable + // Composed type representation for type Workspacesable + workspaces Workspacesable +} +// NewTaskStagesEnvelope_TaskStagesEnvelope_included instantiates a new TaskStagesEnvelope_TaskStagesEnvelope_included and sets the default values. +func NewTaskStagesEnvelope_TaskStagesEnvelope_included()(*TaskStagesEnvelope_TaskStagesEnvelope_included) { + m := &TaskStagesEnvelope_TaskStagesEnvelope_included{ + } + return m +} +// CreateTaskStagesEnvelope_TaskStagesEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTaskStagesEnvelope_TaskStagesEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewTaskStagesEnvelope_TaskStagesEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { + result.SetCostEstimates(NewCostEstimates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policy-evaluations") { + result.SetPolicyEvaluations(NewPolicyEvaluations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-results") { + result.SetTaskResults(NewTaskResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetCostEstimates gets the costEstimates property value. Composed type representation for type CostEstimatesable +// returns a CostEstimatesable when successful +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) GetCostEstimates()(CostEstimatesable) { + return m.costEstimates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetCostEstimates() != nil { + return m.GetCostEstimates().GetFieldDeserializers() + } else if m.GetPolicyEvaluations() != nil { + return m.GetPolicyEvaluations().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetTaskResults() != nil { + return m.GetTaskResults().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetPolicyEvaluations gets the policyEvaluations property value. Composed type representation for type PolicyEvaluationsable +// returns a PolicyEvaluationsable when successful +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) GetPolicyEvaluations()(PolicyEvaluationsable) { + return m.policyEvaluations +} +// GetRuns gets the runs property value. Composed type representation for type Runsable +// returns a Runsable when successful +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) GetRuns()(Runsable) { + return m.runs +} +// GetTaskResults gets the taskResults property value. Composed type representation for type TaskResultsable +// returns a TaskResultsable when successful +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) GetTaskResults()(TaskResultsable) { + return m.taskResults +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type Workspacesable +// returns a Workspacesable when successful +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) GetWorkspaces()(Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCostEstimates() != nil { + err := writer.WriteObjectValue("", m.GetCostEstimates()) + if err != nil { + return err + } + } else if m.GetPolicyEvaluations() != nil { + err := writer.WriteObjectValue("", m.GetPolicyEvaluations()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetTaskResults() != nil { + err := writer.WriteObjectValue("", m.GetTaskResults()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetCostEstimates sets the costEstimates property value. Composed type representation for type CostEstimatesable +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) SetCostEstimates(value CostEstimatesable)() { + m.costEstimates = value +} +// SetPolicyEvaluations sets the policyEvaluations property value. Composed type representation for type PolicyEvaluationsable +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) SetPolicyEvaluations(value PolicyEvaluationsable)() { + m.policyEvaluations = value +} +// SetRuns sets the runs property value. Composed type representation for type Runsable +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) SetRuns(value Runsable)() { + m.runs = value +} +// SetTaskResults sets the taskResults property value. Composed type representation for type TaskResultsable +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) SetTaskResults(value TaskResultsable)() { + m.taskResults = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type Workspacesable +func (m *TaskStagesEnvelope_TaskStagesEnvelope_included) SetWorkspaces(value Workspacesable)() { + m.workspaces = value +} +type TaskStagesEnvelope_TaskStagesEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCostEstimates()(CostEstimatesable) + GetPolicyEvaluations()(PolicyEvaluationsable) + GetRuns()(Runsable) + GetTaskResults()(TaskResultsable) + GetWorkspaces()(Workspacesable) + SetCostEstimates(value CostEstimatesable)() + SetPolicyEvaluations(value PolicyEvaluationsable)() + SetRuns(value Runsable)() + SetTaskResults(value TaskResultsable)() + SetWorkspaces(value Workspacesable)() } // NewTaskStagesEnvelope instantiates a new TaskStagesEnvelope and sets the default values. func NewTaskStagesEnvelope()(*TaskStagesEnvelope) { @@ -49,8 +211,29 @@ func (m *TaskStagesEnvelope) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskStagesEnvelope_TaskStagesEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskStagesEnvelope_TaskStagesEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TaskStagesEnvelope_TaskStagesEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []TaskStagesEnvelope_TaskStagesEnvelope_includedable when successful +func (m *TaskStagesEnvelope) GetIncluded()([]TaskStagesEnvelope_TaskStagesEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *TaskStagesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +242,18 @@ func (m *TaskStagesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +270,15 @@ func (m *TaskStagesEnvelope) SetAdditionalData(value map[string]any)() { func (m *TaskStagesEnvelope) SetData(value TaskStagesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TaskStagesEnvelope) SetIncluded(value []TaskStagesEnvelope_TaskStagesEnvelope_includedable)() { + m.included = value +} type TaskStagesEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(TaskStagesable) + GetIncluded()([]TaskStagesEnvelope_TaskStagesEnvelope_includedable) SetData(value TaskStagesable)() + SetIncluded(value []TaskStagesEnvelope_TaskStagesEnvelope_includedable)() } diff --git a/v2/api/models/tasks_envelope.go b/v2/api/models/tasks_envelope.go index a2ae59696..27ce8a660 100644 --- a/v2/api/models/tasks_envelope.go +++ b/v2/api/models/tasks_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,101 @@ type TasksEnvelope struct { additionalData map[string]any // The data property data Tasksable + // The included property + included []TasksEnvelope_TasksEnvelope_includedable +} +// TasksEnvelope_TasksEnvelope_included composed type wrapper for classes Workspacesable, WorkspaceTasksable +type TasksEnvelope_TasksEnvelope_included struct { + // Composed type representation for type Workspacesable + workspaces Workspacesable + // Composed type representation for type WorkspaceTasksable + workspaceTasks WorkspaceTasksable +} +// NewTasksEnvelope_TasksEnvelope_included instantiates a new TasksEnvelope_TasksEnvelope_included and sets the default values. +func NewTasksEnvelope_TasksEnvelope_included()(*TasksEnvelope_TasksEnvelope_included) { + m := &TasksEnvelope_TasksEnvelope_included{ + } + return m +} +// CreateTasksEnvelope_TasksEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTasksEnvelope_TasksEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewTasksEnvelope_TasksEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewWorkspaces()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-tasks") { + result.SetWorkspaceTasks(NewWorkspaceTasks()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TasksEnvelope_TasksEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } else if m.GetWorkspaceTasks() != nil { + return m.GetWorkspaceTasks().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *TasksEnvelope_TasksEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type Workspacesable +// returns a Workspacesable when successful +func (m *TasksEnvelope_TasksEnvelope_included) GetWorkspaces()(Workspacesable) { + return m.workspaces +} +// GetWorkspaceTasks gets the workspaceTasks property value. Composed type representation for type WorkspaceTasksable +// returns a WorkspaceTasksable when successful +func (m *TasksEnvelope_TasksEnvelope_included) GetWorkspaceTasks()(WorkspaceTasksable) { + return m.workspaceTasks +} +// Serialize serializes information the current object +func (m *TasksEnvelope_TasksEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } else if m.GetWorkspaceTasks() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceTasks()) + if err != nil { + return err + } + } + return nil +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type Workspacesable +func (m *TasksEnvelope_TasksEnvelope_included) SetWorkspaces(value Workspacesable)() { + m.workspaces = value +} +// SetWorkspaceTasks sets the workspaceTasks property value. Composed type representation for type WorkspaceTasksable +func (m *TasksEnvelope_TasksEnvelope_included) SetWorkspaceTasks(value WorkspaceTasksable)() { + m.workspaceTasks = value +} +type TasksEnvelope_TasksEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetWorkspaces()(Workspacesable) + GetWorkspaceTasks()(WorkspaceTasksable) + SetWorkspaces(value Workspacesable)() + SetWorkspaceTasks(value WorkspaceTasksable)() } // NewTasksEnvelope instantiates a new TasksEnvelope and sets the default values. func NewTasksEnvelope()(*TasksEnvelope) { @@ -49,8 +145,29 @@ func (m *TasksEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTasksEnvelope_TasksEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TasksEnvelope_TasksEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TasksEnvelope_TasksEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []TasksEnvelope_TasksEnvelope_includedable when successful +func (m *TasksEnvelope) GetIncluded()([]TasksEnvelope_TasksEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *TasksEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +176,18 @@ func (m *TasksEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +204,15 @@ func (m *TasksEnvelope) SetAdditionalData(value map[string]any)() { func (m *TasksEnvelope) SetData(value Tasksable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TasksEnvelope) SetIncluded(value []TasksEnvelope_TasksEnvelope_includedable)() { + m.included = value +} type TasksEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Tasksable) + GetIncluded()([]TasksEnvelope_TasksEnvelope_includedable) SetData(value Tasksable)() + SetIncluded(value []TasksEnvelope_TasksEnvelope_includedable)() } diff --git a/v2/api/models/team_projects_envelope.go b/v2/api/models/team_projects_envelope.go index 0dd787956..57589f426 100644 --- a/v2/api/models/team_projects_envelope.go +++ b/v2/api/models/team_projects_envelope.go @@ -12,6 +12,8 @@ type TeamProjectsEnvelope struct { additionalData map[string]any // The data property data TeamProjectsable + // The included property + included []Teamsable } // NewTeamProjectsEnvelope instantiates a new TeamProjectsEnvelope and sets the default values. func NewTeamProjectsEnvelope()(*TeamProjectsEnvelope) { @@ -49,8 +51,29 @@ func (m *TeamProjectsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []Teamsable when successful +func (m *TeamProjectsEnvelope) GetIncluded()([]Teamsable) { + return m.included +} // Serialize serializes information the current object func (m *TeamProjectsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *TeamProjectsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487ee return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *TeamProjectsEnvelope) SetAdditionalData(value map[string]any)() { func (m *TeamProjectsEnvelope) SetData(value TeamProjectsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TeamProjectsEnvelope) SetIncluded(value []Teamsable)() { + m.included = value +} type TeamProjectsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(TeamProjectsable) + GetIncluded()([]Teamsable) SetData(value TeamProjectsable)() + SetIncluded(value []Teamsable)() } diff --git a/v2/api/models/team_workspaces_envelope.go b/v2/api/models/team_workspaces_envelope.go index 3cd133700..7578d9a8b 100644 --- a/v2/api/models/team_workspaces_envelope.go +++ b/v2/api/models/team_workspaces_envelope.go @@ -12,6 +12,8 @@ type TeamWorkspacesEnvelope struct { additionalData map[string]any // The data property data TeamWorkspacesable + // The included property + included []Teamsable } // NewTeamWorkspacesEnvelope instantiates a new TeamWorkspacesEnvelope and sets the default values. func NewTeamWorkspacesEnvelope()(*TeamWorkspacesEnvelope) { @@ -49,8 +51,29 @@ func (m *TeamWorkspacesEnvelope) GetFieldDeserializers()(map[string]func(i878a80 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []Teamsable when successful +func (m *TeamWorkspacesEnvelope) GetIncluded()([]Teamsable) { + return m.included +} // Serialize serializes information the current object func (m *TeamWorkspacesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *TeamWorkspacesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *TeamWorkspacesEnvelope) SetAdditionalData(value map[string]any)() { func (m *TeamWorkspacesEnvelope) SetData(value TeamWorkspacesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TeamWorkspacesEnvelope) SetIncluded(value []Teamsable)() { + m.included = value +} type TeamWorkspacesEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(TeamWorkspacesable) + GetIncluded()([]Teamsable) SetData(value TeamWorkspacesable)() + SetIncluded(value []Teamsable)() } diff --git a/v2/api/models/teams_envelope.go b/v2/api/models/teams_envelope.go index d87f9b687..afabd268d 100644 --- a/v2/api/models/teams_envelope.go +++ b/v2/api/models/teams_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,101 @@ type TeamsEnvelope struct { additionalData map[string]any // The data property data Teamsable + // The included property + included []TeamsEnvelope_TeamsEnvelope_includedable +} +// TeamsEnvelope_TeamsEnvelope_included composed type wrapper for classes OrganizationMembershipsable, Usersable +type TeamsEnvelope_TeamsEnvelope_included struct { + // Composed type representation for type OrganizationMembershipsable + organizationMemberships OrganizationMembershipsable + // Composed type representation for type Usersable + users Usersable +} +// NewTeamsEnvelope_TeamsEnvelope_included instantiates a new TeamsEnvelope_TeamsEnvelope_included and sets the default values. +func NewTeamsEnvelope_TeamsEnvelope_included()(*TeamsEnvelope_TeamsEnvelope_included) { + m := &TeamsEnvelope_TeamsEnvelope_included{ + } + return m +} +// CreateTeamsEnvelope_TeamsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamsEnvelope_TeamsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewTeamsEnvelope_TeamsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organization-memberships") { + result.SetOrganizationMemberships(NewOrganizationMemberships()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(NewUsers()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamsEnvelope_TeamsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOrganizationMemberships() != nil { + return m.GetOrganizationMemberships().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *TeamsEnvelope_TeamsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetOrganizationMemberships gets the organizationMemberships property value. Composed type representation for type OrganizationMembershipsable +// returns a OrganizationMembershipsable when successful +func (m *TeamsEnvelope_TeamsEnvelope_included) GetOrganizationMemberships()(OrganizationMembershipsable) { + return m.organizationMemberships +} +// GetUsers gets the users property value. Composed type representation for type Usersable +// returns a Usersable when successful +func (m *TeamsEnvelope_TeamsEnvelope_included) GetUsers()(Usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *TeamsEnvelope_TeamsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizationMemberships() != nil { + err := writer.WriteObjectValue("", m.GetOrganizationMemberships()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil +} +// SetOrganizationMemberships sets the organizationMemberships property value. Composed type representation for type OrganizationMembershipsable +func (m *TeamsEnvelope_TeamsEnvelope_included) SetOrganizationMemberships(value OrganizationMembershipsable)() { + m.organizationMemberships = value +} +// SetUsers sets the users property value. Composed type representation for type Usersable +func (m *TeamsEnvelope_TeamsEnvelope_included) SetUsers(value Usersable)() { + m.users = value +} +type TeamsEnvelope_TeamsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizationMemberships()(OrganizationMembershipsable) + GetUsers()(Usersable) + SetOrganizationMemberships(value OrganizationMembershipsable)() + SetUsers(value Usersable)() } // NewTeamsEnvelope instantiates a new TeamsEnvelope and sets the default values. func NewTeamsEnvelope()(*TeamsEnvelope) { @@ -49,8 +145,29 @@ func (m *TeamsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamsEnvelope_TeamsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamsEnvelope_TeamsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TeamsEnvelope_TeamsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []TeamsEnvelope_TeamsEnvelope_includedable when successful +func (m *TeamsEnvelope) GetIncluded()([]TeamsEnvelope_TeamsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *TeamsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +176,18 @@ func (m *TeamsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +204,15 @@ func (m *TeamsEnvelope) SetAdditionalData(value map[string]any)() { func (m *TeamsEnvelope) SetData(value Teamsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TeamsEnvelope) SetIncluded(value []TeamsEnvelope_TeamsEnvelope_includedable)() { + m.included = value +} type TeamsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Teamsable) + GetIncluded()([]TeamsEnvelope_TeamsEnvelope_includedable) SetData(value Teamsable)() + SetIncluded(value []TeamsEnvelope_TeamsEnvelope_includedable)() } diff --git a/v2/api/models/test_runs.go b/v2/api/models/test_runs.go new file mode 100644 index 000000000..0ab6da9fb --- /dev/null +++ b/v2/api/models/test_runs.go @@ -0,0 +1,165 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TestRuns struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attributes property + attributes TestRuns_attributesable + // The id property + id *string + // The relationships property + relationships TestRuns_relationshipsable + // The type property + typeEscaped *TestRuns_type +} +// NewTestRuns instantiates a new TestRuns and sets the default values. +func NewTestRuns()(*TestRuns) { + m := &TestRuns{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTestRunsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTestRunsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTestRuns(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TestRuns) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +// returns a TestRuns_attributesable when successful +func (m *TestRuns) GetAttributes()(TestRuns_attributesable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TestRuns) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTestRuns_attributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributes(val.(TestRuns_attributesable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTestRuns_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRelationships(val.(TestRuns_relationshipsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTestRuns_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*TestRuns_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *TestRuns) GetId()(*string) { + return m.id +} +// GetRelationships gets the relationships property value. The relationships property +// returns a TestRuns_relationshipsable when successful +func (m *TestRuns) GetRelationships()(TestRuns_relationshipsable) { + return m.relationships +} +// GetTypeEscaped gets the type property value. The type property +// returns a *TestRuns_type when successful +func (m *TestRuns) GetTypeEscaped()(*TestRuns_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *TestRuns) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributes", m.GetAttributes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("relationships", m.GetRelationships()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TestRuns) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *TestRuns) SetAttributes(value TestRuns_attributesable)() { + m.attributes = value +} +// SetId sets the id property value. The id property +func (m *TestRuns) SetId(value *string)() { + m.id = value +} +// SetRelationships sets the relationships property value. The relationships property +func (m *TestRuns) SetRelationships(value TestRuns_relationshipsable)() { + m.relationships = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *TestRuns) SetTypeEscaped(value *TestRuns_type)() { + m.typeEscaped = value +} +type TestRunsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()(TestRuns_attributesable) + GetId()(*string) + GetRelationships()(TestRuns_relationshipsable) + GetTypeEscaped()(*TestRuns_type) + SetAttributes(value TestRuns_attributesable)() + SetId(value *string)() + SetRelationships(value TestRuns_relationshipsable)() + SetTypeEscaped(value *TestRuns_type)() +} diff --git a/v2/api/models/test_runs_escaped_attributes.go b/v2/api/models/test_runs_escaped_attributes.go new file mode 100644 index 000000000..cb9e8e853 --- /dev/null +++ b/v2/api/models/test_runs_escaped_attributes.go @@ -0,0 +1,523 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TestRuns_attributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The createdAt property + createdAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The filters property + filters []string + // The message property + message *string + // The parallelism property + parallelism *int32 + // The source property + source *string + // The status property + status *string + // The statusTimestamps property + statusTimestamps TestRuns_attributes_statusTimestampsable + // The testConfigurableId property + testConfigurableId *string + // The testConfigurableType property + testConfigurableType *string + // The testDirectory property + testDirectory *string + // The testsErrored property + testsErrored *int32 + // The testsFailed property + testsFailed *int32 + // The testsPassed property + testsPassed *int32 + // The testsSkipped property + testsSkipped *int32 + // The testStatus property + testStatus *string + // The updatedAt property + updatedAt *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The variables property + variables []TestRuns_attributes_variablesable + // The verbose property + verbose *bool +} +// NewTestRuns_attributes instantiates a new TestRuns_attributes and sets the default values. +func NewTestRuns_attributes()(*TestRuns_attributes) { + m := &TestRuns_attributes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTestRuns_attributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTestRuns_attributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTestRuns_attributes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TestRuns_attributes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created-at property value. The createdAt property +// returns a *Time when successful +func (m *TestRuns_attributes) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdAt +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TestRuns_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["filters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetFilters(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["parallelism"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetParallelism(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSource(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["status-timestamps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTestRuns_attributes_statusTimestampsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatusTimestamps(val.(TestRuns_attributes_statusTimestampsable)) + } + return nil + } + res["test-configurable-id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTestConfigurableId(val) + } + return nil + } + res["test-configurable-type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTestConfigurableType(val) + } + return nil + } + res["test-directory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTestDirectory(val) + } + return nil + } + res["tests-errored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTestsErrored(val) + } + return nil + } + res["tests-failed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTestsFailed(val) + } + return nil + } + res["tests-passed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTestsPassed(val) + } + return nil + } + res["tests-skipped"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTestsSkipped(val) + } + return nil + } + res["test-status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTestStatus(val) + } + return nil + } + res["updated-at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["variables"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTestRuns_attributes_variablesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TestRuns_attributes_variablesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TestRuns_attributes_variablesable) + } + } + m.SetVariables(res) + } + return nil + } + res["verbose"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerbose(val) + } + return nil + } + return res +} +// GetFilters gets the filters property value. The filters property +// returns a []string when successful +func (m *TestRuns_attributes) GetFilters()([]string) { + return m.filters +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *TestRuns_attributes) GetMessage()(*string) { + return m.message +} +// GetParallelism gets the parallelism property value. The parallelism property +// returns a *int32 when successful +func (m *TestRuns_attributes) GetParallelism()(*int32) { + return m.parallelism +} +// GetSource gets the source property value. The source property +// returns a *string when successful +func (m *TestRuns_attributes) GetSource()(*string) { + return m.source +} +// GetStatus gets the status property value. The status property +// returns a *string when successful +func (m *TestRuns_attributes) GetStatus()(*string) { + return m.status +} +// GetStatusTimestamps gets the status-timestamps property value. The statusTimestamps property +// returns a TestRuns_attributes_statusTimestampsable when successful +func (m *TestRuns_attributes) GetStatusTimestamps()(TestRuns_attributes_statusTimestampsable) { + return m.statusTimestamps +} +// GetTestConfigurableId gets the test-configurable-id property value. The testConfigurableId property +// returns a *string when successful +func (m *TestRuns_attributes) GetTestConfigurableId()(*string) { + return m.testConfigurableId +} +// GetTestConfigurableType gets the test-configurable-type property value. The testConfigurableType property +// returns a *string when successful +func (m *TestRuns_attributes) GetTestConfigurableType()(*string) { + return m.testConfigurableType +} +// GetTestDirectory gets the test-directory property value. The testDirectory property +// returns a *string when successful +func (m *TestRuns_attributes) GetTestDirectory()(*string) { + return m.testDirectory +} +// GetTestsErrored gets the tests-errored property value. The testsErrored property +// returns a *int32 when successful +func (m *TestRuns_attributes) GetTestsErrored()(*int32) { + return m.testsErrored +} +// GetTestsFailed gets the tests-failed property value. The testsFailed property +// returns a *int32 when successful +func (m *TestRuns_attributes) GetTestsFailed()(*int32) { + return m.testsFailed +} +// GetTestsPassed gets the tests-passed property value. The testsPassed property +// returns a *int32 when successful +func (m *TestRuns_attributes) GetTestsPassed()(*int32) { + return m.testsPassed +} +// GetTestsSkipped gets the tests-skipped property value. The testsSkipped property +// returns a *int32 when successful +func (m *TestRuns_attributes) GetTestsSkipped()(*int32) { + return m.testsSkipped +} +// GetTestStatus gets the test-status property value. The testStatus property +// returns a *string when successful +func (m *TestRuns_attributes) GetTestStatus()(*string) { + return m.testStatus +} +// GetUpdatedAt gets the updated-at property value. The updatedAt property +// returns a *Time when successful +func (m *TestRuns_attributes) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedAt +} +// GetVariables gets the variables property value. The variables property +// returns a []TestRuns_attributes_variablesable when successful +func (m *TestRuns_attributes) GetVariables()([]TestRuns_attributes_variablesable) { + return m.variables +} +// GetVerbose gets the verbose property value. The verbose property +// returns a *bool when successful +func (m *TestRuns_attributes) GetVerbose()(*bool) { + return m.verbose +} +// Serialize serializes information the current object +func (m *TestRuns_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetFilters() != nil { + err := writer.WriteCollectionOfStringValues("filters", m.GetFilters()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("parallelism", m.GetParallelism()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("test-directory", m.GetTestDirectory()) + if err != nil { + return err + } + } + if m.GetVariables() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVariables())) + for i, v := range m.GetVariables() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("variables", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verbose", m.GetVerbose()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TestRuns_attributes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created-at property value. The createdAt property +func (m *TestRuns_attributes) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdAt = value +} +// SetFilters sets the filters property value. The filters property +func (m *TestRuns_attributes) SetFilters(value []string)() { + m.filters = value +} +// SetMessage sets the message property value. The message property +func (m *TestRuns_attributes) SetMessage(value *string)() { + m.message = value +} +// SetParallelism sets the parallelism property value. The parallelism property +func (m *TestRuns_attributes) SetParallelism(value *int32)() { + m.parallelism = value +} +// SetSource sets the source property value. The source property +func (m *TestRuns_attributes) SetSource(value *string)() { + m.source = value +} +// SetStatus sets the status property value. The status property +func (m *TestRuns_attributes) SetStatus(value *string)() { + m.status = value +} +// SetStatusTimestamps sets the status-timestamps property value. The statusTimestamps property +func (m *TestRuns_attributes) SetStatusTimestamps(value TestRuns_attributes_statusTimestampsable)() { + m.statusTimestamps = value +} +// SetTestConfigurableId sets the test-configurable-id property value. The testConfigurableId property +func (m *TestRuns_attributes) SetTestConfigurableId(value *string)() { + m.testConfigurableId = value +} +// SetTestConfigurableType sets the test-configurable-type property value. The testConfigurableType property +func (m *TestRuns_attributes) SetTestConfigurableType(value *string)() { + m.testConfigurableType = value +} +// SetTestDirectory sets the test-directory property value. The testDirectory property +func (m *TestRuns_attributes) SetTestDirectory(value *string)() { + m.testDirectory = value +} +// SetTestsErrored sets the tests-errored property value. The testsErrored property +func (m *TestRuns_attributes) SetTestsErrored(value *int32)() { + m.testsErrored = value +} +// SetTestsFailed sets the tests-failed property value. The testsFailed property +func (m *TestRuns_attributes) SetTestsFailed(value *int32)() { + m.testsFailed = value +} +// SetTestsPassed sets the tests-passed property value. The testsPassed property +func (m *TestRuns_attributes) SetTestsPassed(value *int32)() { + m.testsPassed = value +} +// SetTestsSkipped sets the tests-skipped property value. The testsSkipped property +func (m *TestRuns_attributes) SetTestsSkipped(value *int32)() { + m.testsSkipped = value +} +// SetTestStatus sets the test-status property value. The testStatus property +func (m *TestRuns_attributes) SetTestStatus(value *string)() { + m.testStatus = value +} +// SetUpdatedAt sets the updated-at property value. The updatedAt property +func (m *TestRuns_attributes) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedAt = value +} +// SetVariables sets the variables property value. The variables property +func (m *TestRuns_attributes) SetVariables(value []TestRuns_attributes_variablesable)() { + m.variables = value +} +// SetVerbose sets the verbose property value. The verbose property +func (m *TestRuns_attributes) SetVerbose(value *bool)() { + m.verbose = value +} +type TestRuns_attributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFilters()([]string) + GetMessage()(*string) + GetParallelism()(*int32) + GetSource()(*string) + GetStatus()(*string) + GetStatusTimestamps()(TestRuns_attributes_statusTimestampsable) + GetTestConfigurableId()(*string) + GetTestConfigurableType()(*string) + GetTestDirectory()(*string) + GetTestsErrored()(*int32) + GetTestsFailed()(*int32) + GetTestsPassed()(*int32) + GetTestsSkipped()(*int32) + GetTestStatus()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVariables()([]TestRuns_attributes_variablesable) + GetVerbose()(*bool) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFilters(value []string)() + SetMessage(value *string)() + SetParallelism(value *int32)() + SetSource(value *string)() + SetStatus(value *string)() + SetStatusTimestamps(value TestRuns_attributes_statusTimestampsable)() + SetTestConfigurableId(value *string)() + SetTestConfigurableType(value *string)() + SetTestDirectory(value *string)() + SetTestsErrored(value *int32)() + SetTestsFailed(value *int32)() + SetTestsPassed(value *int32)() + SetTestsSkipped(value *int32)() + SetTestStatus(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVariables(value []TestRuns_attributes_variablesable)() + SetVerbose(value *bool)() +} diff --git a/v2/api/models/test_runs_escaped_attributes_escaped_status_timestamps.go b/v2/api/models/test_runs_escaped_attributes_escaped_status_timestamps.go new file mode 100644 index 000000000..ec99b561b --- /dev/null +++ b/v2/api/models/test_runs_escaped_attributes_escaped_status_timestamps.go @@ -0,0 +1,54 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TestRuns_attributes_statusTimestamps struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewTestRuns_attributes_statusTimestamps instantiates a new TestRuns_attributes_statusTimestamps and sets the default values. +func NewTestRuns_attributes_statusTimestamps()(*TestRuns_attributes_statusTimestamps) { + m := &TestRuns_attributes_statusTimestamps{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTestRuns_attributes_statusTimestampsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTestRuns_attributes_statusTimestampsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTestRuns_attributes_statusTimestamps(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TestRuns_attributes_statusTimestamps) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TestRuns_attributes_statusTimestamps) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *TestRuns_attributes_statusTimestamps) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TestRuns_attributes_statusTimestamps) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type TestRuns_attributes_statusTimestampsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/v2/api/models/test_runs_escaped_attributes_escaped_variables.go b/v2/api/models/test_runs_escaped_attributes_escaped_variables.go new file mode 100644 index 000000000..77028e39e --- /dev/null +++ b/v2/api/models/test_runs_escaped_attributes_escaped_variables.go @@ -0,0 +1,54 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TestRuns_attributes_variables struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewTestRuns_attributes_variables instantiates a new TestRuns_attributes_variables and sets the default values. +func NewTestRuns_attributes_variables()(*TestRuns_attributes_variables) { + m := &TestRuns_attributes_variables{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTestRuns_attributes_variablesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTestRuns_attributes_variablesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTestRuns_attributes_variables(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TestRuns_attributes_variables) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TestRuns_attributes_variables) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *TestRuns_attributes_variables) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TestRuns_attributes_variables) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type TestRuns_attributes_variablesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/v2/api/models/test_runs_escaped_relationships.go b/v2/api/models/test_runs_escaped_relationships.go new file mode 100644 index 000000000..d5df18c7b --- /dev/null +++ b/v2/api/models/test_runs_escaped_relationships.go @@ -0,0 +1,112 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TestRuns_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The configurationVersion property + configurationVersion ConfigurationVersionsHasOneable + // The createdBy property + createdBy UsersHasOneable +} +// NewTestRuns_relationships instantiates a new TestRuns_relationships and sets the default values. +func NewTestRuns_relationships()(*TestRuns_relationships) { + m := &TestRuns_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTestRuns_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTestRuns_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTestRuns_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TestRuns_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfigurationVersion gets the configuration-version property value. The configurationVersion property +// returns a ConfigurationVersionsHasOneable when successful +func (m *TestRuns_relationships) GetConfigurationVersion()(ConfigurationVersionsHasOneable) { + return m.configurationVersion +} +// GetCreatedBy gets the created-by property value. The createdBy property +// returns a UsersHasOneable when successful +func (m *TestRuns_relationships) GetCreatedBy()(UsersHasOneable) { + return m.createdBy +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TestRuns_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["configuration-version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConfigurationVersionsHasOneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfigurationVersion(val.(ConfigurationVersionsHasOneable)) + } + return nil + } + res["created-by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUsersHasOneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(UsersHasOneable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *TestRuns_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("configuration-version", m.GetConfigurationVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("created-by", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TestRuns_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfigurationVersion sets the configuration-version property value. The configurationVersion property +func (m *TestRuns_relationships) SetConfigurationVersion(value ConfigurationVersionsHasOneable)() { + m.configurationVersion = value +} +// SetCreatedBy sets the created-by property value. The createdBy property +func (m *TestRuns_relationships) SetCreatedBy(value UsersHasOneable)() { + m.createdBy = value +} +type TestRuns_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersion()(ConfigurationVersionsHasOneable) + GetCreatedBy()(UsersHasOneable) + SetConfigurationVersion(value ConfigurationVersionsHasOneable)() + SetCreatedBy(value UsersHasOneable)() +} diff --git a/v2/api/models/test_runs_escaped_type.go b/v2/api/models/test_runs_escaped_type.go new file mode 100644 index 000000000..6570c1226 --- /dev/null +++ b/v2/api/models/test_runs_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type TestRuns_type int + +const ( + TESTRUNS_TESTRUNS_TYPE TestRuns_type = iota +) + +func (i TestRuns_type) String() string { + return []string{"test-runs"}[i] +} +func ParseTestRuns_type(v string) (any, error) { + result := TESTRUNS_TESTRUNS_TYPE + switch v { + case "test-runs": + result = TESTRUNS_TESTRUNS_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeTestRuns_type(values []TestRuns_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TestRuns_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/tf_policy_evaluations.go b/v2/api/models/tf_policy_evaluations.go index e5f7c762b..9ed77cf64 100644 --- a/v2/api/models/tf_policy_evaluations.go +++ b/v2/api/models/tf_policy_evaluations.go @@ -7,7 +7,7 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// TfPolicyEvaluations represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle. +// TfPolicyEvaluations represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Init or Plan or Apply) in the run lifecycle. type TfPolicyEvaluations struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any diff --git a/v2/api/models/tf_policy_evaluations_envelope.go b/v2/api/models/tf_policy_evaluations_envelope.go index c7b51aae3..4fbe33206 100644 --- a/v2/api/models/tf_policy_evaluations_envelope.go +++ b/v2/api/models/tf_policy_evaluations_envelope.go @@ -10,8 +10,10 @@ import ( type TfPolicyEvaluationsEnvelope struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle. + // Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Init or Plan or Apply) in the run lifecycle. data TfPolicyEvaluationsable + // The included property + included []TfPolicySetOutcomesable } // NewTfPolicyEvaluationsEnvelope instantiates a new TfPolicyEvaluationsEnvelope and sets the default values. func NewTfPolicyEvaluationsEnvelope()(*TfPolicyEvaluationsEnvelope) { @@ -30,7 +32,7 @@ func CreateTfPolicyEvaluationsEnvelopeFromDiscriminatorValue(parseNode i878a80d2 func (m *TfPolicyEvaluationsEnvelope) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetData gets the data property value. Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle. +// GetData gets the data property value. Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Init or Plan or Apply) in the run lifecycle. // returns a TfPolicyEvaluationsable when successful func (m *TfPolicyEvaluationsEnvelope) GetData()(TfPolicyEvaluationsable) { return m.data @@ -49,8 +51,29 @@ func (m *TfPolicyEvaluationsEnvelope) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTfPolicySetOutcomesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TfPolicySetOutcomesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TfPolicySetOutcomesable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []TfPolicySetOutcomesable when successful +func (m *TfPolicyEvaluationsEnvelope) GetIncluded()([]TfPolicySetOutcomesable) { + return m.included +} // Serialize serializes information the current object func (m *TfPolicyEvaluationsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *TfPolicyEvaluationsEnvelope) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -71,13 +106,19 @@ func (m *TfPolicyEvaluationsEnvelope) Serialize(writer i878a80d2330e89d26896388a func (m *TfPolicyEvaluationsEnvelope) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetData sets the data property value. Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle. +// SetData sets the data property value. Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Init or Plan or Apply) in the run lifecycle. func (m *TfPolicyEvaluationsEnvelope) SetData(value TfPolicyEvaluationsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TfPolicyEvaluationsEnvelope) SetIncluded(value []TfPolicySetOutcomesable)() { + m.included = value +} type TfPolicyEvaluationsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(TfPolicyEvaluationsable) + GetIncluded()([]TfPolicySetOutcomesable) SetData(value TfPolicyEvaluationsable)() + SetIncluded(value []TfPolicySetOutcomesable)() } diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes.go b/v2/api/models/tf_policy_evaluations_escaped_attributes.go index fb214d7c2..b55588b33 100644 --- a/v2/api/models/tf_policy_evaluations_escaped_attributes.go +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes.go @@ -23,8 +23,8 @@ type TfPolicyEvaluations_attributes struct { permissions TfPolicyEvaluations_attributes_permissionsable // Aggregated counts of policy results across all policy sets in this evaluation resultCount TfPolicyEvaluations_attributes_resultCountable - // The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init') - stageType *string + // The type of stage this evaluation is associated with. + stageType *TfPolicyEvaluations_attributes_stageType // Current status of the Terraform policy evaluation. Status values:- `pending`: Initial state, not yet queued for evaluation- `queued`: Queued and waiting to be evaluated- `running`: Actively being evaluated- `awaiting_override`: Failed with overridable policies, awaiting manual override- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `overridden`: Failed evaluation manually overridden (final state)- `errored`: System error during processing (final state)- `canceled`: Canceled before completion (final state)- `unreachable`: Pseudo-state derived from run state status *TfPolicyEvaluations_attributes_status // Timestamps for each status transition during the evaluation lifecycle @@ -134,12 +134,12 @@ func (m *TfPolicyEvaluations_attributes) GetFieldDeserializers()(map[string]func return nil } res["stage-type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() + val, err := n.GetEnumValue(ParseTfPolicyEvaluations_attributes_stageType) if err != nil { return err } if val != nil { - m.SetStageType(val) + m.SetStageType(val.(*TfPolicyEvaluations_attributes_stageType)) } return nil } @@ -185,9 +185,9 @@ func (m *TfPolicyEvaluations_attributes) GetPermissions()(TfPolicyEvaluations_at func (m *TfPolicyEvaluations_attributes) GetResultCount()(TfPolicyEvaluations_attributes_resultCountable) { return m.resultCount } -// GetStageType gets the stage-type property value. The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init') -// returns a *string when successful -func (m *TfPolicyEvaluations_attributes) GetStageType()(*string) { +// GetStageType gets the stage-type property value. The type of stage this evaluation is associated with. +// returns a *TfPolicyEvaluations_attributes_stageType when successful +func (m *TfPolicyEvaluations_attributes) GetStageType()(*TfPolicyEvaluations_attributes_stageType) { return m.stageType } // GetStatus gets the status property value. Current status of the Terraform policy evaluation. Status values:- `pending`: Initial state, not yet queued for evaluation- `queued`: Queued and waiting to be evaluated- `running`: Actively being evaluated- `awaiting_override`: Failed with overridable policies, awaiting manual override- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `overridden`: Failed evaluation manually overridden (final state)- `errored`: System error during processing (final state)- `canceled`: Canceled before completion (final state)- `unreachable`: Pseudo-state derived from run state @@ -231,8 +231,9 @@ func (m *TfPolicyEvaluations_attributes) Serialize(writer i878a80d2330e89d268963 return err } } - { - err := writer.WriteStringValue("stage-type", m.GetStageType()) + if m.GetStageType() != nil { + cast := (*m.GetStageType()).String() + err := writer.WriteStringValue("stage-type", &cast) if err != nil { return err } @@ -286,8 +287,8 @@ func (m *TfPolicyEvaluations_attributes) SetPermissions(value TfPolicyEvaluation func (m *TfPolicyEvaluations_attributes) SetResultCount(value TfPolicyEvaluations_attributes_resultCountable)() { m.resultCount = value } -// SetStageType sets the stage-type property value. The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init') -func (m *TfPolicyEvaluations_attributes) SetStageType(value *string)() { +// SetStageType sets the stage-type property value. The type of stage this evaluation is associated with. +func (m *TfPolicyEvaluations_attributes) SetStageType(value *TfPolicyEvaluations_attributes_stageType)() { m.stageType = value } // SetStatus sets the status property value. Current status of the Terraform policy evaluation. Status values:- `pending`: Initial state, not yet queued for evaluation- `queued`: Queued and waiting to be evaluated- `running`: Actively being evaluated- `awaiting_override`: Failed with overridable policies, awaiting manual override- `passed`: All policies passed (final state)- `failed`: Failed with mandatory policies (final state)- `overridden`: Failed evaluation manually overridden (final state)- `errored`: System error during processing (final state)- `canceled`: Canceled before completion (final state)- `unreachable`: Pseudo-state derived from run state @@ -311,7 +312,7 @@ type TfPolicyEvaluations_attributesable interface { GetError()(TfPolicyEvaluations_attributes_errorable) GetPermissions()(TfPolicyEvaluations_attributes_permissionsable) GetResultCount()(TfPolicyEvaluations_attributes_resultCountable) - GetStageType()(*string) + GetStageType()(*TfPolicyEvaluations_attributes_stageType) GetStatus()(*TfPolicyEvaluations_attributes_status) GetStatusTimestamps()(TfPolicyEvaluations_attributes_statusTimestampsable) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -321,7 +322,7 @@ type TfPolicyEvaluations_attributesable interface { SetError(value TfPolicyEvaluations_attributes_errorable)() SetPermissions(value TfPolicyEvaluations_attributes_permissionsable)() SetResultCount(value TfPolicyEvaluations_attributes_resultCountable)() - SetStageType(value *string)() + SetStageType(value *TfPolicyEvaluations_attributes_stageType)() SetStatus(value *TfPolicyEvaluations_attributes_status)() SetStatusTimestamps(value TfPolicyEvaluations_attributes_statusTimestampsable)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go index fb0320e2e..d74425cb8 100644 --- a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_error_escaped_type.go @@ -7,19 +7,25 @@ type TfPolicyEvaluations_attributes_error_type int const ( SETUP_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE TfPolicyEvaluations_attributes_error_type = iota + TOOL_VERSION_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE INCOMPATIBLE_AGENT_VERSION_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + INCOMPATIBLE_TERRAFORM_VERSION_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE ) func (i TfPolicyEvaluations_attributes_error_type) String() string { - return []string{"setup_error", "incompatible_agent_version"}[i] + return []string{"setup_error", "tool_version_error", "incompatible_agent_version", "incompatible_terraform_version_error"}[i] } func ParseTfPolicyEvaluations_attributes_error_type(v string) (any, error) { result := SETUP_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE switch v { case "setup_error": result = SETUP_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + case "tool_version_error": + result = TOOL_VERSION_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE case "incompatible_agent_version": result = INCOMPATIBLE_AGENT_VERSION_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE + case "incompatible_terraform_version_error": + result = INCOMPATIBLE_TERRAFORM_VERSION_ERROR_TFPOLICYEVALUATIONS_ATTRIBUTES_ERROR_TYPE default: return nil, nil } diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_result_count.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_result_count.go index 1ed58ea81..2d35b951a 100644 --- a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_result_count.go +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_result_count.go @@ -17,7 +17,7 @@ type TfPolicyEvaluations_attributes_resultCount struct { errored *int32 // Policies with mandatory enforcement level that failed mandatoryFailed *int32 - // Policies with mandatory-overridable enforcement level that failed + // Policies with `mandatory_overridable` enforcement level that failed. mandatoryOverridableFailed *int32 // Policies that passed passed *int32 @@ -122,7 +122,7 @@ func (m *TfPolicyEvaluations_attributes_resultCount) GetFieldDeserializers()(map func (m *TfPolicyEvaluations_attributes_resultCount) GetMandatoryFailed()(*int32) { return m.mandatoryFailed } -// GetMandatoryOverridableFailed gets the mandatory-overridable-failed property value. Policies with mandatory-overridable enforcement level that failed +// GetMandatoryOverridableFailed gets the mandatory-overridable-failed property value. Policies with `mandatory_overridable` enforcement level that failed. // returns a *int32 when successful func (m *TfPolicyEvaluations_attributes_resultCount) GetMandatoryOverridableFailed()(*int32) { return m.mandatoryOverridableFailed @@ -199,7 +199,7 @@ func (m *TfPolicyEvaluations_attributes_resultCount) SetErrored(value *int32)() func (m *TfPolicyEvaluations_attributes_resultCount) SetMandatoryFailed(value *int32)() { m.mandatoryFailed = value } -// SetMandatoryOverridableFailed sets the mandatory-overridable-failed property value. Policies with mandatory-overridable enforcement level that failed +// SetMandatoryOverridableFailed sets the mandatory-overridable-failed property value. Policies with `mandatory_overridable` enforcement level that failed. func (m *TfPolicyEvaluations_attributes_resultCount) SetMandatoryOverridableFailed(value *int32)() { m.mandatoryOverridableFailed = value } diff --git a/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_stage_type.go b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_stage_type.go new file mode 100644 index 000000000..378c9c753 --- /dev/null +++ b/v2/api/models/tf_policy_evaluations_escaped_attributes_escaped_stage_type.go @@ -0,0 +1,40 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// The type of stage this evaluation is associated with. +type TfPolicyEvaluations_attributes_stageType int + +const ( + INIT_TFPOLICYEVALUATIONS_ATTRIBUTES_STAGETYPE TfPolicyEvaluations_attributes_stageType = iota + PLAN_TFPOLICYEVALUATIONS_ATTRIBUTES_STAGETYPE + APPLY_TFPOLICYEVALUATIONS_ATTRIBUTES_STAGETYPE +) + +func (i TfPolicyEvaluations_attributes_stageType) String() string { + return []string{"Init", "Plan", "Apply"}[i] +} +func ParseTfPolicyEvaluations_attributes_stageType(v string) (any, error) { + result := INIT_TFPOLICYEVALUATIONS_ATTRIBUTES_STAGETYPE + switch v { + case "Init": + result = INIT_TFPOLICYEVALUATIONS_ATTRIBUTES_STAGETYPE + case "Plan": + result = PLAN_TFPOLICYEVALUATIONS_ATTRIBUTES_STAGETYPE + case "Apply": + result = APPLY_TFPOLICYEVALUATIONS_ATTRIBUTES_STAGETYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeTfPolicyEvaluations_attributes_stageType(values []TfPolicyEvaluations_attributes_stageType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TfPolicyEvaluations_attributes_stageType) isMultiValue() bool { + return false +} diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes.go index c5d0ace9e..449cae0d3 100644 --- a/v2/api/models/tf_policy_set_outcomes_escaped_attributes.go +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes.go @@ -10,10 +10,14 @@ import ( type TfPolicySetOutcomes_attributes struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // The error property + // Deprecated: + error *string // Deprecated. Populated for runs that did not support archivist-backed storage.Use `policy-set-result-url` to retrieve full policy results for new runs. // Deprecated: outcomes []TfPolicySetOutcomes_attributes_outcomesable - // Indicates if the policy set outcome can be overridden when policies fail + // This field is deprecated and has no effect. Whether a run can be overridden is decided by the plan-stage Terraform Policy evaluation, based on the enforcement level of failed policies. + // Deprecated: overridable *bool // Optional description of the policy set policySetDescription *string @@ -21,7 +25,7 @@ type TfPolicySetOutcomes_attributes struct { policySetName *string // URL to download the full policy result blob from Archivist.Present only when `archivist-supported` is `true` on the parent `tf-policy-evaluation`.When `null`, fall back to the `outcomes` array. policySetResultUrl *string - // The resultCount property + // Counts of policy results for this policy set resultCount TfPolicySetOutcomes_attributes_resultCountable } // NewTfPolicySetOutcomes_attributes instantiates a new TfPolicySetOutcomes_attributes and sets the default values. @@ -41,10 +45,26 @@ func CreateTfPolicySetOutcomes_attributesFromDiscriminatorValue(parseNode i878a8 func (m *TfPolicySetOutcomes_attributes) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetError gets the error property value. The error property +// Deprecated: +// returns a *string when successful +func (m *TfPolicySetOutcomes_attributes) GetError()(*string) { + return m.error +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *TfPolicySetOutcomes_attributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetError(val) + } + return nil + } res["outcomes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateTfPolicySetOutcomes_attributes_outcomesFromDiscriminatorValue) if err != nil { @@ -119,7 +139,8 @@ func (m *TfPolicySetOutcomes_attributes) GetFieldDeserializers()(map[string]func func (m *TfPolicySetOutcomes_attributes) GetOutcomes()([]TfPolicySetOutcomes_attributes_outcomesable) { return m.outcomes } -// GetOverridable gets the overridable property value. Indicates if the policy set outcome can be overridden when policies fail +// GetOverridable gets the overridable property value. This field is deprecated and has no effect. Whether a run can be overridden is decided by the plan-stage Terraform Policy evaluation, based on the enforcement level of failed policies. +// Deprecated: // returns a *bool when successful func (m *TfPolicySetOutcomes_attributes) GetOverridable()(*bool) { return m.overridable @@ -139,13 +160,19 @@ func (m *TfPolicySetOutcomes_attributes) GetPolicySetName()(*string) { func (m *TfPolicySetOutcomes_attributes) GetPolicySetResultUrl()(*string) { return m.policySetResultUrl } -// GetResultCount gets the result-count property value. The resultCount property +// GetResultCount gets the result-count property value. Counts of policy results for this policy set // returns a TfPolicySetOutcomes_attributes_resultCountable when successful func (m *TfPolicySetOutcomes_attributes) GetResultCount()(TfPolicySetOutcomes_attributes_resultCountable) { return m.resultCount } // Serialize serializes information the current object func (m *TfPolicySetOutcomes_attributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("error", m.GetError()) + if err != nil { + return err + } + } if m.GetOutcomes() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOutcomes())) for i, v := range m.GetOutcomes() { @@ -194,12 +221,18 @@ func (m *TfPolicySetOutcomes_attributes) Serialize(writer i878a80d2330e89d268963 func (m *TfPolicySetOutcomes_attributes) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetError sets the error property value. The error property +// Deprecated: +func (m *TfPolicySetOutcomes_attributes) SetError(value *string)() { + m.error = value +} // SetOutcomes sets the outcomes property value. Deprecated. Populated for runs that did not support archivist-backed storage.Use `policy-set-result-url` to retrieve full policy results for new runs. // Deprecated: func (m *TfPolicySetOutcomes_attributes) SetOutcomes(value []TfPolicySetOutcomes_attributes_outcomesable)() { m.outcomes = value } -// SetOverridable sets the overridable property value. Indicates if the policy set outcome can be overridden when policies fail +// SetOverridable sets the overridable property value. This field is deprecated and has no effect. Whether a run can be overridden is decided by the plan-stage Terraform Policy evaluation, based on the enforcement level of failed policies. +// Deprecated: func (m *TfPolicySetOutcomes_attributes) SetOverridable(value *bool)() { m.overridable = value } @@ -215,19 +248,21 @@ func (m *TfPolicySetOutcomes_attributes) SetPolicySetName(value *string)() { func (m *TfPolicySetOutcomes_attributes) SetPolicySetResultUrl(value *string)() { m.policySetResultUrl = value } -// SetResultCount sets the result-count property value. The resultCount property +// SetResultCount sets the result-count property value. Counts of policy results for this policy set func (m *TfPolicySetOutcomes_attributes) SetResultCount(value TfPolicySetOutcomes_attributes_resultCountable)() { m.resultCount = value } type TfPolicySetOutcomes_attributesable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetError()(*string) GetOutcomes()([]TfPolicySetOutcomes_attributes_outcomesable) GetOverridable()(*bool) GetPolicySetDescription()(*string) GetPolicySetName()(*string) GetPolicySetResultUrl()(*string) GetResultCount()(TfPolicySetOutcomes_attributes_resultCountable) + SetError(value *string)() SetOutcomes(value []TfPolicySetOutcomes_attributes_outcomesable)() SetOverridable(value *bool)() SetPolicySetDescription(value *string)() diff --git a/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_result_count.go b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_result_count.go index bd23bad1a..d6486158f 100644 --- a/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_result_count.go +++ b/v2/api/models/tf_policy_set_outcomes_escaped_attributes_escaped_result_count.go @@ -7,6 +7,7 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) +// TfPolicySetOutcomes_attributes_resultCount counts of policy results for this policy set type TfPolicySetOutcomes_attributes_resultCount struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any @@ -16,7 +17,7 @@ type TfPolicySetOutcomes_attributes_resultCount struct { errored *int32 // Policies with mandatory enforcement level that failed mandatoryFailed *int32 - // Policies with mandatory-overridable enforcement level that failed + // Policies with `mandatory_overridable` enforcement level that failed. mandatoryOverridableFailed *int32 // Policies that passed passed *int32 @@ -121,7 +122,7 @@ func (m *TfPolicySetOutcomes_attributes_resultCount) GetFieldDeserializers()(map func (m *TfPolicySetOutcomes_attributes_resultCount) GetMandatoryFailed()(*int32) { return m.mandatoryFailed } -// GetMandatoryOverridableFailed gets the mandatory-overridable-failed property value. Policies with mandatory-overridable enforcement level that failed +// GetMandatoryOverridableFailed gets the mandatory-overridable-failed property value. Policies with `mandatory_overridable` enforcement level that failed. // returns a *int32 when successful func (m *TfPolicySetOutcomes_attributes_resultCount) GetMandatoryOverridableFailed()(*int32) { return m.mandatoryOverridableFailed @@ -198,7 +199,7 @@ func (m *TfPolicySetOutcomes_attributes_resultCount) SetErrored(value *int32)() func (m *TfPolicySetOutcomes_attributes_resultCount) SetMandatoryFailed(value *int32)() { m.mandatoryFailed = value } -// SetMandatoryOverridableFailed sets the mandatory-overridable-failed property value. Policies with mandatory-overridable enforcement level that failed +// SetMandatoryOverridableFailed sets the mandatory-overridable-failed property value. Policies with `mandatory_overridable` enforcement level that failed. func (m *TfPolicySetOutcomes_attributes_resultCount) SetMandatoryOverridableFailed(value *int32)() { m.mandatoryOverridableFailed = value } diff --git a/v2/api/models/vars_envelope.go b/v2/api/models/vars_envelope.go index ee69b0a57..3717e849c 100644 --- a/v2/api/models/vars_envelope.go +++ b/v2/api/models/vars_envelope.go @@ -12,6 +12,8 @@ type VarsEnvelope struct { additionalData map[string]any // The data property data Varsable + // The included property + included []Varsable } // NewVarsEnvelope instantiates a new VarsEnvelope and sets the default values. func NewVarsEnvelope()(*VarsEnvelope) { @@ -49,8 +51,29 @@ func (m *VarsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVarsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Varsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Varsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []Varsable when successful +func (m *VarsEnvelope) GetIncluded()([]Varsable) { + return m.included +} // Serialize serializes information the current object func (m *VarsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *VarsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *VarsEnvelope) SetAdditionalData(value map[string]any)() { func (m *VarsEnvelope) SetData(value Varsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *VarsEnvelope) SetIncluded(value []Varsable)() { + m.included = value +} type VarsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Varsable) + GetIncluded()([]Varsable) SetData(value Varsable)() + SetIncluded(value []Varsable)() } diff --git a/v2/api/models/varsets_envelope.go b/v2/api/models/varsets_envelope.go index ebaa48718..67195dc77 100644 --- a/v2/api/models/varsets_envelope.go +++ b/v2/api/models/varsets_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,145 @@ type VarsetsEnvelope struct { additionalData map[string]any // The data property data Varsetsable + // The included property + included []VarsetsEnvelope_VarsetsEnvelope_includedable +} +// VarsetsEnvelope_VarsetsEnvelope_included composed type wrapper for classes Projectsable, Stacksable, Varsable, Workspacesable +type VarsetsEnvelope_VarsetsEnvelope_included struct { + // Composed type representation for type Projectsable + projects Projectsable + // Composed type representation for type Stacksable + stacks Stacksable + // Composed type representation for type Varsable + vars Varsable + // Composed type representation for type Workspacesable + workspaces Workspacesable +} +// NewVarsetsEnvelope_VarsetsEnvelope_included instantiates a new VarsetsEnvelope_VarsetsEnvelope_included and sets the default values. +func NewVarsetsEnvelope_VarsetsEnvelope_included()(*VarsetsEnvelope_VarsetsEnvelope_included) { + m := &VarsetsEnvelope_VarsetsEnvelope_included{ + } + return m +} +// CreateVarsetsEnvelope_VarsetsEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateVarsetsEnvelope_VarsetsEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewVarsetsEnvelope_VarsetsEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(NewStacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *VarsetsEnvelope_VarsetsEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *VarsetsEnvelope_VarsetsEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *VarsetsEnvelope_VarsetsEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// GetStacks gets the stacks property value. Composed type representation for type Stacksable +// returns a Stacksable when successful +func (m *VarsetsEnvelope_VarsetsEnvelope_included) GetStacks()(Stacksable) { + return m.stacks +} +// GetVars gets the vars property value. Composed type representation for type Varsable +// returns a Varsable when successful +func (m *VarsetsEnvelope_VarsetsEnvelope_included) GetVars()(Varsable) { + return m.vars +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type Workspacesable +// returns a Workspacesable when successful +func (m *VarsetsEnvelope_VarsetsEnvelope_included) GetWorkspaces()(Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *VarsetsEnvelope_VarsetsEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *VarsetsEnvelope_VarsetsEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +// SetStacks sets the stacks property value. Composed type representation for type Stacksable +func (m *VarsetsEnvelope_VarsetsEnvelope_included) SetStacks(value Stacksable)() { + m.stacks = value +} +// SetVars sets the vars property value. Composed type representation for type Varsable +func (m *VarsetsEnvelope_VarsetsEnvelope_included) SetVars(value Varsable)() { + m.vars = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type Workspacesable +func (m *VarsetsEnvelope_VarsetsEnvelope_included) SetWorkspaces(value Workspacesable)() { + m.workspaces = value +} +type VarsetsEnvelope_VarsetsEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(Projectsable) + GetStacks()(Stacksable) + GetVars()(Varsable) + GetWorkspaces()(Workspacesable) + SetProjects(value Projectsable)() + SetStacks(value Stacksable)() + SetVars(value Varsable)() + SetWorkspaces(value Workspacesable)() } // NewVarsetsEnvelope instantiates a new VarsetsEnvelope and sets the default values. func NewVarsetsEnvelope()(*VarsetsEnvelope) { @@ -49,8 +189,29 @@ func (m *VarsetsEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVarsetsEnvelope_VarsetsEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VarsetsEnvelope_VarsetsEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(VarsetsEnvelope_VarsetsEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []VarsetsEnvelope_VarsetsEnvelope_includedable when successful +func (m *VarsetsEnvelope) GetIncluded()([]VarsetsEnvelope_VarsetsEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *VarsetsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +220,18 @@ func (m *VarsetsEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +248,15 @@ func (m *VarsetsEnvelope) SetAdditionalData(value map[string]any)() { func (m *VarsetsEnvelope) SetData(value Varsetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *VarsetsEnvelope) SetIncluded(value []VarsetsEnvelope_VarsetsEnvelope_includedable)() { + m.included = value +} type VarsetsEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Varsetsable) + GetIncluded()([]VarsetsEnvelope_VarsetsEnvelope_includedable) SetData(value Varsetsable)() + SetIncluded(value []VarsetsEnvelope_VarsetsEnvelope_includedable)() } diff --git a/v2/api/models/workspace_transfers_envelope.go b/v2/api/models/workspace_transfers_envelope.go index 682792500..7fd118341 100644 --- a/v2/api/models/workspace_transfers_envelope.go +++ b/v2/api/models/workspace_transfers_envelope.go @@ -12,6 +12,8 @@ type WorkspaceTransfersEnvelope struct { additionalData map[string]any // The data property data WorkspaceTransfersable + // The included property + included []WorkspaceTransferEventsable } // NewWorkspaceTransfersEnvelope instantiates a new WorkspaceTransfersEnvelope and sets the default values. func NewWorkspaceTransfersEnvelope()(*WorkspaceTransfersEnvelope) { @@ -49,8 +51,29 @@ func (m *WorkspaceTransfersEnvelope) GetFieldDeserializers()(map[string]func(i87 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkspaceTransferEventsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkspaceTransferEventsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(WorkspaceTransferEventsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []WorkspaceTransferEventsable when successful +func (m *WorkspaceTransfersEnvelope) GetIncluded()([]WorkspaceTransferEventsable) { + return m.included +} // Serialize serializes information the current object func (m *WorkspaceTransfersEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *WorkspaceTransfersEnvelope) Serialize(writer i878a80d2330e89d26896388a3 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *WorkspaceTransfersEnvelope) SetAdditionalData(value map[string]any)() { func (m *WorkspaceTransfersEnvelope) SetData(value WorkspaceTransfersable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *WorkspaceTransfersEnvelope) SetIncluded(value []WorkspaceTransferEventsable)() { + m.included = value +} type WorkspaceTransfersEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(WorkspaceTransfersable) + GetIncluded()([]WorkspaceTransferEventsable) SetData(value WorkspaceTransfersable)() + SetIncluded(value []WorkspaceTransferEventsable)() } diff --git a/v2/api/models/workspaces_envelope.go b/v2/api/models/workspaces_envelope.go index 4b8584573..82487d6e1 100644 --- a/v2/api/models/workspaces_envelope.go +++ b/v2/api/models/workspaces_envelope.go @@ -4,6 +4,7 @@ package models import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -12,6 +13,431 @@ type WorkspacesEnvelope struct { additionalData map[string]any // The data property data Workspacesable + // The included property + included []WorkspacesEnvelope_WorkspacesEnvelope_includedable +} +// WorkspacesEnvelope_WorkspacesEnvelope_included composed type wrapper for classes AgentPoolsable, Appliesable, AssessmentResultsable, ConfigurationVersionsable, EffectiveTagBindingsable, IngressAttributesable, NoCodeModulesable, NoCodeModuleVersionsable, Organizationsable, Plansable, Projectsable, Runsable, StateVersionsable, Usersable, Varsable, WorkspaceOutputsable, WorkspaceReadmeable +type WorkspacesEnvelope_WorkspacesEnvelope_included struct { + // Composed type representation for type AgentPoolsable + agentPools AgentPoolsable + // Composed type representation for type Appliesable + applies Appliesable + // Composed type representation for type AssessmentResultsable + assessmentResults AssessmentResultsable + // Composed type representation for type ConfigurationVersionsable + configurationVersions ConfigurationVersionsable + // Composed type representation for type EffectiveTagBindingsable + effectiveTagBindings EffectiveTagBindingsable + // Composed type representation for type IngressAttributesable + ingressAttributes IngressAttributesable + // Composed type representation for type NoCodeModulesable + noCodeModules NoCodeModulesable + // Composed type representation for type NoCodeModuleVersionsable + noCodeModuleVersions NoCodeModuleVersionsable + // Composed type representation for type Organizationsable + organizations Organizationsable + // Composed type representation for type Plansable + plans Plansable + // Composed type representation for type Projectsable + projects Projectsable + // Composed type representation for type Runsable + runs Runsable + // Composed type representation for type StateVersionsable + stateVersions StateVersionsable + // Composed type representation for type Usersable + users Usersable + // Composed type representation for type Varsable + vars Varsable + // Composed type representation for type WorkspaceOutputsable + workspaceOutputs WorkspaceOutputsable + // Composed type representation for type WorkspaceReadmeable + workspaceReadme WorkspaceReadmeable +} +// NewWorkspacesEnvelope_WorkspacesEnvelope_included instantiates a new WorkspacesEnvelope_WorkspacesEnvelope_included and sets the default values. +func NewWorkspacesEnvelope_WorkspacesEnvelope_included()(*WorkspacesEnvelope_WorkspacesEnvelope_included) { + m := &WorkspacesEnvelope_WorkspacesEnvelope_included{ + } + return m +} +// CreateWorkspacesEnvelope_WorkspacesEnvelope_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkspacesEnvelope_WorkspacesEnvelope_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewWorkspacesEnvelope_WorkspacesEnvelope_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "assessment-results") { + result.SetAssessmentResults(NewAssessmentResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "effective-tag-bindings") { + result.SetEffectiveTagBindings(NewEffectiveTagBindings()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-modules") { + result.SetNoCodeModules(NewNoCodeModules()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-module-versions") { + result.SetNoCodeModuleVersions(NewNoCodeModuleVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(NewOrganizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-versions") { + result.SetStateVersions(NewStateVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-outputs") { + result.SetWorkspaceOutputs(NewWorkspaceOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-readme") { + result.SetWorkspaceReadme(NewWorkspaceReadme()) + } + } + } + } + return result, nil +} +// GetAgentPools gets the agentPools property value. Composed type representation for type AgentPoolsable +// returns a AgentPoolsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetAgentPools()(AgentPoolsable) { + return m.agentPools +} +// GetApplies gets the applies property value. Composed type representation for type Appliesable +// returns a Appliesable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetApplies()(Appliesable) { + return m.applies +} +// GetAssessmentResults gets the assessmentResults property value. Composed type representation for type AssessmentResultsable +// returns a AssessmentResultsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetAssessmentResults()(AssessmentResultsable) { + return m.assessmentResults +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetConfigurationVersions()(ConfigurationVersionsable) { + return m.configurationVersions +} +// GetEffectiveTagBindings gets the effectiveTagBindings property value. Composed type representation for type EffectiveTagBindingsable +// returns a EffectiveTagBindingsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetEffectiveTagBindings()(EffectiveTagBindingsable) { + return m.effectiveTagBindings +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetAssessmentResults() != nil { + return m.GetAssessmentResults().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetEffectiveTagBindings() != nil { + return m.GetEffectiveTagBindings().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetNoCodeModules() != nil { + return m.GetNoCodeModules().GetFieldDeserializers() + } else if m.GetNoCodeModuleVersions() != nil { + return m.GetNoCodeModuleVersions().GetFieldDeserializers() + } else if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetStateVersions() != nil { + return m.GetStateVersions().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaceOutputs() != nil { + return m.GetWorkspaceOutputs().GetFieldDeserializers() + } else if m.GetWorkspaceReadme() != nil { + return m.GetWorkspaceReadme().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type IngressAttributesable +// returns a IngressAttributesable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetIngressAttributes()(IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetIsComposedType()(bool) { + return true +} +// GetNoCodeModules gets the noCodeModules property value. Composed type representation for type NoCodeModulesable +// returns a NoCodeModulesable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetNoCodeModules()(NoCodeModulesable) { + return m.noCodeModules +} +// GetNoCodeModuleVersions gets the noCodeModuleVersions property value. Composed type representation for type NoCodeModuleVersionsable +// returns a NoCodeModuleVersionsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetNoCodeModuleVersions()(NoCodeModuleVersionsable) { + return m.noCodeModuleVersions +} +// GetOrganizations gets the organizations property value. Composed type representation for type Organizationsable +// returns a Organizationsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetOrganizations()(Organizationsable) { + return m.organizations +} +// GetPlans gets the plans property value. Composed type representation for type Plansable +// returns a Plansable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetPlans()(Plansable) { + return m.plans +} +// GetProjects gets the projects property value. Composed type representation for type Projectsable +// returns a Projectsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetProjects()(Projectsable) { + return m.projects +} +// GetRuns gets the runs property value. Composed type representation for type Runsable +// returns a Runsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetRuns()(Runsable) { + return m.runs +} +// GetStateVersions gets the stateVersions property value. Composed type representation for type StateVersionsable +// returns a StateVersionsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetStateVersions()(StateVersionsable) { + return m.stateVersions +} +// GetUsers gets the users property value. Composed type representation for type Usersable +// returns a Usersable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetUsers()(Usersable) { + return m.users +} +// GetVars gets the vars property value. Composed type representation for type Varsable +// returns a Varsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetVars()(Varsable) { + return m.vars +} +// GetWorkspaceOutputs gets the workspaceOutputs property value. Composed type representation for type WorkspaceOutputsable +// returns a WorkspaceOutputsable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetWorkspaceOutputs()(WorkspaceOutputsable) { + return m.workspaceOutputs +} +// GetWorkspaceReadme gets the workspaceReadme property value. Composed type representation for type WorkspaceReadmeable +// returns a WorkspaceReadmeable when successful +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) GetWorkspaceReadme()(WorkspaceReadmeable) { + return m.workspaceReadme +} +// Serialize serializes information the current object +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetAssessmentResults() != nil { + err := writer.WriteObjectValue("", m.GetAssessmentResults()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetEffectiveTagBindings() != nil { + err := writer.WriteObjectValue("", m.GetEffectiveTagBindings()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetNoCodeModules() != nil { + err := writer.WriteObjectValue("", m.GetNoCodeModules()) + if err != nil { + return err + } + } else if m.GetNoCodeModuleVersions() != nil { + err := writer.WriteObjectValue("", m.GetNoCodeModuleVersions()) + if err != nil { + return err + } + } else if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetStateVersions() != nil { + err := writer.WriteObjectValue("", m.GetStateVersions()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } + } else if m.GetWorkspaceOutputs() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceOutputs()) + if err != nil { + return err + } + } else if m.GetWorkspaceReadme() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceReadme()) + if err != nil { + return err + } + } + return nil +} +// SetAgentPools sets the agentPools property value. Composed type representation for type AgentPoolsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetAgentPools(value AgentPoolsable)() { + m.agentPools = value +} +// SetApplies sets the applies property value. Composed type representation for type Appliesable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetApplies(value Appliesable)() { + m.applies = value +} +// SetAssessmentResults sets the assessmentResults property value. Composed type representation for type AssessmentResultsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetAssessmentResults(value AssessmentResultsable)() { + m.assessmentResults = value +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type ConfigurationVersionsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetConfigurationVersions(value ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetEffectiveTagBindings sets the effectiveTagBindings property value. Composed type representation for type EffectiveTagBindingsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetEffectiveTagBindings(value EffectiveTagBindingsable)() { + m.effectiveTagBindings = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type IngressAttributesable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetIngressAttributes(value IngressAttributesable)() { + m.ingressAttributes = value +} +// SetNoCodeModules sets the noCodeModules property value. Composed type representation for type NoCodeModulesable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetNoCodeModules(value NoCodeModulesable)() { + m.noCodeModules = value +} +// SetNoCodeModuleVersions sets the noCodeModuleVersions property value. Composed type representation for type NoCodeModuleVersionsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetNoCodeModuleVersions(value NoCodeModuleVersionsable)() { + m.noCodeModuleVersions = value +} +// SetOrganizations sets the organizations property value. Composed type representation for type Organizationsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetOrganizations(value Organizationsable)() { + m.organizations = value +} +// SetPlans sets the plans property value. Composed type representation for type Plansable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetPlans(value Plansable)() { + m.plans = value +} +// SetProjects sets the projects property value. Composed type representation for type Projectsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetProjects(value Projectsable)() { + m.projects = value +} +// SetRuns sets the runs property value. Composed type representation for type Runsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetRuns(value Runsable)() { + m.runs = value +} +// SetStateVersions sets the stateVersions property value. Composed type representation for type StateVersionsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetStateVersions(value StateVersionsable)() { + m.stateVersions = value +} +// SetUsers sets the users property value. Composed type representation for type Usersable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetUsers(value Usersable)() { + m.users = value +} +// SetVars sets the vars property value. Composed type representation for type Varsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetVars(value Varsable)() { + m.vars = value +} +// SetWorkspaceOutputs sets the workspaceOutputs property value. Composed type representation for type WorkspaceOutputsable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetWorkspaceOutputs(value WorkspaceOutputsable)() { + m.workspaceOutputs = value +} +// SetWorkspaceReadme sets the workspaceReadme property value. Composed type representation for type WorkspaceReadmeable +func (m *WorkspacesEnvelope_WorkspacesEnvelope_included) SetWorkspaceReadme(value WorkspaceReadmeable)() { + m.workspaceReadme = value +} +type WorkspacesEnvelope_WorkspacesEnvelope_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools()(AgentPoolsable) + GetApplies()(Appliesable) + GetAssessmentResults()(AssessmentResultsable) + GetConfigurationVersions()(ConfigurationVersionsable) + GetEffectiveTagBindings()(EffectiveTagBindingsable) + GetIngressAttributes()(IngressAttributesable) + GetNoCodeModules()(NoCodeModulesable) + GetNoCodeModuleVersions()(NoCodeModuleVersionsable) + GetOrganizations()(Organizationsable) + GetPlans()(Plansable) + GetProjects()(Projectsable) + GetRuns()(Runsable) + GetStateVersions()(StateVersionsable) + GetUsers()(Usersable) + GetVars()(Varsable) + GetWorkspaceOutputs()(WorkspaceOutputsable) + GetWorkspaceReadme()(WorkspaceReadmeable) + SetAgentPools(value AgentPoolsable)() + SetApplies(value Appliesable)() + SetAssessmentResults(value AssessmentResultsable)() + SetConfigurationVersions(value ConfigurationVersionsable)() + SetEffectiveTagBindings(value EffectiveTagBindingsable)() + SetIngressAttributes(value IngressAttributesable)() + SetNoCodeModules(value NoCodeModulesable)() + SetNoCodeModuleVersions(value NoCodeModuleVersionsable)() + SetOrganizations(value Organizationsable)() + SetPlans(value Plansable)() + SetProjects(value Projectsable)() + SetRuns(value Runsable)() + SetStateVersions(value StateVersionsable)() + SetUsers(value Usersable)() + SetVars(value Varsable)() + SetWorkspaceOutputs(value WorkspaceOutputsable)() + SetWorkspaceReadme(value WorkspaceReadmeable)() } // NewWorkspacesEnvelope instantiates a new WorkspacesEnvelope and sets the default values. func NewWorkspacesEnvelope()(*WorkspacesEnvelope) { @@ -49,8 +475,29 @@ func (m *WorkspacesEnvelope) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkspacesEnvelope_WorkspacesEnvelope_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkspacesEnvelope_WorkspacesEnvelope_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(WorkspacesEnvelope_WorkspacesEnvelope_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []WorkspacesEnvelope_WorkspacesEnvelope_includedable when successful +func (m *WorkspacesEnvelope) GetIncluded()([]WorkspacesEnvelope_WorkspacesEnvelope_includedable) { + return m.included +} // Serialize serializes information the current object func (m *WorkspacesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +506,18 @@ func (m *WorkspacesEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +534,15 @@ func (m *WorkspacesEnvelope) SetAdditionalData(value map[string]any)() { func (m *WorkspacesEnvelope) SetData(value Workspacesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *WorkspacesEnvelope) SetIncluded(value []WorkspacesEnvelope_WorkspacesEnvelope_includedable)() { + m.included = value +} type WorkspacesEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(Workspacesable) + GetIncluded()([]WorkspacesEnvelope_WorkspacesEnvelope_includedable) SetData(value Workspacesable)() + SetIncluded(value []WorkspacesEnvelope_WorkspacesEnvelope_includedable)() } diff --git a/v2/api/oauthclients/item/get_include_query_parameter_type.go b/v2/api/oauthclients/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..fc1544bab --- /dev/null +++ b/v2/api/oauthclients/item/get_include_query_parameter_type.go @@ -0,0 +1,39 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + OAUTH_TOKENS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + AGENT_POOL_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"oauth_tokens", "projects", "agent_pool"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OAUTH_TOKENS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "oauth_tokens": + result = OAUTH_TOKENS_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "agent_pool": + result = AGENT_POOL_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/oauthclients/with_oauth_escaped_client_escaped_item_request_builder.go b/v2/api/oauthclients/with_oauth_escaped_client_escaped_item_request_builder.go index 4cd687a7b..f7713b45a 100644 --- a/v2/api/oauthclients/with_oauth_escaped_client_escaped_item_request_builder.go +++ b/v2/api/oauthclients/with_oauth_escaped_client_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i61b782deab72551f494fd1c6c622c8a13e7601db0a7ae12a3d192b31127d3cea "github.com/hashicorp/go-tfe/v2/api/oauthclients/item" ) // WithOauth_client_ItemRequestBuilder builds and executes requests for operations under \oauth-clients\{oauth_client_id} @@ -17,13 +18,15 @@ type WithOauth_client_ItemRequestBuilder struct { type WithOauth_client_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for oauth-clients resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsoauthClients []string "uriparametername:\"fields%5Boauth%2Dclients%5D\"" + // Optionally side-load the specified relationships. + Include []i61b782deab72551f494fd1c6c622c8a13e7601db0a7ae12a3d192b31127d3cea.GetIncludeQueryParameterType "uriparametername:\"include\"" // If true, includes names of up to 25 affected workspaces and the total count. Show_affected_workspaces *bool "uriparametername:\"show_affected_workspaces\"" } // NewWithOauth_client_ItemRequestBuilderInternal instantiates a new WithOauth_client_ItemRequestBuilder and sets the default values. func NewWithOauth_client_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithOauth_client_ItemRequestBuilder) { m := &WithOauth_client_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/oauth-clients/{oauth_client_id}{?fields%5Boauth%2Dclients%5D,show_affected_workspaces*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/oauth-clients/{oauth_client_id}{?fields%5Boauth%2Dclients%5D,include,show_affected_workspaces*}", pathParameters), } return m } diff --git a/v2/api/organizationmemberships/item/get_include_query_parameter_type.go b/v2/api/organizationmemberships/item/get_include_query_parameter_type.go index 0e2138035..85808fe79 100644 --- a/v2/api/organizationmemberships/item/get_include_query_parameter_type.go +++ b/v2/api/organizationmemberships/item/get_include_query_parameter_type.go @@ -7,10 +7,11 @@ type GetIncludeQueryParameterType int const ( USER_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota TEAMS_GETINCLUDEQUERYPARAMETERTYPE + ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE ) func (i GetIncludeQueryParameterType) String() string { - return []string{"user", "teams"}[i] + return []string{"user", "teams", "organization"}[i] } func ParseGetIncludeQueryParameterType(v string) (any, error) { result := USER_GETINCLUDEQUERYPARAMETERTYPE @@ -19,6 +20,8 @@ func ParseGetIncludeQueryParameterType(v string) (any, error) { result = USER_GETINCLUDEQUERYPARAMETERTYPE case "teams": result = TEAMS_GETINCLUDEQUERYPARAMETERTYPE + case "organization": + result = ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE default: return nil, nil } diff --git a/v2/api/organizationmemberships/item_with_organization_escaped_membership_escaped_get_response.go b/v2/api/organizationmemberships/item_with_organization_escaped_membership_escaped_get_response.go index 05f05322c..3cf5ef525 100644 --- a/v2/api/organizationmemberships/item_with_organization_escaped_membership_escaped_get_response.go +++ b/v2/api/organizationmemberships/item_with_organization_escaped_membership_escaped_get_response.go @@ -4,175 +4,191 @@ package organizationmemberships import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemWithOrganization_membership_GetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsEnvelope - // The included property - included []ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsEnvelope + // The included property + included []ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable } + // ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable type ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable - teams i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable - users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable + teams i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable } + // NewItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included instantiates a new ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included and sets the default values. -func NewItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included()(*ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) { - m := &ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included{ - } - return m +func NewItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included() *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included { + m := &ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included{} + return m } + // CreateItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "teams") { - result.SetTeams(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTeams()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { - result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) - } - } - } - } - return result, nil +func CreateItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "teams") { + result.SetTeams(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTeams()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } + } + } + } + return result, nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetTeams() != nil { - return m.GetTeams().GetFieldDeserializers() - } else if m.GetUsers() != nil { - return m.GetUsers().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetTeams() != nil { + return m.GetTeams().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) GetIsComposedType()(bool) { - return true +func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) GetIsComposedType() bool { + return true } + // GetTeams gets the teams property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable // returns a Teamsable when successful -func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) GetTeams()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) { - return m.teams +func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) GetTeams() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable { + return m.teams } + // GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable // returns a Usersable when successful -func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { - return m.users +func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) GetUsers() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable { + return m.users } + // Serialize serializes information the current object -func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetTeams() != nil { - err := writer.WriteObjectValue("", m.GetTeams()) - if err != nil { - return err - } - } else if m.GetUsers() != nil { - err := writer.WriteObjectValue("", m.GetUsers()) - if err != nil { - return err - } - } - return nil +func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetTeams() != nil { + err := writer.WriteObjectValue("", m.GetTeams()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil } + // SetTeams sets the teams property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable -func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) SetTeams(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() { - m.teams = value +func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) SetTeams(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) { + m.teams = value } + // SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable -func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { - m.users = value +func (m *ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + m.users = value } + type ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetTeams()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) - GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - SetTeams(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() - SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTeams() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable + GetUsers() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + SetTeams(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) } + // NewItemWithOrganization_membership_GetResponse instantiates a new ItemWithOrganization_membership_GetResponse and sets the default values. -func NewItemWithOrganization_membership_GetResponse()(*ItemWithOrganization_membership_GetResponse) { - m := &ItemWithOrganization_membership_GetResponse{ - OrganizationMembershipsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationMembershipsEnvelope(), - } - return m +func NewItemWithOrganization_membership_GetResponse() *ItemWithOrganization_membership_GetResponse { + m := &ItemWithOrganization_membership_GetResponse{ + OrganizationMembershipsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationMembershipsEnvelope(), + } + return m } + // CreateItemWithOrganization_membership_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithOrganization_membership_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemWithOrganization_membership_GetResponse(), nil +func CreateItemWithOrganization_membership_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithOrganization_membership_GetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithOrganization_membership_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.OrganizationMembershipsEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemWithOrganization_membership_GetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.OrganizationMembershipsEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable when successful -func (m *ItemWithOrganization_membership_GetResponse) GetIncluded()([]ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable) { - return m.included +func (m *ItemWithOrganization_membership_GetResponse) GetIncluded() []ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable { + return m.included } + // Serialize serializes information the current object -func (m *ItemWithOrganization_membership_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.OrganizationMembershipsEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemWithOrganization_membership_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.OrganizationMembershipsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemWithOrganization_membership_GetResponse) SetIncluded(value []ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable)() { - m.included = value +func (m *ItemWithOrganization_membership_GetResponse) SetIncluded(value []ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable) { + m.included = value } + type ItemWithOrganization_membership_GetResponseable interface { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsEnvelopeable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetIncluded()([]ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable) - SetIncluded(value []ItemWithOrganization_membership_GetResponse_WithOrganization_membership_GetResponse_includedable)() + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationMembershipsEnvelopeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable } diff --git a/v2/api/organizations/get_include_query_parameter_type.go b/v2/api/organizations/get_include_query_parameter_type.go index bc346a60d..a30526d8b 100644 --- a/v2/api/organizations/get_include_query_parameter_type.go +++ b/v2/api/organizations/get_include_query_parameter_type.go @@ -8,10 +8,11 @@ const ( SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota DEFAULT_PROJECT_GETINCLUDEQUERYPARAMETERTYPE ENTITLEMENT_SET_GETINCLUDEQUERYPARAMETERTYPE + CURRENT_ONBOARDING_TASK_LIST_GETINCLUDEQUERYPARAMETERTYPE ) func (i GetIncludeQueryParameterType) String() string { - return []string{"subscription", "default_project", "entitlement_set"}[i] + return []string{"subscription", "default_project", "entitlement_set", "current_onboarding_task_list"}[i] } func ParseGetIncludeQueryParameterType(v string) (any, error) { result := SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE @@ -22,6 +23,8 @@ func ParseGetIncludeQueryParameterType(v string) (any, error) { result = DEFAULT_PROJECT_GETINCLUDEQUERYPARAMETERTYPE case "entitlement_set": result = ENTITLEMENT_SET_GETINCLUDEQUERYPARAMETERTYPE + case "current_onboarding_task_list": + result = CURRENT_ONBOARDING_TASK_LIST_GETINCLUDEQUERYPARAMETERTYPE default: return nil, nil } diff --git a/v2/api/organizations/item/agentpools/get_include_query_parameter_type.go b/v2/api/organizations/item/agentpools/get_include_query_parameter_type.go new file mode 100644 index 000000000..3a4ded8cf --- /dev/null +++ b/v2/api/organizations/item/agentpools/get_include_query_parameter_type.go @@ -0,0 +1,75 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package agentpools +type GetIncludeQueryParameterType int + +const ( + OAUTH_CLIENTS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + HYOK_CONFIGURATIONS_GETINCLUDEQUERYPARAMETERTYPE + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + STACKS_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + ALLOWED_PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + ALLOWED_STACKS_GETINCLUDEQUERYPARAMETERTYPE + ALLOWED_WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + EXCLUDED_STACKS_GETINCLUDEQUERYPARAMETERTYPE + EXCLUDED_WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + MODULES_GETINCLUDEQUERYPARAMETERTYPE + ALLOWED_MODULES_GETINCLUDEQUERYPARAMETERTYPE + EXCLUDED_MODULES_GETINCLUDEQUERYPARAMETERTYPE + CIDR_RANGE_LISTS_GETINCLUDEQUERYPARAMETERTYPE + CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"oauth_clients", "hyok_configurations", "projects", "stacks", "workspaces", "allowed_projects", "allowed_stacks", "allowed_workspaces", "excluded_stacks", "excluded_workspaces", "modules", "allowed_modules", "excluded_modules", "cidr_range_lists", "cidr_ranges"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OAUTH_CLIENTS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "oauth_clients": + result = OAUTH_CLIENTS_GETINCLUDEQUERYPARAMETERTYPE + case "hyok_configurations": + result = HYOK_CONFIGURATIONS_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "stacks": + result = STACKS_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "allowed_projects": + result = ALLOWED_PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "allowed_stacks": + result = ALLOWED_STACKS_GETINCLUDEQUERYPARAMETERTYPE + case "allowed_workspaces": + result = ALLOWED_WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "excluded_stacks": + result = EXCLUDED_STACKS_GETINCLUDEQUERYPARAMETERTYPE + case "excluded_workspaces": + result = EXCLUDED_WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "modules": + result = MODULES_GETINCLUDEQUERYPARAMETERTYPE + case "allowed_modules": + result = ALLOWED_MODULES_GETINCLUDEQUERYPARAMETERTYPE + case "excluded_modules": + result = EXCLUDED_MODULES_GETINCLUDEQUERYPARAMETERTYPE + case "cidr_range_lists": + result = CIDR_RANGE_LISTS_GETINCLUDEQUERYPARAMETERTYPE + case "cidr_ranges": + result = CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/cidrrangelists/get_include_query_parameter_type.go b/v2/api/organizations/item/cidrrangelists/get_include_query_parameter_type.go new file mode 100644 index 000000000..b0db5eb7d --- /dev/null +++ b/v2/api/organizations/item/cidrrangelists/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package cidrrangelists +type GetIncludeQueryParameterType int + +const ( + CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + AGENT_POOLS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"cidr_ranges", "agent_pools"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "cidr_ranges": + result = CIDR_RANGES_GETINCLUDEQUERYPARAMETERTYPE + case "agent_pools": + result = AGENT_POOLS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/get_include_query_parameter_type.go b/v2/api/organizations/item/get_include_query_parameter_type.go index d20cc31fb..56e99f5ba 100644 --- a/v2/api/organizations/item/get_include_query_parameter_type.go +++ b/v2/api/organizations/item/get_include_query_parameter_type.go @@ -8,10 +8,11 @@ const ( SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota DEFAULT_PROJECT_GETINCLUDEQUERYPARAMETERTYPE ENTITLEMENT_SET_GETINCLUDEQUERYPARAMETERTYPE + CURRENT_ONBOARDING_TASK_LIST_GETINCLUDEQUERYPARAMETERTYPE ) func (i GetIncludeQueryParameterType) String() string { - return []string{"subscription", "default_project", "entitlement_set"}[i] + return []string{"subscription", "default_project", "entitlement_set", "current_onboarding_task_list"}[i] } func ParseGetIncludeQueryParameterType(v string) (any, error) { result := SUBSCRIPTION_GETINCLUDEQUERYPARAMETERTYPE @@ -22,6 +23,8 @@ func ParseGetIncludeQueryParameterType(v string) (any, error) { result = DEFAULT_PROJECT_GETINCLUDEQUERYPARAMETERTYPE case "entitlement_set": result = ENTITLEMENT_SET_GETINCLUDEQUERYPARAMETERTYPE + case "current_onboarding_task_list": + result = CURRENT_ONBOARDING_TASK_LIST_GETINCLUDEQUERYPARAMETERTYPE default: return nil, nil } diff --git a/v2/api/organizations/item/hyokconfigurations/get_include_query_parameter_type.go b/v2/api/organizations/item/hyokconfigurations/get_include_query_parameter_type.go new file mode 100644 index 000000000..94c4c6f08 --- /dev/null +++ b/v2/api/organizations/item/hyokconfigurations/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package hyokconfigurations +type GetIncludeQueryParameterType int + +const ( + HYOK_CUSTOMER_KEY_VERSIONS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OIDC_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"hyok_customer_key_versions", "oidc_configuration"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := HYOK_CUSTOMER_KEY_VERSIONS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "hyok_customer_key_versions": + result = HYOK_CUSTOMER_KEY_VERSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "oidc_configuration": + result = OIDC_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/oauthclients/get_include_query_parameter_type.go b/v2/api/organizations/item/oauthclients/get_include_query_parameter_type.go new file mode 100644 index 000000000..4528101f8 --- /dev/null +++ b/v2/api/organizations/item/oauthclients/get_include_query_parameter_type.go @@ -0,0 +1,39 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package oauthclients +type GetIncludeQueryParameterType int + +const ( + OAUTH_TOKENS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + AGENT_POOL_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"oauth_tokens", "projects", "agent_pool"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OAUTH_TOKENS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "oauth_tokens": + result = OAUTH_TOKENS_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "agent_pool": + result = AGENT_POOL_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/policies/get_include_query_parameter_type.go b/v2/api/organizations/item/policies/get_include_query_parameter_type.go new file mode 100644 index 000000000..372f6bd08 --- /dev/null +++ b/v2/api/organizations/item/policies/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package policies +type GetIncludeQueryParameterType int + +const ( + POLICY_SETS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"policy_sets"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := POLICY_SETS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "policy_sets": + result = POLICY_SETS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/policysets/get_include_query_parameter_type.go b/v2/api/organizations/item/policysets/get_include_query_parameter_type.go new file mode 100644 index 000000000..777e9ed88 --- /dev/null +++ b/v2/api/organizations/item/policysets/get_include_query_parameter_type.go @@ -0,0 +1,63 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package policysets +type GetIncludeQueryParameterType int + +const ( + POLICIES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + POLICIESOOTB_POLICY_GETINCLUDEQUERYPARAMETERTYPE + POLICIESOOTB_POLICYOOTB_POLICY_LIBRARIES_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACE_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + CURRENT_VERSION_GETINCLUDEQUERYPARAMETERTYPE + NEWEST_VERSION_GETINCLUDEQUERYPARAMETERTYPE + PROJECT_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + STACKS_GETINCLUDEQUERYPARAMETERTYPE + STACK_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"policies", "policies.ootb_policy", "policies.ootb_policy.ootb_policy_libraries", "workspaces", "workspace_exclusions", "projects", "current_version", "newest_version", "project_exclusions", "stacks", "stack_exclusions"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := POLICIES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "policies": + result = POLICIES_GETINCLUDEQUERYPARAMETERTYPE + case "policies.ootb_policy": + result = POLICIESOOTB_POLICY_GETINCLUDEQUERYPARAMETERTYPE + case "policies.ootb_policy.ootb_policy_libraries": + result = POLICIESOOTB_POLICYOOTB_POLICY_LIBRARIES_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "workspace_exclusions": + result = WORKSPACE_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "current_version": + result = CURRENT_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "newest_version": + result = NEWEST_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "project_exclusions": + result = PROJECT_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "stacks": + result = STACKS_GETINCLUDEQUERYPARAMETERTYPE + case "stack_exclusions": + result = STACK_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/projects/get_include_query_parameter_type.go b/v2/api/organizations/item/projects/get_include_query_parameter_type.go new file mode 100644 index 000000000..8b7475f2a --- /dev/null +++ b/v2/api/organizations/item/projects/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package projects +type GetIncludeQueryParameterType int + +const ( + EFFECTIVE_TAG_BINDINGS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"effective_tag_bindings"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := EFFECTIVE_TAG_BINDINGS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "effective_tag_bindings": + result = EFFECTIVE_TAG_BINDINGS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/registrymodules/item/item/item/item/get_include_query_parameter_type.go b/v2/api/organizations/item/registrymodules/item/item/item/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..fceff0229 --- /dev/null +++ b/v2/api/organizations/item/registrymodules/item/item/item/item/get_include_query_parameter_type.go @@ -0,0 +1,39 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + NO_CODE_MODULES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + LATEST_TEST_RUN_GETINCLUDEQUERYPARAMETERTYPE + LATEST_TEST_RUNMOST_RECENT_TEST_RUN_CLEANUP_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"no_code_modules", "latest_test_run", "latest_test_run.most_recent_test_run_cleanup"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := NO_CODE_MODULES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "no_code_modules": + result = NO_CODE_MODULES_GETINCLUDEQUERYPARAMETERTYPE + case "latest_test_run": + result = LATEST_TEST_RUN_GETINCLUDEQUERYPARAMETERTYPE + case "latest_test_run.most_recent_test_run_cleanup": + result = LATEST_TEST_RUNMOST_RECENT_TEST_RUN_CLEANUP_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/runs/get_include_query_parameter_type.go b/v2/api/organizations/item/runs/get_include_query_parameter_type.go new file mode 100644 index 000000000..a2a121a01 --- /dev/null +++ b/v2/api/organizations/item/runs/get_include_query_parameter_type.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package runs +type GetIncludeQueryParameterType int + +const ( + WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + WORKSPACEPROJECT_GETINCLUDEQUERYPARAMETERTYPE + CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"workspace", "workspace.project", "configuration_version", "configuration_version.ingress_attributes"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "workspace": + result = WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + case "workspace.project": + result = WORKSPACEPROJECT_GETINCLUDEQUERYPARAMETERTYPE + case "configuration_version": + result = CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "configuration_version.ingress_attributes": + result = CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/taskconfigs/forowner/get_include_query_parameter_type.go b/v2/api/organizations/item/taskconfigs/forowner/get_include_query_parameter_type.go new file mode 100644 index 000000000..91aba6b83 --- /dev/null +++ b/v2/api/organizations/item/taskconfigs/forowner/get_include_query_parameter_type.go @@ -0,0 +1,45 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package forowner +type GetIncludeQueryParameterType int + +const ( + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OWNER_GETINCLUDEQUERYPARAMETERTYPE + TASK_GETINCLUDEQUERYPARAMETERTYPE + ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"projects", "owner", "task", "organization", "workspaces"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "owner": + result = OWNER_GETINCLUDEQUERYPARAMETERTYPE + case "task": + result = TASK_GETINCLUDEQUERYPARAMETERTYPE + case "organization": + result = ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/taskconfigs/get_include_query_parameter_type.go b/v2/api/organizations/item/taskconfigs/get_include_query_parameter_type.go new file mode 100644 index 000000000..8ec0d1ffd --- /dev/null +++ b/v2/api/organizations/item/taskconfigs/get_include_query_parameter_type.go @@ -0,0 +1,45 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package taskconfigs +type GetIncludeQueryParameterType int + +const ( + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OWNER_GETINCLUDEQUERYPARAMETERTYPE + TASK_GETINCLUDEQUERYPARAMETERTYPE + ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"projects", "owner", "task", "organization", "workspaces"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "owner": + result = OWNER_GETINCLUDEQUERYPARAMETERTYPE + case "task": + result = TASK_GETINCLUDEQUERYPARAMETERTYPE + case "organization": + result = ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/teamtokens/get_include_query_parameter_type.go b/v2/api/organizations/item/teamtokens/get_include_query_parameter_type.go new file mode 100644 index 000000000..dbadfcc67 --- /dev/null +++ b/v2/api/organizations/item/teamtokens/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamtokens +type GetIncludeQueryParameterType int + +const ( + TEAM_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"team"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := TEAM_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "team": + result = TEAM_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item/varsets/get_include_query_parameter_type.go b/v2/api/organizations/item/varsets/get_include_query_parameter_type.go new file mode 100644 index 000000000..cec1e0008 --- /dev/null +++ b/v2/api/organizations/item/varsets/get_include_query_parameter_type.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package varsets +type GetIncludeQueryParameterType int + +const ( + VARS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + STACKS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"vars", "workspaces", "projects", "stacks"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := VARS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "vars": + result = VARS_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "stacks": + result = STACKS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/organizations/item_agent_pools_get_response.go b/v2/api/organizations/item_agent_pools_get_response.go index 4a89cfb10..bebee76ea 100644 --- a/v2/api/organizations/item_agent_pools_get_response.go +++ b/v2/api/organizations/item_agent_pools_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,238 @@ type ItemAgentPoolsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + // The included property + included []ItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemAgentPoolsGetResponse_metaable } +// ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RegistryModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable + cidrRangeLists i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable + cidrRanges i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable + hyokConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable + oauthClients i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RegistryModulesable + registryModules i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RegistryModulesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + stacks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemAgentPoolsGetResponse_AgentPoolsGetResponse_included instantiates a new ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included and sets the default values. +func NewItemAgentPoolsGetResponse_AgentPoolsGetResponse_included()(*ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) { + m := &ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included{ + } + return m +} +// CreateItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemAgentPoolsGetResponse_AgentPoolsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cidr-range-lists") { + result.SetCidrRangeLists(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCidrRangeLists()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cidr-ranges") { + result.SetCidrRanges(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCidrRanges()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "hyok-configurations") { + result.SetHyokConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewHyokConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "oauth-clients") { + result.SetOauthClients(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOauthClients()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "registry-modules") { + result.SetRegistryModules(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRegistryModules()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetCidrRangeLists gets the cidrRangeLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable +// returns a CidrRangeListsable when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetCidrRangeLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable) { + return m.cidrRangeLists +} +// GetCidrRanges gets the cidrRanges property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable +// returns a CidrRangesable when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetCidrRanges()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable) { + return m.cidrRanges +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetCidrRangeLists() != nil { + return m.GetCidrRangeLists().GetFieldDeserializers() + } else if m.GetCidrRanges() != nil { + return m.GetCidrRanges().GetFieldDeserializers() + } else if m.GetHyokConfigurations() != nil { + return m.GetHyokConfigurations().GetFieldDeserializers() + } else if m.GetOauthClients() != nil { + return m.GetOauthClients().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetRegistryModules() != nil { + return m.GetRegistryModules().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetHyokConfigurations gets the hyokConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable +// returns a HyokConfigurationsable when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetHyokConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable) { + return m.hyokConfigurations +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetOauthClients gets the oauthClients property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable +// returns a OauthClientsable when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetOauthClients()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable) { + return m.oauthClients +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetRegistryModules gets the registryModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RegistryModulesable +// returns a RegistryModulesable when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetRegistryModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RegistryModulesable) { + return m.registryModules +} +// GetStacks gets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +// returns a Stacksable when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) { + return m.stacks +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCidrRangeLists() != nil { + err := writer.WriteObjectValue("", m.GetCidrRangeLists()) + if err != nil { + return err + } + } else if m.GetCidrRanges() != nil { + err := writer.WriteObjectValue("", m.GetCidrRanges()) + if err != nil { + return err + } + } else if m.GetHyokConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetHyokConfigurations()) + if err != nil { + return err + } + } else if m.GetOauthClients() != nil { + err := writer.WriteObjectValue("", m.GetOauthClients()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetRegistryModules() != nil { + err := writer.WriteObjectValue("", m.GetRegistryModules()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetCidrRangeLists sets the cidrRangeLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) SetCidrRangeLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable)() { + m.cidrRangeLists = value +} +// SetCidrRanges sets the cidrRanges property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) SetCidrRanges(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable)() { + m.cidrRanges = value +} +// SetHyokConfigurations sets the hyokConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) SetHyokConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable)() { + m.hyokConfigurations = value +} +// SetOauthClients sets the oauthClients property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) SetOauthClients(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable)() { + m.oauthClients = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetRegistryModules sets the registryModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RegistryModulesable +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) SetRegistryModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RegistryModulesable)() { + m.registryModules = value +} +// SetStacks sets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() { + m.stacks = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemAgentPoolsGetResponse_AgentPoolsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCidrRangeLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable) + GetCidrRanges()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable) + GetHyokConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable) + GetOauthClients()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetRegistryModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RegistryModulesable) + GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetCidrRangeLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable)() + SetCidrRanges(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable)() + SetHyokConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable)() + SetOauthClients(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetRegistryModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RegistryModulesable)() + SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemAgentPoolsGetResponse instantiates a new ItemAgentPoolsGetResponse and sets the default values. func NewItemAgentPoolsGetResponse()(*ItemAgentPoolsGetResponse) { m := &ItemAgentPoolsGetResponse{ @@ -60,6 +288,22 @@ func (m *ItemAgentPoolsGetResponse) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +326,11 @@ func (m *ItemAgentPoolsGetResponse) GetFieldDeserializers()(map[string]func(i878 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedable when successful +func (m *ItemAgentPoolsGetResponse) GetIncluded()([]ItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemAgentPoolsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +355,18 @@ func (m *ItemAgentPoolsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +395,10 @@ func (m *ItemAgentPoolsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemAgentPoolsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemAgentPoolsGetResponse) SetIncluded(value []ItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemAgentPoolsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +411,11 @@ type ItemAgentPoolsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) + GetIncluded()([]ItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemAgentPoolsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() + SetIncluded(value []ItemAgentPoolsGetResponse_AgentPoolsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemAgentPoolsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_agent_pools_request_builder.go b/v2/api/organizations/item_agent_pools_request_builder.go index 29fc52e7b..477e6a414 100644 --- a/v2/api/organizations/item_agent_pools_request_builder.go +++ b/v2/api/organizations/item_agent_pools_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ic5975c5af16b7d8ce4e007ccc553bb99eef7b52d83dafe45a9a0f4407b443388 "github.com/hashicorp/go-tfe/v2/api/organizations/item/agentpools" ) // ItemAgentPoolsRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\agent-pools @@ -19,6 +20,8 @@ type ItemAgentPoolsRequestBuilderGetQueryParameters struct { FieldsagentPools []string "uriparametername:\"fields%5Bagent%2Dpools%5D\"" // Filters agent pools to those associated with the given workspace. The workspace must have permission to use the agent pool. FilterallowedWorkspacesname *string "uriparametername:\"filter%5Ballowed%2Dworkspaces%5D%5Bname%5D\"" + // Optionally side-load the specified relationships. + Include []ic5975c5af16b7d8ce4e007ccc553bb99eef7b52d83dafe45a9a0f4407b443388.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -31,7 +34,7 @@ type ItemAgentPoolsRequestBuilderGetQueryParameters struct { // NewItemAgentPoolsRequestBuilderInternal instantiates a new ItemAgentPoolsRequestBuilder and sets the default values. func NewItemAgentPoolsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAgentPoolsRequestBuilder) { m := &ItemAgentPoolsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/agent-pools{?fields%5Bagent%2Dpools%5D,filter%5Ballowed%2Dworkspaces%5D%5Bname%5D*,page%5Bnumber%5D*,page%5Bsize%5D*,q*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/agent-pools{?fields%5Bagent%2Dpools%5D,filter%5Ballowed%2Dworkspaces%5D%5Bname%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*,q*,sort*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_cidr_range_lists_get_response.go b/v2/api/organizations/item_cidr_range_lists_get_response.go index 5f509f5de..971ae6e9c 100644 --- a/v2/api/organizations/item_cidr_range_lists_get_response.go +++ b/v2/api/organizations/item_cidr_range_lists_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,106 @@ type ItemCidrRangeListsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable + // The included property + included []ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemCidrRangeListsGetResponse_metaable } +// ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable +type ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable + cidrRanges i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable +} +// NewItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included instantiates a new ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included and sets the default values. +func NewItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included()(*ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included) { + m := &ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included{ + } + return m +} +// CreateItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cidr-ranges") { + result.SetCidrRanges(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCidrRanges()) + } + } + } + } + return result, nil +} +// GetAgentPools gets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +// returns a AgentPoolsable when successful +func (m *ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included) GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { + return m.agentPools +} +// GetCidrRanges gets the cidrRanges property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable +// returns a CidrRangesable when successful +func (m *ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included) GetCidrRanges()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable) { + return m.cidrRanges +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetCidrRanges() != nil { + return m.GetCidrRanges().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// Serialize serializes information the current object +func (m *ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetCidrRanges() != nil { + err := writer.WriteObjectValue("", m.GetCidrRanges()) + if err != nil { + return err + } + } + return nil +} +// SetAgentPools sets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +func (m *ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { + m.agentPools = value +} +// SetCidrRanges sets the cidrRanges property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable +func (m *ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_included) SetCidrRanges(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable)() { + m.cidrRanges = value +} +type ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) + GetCidrRanges()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable) + SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() + SetCidrRanges(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangesable)() +} // NewItemCidrRangeListsGetResponse instantiates a new ItemCidrRangeListsGetResponse and sets the default values. func NewItemCidrRangeListsGetResponse()(*ItemCidrRangeListsGetResponse) { m := &ItemCidrRangeListsGetResponse{ @@ -60,6 +156,22 @@ func (m *ItemCidrRangeListsGetResponse) GetFieldDeserializers()(map[string]func( } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +194,11 @@ func (m *ItemCidrRangeListsGetResponse) GetFieldDeserializers()(map[string]func( } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedable when successful +func (m *ItemCidrRangeListsGetResponse) GetIncluded()([]ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemCidrRangeListsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +223,18 @@ func (m *ItemCidrRangeListsGetResponse) Serialize(writer i878a80d2330e89d2689638 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +263,10 @@ func (m *ItemCidrRangeListsGetResponse) SetAdditionalData(value map[string]any)( func (m *ItemCidrRangeListsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemCidrRangeListsGetResponse) SetIncluded(value []ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemCidrRangeListsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +279,11 @@ type ItemCidrRangeListsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable) + GetIncluded()([]ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemCidrRangeListsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CidrRangeListsable)() + SetIncluded(value []ItemCidrRangeListsGetResponse_CidrRangeListsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemCidrRangeListsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_cidr_range_lists_request_builder.go b/v2/api/organizations/item_cidr_range_lists_request_builder.go index d224beb57..f76dbcc29 100644 --- a/v2/api/organizations/item_cidr_range_lists_request_builder.go +++ b/v2/api/organizations/item_cidr_range_lists_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i35de644a8ac92f69b57518dc605cd832d42403de8e2f7fefdbfe55ad1171a626 "github.com/hashicorp/go-tfe/v2/api/organizations/item/cidrrangelists" ) // ItemCidrRangeListsRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\cidr-range-lists @@ -17,6 +18,8 @@ type ItemCidrRangeListsRequestBuilder struct { type ItemCidrRangeListsRequestBuilderGetQueryParameters struct { // Return only the specified fields for cidr-range-lists resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldscidrRangeLists []string "uriparametername:\"fields%5Bcidr%2Drange%2Dlists%5D\"" + // Optionally side-load the specified relationships. + Include []i35de644a8ac92f69b57518dc605cd832d42403de8e2f7fefdbfe55ad1171a626.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemCidrRangeListsRequestBuilderGetQueryParameters struct { // NewItemCidrRangeListsRequestBuilderInternal instantiates a new ItemCidrRangeListsRequestBuilder and sets the default values. func NewItemCidrRangeListsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCidrRangeListsRequestBuilder) { m := &ItemCidrRangeListsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/cidr-range-lists{?fields%5Bcidr%2Drange%2Dlists%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/cidr-range-lists{?fields%5Bcidr%2Drange%2Dlists%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_hyok_configurations_get_response.go b/v2/api/organizations/item_hyok_configurations_get_response.go index b7f5e885d..646701b06 100644 --- a/v2/api/organizations/item_hyok_configurations_get_response.go +++ b/v2/api/organizations/item_hyok_configurations_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,172 @@ type ItemHyokConfigurationsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable + // The included property + included []ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemHyokConfigurationsGetResponse_metaable } +// ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AwsOidcConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AzureOidcConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.GcpOidcConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VaultOidcConfigurationsable +type ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AwsOidcConfigurationsable + awsOidcConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AwsOidcConfigurationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AzureOidcConfigurationsable + azureOidcConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AzureOidcConfigurationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.GcpOidcConfigurationsable + gcpOidcConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.GcpOidcConfigurationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable + hyokCustomerKeyVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VaultOidcConfigurationsable + vaultOidcConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VaultOidcConfigurationsable +} +// NewItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included instantiates a new ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included and sets the default values. +func NewItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included()(*ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) { + m := &ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included{ + } + return m +} +// CreateItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "aws-oidc-configurations") { + result.SetAwsOidcConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAwsOidcConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "azure-oidc-configurations") { + result.SetAzureOidcConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAzureOidcConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "gcp-oidc-configurations") { + result.SetGcpOidcConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewGcpOidcConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "hyok-customer-key-versions") { + result.SetHyokCustomerKeyVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewHyokCustomerKeyVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vault-oidc-configurations") { + result.SetVaultOidcConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVaultOidcConfigurations()) + } + } + } + } + return result, nil +} +// GetAwsOidcConfigurations gets the awsOidcConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AwsOidcConfigurationsable +// returns a AwsOidcConfigurationsable when successful +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) GetAwsOidcConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AwsOidcConfigurationsable) { + return m.awsOidcConfigurations +} +// GetAzureOidcConfigurations gets the azureOidcConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AzureOidcConfigurationsable +// returns a AzureOidcConfigurationsable when successful +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) GetAzureOidcConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AzureOidcConfigurationsable) { + return m.azureOidcConfigurations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAwsOidcConfigurations() != nil { + return m.GetAwsOidcConfigurations().GetFieldDeserializers() + } else if m.GetAzureOidcConfigurations() != nil { + return m.GetAzureOidcConfigurations().GetFieldDeserializers() + } else if m.GetGcpOidcConfigurations() != nil { + return m.GetGcpOidcConfigurations().GetFieldDeserializers() + } else if m.GetHyokCustomerKeyVersions() != nil { + return m.GetHyokCustomerKeyVersions().GetFieldDeserializers() + } else if m.GetVaultOidcConfigurations() != nil { + return m.GetVaultOidcConfigurations().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetGcpOidcConfigurations gets the gcpOidcConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.GcpOidcConfigurationsable +// returns a GcpOidcConfigurationsable when successful +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) GetGcpOidcConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.GcpOidcConfigurationsable) { + return m.gcpOidcConfigurations +} +// GetHyokCustomerKeyVersions gets the hyokCustomerKeyVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable +// returns a HyokCustomerKeyVersionsable when successful +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) GetHyokCustomerKeyVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable) { + return m.hyokCustomerKeyVersions +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetVaultOidcConfigurations gets the vaultOidcConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VaultOidcConfigurationsable +// returns a VaultOidcConfigurationsable when successful +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) GetVaultOidcConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VaultOidcConfigurationsable) { + return m.vaultOidcConfigurations +} +// Serialize serializes information the current object +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAwsOidcConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetAwsOidcConfigurations()) + if err != nil { + return err + } + } else if m.GetAzureOidcConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetAzureOidcConfigurations()) + if err != nil { + return err + } + } else if m.GetGcpOidcConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetGcpOidcConfigurations()) + if err != nil { + return err + } + } else if m.GetHyokCustomerKeyVersions() != nil { + err := writer.WriteObjectValue("", m.GetHyokCustomerKeyVersions()) + if err != nil { + return err + } + } else if m.GetVaultOidcConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetVaultOidcConfigurations()) + if err != nil { + return err + } + } + return nil +} +// SetAwsOidcConfigurations sets the awsOidcConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AwsOidcConfigurationsable +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) SetAwsOidcConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AwsOidcConfigurationsable)() { + m.awsOidcConfigurations = value +} +// SetAzureOidcConfigurations sets the azureOidcConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AzureOidcConfigurationsable +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) SetAzureOidcConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AzureOidcConfigurationsable)() { + m.azureOidcConfigurations = value +} +// SetGcpOidcConfigurations sets the gcpOidcConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.GcpOidcConfigurationsable +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) SetGcpOidcConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.GcpOidcConfigurationsable)() { + m.gcpOidcConfigurations = value +} +// SetHyokCustomerKeyVersions sets the hyokCustomerKeyVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) SetHyokCustomerKeyVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable)() { + m.hyokCustomerKeyVersions = value +} +// SetVaultOidcConfigurations sets the vaultOidcConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VaultOidcConfigurationsable +func (m *ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_included) SetVaultOidcConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VaultOidcConfigurationsable)() { + m.vaultOidcConfigurations = value +} +type ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAwsOidcConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AwsOidcConfigurationsable) + GetAzureOidcConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AzureOidcConfigurationsable) + GetGcpOidcConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.GcpOidcConfigurationsable) + GetHyokCustomerKeyVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable) + GetVaultOidcConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VaultOidcConfigurationsable) + SetAwsOidcConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AwsOidcConfigurationsable)() + SetAzureOidcConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AzureOidcConfigurationsable)() + SetGcpOidcConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.GcpOidcConfigurationsable)() + SetHyokCustomerKeyVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable)() + SetVaultOidcConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.VaultOidcConfigurationsable)() +} // NewItemHyokConfigurationsGetResponse instantiates a new ItemHyokConfigurationsGetResponse and sets the default values. func NewItemHyokConfigurationsGetResponse()(*ItemHyokConfigurationsGetResponse) { m := &ItemHyokConfigurationsGetResponse{ @@ -60,6 +222,22 @@ func (m *ItemHyokConfigurationsGetResponse) GetFieldDeserializers()(map[string]f } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +260,11 @@ func (m *ItemHyokConfigurationsGetResponse) GetFieldDeserializers()(map[string]f } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedable when successful +func (m *ItemHyokConfigurationsGetResponse) GetIncluded()([]ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemHyokConfigurationsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +289,18 @@ func (m *ItemHyokConfigurationsGetResponse) Serialize(writer i878a80d2330e89d268 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +329,10 @@ func (m *ItemHyokConfigurationsGetResponse) SetAdditionalData(value map[string]a func (m *ItemHyokConfigurationsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemHyokConfigurationsGetResponse) SetIncluded(value []ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemHyokConfigurationsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +345,11 @@ type ItemHyokConfigurationsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable) + GetIncluded()([]ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemHyokConfigurationsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokConfigurationsable)() + SetIncluded(value []ItemHyokConfigurationsGetResponse_HyokConfigurationsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemHyokConfigurationsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_hyok_configurations_request_builder.go b/v2/api/organizations/item_hyok_configurations_request_builder.go index 049949e93..0af784edd 100644 --- a/v2/api/organizations/item_hyok_configurations_request_builder.go +++ b/v2/api/organizations/item_hyok_configurations_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i87f0cde6757d2988f6030c10e84373f17b734ebb43eaf8d8ed32f3f49252177b "github.com/hashicorp/go-tfe/v2/api/organizations/item/hyokconfigurations" ) // ItemHyokConfigurationsRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\hyok-configurations @@ -17,6 +18,8 @@ type ItemHyokConfigurationsRequestBuilder struct { type ItemHyokConfigurationsRequestBuilderGetQueryParameters struct { // Return only the specified fields for hyok-configurations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldshyokConfigurations []string "uriparametername:\"fields%5Bhyok%2Dconfigurations%5D\"" + // Optionally side-load the specified relationships. + Include []i87f0cde6757d2988f6030c10e84373f17b734ebb43eaf8d8ed32f3f49252177b.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemHyokConfigurationsRequestBuilderGetQueryParameters struct { // NewItemHyokConfigurationsRequestBuilderInternal instantiates a new ItemHyokConfigurationsRequestBuilder and sets the default values. func NewItemHyokConfigurationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHyokConfigurationsRequestBuilder) { m := &ItemHyokConfigurationsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/hyok-configurations{?fields%5Bhyok%2Dconfigurations%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/hyok-configurations{?fields%5Bhyok%2Dconfigurations%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_oauth_clients_get_response.go b/v2/api/organizations/item_oauth_clients_get_response.go index 37232398d..1e01fb669 100644 --- a/v2/api/organizations/item_oauth_clients_get_response.go +++ b/v2/api/organizations/item_oauth_clients_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,128 @@ type ItemOauthClientsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable + // The included property + included []ItemOauthClientsGetResponse_OauthClientsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemOauthClientsGetResponse_metaable } +// ItemOauthClientsGetResponse_OauthClientsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthTokensable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +type ItemOauthClientsGetResponse_OauthClientsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthTokensable + oauthTokens i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthTokensable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +} +// NewItemOauthClientsGetResponse_OauthClientsGetResponse_included instantiates a new ItemOauthClientsGetResponse_OauthClientsGetResponse_included and sets the default values. +func NewItemOauthClientsGetResponse_OauthClientsGetResponse_included()(*ItemOauthClientsGetResponse_OauthClientsGetResponse_included) { + m := &ItemOauthClientsGetResponse_OauthClientsGetResponse_included{ + } + return m +} +// CreateItemOauthClientsGetResponse_OauthClientsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemOauthClientsGetResponse_OauthClientsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemOauthClientsGetResponse_OauthClientsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "oauth-tokens") { + result.SetOauthTokens(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOauthTokens()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } + } + } + } + return result, nil +} +// GetAgentPools gets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +// returns a AgentPoolsable when successful +func (m *ItemOauthClientsGetResponse_OauthClientsGetResponse_included) GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { + return m.agentPools +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemOauthClientsGetResponse_OauthClientsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetOauthTokens() != nil { + return m.GetOauthTokens().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemOauthClientsGetResponse_OauthClientsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetOauthTokens gets the oauthTokens property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthTokensable +// returns a OauthTokensable when successful +func (m *ItemOauthClientsGetResponse_OauthClientsGetResponse_included) GetOauthTokens()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthTokensable) { + return m.oauthTokens +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemOauthClientsGetResponse_OauthClientsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// Serialize serializes information the current object +func (m *ItemOauthClientsGetResponse_OauthClientsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetOauthTokens() != nil { + err := writer.WriteObjectValue("", m.GetOauthTokens()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } + return nil +} +// SetAgentPools sets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable +func (m *ItemOauthClientsGetResponse_OauthClientsGetResponse_included) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { + m.agentPools = value +} +// SetOauthTokens sets the oauthTokens property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthTokensable +func (m *ItemOauthClientsGetResponse_OauthClientsGetResponse_included) SetOauthTokens(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthTokensable)() { + m.oauthTokens = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemOauthClientsGetResponse_OauthClientsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +type ItemOauthClientsGetResponse_OauthClientsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) + GetOauthTokens()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthTokensable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() + SetOauthTokens(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthTokensable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() +} // NewItemOauthClientsGetResponse instantiates a new ItemOauthClientsGetResponse and sets the default values. func NewItemOauthClientsGetResponse()(*ItemOauthClientsGetResponse) { m := &ItemOauthClientsGetResponse{ @@ -60,6 +178,22 @@ func (m *ItemOauthClientsGetResponse) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemOauthClientsGetResponse_OauthClientsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemOauthClientsGetResponse_OauthClientsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemOauthClientsGetResponse_OauthClientsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +216,11 @@ func (m *ItemOauthClientsGetResponse) GetFieldDeserializers()(map[string]func(i8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemOauthClientsGetResponse_OauthClientsGetResponse_includedable when successful +func (m *ItemOauthClientsGetResponse) GetIncluded()([]ItemOauthClientsGetResponse_OauthClientsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemOauthClientsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +245,18 @@ func (m *ItemOauthClientsGetResponse) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +285,10 @@ func (m *ItemOauthClientsGetResponse) SetAdditionalData(value map[string]any)() func (m *ItemOauthClientsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemOauthClientsGetResponse) SetIncluded(value []ItemOauthClientsGetResponse_OauthClientsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemOauthClientsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +301,11 @@ type ItemOauthClientsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable) + GetIncluded()([]ItemOauthClientsGetResponse_OauthClientsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemOauthClientsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OauthClientsable)() + SetIncluded(value []ItemOauthClientsGetResponse_OauthClientsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemOauthClientsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_oauth_clients_request_builder.go b/v2/api/organizations/item_oauth_clients_request_builder.go index f26c49c54..0aede17cb 100644 --- a/v2/api/organizations/item_oauth_clients_request_builder.go +++ b/v2/api/organizations/item_oauth_clients_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i12bbc6b68134b600eabd42d2ea9e9b2a07df56b89beaf018516877299a94369c "github.com/hashicorp/go-tfe/v2/api/organizations/item/oauthclients" ) // ItemOauthClientsRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\oauth-clients @@ -17,6 +18,8 @@ type ItemOauthClientsRequestBuilder struct { type ItemOauthClientsRequestBuilderGetQueryParameters struct { // Return only the specified fields for oauth-clients resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsoauthClients []string "uriparametername:\"fields%5Boauth%2Dclients%5D\"" + // Optionally side-load the specified relationships. + Include []i12bbc6b68134b600eabd42d2ea9e9b2a07df56b89beaf018516877299a94369c.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -27,7 +30,7 @@ type ItemOauthClientsRequestBuilderGetQueryParameters struct { // NewItemOauthClientsRequestBuilderInternal instantiates a new ItemOauthClientsRequestBuilder and sets the default values. func NewItemOauthClientsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOauthClientsRequestBuilder) { m := &ItemOauthClientsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/oauth-clients{?fields%5Boauth%2Dclients%5D,page%5Bnumber%5D*,page%5Bsize%5D*,show_affected_workspaces*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/oauth-clients{?fields%5Boauth%2Dclients%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*,show_affected_workspaces*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_policies_get_response.go b/v2/api/organizations/item_policies_get_response.go index 3ad83e769..ee3295af6 100644 --- a/v2/api/organizations/item_policies_get_response.go +++ b/v2/api/organizations/item_policies_get_response.go @@ -13,6 +13,8 @@ type ItemPoliciesGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemPoliciesGetResponse) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreatePolicySetsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemPoliciesGetResponse) GetFieldDeserializers()(map[string]func(i878a8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []PolicySetsable when successful +func (m *ItemPoliciesGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemPoliciesGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemPoliciesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemPoliciesGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemPoliciesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemPoliciesGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemPoliciesGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemPoliciesGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemPoliciesGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemPoliciesGetResponse_metaable)() } diff --git a/v2/api/organizations/item_policies_request_builder.go b/v2/api/organizations/item_policies_request_builder.go index 870ebffbb..c4dbba3f4 100644 --- a/v2/api/organizations/item_policies_request_builder.go +++ b/v2/api/organizations/item_policies_request_builder.go @@ -20,6 +20,8 @@ type ItemPoliciesRequestBuilderGetQueryParameters struct { Fieldspolicies []string "uriparametername:\"fields%5Bpolicies%5D\"" // Filter policies by kind. Valid values are sentinel and opa. Filterkind *ieeda671510118658dce37ec4adc9dc98dfde056c5e2589d03657530d4a5526ae.GetFilterKindQueryParameterType "uriparametername:\"filter%5Bkind%5D\"" + // Optionally side-load the specified relationships. + Include []ieeda671510118658dce37ec4adc9dc98dfde056c5e2589d03657530d4a5526ae.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -32,7 +34,7 @@ type ItemPoliciesRequestBuilderGetQueryParameters struct { // NewItemPoliciesRequestBuilderInternal instantiates a new ItemPoliciesRequestBuilder and sets the default values. func NewItemPoliciesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPoliciesRequestBuilder) { m := &ItemPoliciesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/policies{?fields%5Bpolicies%5D,filter%5Bkind%5D*,page%5Bnumber%5D*,page%5Bsize%5D*,search%5Bname%5D*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/policies{?fields%5Bpolicies%5D,filter%5Bkind%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*,search%5Bname%5D*,sort*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_policy_sets_get_response.go b/v2/api/organizations/item_policy_sets_get_response.go index 3bfc5732d..7da772560 100644 --- a/v2/api/organizations/item_policy_sets_get_response.go +++ b/v2/api/organizations/item_policy_sets_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,216 @@ type ItemPolicySetsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable + // The included property + included []ItemPolicySetsGetResponse_PolicySetsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemPolicySetsGetResponse_metaable } +// ItemPolicySetsGetResponse_PolicySetsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPoliciesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPolicyLibrariesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemPolicySetsGetResponse_PolicySetsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPoliciesable + ootbPolicies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPoliciesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPolicyLibrariesable + ootbPolicyLibraries i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPolicyLibrariesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable + policies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable + policySetVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + stacks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemPolicySetsGetResponse_PolicySetsGetResponse_included instantiates a new ItemPolicySetsGetResponse_PolicySetsGetResponse_included and sets the default values. +func NewItemPolicySetsGetResponse_PolicySetsGetResponse_included()(*ItemPolicySetsGetResponse_PolicySetsGetResponse_included) { + m := &ItemPolicySetsGetResponse_PolicySetsGetResponse_included{ + } + return m +} +// CreateItemPolicySetsGetResponse_PolicySetsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPolicySetsGetResponse_PolicySetsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemPolicySetsGetResponse_PolicySetsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ootb-policies") { + result.SetOotbPolicies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOotbPolicies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ootb-policy-libraries") { + result.SetOotbPolicyLibraries(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOotbPolicyLibraries()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policies") { + result.SetPolicies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPolicies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policy-set-versions") { + result.SetPolicySetVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPolicySetVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOotbPolicies() != nil { + return m.GetOotbPolicies().GetFieldDeserializers() + } else if m.GetOotbPolicyLibraries() != nil { + return m.GetOotbPolicyLibraries().GetFieldDeserializers() + } else if m.GetPolicies() != nil { + return m.GetPolicies().GetFieldDeserializers() + } else if m.GetPolicySetVersions() != nil { + return m.GetPolicySetVersions().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetOotbPolicies gets the ootbPolicies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPoliciesable +// returns a OotbPoliciesable when successful +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) GetOotbPolicies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPoliciesable) { + return m.ootbPolicies +} +// GetOotbPolicyLibraries gets the ootbPolicyLibraries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPolicyLibrariesable +// returns a OotbPolicyLibrariesable when successful +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) GetOotbPolicyLibraries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPolicyLibrariesable) { + return m.ootbPolicyLibraries +} +// GetPolicies gets the policies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable +// returns a Policiesable when successful +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) GetPolicies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable) { + return m.policies +} +// GetPolicySetVersions gets the policySetVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable +// returns a PolicySetVersionsable when successful +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) GetPolicySetVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable) { + return m.policySetVersions +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetStacks gets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +// returns a Stacksable when successful +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) { + return m.stacks +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOotbPolicies() != nil { + err := writer.WriteObjectValue("", m.GetOotbPolicies()) + if err != nil { + return err + } + } else if m.GetOotbPolicyLibraries() != nil { + err := writer.WriteObjectValue("", m.GetOotbPolicyLibraries()) + if err != nil { + return err + } + } else if m.GetPolicies() != nil { + err := writer.WriteObjectValue("", m.GetPolicies()) + if err != nil { + return err + } + } else if m.GetPolicySetVersions() != nil { + err := writer.WriteObjectValue("", m.GetPolicySetVersions()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetOotbPolicies sets the ootbPolicies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPoliciesable +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) SetOotbPolicies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPoliciesable)() { + m.ootbPolicies = value +} +// SetOotbPolicyLibraries sets the ootbPolicyLibraries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPolicyLibrariesable +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) SetOotbPolicyLibraries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPolicyLibrariesable)() { + m.ootbPolicyLibraries = value +} +// SetPolicies sets the policies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) SetPolicies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable)() { + m.policies = value +} +// SetPolicySetVersions sets the policySetVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) SetPolicySetVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable)() { + m.policySetVersions = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetStacks sets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() { + m.stacks = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemPolicySetsGetResponse_PolicySetsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemPolicySetsGetResponse_PolicySetsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOotbPolicies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPoliciesable) + GetOotbPolicyLibraries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPolicyLibrariesable) + GetPolicies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable) + GetPolicySetVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetOotbPolicies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPoliciesable)() + SetOotbPolicyLibraries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OotbPolicyLibrariesable)() + SetPolicies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Policiesable)() + SetPolicySetVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemPolicySetsGetResponse instantiates a new ItemPolicySetsGetResponse and sets the default values. func NewItemPolicySetsGetResponse()(*ItemPolicySetsGetResponse) { m := &ItemPolicySetsGetResponse{ @@ -60,6 +266,22 @@ func (m *ItemPolicySetsGetResponse) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemPolicySetsGetResponse_PolicySetsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemPolicySetsGetResponse_PolicySetsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemPolicySetsGetResponse_PolicySetsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +304,11 @@ func (m *ItemPolicySetsGetResponse) GetFieldDeserializers()(map[string]func(i878 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemPolicySetsGetResponse_PolicySetsGetResponse_includedable when successful +func (m *ItemPolicySetsGetResponse) GetIncluded()([]ItemPolicySetsGetResponse_PolicySetsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemPolicySetsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +333,18 @@ func (m *ItemPolicySetsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +373,10 @@ func (m *ItemPolicySetsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemPolicySetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemPolicySetsGetResponse) SetIncluded(value []ItemPolicySetsGetResponse_PolicySetsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemPolicySetsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +389,11 @@ type ItemPolicySetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable) + GetIncluded()([]ItemPolicySetsGetResponse_PolicySetsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemPolicySetsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable)() + SetIncluded(value []ItemPolicySetsGetResponse_PolicySetsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemPolicySetsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_policy_sets_request_builder.go b/v2/api/organizations/item_policy_sets_request_builder.go index ec7c9e4c9..11a5400ac 100644 --- a/v2/api/organizations/item_policy_sets_request_builder.go +++ b/v2/api/organizations/item_policy_sets_request_builder.go @@ -24,6 +24,8 @@ type ItemPolicySetsRequestBuilderGetQueryParameters struct { FilterootbPolicy *string "uriparametername:\"filter%5Bootb%2Dpolicy%5D\"" // If true, only return versioned policy sets. If false, only return non-versioned policy sets. Filterversioned *bool "uriparametername:\"filter%5Bversioned%5D\"" + // Optionally side-load the specified relationships. + Include []i68c0d88f19bdb5f6799704485b8f56a81066e073df17782a0dcb2f0a7e75c596.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -34,7 +36,7 @@ type ItemPolicySetsRequestBuilderGetQueryParameters struct { // NewItemPolicySetsRequestBuilderInternal instantiates a new ItemPolicySetsRequestBuilder and sets the default values. func NewItemPolicySetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPolicySetsRequestBuilder) { m := &ItemPolicySetsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/policy-sets{?fields%5Bpolicy%2Dsets%5D,filter%5Bkind%5D*,filter%5Bootb%2Dpolicy%5D*,filter%5Bversioned%5D*,page%5Bnumber%5D*,page%5Bsize%5D*,search%5Bname%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/policy-sets{?fields%5Bpolicy%2Dsets%5D,filter%5Bkind%5D*,filter%5Bootb%2Dpolicy%5D*,filter%5Bversioned%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*,search%5Bname%5D*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_projects_get_response.go b/v2/api/organizations/item_projects_get_response.go index 092d0f284..d850a543b 100644 --- a/v2/api/organizations/item_projects_get_response.go +++ b/v2/api/organizations/item_projects_get_response.go @@ -13,6 +13,8 @@ type ItemProjectsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemProjectsGetResponse) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateEffectiveTagBindingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemProjectsGetResponse) GetFieldDeserializers()(map[string]func(i878a8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []EffectiveTagBindingsable when successful +func (m *ItemProjectsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemProjectsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemProjectsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemProjectsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemProjectsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemProjectsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemProjectsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemProjectsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemProjectsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemProjectsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_projects_request_builder.go b/v2/api/organizations/item_projects_request_builder.go index 9e318b617..e0de8e329 100644 --- a/v2/api/organizations/item_projects_request_builder.go +++ b/v2/api/organizations/item_projects_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i397d98037abac0e4fdb5cc249e80f1867a2ca80f7f6723a7988ed951da417f32 "github.com/hashicorp/go-tfe/v2/api/organizations/item/projects" ) // ItemProjectsRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\projects @@ -23,6 +24,8 @@ type ItemProjectsRequestBuilderGetQueryParameters struct { FilterpermissionscreateWorkspace *bool "uriparametername:\"filter%5Bpermissions%5D%5Bcreate%2Dworkspace%5D\"" // If present, returns a list of projects that the authenticated user can update. Filterpermissionsupdate *bool "uriparametername:\"filter%5Bpermissions%5D%5Bupdate%5D\"" + // Optionally side-load the specified relationships. + Include []i397d98037abac0e4fdb5cc249e80f1867a2ca80f7f6723a7988ed951da417f32.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -33,7 +36,7 @@ type ItemProjectsRequestBuilderGetQueryParameters struct { // NewItemProjectsRequestBuilderInternal instantiates a new ItemProjectsRequestBuilder and sets the default values. func NewItemProjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProjectsRequestBuilder) { m := &ItemProjectsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/projects{?fields%5Bprojects%5D,filter%5Bnames%5D*,filter%5Bpermissions%5D%5Bcreate%2Dworkspace%5D*,filter%5Bpermissions%5D%5Bupdate%5D*,page%5Bnumber%5D*,page%5Bsize%5D*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/projects{?fields%5Bprojects%5D,filter%5Bnames%5D*,filter%5Bpermissions%5D%5Bcreate%2Dworkspace%5D*,filter%5Bpermissions%5D%5Bupdate%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*,sort*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_provider_sets_item_with_provider_escaped_set_escaped_name_get_response.go b/v2/api/organizations/item_provider_sets_item_with_provider_escaped_set_escaped_name_get_response.go index 3a1c3d68d..ec8eb3900 100644 --- a/v2/api/organizations/item_provider_sets_item_with_provider_escaped_set_escaped_name_get_response.go +++ b/v2/api/organizations/item_provider_sets_item_with_provider_escaped_set_escaped_name_get_response.go @@ -4,175 +4,191 @@ package organizations import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemProviderSetsItemWithProvider_set_nameGetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelope - // The included property - included []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelope + // The included property + included []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable } + // ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable type ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable } + // NewItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name instantiates a new ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name and sets the default values. -func NewItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name()(*ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) { - m := &ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name{ - } - return m +func NewItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name() *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name { + m := &ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name{} + return m } + // CreateItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { - result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) - } - } - } - } - return result, nil +func CreateItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetProjects() != nil { - return m.GetProjects().GetFieldDeserializers() - } else if m.GetWorkspaces() != nil { - return m.GetWorkspaces().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetIsComposedType()(bool) { - return true +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetIsComposedType() bool { + return true } + // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { - return m.projects +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable { + return m.projects } + // GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable // returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { - return m.workspaces +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable { + return m.workspaces } + // Serialize serializes information the current object -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetProjects() != nil { - err := writer.WriteObjectValue("", m.GetProjects()) - if err != nil { - return err - } - } else if m.GetWorkspaces() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaces()) - if err != nil { - return err - } - } - return nil +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil } + // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { - m.projects = value +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + m.projects = value } + // SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { - m.workspaces = value +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_name) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + m.workspaces = value } + type ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) - SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) } + // NewItemProviderSetsItemWithProvider_set_nameGetResponse instantiates a new ItemProviderSetsItemWithProvider_set_nameGetResponse and sets the default values. -func NewItemProviderSetsItemWithProvider_set_nameGetResponse()(*ItemProviderSetsItemWithProvider_set_nameGetResponse) { - m := &ItemProviderSetsItemWithProvider_set_nameGetResponse{ - ProviderSetsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProviderSetsEnvelope(), - } - return m +func NewItemProviderSetsItemWithProvider_set_nameGetResponse() *ItemProviderSetsItemWithProvider_set_nameGetResponse { + m := &ItemProviderSetsItemWithProvider_set_nameGetResponse{ + ProviderSetsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProviderSetsEnvelope(), + } + return m } + // CreateItemProviderSetsItemWithProvider_set_nameGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemProviderSetsItemWithProvider_set_nameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemProviderSetsItemWithProvider_set_nameGetResponse(), nil +func CreateItemProviderSetsItemWithProvider_set_nameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemProviderSetsItemWithProvider_set_nameGetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.ProviderSetsEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.ProviderSetsEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable when successful -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) GetIncluded()([]ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable) { - return m.included +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) GetIncluded() []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable { + return m.included } + // Serialize serializes information the current object -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.ProviderSetsEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.ProviderSetsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) SetIncluded(value []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable)() { - m.included = value +func (m *ItemProviderSetsItemWithProvider_set_nameGetResponse) SetIncluded(value []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable) { + m.included = value } + type ItemProviderSetsItemWithProvider_set_nameGetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable - GetIncluded()([]ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable) - SetIncluded(value []ItemProviderSetsItemWithProvider_set_nameGetResponse_WithProvider_set_nameable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable } diff --git a/v2/api/organizations/item_registry_modules_item_item_item_with_provider_item_request_builder.go b/v2/api/organizations/item_registry_modules_item_item_item_with_provider_item_request_builder.go index bb3175827..463e6aa4b 100644 --- a/v2/api/organizations/item_registry_modules_item_item_item_with_provider_item_request_builder.go +++ b/v2/api/organizations/item_registry_modules_item_item_item_with_provider_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i66bba72cca8aa4ddbdde42e0c4b0e5420f921574895484b21bb4a444be9c3d5a "github.com/hashicorp/go-tfe/v2/api/organizations/item/registrymodules/item/item/item/item" ) // ItemRegistryModulesItemItemItemWithProviderItemRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\registry-modules\{registry_name}\{namespace}\{name}\{provider} @@ -17,11 +18,13 @@ type ItemRegistryModulesItemItemItemWithProviderItemRequestBuilder struct { type ItemRegistryModulesItemItemItemWithProviderItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for registry-modules resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsregistryModules []string "uriparametername:\"fields%5Bregistry%2Dmodules%5D\"" + // Optionally side-load the specified relationships. + Include []i66bba72cca8aa4ddbdde42e0c4b0e5420f921574895484b21bb4a444be9c3d5a.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewItemRegistryModulesItemItemItemWithProviderItemRequestBuilderInternal instantiates a new ItemRegistryModulesItemItemItemWithProviderItemRequestBuilder and sets the default values. func NewItemRegistryModulesItemItemItemWithProviderItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRegistryModulesItemItemItemWithProviderItemRequestBuilder) { m := &ItemRegistryModulesItemItemItemWithProviderItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/registry-modules/{registry_name}/{namespace}/{name}/{provider}{?fields%5Bregistry%2Dmodules%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/registry-modules/{registry_name}/{namespace}/{name}/{provider}{?fields%5Bregistry%2Dmodules%5D,include}", pathParameters), } return m } diff --git a/v2/api/organizations/item_runs_get_response.go b/v2/api/organizations/item_runs_get_response.go index 1a03878ab..207ee48a1 100644 --- a/v2/api/organizations/item_runs_get_response.go +++ b/v2/api/organizations/item_runs_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,150 @@ type ItemRunsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // The included property + included []ItemRunsGetResponse_RunsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemRunsGetResponse_metaable } +// ItemRunsGetResponse_RunsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemRunsGetResponse_RunsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemRunsGetResponse_RunsGetResponse_included instantiates a new ItemRunsGetResponse_RunsGetResponse_included and sets the default values. +func NewItemRunsGetResponse_RunsGetResponse_included()(*ItemRunsGetResponse_RunsGetResponse_included) { + m := &ItemRunsGetResponse_RunsGetResponse_included{ + } + return m +} +// CreateItemRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemRunsGetResponse_RunsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + return m.configurationVersions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemRunsGetResponse_RunsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemRunsGetResponse_RunsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemRunsGetResponse instantiates a new ItemRunsGetResponse and sets the default values. func NewItemRunsGetResponse()(*ItemRunsGetResponse) { m := &ItemRunsGetResponse{ @@ -60,6 +200,22 @@ func (m *ItemRunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemRunsGetResponse_RunsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemRunsGetResponse_RunsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +238,11 @@ func (m *ItemRunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d23 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemRunsGetResponse_RunsGetResponse_includedable when successful +func (m *ItemRunsGetResponse) GetIncluded()([]ItemRunsGetResponse_RunsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemRunsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +267,18 @@ func (m *ItemRunsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +307,10 @@ func (m *ItemRunsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemRunsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemRunsGetResponse) SetIncluded(value []ItemRunsGetResponse_RunsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemRunsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +323,11 @@ type ItemRunsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetIncluded()([]ItemRunsGetResponse_RunsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRunsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetIncluded(value []ItemRunsGetResponse_RunsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRunsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_runs_request_builder.go b/v2/api/organizations/item_runs_request_builder.go index dd7382a9c..71dcd9c16 100644 --- a/v2/api/organizations/item_runs_request_builder.go +++ b/v2/api/organizations/item_runs_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i662de40c7dc082e5b0f6b2db3b372c023443acc6df2c9da998eafdfd24ed6ba7 "github.com/hashicorp/go-tfe/v2/api/organizations/item/runs" ) // ItemRunsRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\runs @@ -23,6 +24,8 @@ type ItemRunsRequestBuilderGetQueryParameters struct { Filterstatus *string "uriparametername:\"filter%5Bstatus%5D\"" // Filter by timeframe. Must be a numeric year from 2018 through the current calendar year, or "year" for the last 12 months (the default). Filtertimeframe *string "uriparametername:\"filter%5Btimeframe%5D\"" + // Optionally side-load the specified relationships. + Include []i662de40c7dc082e5b0f6b2db3b372c023443acc6df2c9da998eafdfd24ed6ba7.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -31,7 +34,7 @@ type ItemRunsRequestBuilderGetQueryParameters struct { // NewItemRunsRequestBuilderInternal instantiates a new ItemRunsRequestBuilder and sets the default values. func NewItemRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRunsRequestBuilder) { m := &ItemRunsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/runs{?fields%5Bruns%5D,filter%5Boperation%5D*,filter%5Bstatus%5D*,filter%5Btimeframe%5D*,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/runs{?fields%5Bruns%5D,filter%5Boperation%5D*,filter%5Bstatus%5D*,filter%5Btimeframe%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_task_configs_for_owner_request_builder.go b/v2/api/organizations/item_task_configs_for_owner_request_builder.go index db5b8fa15..3e179c72a 100644 --- a/v2/api/organizations/item_task_configs_for_owner_request_builder.go +++ b/v2/api/organizations/item_task_configs_for_owner_request_builder.go @@ -18,6 +18,8 @@ type ItemTaskConfigsForOwnerRequestBuilder struct { type ItemTaskConfigsForOwnerRequestBuilderGetQueryParameters struct { // Return only the specified fields for task-configs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldstaskConfigs []string "uriparametername:\"fields%5Btask%2Dconfigs%5D\"" + // Optionally side-load the specified relationships. + Include []i1b53b561cb18bd63c1d8748a8c7f7559b698912f8cec483117e58bb8532017ef.GetIncludeQueryParameterType "uriparametername:\"include\"" // The ID of the owner. For organization owners, this is the organization name. Qowner_id *string "uriparametername:\"q%5Bowner_id%5D\"" // The type of the owner. @@ -28,7 +30,7 @@ type ItemTaskConfigsForOwnerRequestBuilderGetQueryParameters struct { // NewItemTaskConfigsForOwnerRequestBuilderInternal instantiates a new ItemTaskConfigsForOwnerRequestBuilder and sets the default values. func NewItemTaskConfigsForOwnerRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTaskConfigsForOwnerRequestBuilder) { m := &ItemTaskConfigsForOwnerRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/task-configs/for-owner?q[owner_id]={q%5Bowner_id%5D}&q[owner_type]={q%5Bowner_type%5D}&q[task_id]={q%5Btask_id%5D}{&fields%5Btask%2Dconfigs%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/task-configs/for-owner?q[owner_id]={q%5Bowner_id%5D}&q[owner_type]={q%5Bowner_type%5D}&q[task_id]={q%5Btask_id%5D}{&fields%5Btask%2Dconfigs%5D,include}", pathParameters), } return m } diff --git a/v2/api/organizations/item_task_configs_get_response.go b/v2/api/organizations/item_task_configs_get_response.go index 861db904c..ecfda2cad 100644 --- a/v2/api/organizations/item_task_configs_get_response.go +++ b/v2/api/organizations/item_task_configs_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,150 @@ type ItemTaskConfigsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsable + // The included property + included []ItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemTaskConfigsGetResponse_metaable } +// ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable + tasks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemTaskConfigsGetResponse_TaskConfigsGetResponse_included instantiates a new ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included and sets the default values. +func NewItemTaskConfigsGetResponse_TaskConfigsGetResponse_included()(*ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) { + m := &ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included{ + } + return m +} +// CreateItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemTaskConfigsGetResponse_TaskConfigsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tasks") { + result.SetTasks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTasks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetTasks() != nil { + return m.GetTasks().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable +// returns a Organizationsable when successful +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) { + return m.organizations +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetTasks gets the tasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable +// returns a Tasksable when successful +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) GetTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable) { + return m.tasks +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetTasks() != nil { + err := writer.WriteObjectValue("", m.GetTasks()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() { + m.organizations = value +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetTasks sets the tasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) SetTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable)() { + m.tasks = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemTaskConfigsGetResponse_TaskConfigsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable) + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Organizationsable)() + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Tasksable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemTaskConfigsGetResponse instantiates a new ItemTaskConfigsGetResponse and sets the default values. func NewItemTaskConfigsGetResponse()(*ItemTaskConfigsGetResponse) { m := &ItemTaskConfigsGetResponse{ @@ -60,6 +200,22 @@ func (m *ItemTaskConfigsGetResponse) GetFieldDeserializers()(map[string]func(i87 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +238,11 @@ func (m *ItemTaskConfigsGetResponse) GetFieldDeserializers()(map[string]func(i87 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedable when successful +func (m *ItemTaskConfigsGetResponse) GetIncluded()([]ItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemTaskConfigsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +267,18 @@ func (m *ItemTaskConfigsGetResponse) Serialize(writer i878a80d2330e89d26896388a3 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +307,10 @@ func (m *ItemTaskConfigsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemTaskConfigsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemTaskConfigsGetResponse) SetIncluded(value []ItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemTaskConfigsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +323,11 @@ type ItemTaskConfigsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsable) + GetIncluded()([]ItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemTaskConfigsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsable)() + SetIncluded(value []ItemTaskConfigsGetResponse_TaskConfigsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemTaskConfigsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_task_configs_request_builder.go b/v2/api/organizations/item_task_configs_request_builder.go index e1f8a84e5..6a9728883 100644 --- a/v2/api/organizations/item_task_configs_request_builder.go +++ b/v2/api/organizations/item_task_configs_request_builder.go @@ -24,6 +24,8 @@ type ItemTaskConfigsRequestBuilderGetQueryParameters struct { Filtertarget_type *ie5be88d480c1652fa10a8aabe120abc785cf042db2d36c2b2f202f3fed9f2717.GetFilterTarget_typeQueryParameterType "uriparametername:\"filter%5Btarget_type%5D\"" // Restricts results to task configurations whose task belongs to the given category. Filtertask_category *ie5be88d480c1652fa10a8aabe120abc785cf042db2d36c2b2f202f3fed9f2717.GetFilterTask_categoryQueryParameterType "uriparametername:\"filter%5Btask_category%5D\"" + // Optionally side-load the specified relationships. + Include []ie5be88d480c1652fa10a8aabe120abc785cf042db2d36c2b2f202f3fed9f2717.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -32,7 +34,7 @@ type ItemTaskConfigsRequestBuilderGetQueryParameters struct { // NewItemTaskConfigsRequestBuilderInternal instantiates a new ItemTaskConfigsRequestBuilder and sets the default values. func NewItemTaskConfigsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTaskConfigsRequestBuilder) { m := &ItemTaskConfigsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/task-configs?filter[target_id]={filter%5Btarget_id%5D}&filter[target_type]={filter%5Btarget_type%5D}{&fields%5Btask%2Dconfigs%5D,filter%5Btask_category%5D*,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/task-configs?filter[target_id]={filter%5Btarget_id%5D}&filter[target_type]={filter%5Btarget_type%5D}{&fields%5Btask%2Dconfigs%5D,filter%5Btask_category%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_team_tokens_get_response.go b/v2/api/organizations/item_team_tokens_get_response.go index 1280536d0..4869e8018 100644 --- a/v2/api/organizations/item_team_tokens_get_response.go +++ b/v2/api/organizations/item_team_tokens_get_response.go @@ -13,6 +13,8 @@ type ItemTeamTokensGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AuthenticationTokensable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemTeamTokensGetResponse) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTeamsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemTeamTokensGetResponse) GetFieldDeserializers()(map[string]func(i878 } return res } +// GetIncluded gets the included property value. The included property +// returns a []Teamsable when successful +func (m *ItemTeamTokensGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemTeamTokensGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemTeamTokensGetResponse) Serialize(writer i878a80d2330e89d26896388a3f return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemTeamTokensGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemTeamTokensGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AuthenticationTokensable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemTeamTokensGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemTeamTokensGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemTeamTokensGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AuthenticationTokensable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemTeamTokensGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AuthenticationTokensable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemTeamTokensGetResponse_metaable)() } diff --git a/v2/api/organizations/item_team_tokens_request_builder.go b/v2/api/organizations/item_team_tokens_request_builder.go index d3fb1db12..bf532d791 100644 --- a/v2/api/organizations/item_team_tokens_request_builder.go +++ b/v2/api/organizations/item_team_tokens_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i1b2a1309d38709d709210d78197345fb7c6b974298025cfa1c0087c96c753fe2 "github.com/hashicorp/go-tfe/v2/api/organizations/item/teamtokens" ) // ItemTeamTokensRequestBuilder builds and executes requests for operations under \organizations\{organization_name}\team-tokens @@ -19,6 +20,8 @@ type ItemTeamTokensRequestBuilderGetQueryParameters struct { FieldsauthenticationTokens []string "uriparametername:\"fields%5Bauthentication%2Dtokens%5D\"" // Filter by token expiry status. Accepts a comma-separated list of any of: `active`, `expiring_in_7_days`, `expiring_in_30_days`, `expired`, `no_expiration`. Multiple values are combined with OR. Filterexpiry_status *string "uriparametername:\"filter%5Bexpiry_status%5D\"" + // Optionally side-load the specified relationships. + Include []i1b2a1309d38709d709210d78197345fb7c6b974298025cfa1c0087c96c753fe2.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -29,7 +32,7 @@ type ItemTeamTokensRequestBuilderGetQueryParameters struct { // NewItemTeamTokensRequestBuilderInternal instantiates a new ItemTeamTokensRequestBuilder and sets the default values. func NewItemTeamTokensRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamTokensRequestBuilder) { m := &ItemTeamTokensRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/team-tokens{?fields%5Bauthentication%2Dtokens%5D,filter%5Bexpiry_status%5D*,page%5Bnumber%5D*,page%5Bsize%5D*,q*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/team-tokens{?fields%5Bauthentication%2Dtokens%5D,filter%5Bexpiry_status%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*,q*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_varsets_get_response.go b/v2/api/organizations/item_varsets_get_response.go index f73906a74..41d54eb35 100644 --- a/v2/api/organizations/item_varsets_get_response.go +++ b/v2/api/organizations/item_varsets_get_response.go @@ -4,6 +4,7 @@ package organizations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,150 @@ type ItemVarsetsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable + // The included property + included []ItemVarsetsGetResponse_VarsetsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemVarsetsGetResponse_metaable } +// ItemVarsetsGetResponse_VarsetsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemVarsetsGetResponse_VarsetsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + stacks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemVarsetsGetResponse_VarsetsGetResponse_included instantiates a new ItemVarsetsGetResponse_VarsetsGetResponse_included and sets the default values. +func NewItemVarsetsGetResponse_VarsetsGetResponse_included()(*ItemVarsetsGetResponse_VarsetsGetResponse_included) { + m := &ItemVarsetsGetResponse_VarsetsGetResponse_included{ + } + return m +} +// CreateItemVarsetsGetResponse_VarsetsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemVarsetsGetResponse_VarsetsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemVarsetsGetResponse_VarsetsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetStacks gets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +// returns a Stacksable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) { + return m.stacks +} +// GetVars gets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +// returns a Varsable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.vars +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetStacks sets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() { + m.stacks = value +} +// SetVars sets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.vars = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemVarsetsGetResponse_VarsetsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) + GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() + SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemVarsetsGetResponse instantiates a new ItemVarsetsGetResponse and sets the default values. func NewItemVarsetsGetResponse()(*ItemVarsetsGetResponse) { m := &ItemVarsetsGetResponse{ @@ -60,6 +200,22 @@ func (m *ItemVarsetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemVarsetsGetResponse_VarsetsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemVarsetsGetResponse_VarsetsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemVarsetsGetResponse_VarsetsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +238,11 @@ func (m *ItemVarsetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemVarsetsGetResponse_VarsetsGetResponse_includedable when successful +func (m *ItemVarsetsGetResponse) GetIncluded()([]ItemVarsetsGetResponse_VarsetsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemVarsetsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +267,18 @@ func (m *ItemVarsetsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +307,10 @@ func (m *ItemVarsetsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemVarsetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemVarsetsGetResponse) SetIncluded(value []ItemVarsetsGetResponse_VarsetsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemVarsetsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +323,11 @@ type ItemVarsetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable) + GetIncluded()([]ItemVarsetsGetResponse_VarsetsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemVarsetsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable)() + SetIncluded(value []ItemVarsetsGetResponse_VarsetsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemVarsetsGetResponse_metaable)() } diff --git a/v2/api/organizations/item_varsets_request_builder.go b/v2/api/organizations/item_varsets_request_builder.go index e3063cdc4..efda462c6 100644 --- a/v2/api/organizations/item_varsets_request_builder.go +++ b/v2/api/organizations/item_varsets_request_builder.go @@ -20,6 +20,8 @@ type ItemVarsetsRequestBuilderGetQueryParameters struct { Fieldsvarsets []string "uriparametername:\"fields%5Bvarsets%5D\"" // When true, returns only global variable sets. When false, returns only non-global variable sets. Filterglobal *bool "uriparametername:\"filter%5Bglobal%5D\"" + // Optionally side-load the specified relationships. + Include []iaa4370d8ea01f45667d0554312eb3b9db07ee7e0ffbd736545f4f85ce8c471a3.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -32,7 +34,7 @@ type ItemVarsetsRequestBuilderGetQueryParameters struct { // NewItemVarsetsRequestBuilderInternal instantiates a new ItemVarsetsRequestBuilder and sets the default values. func NewItemVarsetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemVarsetsRequestBuilder) { m := &ItemVarsetsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/varsets{?fields%5Bvarsets%5D,filter%5Bglobal%5D*,page%5Bnumber%5D*,page%5Bsize%5D*,q*,scope*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_name}/varsets{?fields%5Bvarsets%5D,filter%5Bglobal%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*,q*,scope*}", pathParameters), } return m } diff --git a/v2/api/organizations/item_with_organization_escaped_name_get_response.go b/v2/api/organizations/item_with_organization_escaped_name_get_response.go index 4240bee68..96ddd2f3e 100644 --- a/v2/api/organizations/item_with_organization_escaped_name_get_response.go +++ b/v2/api/organizations/item_with_organization_escaped_name_get_response.go @@ -4,219 +4,239 @@ package organizations import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemWithOrganization_nameGetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelope - // The included property - included []ItemWithOrganization_nameGetResponse_WithOrganization_nameable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelope + // The included property + included []ItemWithOrganization_nameGetResponse_WithOrganization_nameable } + // ItemWithOrganization_nameGetResponse_WithOrganization_name composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable type ItemWithOrganization_nameGetResponse_WithOrganization_name struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable - entitlementSets i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable - onboardingTaskLists i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable - subscriptions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable + entitlementSets i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable + onboardingTaskLists i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable + subscriptions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable } + // NewItemWithOrganization_nameGetResponse_WithOrganization_name instantiates a new ItemWithOrganization_nameGetResponse_WithOrganization_name and sets the default values. -func NewItemWithOrganization_nameGetResponse_WithOrganization_name()(*ItemWithOrganization_nameGetResponse_WithOrganization_name) { - m := &ItemWithOrganization_nameGetResponse_WithOrganization_name{ - } - return m +func NewItemWithOrganization_nameGetResponse_WithOrganization_name() *ItemWithOrganization_nameGetResponse_WithOrganization_name { + m := &ItemWithOrganization_nameGetResponse_WithOrganization_name{} + return m } + // CreateItemWithOrganization_nameGetResponse_WithOrganization_nameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithOrganization_nameGetResponse_WithOrganization_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWithOrganization_nameGetResponse_WithOrganization_name() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "entitlement-sets") { - result.SetEntitlementSets(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEntitlementSets()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "onboarding-task-lists") { - result.SetOnboardingTaskLists(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOnboardingTaskLists()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { - result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "subscriptions") { - result.SetSubscriptions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewSubscriptions()) - } - } - } - } - return result, nil +func CreateItemWithOrganization_nameGetResponse_WithOrganization_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithOrganization_nameGetResponse_WithOrganization_name() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "entitlement-sets") { + result.SetEntitlementSets(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEntitlementSets()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "onboarding-task-lists") { + result.SetOnboardingTaskLists(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOnboardingTaskLists()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "subscriptions") { + result.SetSubscriptions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewSubscriptions()) + } + } + } + } + return result, nil } + // GetEntitlementSets gets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable // returns a EntitlementSetsable when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) { - return m.entitlementSets +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetEntitlementSets() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable { + return m.entitlementSets } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetEntitlementSets() != nil { - return m.GetEntitlementSets().GetFieldDeserializers() - } else if m.GetOnboardingTaskLists() != nil { - return m.GetOnboardingTaskLists().GetFieldDeserializers() - } else if m.GetProjects() != nil { - return m.GetProjects().GetFieldDeserializers() - } else if m.GetSubscriptions() != nil { - return m.GetSubscriptions().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetEntitlementSets() != nil { + return m.GetEntitlementSets().GetFieldDeserializers() + } else if m.GetOnboardingTaskLists() != nil { + return m.GetOnboardingTaskLists().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetSubscriptions() != nil { + return m.GetSubscriptions().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetIsComposedType()(bool) { - return true +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetIsComposedType() bool { + return true } + // GetOnboardingTaskLists gets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable // returns a OnboardingTaskListsable when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) { - return m.onboardingTaskLists +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetOnboardingTaskLists() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable { + return m.onboardingTaskLists } + // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { - return m.projects +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable { + return m.projects } + // GetSubscriptions gets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable // returns a Subscriptionsable when successful -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { - return m.subscriptions +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) GetSubscriptions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable { + return m.subscriptions } + // Serialize serializes information the current object -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetEntitlementSets() != nil { - err := writer.WriteObjectValue("", m.GetEntitlementSets()) - if err != nil { - return err - } - } else if m.GetOnboardingTaskLists() != nil { - err := writer.WriteObjectValue("", m.GetOnboardingTaskLists()) - if err != nil { - return err - } - } else if m.GetProjects() != nil { - err := writer.WriteObjectValue("", m.GetProjects()) - if err != nil { - return err - } - } else if m.GetSubscriptions() != nil { - err := writer.WriteObjectValue("", m.GetSubscriptions()) - if err != nil { - return err - } - } - return nil +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetEntitlementSets() != nil { + err := writer.WriteObjectValue("", m.GetEntitlementSets()) + if err != nil { + return err + } + } else if m.GetOnboardingTaskLists() != nil { + err := writer.WriteObjectValue("", m.GetOnboardingTaskLists()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetSubscriptions() != nil { + err := writer.WriteObjectValue("", m.GetSubscriptions()) + if err != nil { + return err + } + } + return nil } + // SetEntitlementSets sets the entitlementSets property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() { - m.entitlementSets = value +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) { + m.entitlementSets = value } + // SetOnboardingTaskLists sets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() { - m.onboardingTaskLists = value +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) { + m.onboardingTaskLists = value } + // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { - m.projects = value +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + m.projects = value } + // SetSubscriptions sets the subscriptions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable -func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() { - m.subscriptions = value +func (m *ItemWithOrganization_nameGetResponse_WithOrganization_name) SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) { + m.subscriptions = value } + type ItemWithOrganization_nameGetResponse_WithOrganization_nameable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) - GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) - GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) - SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() - SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() - SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEntitlementSets() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable + GetOnboardingTaskLists() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable + GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + GetSubscriptions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable + SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) + SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) } + // NewItemWithOrganization_nameGetResponse instantiates a new ItemWithOrganization_nameGetResponse and sets the default values. -func NewItemWithOrganization_nameGetResponse()(*ItemWithOrganization_nameGetResponse) { - m := &ItemWithOrganization_nameGetResponse{ - OrganizationsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsEnvelope(), - } - return m +func NewItemWithOrganization_nameGetResponse() *ItemWithOrganization_nameGetResponse { + m := &ItemWithOrganization_nameGetResponse{ + OrganizationsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsEnvelope(), + } + return m } + // CreateItemWithOrganization_nameGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithOrganization_nameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemWithOrganization_nameGetResponse(), nil +func CreateItemWithOrganization_nameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithOrganization_nameGetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithOrganization_nameGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.OrganizationsEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWithOrganization_nameGetResponse_WithOrganization_nameFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemWithOrganization_nameGetResponse_WithOrganization_nameable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemWithOrganization_nameGetResponse_WithOrganization_nameable) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemWithOrganization_nameGetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.OrganizationsEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithOrganization_nameGetResponse_WithOrganization_nameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithOrganization_nameGetResponse_WithOrganization_nameable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithOrganization_nameGetResponse_WithOrganization_nameable) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemWithOrganization_nameGetResponse_WithOrganization_nameable when successful -func (m *ItemWithOrganization_nameGetResponse) GetIncluded()([]ItemWithOrganization_nameGetResponse_WithOrganization_nameable) { - return m.included +func (m *ItemWithOrganization_nameGetResponse) GetIncluded() []ItemWithOrganization_nameGetResponse_WithOrganization_nameable { + return m.included } + // Serialize serializes information the current object -func (m *ItemWithOrganization_nameGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.OrganizationsEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemWithOrganization_nameGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.OrganizationsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemWithOrganization_nameGetResponse) SetIncluded(value []ItemWithOrganization_nameGetResponse_WithOrganization_nameable)() { - m.included = value +func (m *ItemWithOrganization_nameGetResponse) SetIncluded(value []ItemWithOrganization_nameGetResponse_WithOrganization_nameable) { + m.included = value } + type ItemWithOrganization_nameGetResponseable interface { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelopeable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetIncluded()([]ItemWithOrganization_nameGetResponse_WithOrganization_nameable) - SetIncluded(value []ItemWithOrganization_nameGetResponse_WithOrganization_nameable)() + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsEnvelopeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable } diff --git a/v2/api/organizations/item_workspaces_item_with_workspace_escaped_name_get_response.go b/v2/api/organizations/item_workspaces_item_with_workspace_escaped_name_get_response.go index 6c2a93aee..8393662dd 100644 --- a/v2/api/organizations/item_workspaces_item_with_workspace_escaped_name_get_response.go +++ b/v2/api/organizations/item_workspaces_item_with_workspace_escaped_name_get_response.go @@ -4,505 +4,551 @@ package organizations import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemWorkspacesItemWithWorkspace_nameGetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelope - // The included property - included []ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelope + // The included property + included []ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable } + // ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable type ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable - agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable - applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable - assessmentResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable - configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable - effectiveTagBindings i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable - ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable - noCodeModules i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable - noCodeModuleVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable - organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable - plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable - runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable - stateVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable - users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable - vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable - workspaceOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable - workspaceReadme i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + assessmentResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + effectiveTagBindings i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable + noCodeModules i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable + noCodeModuleVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + stateVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable + workspaceOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable + workspaceReadme i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable } + // NewItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included instantiates a new ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included and sets the default values. -func NewItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included()(*ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) { - m := &ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included{ - } - return m +func NewItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included() *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included { + m := &ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included{} + return m } + // CreateItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { - result.SetAgentPools(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAgentPools()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { - result.SetApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewApplies()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "assessment-results") { - result.SetAssessmentResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAssessmentResults()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { - result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "effective-tag-bindings") { - result.SetEffectiveTagBindings(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEffectiveTagBindings()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { - result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-modules") { - result.SetNoCodeModules(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModules()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-module-versions") { - result.SetNoCodeModuleVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModuleVersions()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { - result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { - result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { - result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { - result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-versions") { - result.SetStateVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStateVersions()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { - result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { - result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-outputs") { - result.SetWorkspaceOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceOutputs()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-readme") { - result.SetWorkspaceReadme(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceReadme()) - } - } - } - } - return result, nil +func CreateItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "assessment-results") { + result.SetAssessmentResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAssessmentResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "effective-tag-bindings") { + result.SetEffectiveTagBindings(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEffectiveTagBindings()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-modules") { + result.SetNoCodeModules(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModules()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-module-versions") { + result.SetNoCodeModuleVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModuleVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-versions") { + result.SetStateVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStateVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-outputs") { + result.SetWorkspaceOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-readme") { + result.SetWorkspaceReadme(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceReadme()) + } + } + } + } + return result, nil } + // GetAgentPools gets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable // returns a AgentPoolsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { - return m.agentPools +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetAgentPools() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable { + return m.agentPools } + // GetApplies gets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable // returns a Appliesable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { - return m.applies +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetApplies() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable { + return m.applies } + // GetAssessmentResults gets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable // returns a AssessmentResultsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) { - return m.assessmentResults +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetAssessmentResults() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable { + return m.assessmentResults } + // GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable // returns a ConfigurationVersionsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { - return m.configurationVersions +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetConfigurationVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable { + return m.configurationVersions } + // GetEffectiveTagBindings gets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable // returns a EffectiveTagBindingsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { - return m.effectiveTagBindings +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetEffectiveTagBindings() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable { + return m.effectiveTagBindings } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetAgentPools() != nil { - return m.GetAgentPools().GetFieldDeserializers() - } else if m.GetApplies() != nil { - return m.GetApplies().GetFieldDeserializers() - } else if m.GetAssessmentResults() != nil { - return m.GetAssessmentResults().GetFieldDeserializers() - } else if m.GetConfigurationVersions() != nil { - return m.GetConfigurationVersions().GetFieldDeserializers() - } else if m.GetEffectiveTagBindings() != nil { - return m.GetEffectiveTagBindings().GetFieldDeserializers() - } else if m.GetIngressAttributes() != nil { - return m.GetIngressAttributes().GetFieldDeserializers() - } else if m.GetNoCodeModules() != nil { - return m.GetNoCodeModules().GetFieldDeserializers() - } else if m.GetNoCodeModuleVersions() != nil { - return m.GetNoCodeModuleVersions().GetFieldDeserializers() - } else if m.GetOrganizations() != nil { - return m.GetOrganizations().GetFieldDeserializers() - } else if m.GetPlans() != nil { - return m.GetPlans().GetFieldDeserializers() - } else if m.GetProjects() != nil { - return m.GetProjects().GetFieldDeserializers() - } else if m.GetRuns() != nil { - return m.GetRuns().GetFieldDeserializers() - } else if m.GetStateVersions() != nil { - return m.GetStateVersions().GetFieldDeserializers() - } else if m.GetUsers() != nil { - return m.GetUsers().GetFieldDeserializers() - } else if m.GetVars() != nil { - return m.GetVars().GetFieldDeserializers() - } else if m.GetWorkspaceOutputs() != nil { - return m.GetWorkspaceOutputs().GetFieldDeserializers() - } else if m.GetWorkspaceReadme() != nil { - return m.GetWorkspaceReadme().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetAssessmentResults() != nil { + return m.GetAssessmentResults().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetEffectiveTagBindings() != nil { + return m.GetEffectiveTagBindings().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetNoCodeModules() != nil { + return m.GetNoCodeModules().GetFieldDeserializers() + } else if m.GetNoCodeModuleVersions() != nil { + return m.GetNoCodeModuleVersions().GetFieldDeserializers() + } else if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetStateVersions() != nil { + return m.GetStateVersions().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaceOutputs() != nil { + return m.GetWorkspaceOutputs().GetFieldDeserializers() + } else if m.GetWorkspaceReadme() != nil { + return m.GetWorkspaceReadme().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable // returns a IngressAttributesable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { - return m.ingressAttributes +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetIngressAttributes() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable { + return m.ingressAttributes } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetIsComposedType()(bool) { - return true +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetIsComposedType() bool { + return true } + // GetNoCodeModules gets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable // returns a NoCodeModulesable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { - return m.noCodeModules +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetNoCodeModules() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable { + return m.noCodeModules } + // GetNoCodeModuleVersions gets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable // returns a NoCodeModuleVersionsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { - return m.noCodeModuleVersions +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetNoCodeModuleVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable { + return m.noCodeModuleVersions } + // GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable // returns a OrganizationsGetResponse_Organizationsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { - return m.organizations +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetOrganizations() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable { + return m.organizations } + // GetPlans gets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable // returns a Plansable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { - return m.plans +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetPlans() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable { + return m.plans } + // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { - return m.projects +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable { + return m.projects } + // GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable // returns a Runsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { - return m.runs +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetRuns() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable { + return m.runs } + // GetStateVersions gets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable // returns a StateVersionsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) { - return m.stateVersions +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetStateVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable { + return m.stateVersions } + // GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable // returns a Usersable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { - return m.users +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetUsers() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable { + return m.users } + // GetVars gets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable // returns a Varsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { - return m.vars +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetVars() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable { + return m.vars } + // GetWorkspaceOutputs gets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable // returns a WorkspaceOutputsable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { - return m.workspaceOutputs +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetWorkspaceOutputs() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable { + return m.workspaceOutputs } + // GetWorkspaceReadme gets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable // returns a WorkspaceReadmeable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { - return m.workspaceReadme +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) GetWorkspaceReadme() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable { + return m.workspaceReadme } + // Serialize serializes information the current object -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetAgentPools() != nil { - err := writer.WriteObjectValue("", m.GetAgentPools()) - if err != nil { - return err - } - } else if m.GetApplies() != nil { - err := writer.WriteObjectValue("", m.GetApplies()) - if err != nil { - return err - } - } else if m.GetAssessmentResults() != nil { - err := writer.WriteObjectValue("", m.GetAssessmentResults()) - if err != nil { - return err - } - } else if m.GetConfigurationVersions() != nil { - err := writer.WriteObjectValue("", m.GetConfigurationVersions()) - if err != nil { - return err - } - } else if m.GetEffectiveTagBindings() != nil { - err := writer.WriteObjectValue("", m.GetEffectiveTagBindings()) - if err != nil { - return err - } - } else if m.GetIngressAttributes() != nil { - err := writer.WriteObjectValue("", m.GetIngressAttributes()) - if err != nil { - return err - } - } else if m.GetNoCodeModules() != nil { - err := writer.WriteObjectValue("", m.GetNoCodeModules()) - if err != nil { - return err - } - } else if m.GetNoCodeModuleVersions() != nil { - err := writer.WriteObjectValue("", m.GetNoCodeModuleVersions()) - if err != nil { - return err - } - } else if m.GetOrganizations() != nil { - err := writer.WriteObjectValue("", m.GetOrganizations()) - if err != nil { - return err - } - } else if m.GetPlans() != nil { - err := writer.WriteObjectValue("", m.GetPlans()) - if err != nil { - return err - } - } else if m.GetProjects() != nil { - err := writer.WriteObjectValue("", m.GetProjects()) - if err != nil { - return err - } - } else if m.GetRuns() != nil { - err := writer.WriteObjectValue("", m.GetRuns()) - if err != nil { - return err - } - } else if m.GetStateVersions() != nil { - err := writer.WriteObjectValue("", m.GetStateVersions()) - if err != nil { - return err - } - } else if m.GetUsers() != nil { - err := writer.WriteObjectValue("", m.GetUsers()) - if err != nil { - return err - } - } else if m.GetVars() != nil { - err := writer.WriteObjectValue("", m.GetVars()) - if err != nil { - return err - } - } else if m.GetWorkspaceOutputs() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaceOutputs()) - if err != nil { - return err - } - } else if m.GetWorkspaceReadme() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaceReadme()) - if err != nil { - return err - } - } - return nil +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetAssessmentResults() != nil { + err := writer.WriteObjectValue("", m.GetAssessmentResults()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetEffectiveTagBindings() != nil { + err := writer.WriteObjectValue("", m.GetEffectiveTagBindings()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetNoCodeModules() != nil { + err := writer.WriteObjectValue("", m.GetNoCodeModules()) + if err != nil { + return err + } + } else if m.GetNoCodeModuleVersions() != nil { + err := writer.WriteObjectValue("", m.GetNoCodeModuleVersions()) + if err != nil { + return err + } + } else if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetStateVersions() != nil { + err := writer.WriteObjectValue("", m.GetStateVersions()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } + } else if m.GetWorkspaceOutputs() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceOutputs()) + if err != nil { + return err + } + } else if m.GetWorkspaceReadme() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceReadme()) + if err != nil { + return err + } + } + return nil } + // SetAgentPools sets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { - m.agentPools = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { + m.agentPools = value } + // SetApplies sets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() { - m.applies = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { + m.applies = value } + // SetAssessmentResults sets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() { - m.assessmentResults = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) { + m.assessmentResults = value } + // SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { - m.configurationVersions = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + m.configurationVersions = value } + // SetEffectiveTagBindings sets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() { - m.effectiveTagBindings = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { + m.effectiveTagBindings = value } + // SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { - m.ingressAttributes = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + m.ingressAttributes = value } + // SetNoCodeModules sets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() { - m.noCodeModules = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { + m.noCodeModules = value } + // SetNoCodeModuleVersions sets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() { - m.noCodeModuleVersions = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { + m.noCodeModuleVersions = value } + // SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { - m.organizations = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { + m.organizations = value } + // SetPlans sets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() { - m.plans = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { + m.plans = value } + // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { - m.projects = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + m.projects = value } + // SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { - m.runs = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + m.runs = value } + // SetStateVersions sets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() { - m.stateVersions = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) { + m.stateVersions = value } + // SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { - m.users = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + m.users = value } + // SetVars sets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { - m.vars = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + m.vars = value } + // SetWorkspaceOutputs sets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() { - m.workspaceOutputs = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { + m.workspaceOutputs = value } + // SetWorkspaceReadme sets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() { - m.workspaceReadme = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_included) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { + m.workspaceReadme = value } + type ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) - GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) - GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) - GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) - GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) - GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) - GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) - GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) - GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) - GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) - GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) - GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) - GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) - GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) - GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) - SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() - SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() - SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() - SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() - SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() - SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() - SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() - SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() - SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() - SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() - SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() - SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() - SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() - SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() - SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() - SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + GetApplies() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + GetAssessmentResults() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + GetConfigurationVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + GetEffectiveTagBindings() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + GetIngressAttributes() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + GetNoCodeModules() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable + GetNoCodeModuleVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable + GetOrganizations() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + GetPlans() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + GetRuns() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + GetStateVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + GetUsers() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + GetVars() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + GetWorkspaceOutputs() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable + GetWorkspaceReadme() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable + SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) + SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) + SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) + SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) + SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) } + // NewItemWorkspacesItemWithWorkspace_nameGetResponse instantiates a new ItemWorkspacesItemWithWorkspace_nameGetResponse and sets the default values. -func NewItemWorkspacesItemWithWorkspace_nameGetResponse()(*ItemWorkspacesItemWithWorkspace_nameGetResponse) { - m := &ItemWorkspacesItemWithWorkspace_nameGetResponse{ - WorkspacesEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspacesEnvelope(), - } - return m +func NewItemWorkspacesItemWithWorkspace_nameGetResponse() *ItemWorkspacesItemWithWorkspace_nameGetResponse { + m := &ItemWorkspacesItemWithWorkspace_nameGetResponse{ + WorkspacesEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspacesEnvelope(), + } + return m } + // CreateItemWorkspacesItemWithWorkspace_nameGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWorkspacesItemWithWorkspace_nameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemWorkspacesItemWithWorkspace_nameGetResponse(), nil +func CreateItemWorkspacesItemWithWorkspace_nameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWorkspacesItemWithWorkspace_nameGetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.WorkspacesEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.WorkspacesEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable when successful -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse) GetIncluded()([]ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable) { - return m.included +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse) GetIncluded() []ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable { + return m.included } + // Serialize serializes information the current object -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.WorkspacesEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.WorkspacesEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse) SetIncluded(value []ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable)() { - m.included = value +func (m *ItemWorkspacesItemWithWorkspace_nameGetResponse) SetIncluded(value []ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable) { + m.included = value } + type ItemWorkspacesItemWithWorkspace_nameGetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelopeable - GetIncluded()([]ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable) - SetIncluded(value []ItemWorkspacesItemWithWorkspace_nameGetResponse_WithWorkspace_nameGetResponse_includedable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelopeable } diff --git a/v2/api/organizations/organizations_get_response.go b/v2/api/organizations/organizations_get_response.go index 6282f10ff..527c5f84e 100644 --- a/v2/api/organizations/organizations_get_response.go +++ b/v2/api/organizations/organizations_get_response.go @@ -21,10 +21,12 @@ type OrganizationsGetResponse struct { // The meta property meta OrganizationsGetResponse_metaable } -// OrganizationsGetResponse_OrganizationsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable +// OrganizationsGetResponse_OrganizationsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable type OrganizationsGetResponse_OrganizationsGetResponse_included struct { // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable entitlementSets i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable + onboardingTaskLists i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable @@ -53,6 +55,8 @@ func CreateOrganizationsGetResponse_OrganizationsGetResponse_includedFromDiscrim if mappingValue != nil { if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "entitlement-sets") { result.SetEntitlementSets(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEntitlementSets()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "onboarding-task-lists") { + result.SetOnboardingTaskLists(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOnboardingTaskLists()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "subscriptions") { @@ -73,6 +77,8 @@ func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetEntitlem func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { if m.GetEntitlementSets() != nil { return m.GetEntitlementSets().GetFieldDeserializers() + } else if m.GetOnboardingTaskLists() != nil { + return m.GetOnboardingTaskLists().GetFieldDeserializers() } else if m.GetProjects() != nil { return m.GetProjects().GetFieldDeserializers() } else if m.GetSubscriptions() != nil { @@ -85,6 +91,11 @@ func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetFieldDes func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetIsComposedType()(bool) { return true } +// GetOnboardingTaskLists gets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable +// returns a OnboardingTaskListsable when successful +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) { + return m.onboardingTaskLists +} // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { @@ -102,6 +113,11 @@ func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) Serialize(w if err != nil { return err } + } else if m.GetOnboardingTaskLists() != nil { + err := writer.WriteObjectValue("", m.GetOnboardingTaskLists()) + if err != nil { + return err + } } else if m.GetProjects() != nil { err := writer.WriteObjectValue("", m.GetProjects()) if err != nil { @@ -119,6 +135,10 @@ func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) Serialize(w func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() { m.entitlementSets = value } +// SetOnboardingTaskLists sets the onboardingTaskLists property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable +func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() { + m.onboardingTaskLists = value +} // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { m.projects = value @@ -130,9 +150,11 @@ func (m *OrganizationsGetResponse_OrganizationsGetResponse_included) SetSubscrip type OrganizationsGetResponse_OrganizationsGetResponse_includedable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetEntitlementSets()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable) + GetOnboardingTaskLists()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) GetSubscriptions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable) SetEntitlementSets(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EntitlementSetsable)() + SetOnboardingTaskLists(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OnboardingTaskListsable)() SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() SetSubscriptions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Subscriptionsable)() } diff --git a/v2/api/policies/item/get_include_query_parameter_type.go b/v2/api/policies/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..d78e65110 --- /dev/null +++ b/v2/api/policies/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + POLICY_SETS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"policy_sets"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := POLICY_SETS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "policy_sets": + result = POLICY_SETS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/policies/with_policy_escaped_item_request_builder.go b/v2/api/policies/with_policy_escaped_item_request_builder.go index 14b1cf5d9..a2a246467 100644 --- a/v2/api/policies/with_policy_escaped_item_request_builder.go +++ b/v2/api/policies/with_policy_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i1c02e1c12746a6de1bc3aef70ac934596358835569ad4764a47dba88f62eab89 "github.com/hashicorp/go-tfe/v2/api/policies/item" ) // WithPolicy_ItemRequestBuilder builds and executes requests for operations under \policies\{policy_id} @@ -17,11 +18,13 @@ type WithPolicy_ItemRequestBuilder struct { type WithPolicy_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for policies resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldspolicies []string "uriparametername:\"fields%5Bpolicies%5D\"" + // Optionally side-load the specified relationships. + Include []i1c02e1c12746a6de1bc3aef70ac934596358835569ad4764a47dba88f62eab89.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithPolicy_ItemRequestBuilderInternal instantiates a new WithPolicy_ItemRequestBuilder and sets the default values. func NewWithPolicy_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithPolicy_ItemRequestBuilder) { m := &WithPolicy_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policies/{policy_id}{?fields%5Bpolicies%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policies/{policy_id}{?fields%5Bpolicies%5D,include}", pathParameters), } return m } diff --git a/v2/api/policychecks/item/get_include_query_parameter_type.go b/v2/api/policychecks/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..24031e112 --- /dev/null +++ b/v2/api/policychecks/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + RUN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + RUNWORKSPACE_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"run", "run.workspace"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := RUN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "run": + result = RUN_GETINCLUDEQUERYPARAMETERTYPE + case "run.workspace": + result = RUNWORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/policychecks/policy_checks_item_request_builder.go b/v2/api/policychecks/policy_checks_item_request_builder.go index 39f8a7148..c3f50a90d 100644 --- a/v2/api/policychecks/policy_checks_item_request_builder.go +++ b/v2/api/policychecks/policy_checks_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + icad01a04268564501bb657fb68ea5301f04f8785f061e354d2836ba03c6f814c "github.com/hashicorp/go-tfe/v2/api/policychecks/item" ) // PolicyChecksItemRequestBuilder builds and executes requests for operations under \policy-checks\{id} @@ -17,6 +18,8 @@ type PolicyChecksItemRequestBuilder struct { type PolicyChecksItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for policy-checks resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldspolicyChecks []string "uriparametername:\"fields%5Bpolicy%2Dchecks%5D\"" + // Optionally side-load the specified relationships. + Include []icad01a04268564501bb657fb68ea5301f04f8785f061e354d2836ba03c6f814c.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property // returns a *ItemActionsRequestBuilder when successful @@ -26,7 +29,7 @@ func (m *PolicyChecksItemRequestBuilder) Actions()(*ItemActionsRequestBuilder) { // NewPolicyChecksItemRequestBuilderInternal instantiates a new PolicyChecksItemRequestBuilder and sets the default values. func NewPolicyChecksItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PolicyChecksItemRequestBuilder) { m := &PolicyChecksItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-checks/{id}{?fields%5Bpolicy%2Dchecks%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-checks/{id}{?fields%5Bpolicy%2Dchecks%5D,include}", pathParameters), } return m } diff --git a/v2/api/policysets/item/get_include_query_parameter_type.go b/v2/api/policysets/item/get_include_query_parameter_type.go index 6c27c0535..c13b1f0f8 100644 --- a/v2/api/policysets/item/get_include_query_parameter_type.go +++ b/v2/api/policysets/item/get_include_query_parameter_type.go @@ -7,17 +7,19 @@ type GetIncludeQueryParameterType int const ( POLICIES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE - PROJECTS_GETINCLUDEQUERYPARAMETERTYPE - CURRENTVERSION_GETINCLUDEQUERYPARAMETERTYPE - NEWESTVERSION_GETINCLUDEQUERYPARAMETERTYPE - WORKSPACEEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE - PROJECTEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACE_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE STACKS_GETINCLUDEQUERYPARAMETERTYPE - STACKEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + STACK_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + PROJECT_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + CURRENT_VERSION_GETINCLUDEQUERYPARAMETERTYPE + NEWEST_VERSION_GETINCLUDEQUERYPARAMETERTYPE + POLICIESOOTB_POLICY_GETINCLUDEQUERYPARAMETERTYPE + POLICIESOOTB_POLICYOOTB_POLICY_LIBRARIES_GETINCLUDEQUERYPARAMETERTYPE ) func (i GetIncludeQueryParameterType) String() string { - return []string{"policies", "workspaces", "projects", "current-version", "newest-version", "workspace-exclusions", "project-exclusions", "stacks", "stack-exclusions"}[i] + return []string{"policies", "workspaces", "workspace_exclusions", "stacks", "stack_exclusions", "projects", "project_exclusions", "current_version", "newest_version", "policies.ootb_policy", "policies.ootb_policy.ootb_policy_libraries"}[i] } func ParseGetIncludeQueryParameterType(v string) (any, error) { result := POLICIES_GETINCLUDEQUERYPARAMETERTYPE @@ -26,20 +28,24 @@ func ParseGetIncludeQueryParameterType(v string) (any, error) { result = POLICIES_GETINCLUDEQUERYPARAMETERTYPE case "workspaces": result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE - case "projects": - result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE - case "current-version": - result = CURRENTVERSION_GETINCLUDEQUERYPARAMETERTYPE - case "newest-version": - result = NEWESTVERSION_GETINCLUDEQUERYPARAMETERTYPE - case "workspace-exclusions": - result = WORKSPACEEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE - case "project-exclusions": - result = PROJECTEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "workspace_exclusions": + result = WORKSPACE_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE case "stacks": result = STACKS_GETINCLUDEQUERYPARAMETERTYPE - case "stack-exclusions": - result = STACKEXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "stack_exclusions": + result = STACK_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "project_exclusions": + result = PROJECT_EXCLUSIONS_GETINCLUDEQUERYPARAMETERTYPE + case "current_version": + result = CURRENT_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "newest_version": + result = NEWEST_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "policies.ootb_policy": + result = POLICIESOOTB_POLICY_GETINCLUDEQUERYPARAMETERTYPE + case "policies.ootb_policy.ootb_policy_libraries": + result = POLICIESOOTB_POLICYOOTB_POLICY_LIBRARIES_GETINCLUDEQUERYPARAMETERTYPE default: return nil, nil } diff --git a/v2/api/policysets/item/versions/get_include_query_parameter_type.go b/v2/api/policysets/item/versions/get_include_query_parameter_type.go new file mode 100644 index 000000000..4d4b8050a --- /dev/null +++ b/v2/api/policysets/item/versions/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package versions +type GetIncludeQueryParameterType int + +const ( + POLICY_SET_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"policy_set"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := POLICY_SET_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "policy_set": + result = POLICY_SET_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/policysets/item_relationships_request_builder.go b/v2/api/policysets/item_relationships_request_builder.go index 1393e59cc..649e9cbb5 100644 --- a/v2/api/policysets/item_relationships_request_builder.go +++ b/v2/api/policysets/item_relationships_request_builder.go @@ -39,6 +39,16 @@ func (m *ItemRelationshipsRequestBuilder) ProjectExclusions()(*ItemRelationships func (m *ItemRelationshipsRequestBuilder) Projects()(*ItemRelationshipsProjectsRequestBuilder) { return NewItemRelationshipsProjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// StackExclusions the stackExclusions property +// returns a *ItemRelationshipsStackExclusionsRequestBuilder when successful +func (m *ItemRelationshipsRequestBuilder) StackExclusions()(*ItemRelationshipsStackExclusionsRequestBuilder) { + return NewItemRelationshipsStackExclusionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Stacks the stacks property +// returns a *ItemRelationshipsStacksRequestBuilder when successful +func (m *ItemRelationshipsRequestBuilder) Stacks()(*ItemRelationshipsStacksRequestBuilder) { + return NewItemRelationshipsStacksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WorkspaceExclusions the workspaceExclusions property // returns a *ItemRelationshipsWorkspaceExclusionsRequestBuilder when successful func (m *ItemRelationshipsRequestBuilder) WorkspaceExclusions()(*ItemRelationshipsWorkspaceExclusionsRequestBuilder) { diff --git a/v2/api/policysets/item_relationships_stack_exclusions_request_builder.go b/v2/api/policysets/item_relationships_stack_exclusions_request_builder.go new file mode 100644 index 000000000..b25edb12e --- /dev/null +++ b/v2/api/policysets/item_relationships_stack_exclusions_request_builder.go @@ -0,0 +1,89 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package policysets + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +// ItemRelationshipsStackExclusionsRequestBuilder builds and executes requests for operations under \policy-sets\{policy_set_id}\relationships\stack-exclusions +type ItemRelationshipsStackExclusionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemRelationshipsStackExclusionsRequestBuilderInternal instantiates a new ItemRelationshipsStackExclusionsRequestBuilder and sets the default values. +func NewItemRelationshipsStackExclusionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRelationshipsStackExclusionsRequestBuilder) { + m := &ItemRelationshipsStackExclusionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-sets/{policy_set_id}/relationships/stack-exclusions", pathParameters), + } + return m +} +// NewItemRelationshipsStackExclusionsRequestBuilder instantiates a new ItemRelationshipsStackExclusionsRequestBuilder and sets the default values. +func NewItemRelationshipsStackExclusionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRelationshipsStackExclusionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRelationshipsStackExclusionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove stack exclusions from a policy set. Stack exclusions not currently in the set are ignored.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *ItemRelationshipsStackExclusionsRequestBuilder) Delete(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StacksIdentifierArrayDocumentable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Post add stack exclusions to a policy set. Excluded stacks will not have the policy set applied to them even if the set is global.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *ItemRelationshipsStackExclusionsRequestBuilder) Post(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StacksIdentifierArrayDocumentable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation remove stack exclusions from a policy set. Stack exclusions not currently in the set are ignored.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *ItemRelationshipsStackExclusionsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StacksIdentifierArrayDocumentable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/vnd.api+json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPostRequestInformation add stack exclusions to a policy set. Excluded stacks will not have the policy set applied to them even if the set is global.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *ItemRelationshipsStackExclusionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StacksIdentifierArrayDocumentable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/vnd.api+json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRelationshipsStackExclusionsRequestBuilder when successful +func (m *ItemRelationshipsStackExclusionsRequestBuilder) WithUrl(rawUrl string)(*ItemRelationshipsStackExclusionsRequestBuilder) { + return NewItemRelationshipsStackExclusionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/v2/api/policysets/item_relationships_stacks_request_builder.go b/v2/api/policysets/item_relationships_stacks_request_builder.go new file mode 100644 index 000000000..5e4855d18 --- /dev/null +++ b/v2/api/policysets/item_relationships_stacks_request_builder.go @@ -0,0 +1,89 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package policysets + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +// ItemRelationshipsStacksRequestBuilder builds and executes requests for operations under \policy-sets\{policy_set_id}\relationships\stacks +type ItemRelationshipsStacksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemRelationshipsStacksRequestBuilderInternal instantiates a new ItemRelationshipsStacksRequestBuilder and sets the default values. +func NewItemRelationshipsStacksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRelationshipsStacksRequestBuilder) { + m := &ItemRelationshipsStacksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-sets/{policy_set_id}/relationships/stacks", pathParameters), + } + return m +} +// NewItemRelationshipsStacksRequestBuilder instantiates a new ItemRelationshipsStacksRequestBuilder and sets the default values. +func NewItemRelationshipsStacksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRelationshipsStacksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRelationshipsStacksRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove stacks from a policy set. Stacks not currently in the set are ignored.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *ItemRelationshipsStacksRequestBuilder) Delete(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StacksIdentifierArrayDocumentable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Post add stacks to a policy set. Relationships are additive; existing stack memberships are preserved. Only supported for policy sets of kind tfpolicy.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *ItemRelationshipsStacksRequestBuilder) Post(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StacksIdentifierArrayDocumentable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation remove stacks from a policy set. Stacks not currently in the set are ignored.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *ItemRelationshipsStacksRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StacksIdentifierArrayDocumentable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/vnd.api+json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPostRequestInformation add stacks to a policy set. Relationships are additive; existing stack memberships are preserved. Only supported for policy sets of kind tfpolicy.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *ItemRelationshipsStacksRequestBuilder) ToPostRequestInformation(ctx context.Context, body i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StacksIdentifierArrayDocumentable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/vnd.api+json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRelationshipsStacksRequestBuilder when successful +func (m *ItemRelationshipsStacksRequestBuilder) WithUrl(rawUrl string)(*ItemRelationshipsStacksRequestBuilder) { + return NewItemRelationshipsStacksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/v2/api/policysets/item_tag_selectors_request_builder.go b/v2/api/policysets/item_tag_selectors_request_builder.go index 0dbeeb79b..9b6d59bc4 100644 --- a/v2/api/policysets/item_tag_selectors_request_builder.go +++ b/v2/api/policysets/item_tag_selectors_request_builder.go @@ -26,7 +26,7 @@ func NewItemTagSelectorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewItemTagSelectorsRequestBuilderInternal(urlParams, requestAdapter) } -// Delete remove tag selectors from a policy set by their tag key and value.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// Delete remove tag selectors from a policy set by their tag key and value. // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 4XX or 5XX status code func (m *ItemTagSelectorsRequestBuilder) Delete(ctx context.Context, body ItemTagSelectorsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { @@ -44,7 +44,7 @@ func (m *ItemTagSelectorsRequestBuilder) Delete(ctx context.Context, body ItemTa } return nil } -// Post add tag selectors to a policy set. Tag selectors define tag-based scoping rules for the policy set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// Post add tag selectors to a policy set. Tag selectors define tag-based scoping rules for the policy set.The policy set must have `tag-selector-matching-logic` set before adding tag selectors. // returns a Errors error when the service returns a 404 status code // returns a Errors error when the service returns a 422 status code // returns a Errors error when the service returns a 4XX or 5XX status code @@ -64,7 +64,7 @@ func (m *ItemTagSelectorsRequestBuilder) Post(ctx context.Context, body ItemTagS } return nil } -// ToDeleteRequestInformation remove tag selectors from a policy set by their tag key and value.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// ToDeleteRequestInformation remove tag selectors from a policy set by their tag key and value. // returns a *RequestInformation when successful func (m *ItemTagSelectorsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemTagSelectorsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -76,7 +76,7 @@ func (m *ItemTagSelectorsRequestBuilder) ToDeleteRequestInformation(ctx context. } return requestInfo, nil } -// ToPostRequestInformation add tag selectors to a policy set. Tag selectors define tag-based scoping rules for the policy set.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// ToPostRequestInformation add tag selectors to a policy set. Tag selectors define tag-based scoping rules for the policy set.The policy set must have `tag-selector-matching-logic` set before adding tag selectors. // returns a *RequestInformation when successful func (m *ItemTagSelectorsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTagSelectorsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/v2/api/policysets/item_versions_get_response.go b/v2/api/policysets/item_versions_get_response.go index 4c4cfe1c1..0b9fe97ce 100644 --- a/v2/api/policysets/item_versions_get_response.go +++ b/v2/api/policysets/item_versions_get_response.go @@ -13,6 +13,8 @@ type ItemVersionsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemVersionsGetResponse) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreatePolicySetsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemVersionsGetResponse) GetFieldDeserializers()(map[string]func(i878a8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []PolicySetsable when successful +func (m *ItemVersionsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemVersionsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemVersionsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemVersionsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemVersionsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemVersionsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemVersionsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemVersionsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemVersionsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetVersionsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicySetsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemVersionsGetResponse_metaable)() } diff --git a/v2/api/policysets/item_versions_request_builder.go b/v2/api/policysets/item_versions_request_builder.go index a14fac686..42aa2d9ff 100644 --- a/v2/api/policysets/item_versions_request_builder.go +++ b/v2/api/policysets/item_versions_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ia43a7ff6055d9d288cd51e687f8e78a8ddc408fb4be5107d755a0b8d96b84912 "github.com/hashicorp/go-tfe/v2/api/policysets/item/versions" ) // ItemVersionsRequestBuilder builds and executes requests for operations under \policy-sets\{policy_set_id}\versions @@ -17,6 +18,8 @@ type ItemVersionsRequestBuilder struct { type ItemVersionsRequestBuilderGetQueryParameters struct { // Return only the specified fields for policy-set-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldspolicySetVersions []string "uriparametername:\"fields%5Bpolicy%2Dset%2Dversions%5D\"" + // Optionally side-load the specified relationships. + Include []ia43a7ff6055d9d288cd51e687f8e78a8ddc408fb4be5107d755a0b8d96b84912.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemVersionsRequestBuilderGetQueryParameters struct { // NewItemVersionsRequestBuilderInternal instantiates a new ItemVersionsRequestBuilder and sets the default values. func NewItemVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemVersionsRequestBuilder) { m := &ItemVersionsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-sets/{policy_set_id}/versions{?fields%5Bpolicy%2Dset%2Dversions%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-sets/{policy_set_id}/versions{?fields%5Bpolicy%2Dset%2Dversions%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/policysets/with_policy_escaped_set_escaped_item_request_builder.go b/v2/api/policysets/with_policy_escaped_set_escaped_item_request_builder.go index 301a12be3..5f2c44823 100644 --- a/v2/api/policysets/with_policy_escaped_set_escaped_item_request_builder.go +++ b/v2/api/policysets/with_policy_escaped_set_escaped_item_request_builder.go @@ -18,7 +18,7 @@ type WithPolicy_set_ItemRequestBuilder struct { type WithPolicy_set_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for policy-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldspolicySets []string "uriparametername:\"fields%5Bpolicy%2Dsets%5D\"" - // Optionally side-load the specified relationships. + // Available side-load related resources. Multiple values can be comma-separated.Project exclusion, stack, and stack exclusion relationship data is onlyreturned when included.Available includes:- `policies` - The policies in this policy set- `workspaces` - The workspaces this policy set is attached to- `workspace_exclusions` - The workspaces excluded from this policy set- `stacks` - The stacks this policy set is attached to (`tfpolicy` policy sets only) *(public-beta)*- `stack_exclusions` - The stacks excluded from this policy set (`tfpolicy` policy sets only) *(public-beta)*- `projects` - The projects this policy set is attached to- `project_exclusions` - The projects excluded from this policy set- `current_version` - The current policy set version- `newest_version` - The newest policy set version- `policies.ootb_policy` - The OOTB policy for each policy *(public-beta)*- `policies.ootb_policy.ootb_policy_libraries` - The OOTB policy libraries for each OOTB policy *(public-beta)* Include []ib4032290f0e3b2e810de95e092424c16936fad4fe1b1b4fe84f7b7ac59592fb4.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithPolicy_set_ItemRequestBuilderInternal instantiates a new WithPolicy_set_ItemRequestBuilder and sets the default values. diff --git a/v2/api/policysetversions/item/get_include_query_parameter_type.go b/v2/api/policysetversions/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..7505ecb85 --- /dev/null +++ b/v2/api/policysetversions/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + POLICY_SET_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"policy_set"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := POLICY_SET_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "policy_set": + result = POLICY_SET_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/policysetversions/with_policy_escaped_set_escaped_version_escaped_item_request_builder.go b/v2/api/policysetversions/with_policy_escaped_set_escaped_version_escaped_item_request_builder.go index 55b11f0b3..20c221356 100644 --- a/v2/api/policysetversions/with_policy_escaped_set_escaped_version_escaped_item_request_builder.go +++ b/v2/api/policysetversions/with_policy_escaped_set_escaped_version_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i926bfb8dd49387679740a2bcfb7f17e7306af5c7b7bea901493418ca10ade964 "github.com/hashicorp/go-tfe/v2/api/policysetversions/item" ) // WithPolicy_set_version_ItemRequestBuilder builds and executes requests for operations under \policy-set-versions\{policy_set_version_id} @@ -17,11 +18,13 @@ type WithPolicy_set_version_ItemRequestBuilder struct { type WithPolicy_set_version_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for policy-set-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldspolicySetVersions []string "uriparametername:\"fields%5Bpolicy%2Dset%2Dversions%5D\"" + // Optionally side-load the specified relationships. + Include []i926bfb8dd49387679740a2bcfb7f17e7306af5c7b7bea901493418ca10ade964.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithPolicy_set_version_ItemRequestBuilderInternal instantiates a new WithPolicy_set_version_ItemRequestBuilder and sets the default values. func NewWithPolicy_set_version_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithPolicy_set_version_ItemRequestBuilder) { m := &WithPolicy_set_version_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-set-versions/{policy_set_version_id}{?fields%5Bpolicy%2Dset%2Dversions%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policy-set-versions/{policy_set_version_id}{?fields%5Bpolicy%2Dset%2Dversions%5D,include}", pathParameters), } return m } diff --git a/v2/api/projects/item/get_include_query_parameter_type.go b/v2/api/projects/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..78e4b6c99 --- /dev/null +++ b/v2/api/projects/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + EFFECTIVE_TAG_BINDINGS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"effective_tag_bindings"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := EFFECTIVE_TAG_BINDINGS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "effective_tag_bindings": + result = EFFECTIVE_TAG_BINDINGS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/projects/item/providersets/get_include_query_parameter_type.go b/v2/api/projects/item/providersets/get_include_query_parameter_type.go new file mode 100644 index 000000000..1c3c74a9b --- /dev/null +++ b/v2/api/projects/item/providersets/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package providersets +type GetIncludeQueryParameterType int + +const ( + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"workspaces", "projects"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/projects/item/varsets/get_include_query_parameter_type.go b/v2/api/projects/item/varsets/get_include_query_parameter_type.go new file mode 100644 index 000000000..cec1e0008 --- /dev/null +++ b/v2/api/projects/item/varsets/get_include_query_parameter_type.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package varsets +type GetIncludeQueryParameterType int + +const ( + VARS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + STACKS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"vars", "workspaces", "projects", "stacks"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := VARS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "vars": + result = VARS_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "stacks": + result = STACKS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/projects/item_provider_sets_get_response.go b/v2/api/projects/item_provider_sets_get_response.go index 8da7e664b..450dcfd6b 100644 --- a/v2/api/projects/item_provider_sets_get_response.go +++ b/v2/api/projects/item_provider_sets_get_response.go @@ -4,6 +4,7 @@ package projects import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,106 @@ type ItemProviderSetsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable + // The included property + included []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemProviderSetsGetResponse_metaable } +// ItemProviderSetsGetResponse_ProviderSetsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemProviderSetsGetResponse_ProviderSetsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemProviderSetsGetResponse_ProviderSetsGetResponse_included instantiates a new ItemProviderSetsGetResponse_ProviderSetsGetResponse_included and sets the default values. +func NewItemProviderSetsGetResponse_ProviderSetsGetResponse_included()(*ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) { + m := &ItemProviderSetsGetResponse_ProviderSetsGetResponse_included{ + } + return m +} +// CreateItemProviderSetsGetResponse_ProviderSetsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProviderSetsGetResponse_ProviderSetsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemProviderSetsGetResponse_ProviderSetsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemProviderSetsGetResponse instantiates a new ItemProviderSetsGetResponse and sets the default values. func NewItemProviderSetsGetResponse()(*ItemProviderSetsGetResponse) { m := &ItemProviderSetsGetResponse{ @@ -60,6 +156,22 @@ func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemProviderSetsGetResponse_ProviderSetsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +194,11 @@ func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable when successful +func (m *ItemProviderSetsGetResponse) GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemProviderSetsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +223,18 @@ func (m *ItemProviderSetsGetResponse) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +263,10 @@ func (m *ItemProviderSetsGetResponse) SetAdditionalData(value map[string]any)() func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemProviderSetsGetResponse) SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemProviderSetsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +279,11 @@ type ItemProviderSetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) + GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemProviderSetsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() + SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemProviderSetsGetResponse_metaable)() } diff --git a/v2/api/projects/item_provider_sets_request_builder.go b/v2/api/projects/item_provider_sets_request_builder.go index bb5ea60bb..d5b81ba13 100644 --- a/v2/api/projects/item_provider_sets_request_builder.go +++ b/v2/api/projects/item_provider_sets_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i6ee79ed98595779a28f9175f6c66b8ad1410a193ca6185011f2b0a4a526c8e6e "github.com/hashicorp/go-tfe/v2/api/projects/item/providersets" ) // ItemProviderSetsRequestBuilder builds and executes requests for operations under \projects\{project_id}\provider-sets @@ -17,6 +18,8 @@ type ItemProviderSetsRequestBuilder struct { type ItemProviderSetsRequestBuilderGetQueryParameters struct { // Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsproviderSets []string "uriparametername:\"fields%5Bprovider%2Dsets%5D\"" + // Optionally side-load the specified relationships. + Include []i6ee79ed98595779a28f9175f6c66b8ad1410a193ca6185011f2b0a4a526c8e6e.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemProviderSetsRequestBuilderGetQueryParameters struct { // NewItemProviderSetsRequestBuilderInternal instantiates a new ItemProviderSetsRequestBuilder and sets the default values. func NewItemProviderSetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProviderSetsRequestBuilder) { m := &ItemProviderSetsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}/provider-sets{?fields%5Bprovider%2Dsets%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}/provider-sets{?fields%5Bprovider%2Dsets%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/projects/item_varsets_get_response.go b/v2/api/projects/item_varsets_get_response.go index ae3bcc465..c0e6377e5 100644 --- a/v2/api/projects/item_varsets_get_response.go +++ b/v2/api/projects/item_varsets_get_response.go @@ -4,6 +4,7 @@ package projects import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,150 @@ type ItemVarsetsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable + // The included property + included []ItemVarsetsGetResponse_VarsetsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemVarsetsGetResponse_metaable } +// ItemVarsetsGetResponse_VarsetsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemVarsetsGetResponse_VarsetsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + stacks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemVarsetsGetResponse_VarsetsGetResponse_included instantiates a new ItemVarsetsGetResponse_VarsetsGetResponse_included and sets the default values. +func NewItemVarsetsGetResponse_VarsetsGetResponse_included()(*ItemVarsetsGetResponse_VarsetsGetResponse_included) { + m := &ItemVarsetsGetResponse_VarsetsGetResponse_included{ + } + return m +} +// CreateItemVarsetsGetResponse_VarsetsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemVarsetsGetResponse_VarsetsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemVarsetsGetResponse_VarsetsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetStacks gets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +// returns a Stacksable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) { + return m.stacks +} +// GetVars gets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +// returns a Varsable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.vars +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetStacks sets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() { + m.stacks = value +} +// SetVars sets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.vars = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemVarsetsGetResponse_VarsetsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) + GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() + SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemVarsetsGetResponse instantiates a new ItemVarsetsGetResponse and sets the default values. func NewItemVarsetsGetResponse()(*ItemVarsetsGetResponse) { m := &ItemVarsetsGetResponse{ @@ -60,6 +200,22 @@ func (m *ItemVarsetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemVarsetsGetResponse_VarsetsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemVarsetsGetResponse_VarsetsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemVarsetsGetResponse_VarsetsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +238,11 @@ func (m *ItemVarsetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemVarsetsGetResponse_VarsetsGetResponse_includedable when successful +func (m *ItemVarsetsGetResponse) GetIncluded()([]ItemVarsetsGetResponse_VarsetsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemVarsetsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +267,18 @@ func (m *ItemVarsetsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +307,10 @@ func (m *ItemVarsetsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemVarsetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemVarsetsGetResponse) SetIncluded(value []ItemVarsetsGetResponse_VarsetsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemVarsetsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +323,11 @@ type ItemVarsetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable) + GetIncluded()([]ItemVarsetsGetResponse_VarsetsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemVarsetsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable)() + SetIncluded(value []ItemVarsetsGetResponse_VarsetsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemVarsetsGetResponse_metaable)() } diff --git a/v2/api/projects/item_varsets_request_builder.go b/v2/api/projects/item_varsets_request_builder.go index 175e16d67..b7d632eec 100644 --- a/v2/api/projects/item_varsets_request_builder.go +++ b/v2/api/projects/item_varsets_request_builder.go @@ -18,6 +18,8 @@ type ItemVarsetsRequestBuilder struct { type ItemVarsetsRequestBuilderGetQueryParameters struct { // Return only the specified fields for varsets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvarsets []string "uriparametername:\"fields%5Bvarsets%5D\"" + // Optionally side-load the specified relationships. + Include []id9b1cd05c1aed4a221a26914a10d3fb317a479fef370fc0d10c23974bb8a2e86.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -30,7 +32,7 @@ type ItemVarsetsRequestBuilderGetQueryParameters struct { // NewItemVarsetsRequestBuilderInternal instantiates a new ItemVarsetsRequestBuilder and sets the default values. func NewItemVarsetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemVarsetsRequestBuilder) { m := &ItemVarsetsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}/varsets{?fields%5Bvarsets%5D,page%5Bnumber%5D*,page%5Bsize%5D*,q*,scope*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}/varsets{?fields%5Bvarsets%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*,q*,scope*}", pathParameters), } return m } diff --git a/v2/api/projects/with_project_escaped_item_request_builder.go b/v2/api/projects/with_project_escaped_item_request_builder.go index b7fdf4fb0..e96efa0db 100644 --- a/v2/api/projects/with_project_escaped_item_request_builder.go +++ b/v2/api/projects/with_project_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i24f065a4cb93e600a5b77b596edf6d2fd9e2c4f3da6fd1051d0a6fe511fdc2b2 "github.com/hashicorp/go-tfe/v2/api/projects/item" ) // WithProject_ItemRequestBuilder builds and executes requests for operations under \projects\{project_id} @@ -17,11 +18,13 @@ type WithProject_ItemRequestBuilder struct { type WithProject_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for projects resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsprojects []string "uriparametername:\"fields%5Bprojects%5D\"" + // Optionally side-load the specified relationships. + Include []i24f065a4cb93e600a5b77b596edf6d2fd9e2c4f3da6fd1051d0a6fe511fdc2b2.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithProject_ItemRequestBuilderInternal instantiates a new WithProject_ItemRequestBuilder and sets the default values. func NewWithProject_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithProject_ItemRequestBuilder) { m := &WithProject_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}{?fields%5Bprojects%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}{?fields%5Bprojects%5D,include}", pathParameters), } return m } diff --git a/v2/api/providersets/item_with_provider_escaped_set_escaped_get_response.go b/v2/api/providersets/item_with_provider_escaped_set_escaped_get_response.go index 65aaac042..1809b3046 100644 --- a/v2/api/providersets/item_with_provider_escaped_set_escaped_get_response.go +++ b/v2/api/providersets/item_with_provider_escaped_set_escaped_get_response.go @@ -4,175 +4,191 @@ package providersets import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemWithProvider_set_GetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelope - // The included property - included []ItemWithProvider_set_GetResponse_WithProvider_set_able + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelope + // The included property + included []ItemWithProvider_set_GetResponse_WithProvider_set_able } + // ItemWithProvider_set_GetResponse_WithProvider_set_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable type ItemWithProvider_set_GetResponse_WithProvider_set_ struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable } + // NewItemWithProvider_set_GetResponse_WithProvider_set_ instantiates a new ItemWithProvider_set_GetResponse_WithProvider_set_ and sets the default values. -func NewItemWithProvider_set_GetResponse_WithProvider_set_()(*ItemWithProvider_set_GetResponse_WithProvider_set_) { - m := &ItemWithProvider_set_GetResponse_WithProvider_set_{ - } - return m +func NewItemWithProvider_set_GetResponse_WithProvider_set_() *ItemWithProvider_set_GetResponse_WithProvider_set_ { + m := &ItemWithProvider_set_GetResponse_WithProvider_set_{} + return m } + // CreateItemWithProvider_set_GetResponse_WithProvider_set_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithProvider_set_GetResponse_WithProvider_set_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWithProvider_set_GetResponse_WithProvider_set_() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { - result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) - } - } - } - } - return result, nil +func CreateItemWithProvider_set_GetResponse_WithProvider_set_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithProvider_set_GetResponse_WithProvider_set_() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetProjects() != nil { - return m.GetProjects().GetFieldDeserializers() - } else if m.GetWorkspaces() != nil { - return m.GetWorkspaces().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetIsComposedType()(bool) { - return true +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetIsComposedType() bool { + return true } + // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { - return m.projects +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable { + return m.projects } + // GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable // returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { - return m.workspaces +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable { + return m.workspaces } + // Serialize serializes information the current object -func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetProjects() != nil { - err := writer.WriteObjectValue("", m.GetProjects()) - if err != nil { - return err - } - } else if m.GetWorkspaces() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaces()) - if err != nil { - return err - } - } - return nil +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil } + // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { - m.projects = value +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + m.projects = value } + // SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { - m.workspaces = value +func (m *ItemWithProvider_set_GetResponse_WithProvider_set_) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + m.workspaces = value } + type ItemWithProvider_set_GetResponse_WithProvider_set_able interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) - SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) } + // NewItemWithProvider_set_GetResponse instantiates a new ItemWithProvider_set_GetResponse and sets the default values. -func NewItemWithProvider_set_GetResponse()(*ItemWithProvider_set_GetResponse) { - m := &ItemWithProvider_set_GetResponse{ - ProviderSetsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProviderSetsEnvelope(), - } - return m +func NewItemWithProvider_set_GetResponse() *ItemWithProvider_set_GetResponse { + m := &ItemWithProvider_set_GetResponse{ + ProviderSetsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProviderSetsEnvelope(), + } + return m } + // CreateItemWithProvider_set_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithProvider_set_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemWithProvider_set_GetResponse(), nil +func CreateItemWithProvider_set_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithProvider_set_GetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithProvider_set_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.ProviderSetsEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWithProvider_set_GetResponse_WithProvider_set_FromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemWithProvider_set_GetResponse_WithProvider_set_able, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemWithProvider_set_GetResponse_WithProvider_set_able) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemWithProvider_set_GetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.ProviderSetsEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithProvider_set_GetResponse_WithProvider_set_FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithProvider_set_GetResponse_WithProvider_set_able, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithProvider_set_GetResponse_WithProvider_set_able) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemWithProvider_set_GetResponse_WithProvider_set_able when successful -func (m *ItemWithProvider_set_GetResponse) GetIncluded()([]ItemWithProvider_set_GetResponse_WithProvider_set_able) { - return m.included +func (m *ItemWithProvider_set_GetResponse) GetIncluded() []ItemWithProvider_set_GetResponse_WithProvider_set_able { + return m.included } + // Serialize serializes information the current object -func (m *ItemWithProvider_set_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.ProviderSetsEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemWithProvider_set_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.ProviderSetsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemWithProvider_set_GetResponse) SetIncluded(value []ItemWithProvider_set_GetResponse_WithProvider_set_able)() { - m.included = value +func (m *ItemWithProvider_set_GetResponse) SetIncluded(value []ItemWithProvider_set_GetResponse_WithProvider_set_able) { + m.included = value } + type ItemWithProvider_set_GetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable - GetIncluded()([]ItemWithProvider_set_GetResponse_WithProvider_set_able) - SetIncluded(value []ItemWithProvider_set_GetResponse_WithProvider_set_able)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsEnvelopeable } diff --git a/v2/api/queries/item/get_include_query_parameter_type.go b/v2/api/queries/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..1a101f8fd --- /dev/null +++ b/v2/api/queries/item/get_include_query_parameter_type.go @@ -0,0 +1,39 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"configuration_version", "created_by", "configuration_version.ingress_attributes"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "configuration_version": + result = CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "created_by": + result = CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + case "configuration_version.ingress_attributes": + result = CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/queries/item_with_query_escaped_get_response.go b/v2/api/queries/item_with_query_escaped_get_response.go index d6c483007..9aaed17c0 100644 --- a/v2/api/queries/item_with_query_escaped_get_response.go +++ b/v2/api/queries/item_with_query_escaped_get_response.go @@ -4,12 +4,130 @@ package queries import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) type ItemWithQuery_GetResponse struct { i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.QueriesEnvelope + // The included property + included []ItemWithQuery_GetResponse_WithQuery_GetResponse_includedable +} +// ItemWithQuery_GetResponse_WithQuery_GetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +type ItemWithQuery_GetResponse_WithQuery_GetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +} +// NewItemWithQuery_GetResponse_WithQuery_GetResponse_included instantiates a new ItemWithQuery_GetResponse_WithQuery_GetResponse_included and sets the default values. +func NewItemWithQuery_GetResponse_WithQuery_GetResponse_included()(*ItemWithQuery_GetResponse_WithQuery_GetResponse_included) { + m := &ItemWithQuery_GetResponse_WithQuery_GetResponse_included{ + } + return m +} +// CreateItemWithQuery_GetResponse_WithQuery_GetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithQuery_GetResponse_WithQuery_GetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithQuery_GetResponse_WithQuery_GetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } + } + } + } + return result, nil +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *ItemWithQuery_GetResponse_WithQuery_GetResponse_included) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + return m.configurationVersions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithQuery_GetResponse_WithQuery_GetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *ItemWithQuery_GetResponse_WithQuery_GetResponse_included) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemWithQuery_GetResponse_WithQuery_GetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// returns a Usersable when successful +func (m *ItemWithQuery_GetResponse_WithQuery_GetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemWithQuery_GetResponse_WithQuery_GetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +func (m *ItemWithQuery_GetResponse_WithQuery_GetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *ItemWithQuery_GetResponse_WithQuery_GetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} +// SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +func (m *ItemWithQuery_GetResponse_WithQuery_GetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { + m.users = value +} +type ItemWithQuery_GetResponse_WithQuery_GetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() } // NewItemWithQuery_GetResponse instantiates a new ItemWithQuery_GetResponse and sets the default values. func NewItemWithQuery_GetResponse()(*ItemWithQuery_GetResponse) { @@ -27,17 +145,56 @@ func CreateItemWithQuery_GetResponseFromDiscriminatorValue(parseNode i878a80d233 // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ItemWithQuery_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.QueriesEnvelope.GetFieldDeserializers() + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithQuery_GetResponse_WithQuery_GetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithQuery_GetResponse_WithQuery_GetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithQuery_GetResponse_WithQuery_GetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemWithQuery_GetResponse_WithQuery_GetResponse_includedable when successful +func (m *ItemWithQuery_GetResponse) GetIncluded()([]ItemWithQuery_GetResponse_WithQuery_GetResponse_includedable) { + return m.included +} // Serialize serializes information the current object func (m *ItemWithQuery_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.QueriesEnvelope.Serialize(writer) if err != nil { return err } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } return nil } +// SetIncluded sets the included property value. The included property +func (m *ItemWithQuery_GetResponse) SetIncluded(value []ItemWithQuery_GetResponse_WithQuery_GetResponse_includedable)() { + m.included = value +} type ItemWithQuery_GetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.QueriesEnvelopeable + GetIncluded()([]ItemWithQuery_GetResponse_WithQuery_GetResponse_includedable) + SetIncluded(value []ItemWithQuery_GetResponse_WithQuery_GetResponse_includedable)() } diff --git a/v2/api/queries/with_query_escaped_item_request_builder.go b/v2/api/queries/with_query_escaped_item_request_builder.go index f58fdf85d..14f2a6251 100644 --- a/v2/api/queries/with_query_escaped_item_request_builder.go +++ b/v2/api/queries/with_query_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i1086c35b1c68ad4f0e6c75c139596119e4ef079a253830d749f7f508574765e6 "github.com/hashicorp/go-tfe/v2/api/queries/item" ) // WithQuery_ItemRequestBuilder builds and executes requests for operations under \queries\{query_id} @@ -17,6 +18,8 @@ type WithQuery_ItemRequestBuilder struct { type WithQuery_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for queries resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsqueries []string "uriparametername:\"fields%5Bqueries%5D\"" + // Optionally side-load the specified relationships. + Include []i1086c35b1c68ad4f0e6c75c139596119e4ef079a253830d749f7f508574765e6.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property // returns a *ItemActionsRequestBuilder when successful @@ -26,7 +29,7 @@ func (m *WithQuery_ItemRequestBuilder) Actions()(*ItemActionsRequestBuilder) { // NewWithQuery_ItemRequestBuilderInternal instantiates a new WithQuery_ItemRequestBuilder and sets the default values. func NewWithQuery_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithQuery_ItemRequestBuilder) { m := &WithQuery_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/queries/{query_id}{?fields%5Bqueries%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/queries/{query_id}{?fields%5Bqueries%5D,include}", pathParameters), } return m } @@ -37,9 +40,9 @@ func NewWithQuery_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7dae return NewWithQuery_ItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get details of a specific query. -// returns a QueriesEnvelopeable when successful +// returns a ItemWithQuery_GetResponseable when successful // returns a Errors error when the service returns a 4XX or 5XX status code -func (m *WithQuery_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithQuery_ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.QueriesEnvelopeable, error) { +func (m *WithQuery_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[WithQuery_ItemRequestBuilderGetQueryParameters])(ItemWithQuery_GetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -47,14 +50,14 @@ func (m *WithQuery_ItemRequestBuilder) Get(ctx context.Context, requestConfigura errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateQueriesEnvelopeFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithQuery_GetResponseFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.QueriesEnvelopeable), nil + return res.(ItemWithQuery_GetResponseable), nil } // ToGetRequestInformation get details of a specific query. // returns a *RequestInformation when successful diff --git a/v2/api/runs/item/policychecks/get_include_query_parameter_type.go b/v2/api/runs/item/policychecks/get_include_query_parameter_type.go new file mode 100644 index 000000000..e373e9a5c --- /dev/null +++ b/v2/api/runs/item/policychecks/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package policychecks +type GetIncludeQueryParameterType int + +const ( + RUN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + RUNWORKSPACE_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"run", "run.workspace"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := RUN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "run": + result = RUN_GETINCLUDEQUERYPARAMETERTYPE + case "run.workspace": + result = RUNWORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/runs/item/taskstages/get_include_query_parameter_type.go b/v2/api/runs/item/taskstages/get_include_query_parameter_type.go new file mode 100644 index 000000000..873b31dd4 --- /dev/null +++ b/v2/api/runs/item/taskstages/get_include_query_parameter_type.go @@ -0,0 +1,45 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package taskstages +type GetIncludeQueryParameterType int + +const ( + RUN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + RUNWORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + TASK_RESULTS_GETINCLUDEQUERYPARAMETERTYPE + POLICY_EVALUATIONS_GETINCLUDEQUERYPARAMETERTYPE + COST_ESTIMATE_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"run", "run.workspace", "task_results", "policy_evaluations", "cost_estimate"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := RUN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "run": + result = RUN_GETINCLUDEQUERYPARAMETERTYPE + case "run.workspace": + result = RUNWORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + case "task_results": + result = TASK_RESULTS_GETINCLUDEQUERYPARAMETERTYPE + case "policy_evaluations": + result = POLICY_EVALUATIONS_GETINCLUDEQUERYPARAMETERTYPE + case "cost_estimate": + result = COST_ESTIMATE_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/runs/item_policy_checks_get_response.go b/v2/api/runs/item_policy_checks_get_response.go index 51b8b7c33..2e959cc24 100644 --- a/v2/api/runs/item_policy_checks_get_response.go +++ b/v2/api/runs/item_policy_checks_get_response.go @@ -4,6 +4,7 @@ package runs import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,106 @@ type ItemPolicyChecksGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyChecksable + // The included property + included []ItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemPolicyChecksGetResponse_metaable } +// ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemPolicyChecksGetResponse_PolicyChecksGetResponse_included instantiates a new ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included and sets the default values. +func NewItemPolicyChecksGetResponse_PolicyChecksGetResponse_included()(*ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included) { + m := &ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included{ + } + return m +} +// CreateItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemPolicyChecksGetResponse_PolicyChecksGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +// returns a Runsable when successful +func (m *ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + return m.runs +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +func (m *ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { + m.runs = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemPolicyChecksGetResponse_PolicyChecksGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemPolicyChecksGetResponse instantiates a new ItemPolicyChecksGetResponse and sets the default values. func NewItemPolicyChecksGetResponse()(*ItemPolicyChecksGetResponse) { m := &ItemPolicyChecksGetResponse{ @@ -60,6 +156,22 @@ func (m *ItemPolicyChecksGetResponse) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +194,11 @@ func (m *ItemPolicyChecksGetResponse) GetFieldDeserializers()(map[string]func(i8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedable when successful +func (m *ItemPolicyChecksGetResponse) GetIncluded()([]ItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemPolicyChecksGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +223,18 @@ func (m *ItemPolicyChecksGetResponse) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +263,10 @@ func (m *ItemPolicyChecksGetResponse) SetAdditionalData(value map[string]any)() func (m *ItemPolicyChecksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyChecksable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemPolicyChecksGetResponse) SetIncluded(value []ItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemPolicyChecksGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +279,11 @@ type ItemPolicyChecksGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyChecksable) + GetIncluded()([]ItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemPolicyChecksGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyChecksable)() + SetIncluded(value []ItemPolicyChecksGetResponse_PolicyChecksGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemPolicyChecksGetResponse_metaable)() } diff --git a/v2/api/runs/item_policy_checks_request_builder.go b/v2/api/runs/item_policy_checks_request_builder.go index d099045d3..cb79fd51d 100644 --- a/v2/api/runs/item_policy_checks_request_builder.go +++ b/v2/api/runs/item_policy_checks_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i4db4cf7b5a07810edb2a5fa006b808d202c22af20e9a6995c619346cc628aaa6 "github.com/hashicorp/go-tfe/v2/api/runs/item/policychecks" ) // ItemPolicyChecksRequestBuilder builds and executes requests for operations under \runs\{-id}\policy-checks @@ -17,6 +18,8 @@ type ItemPolicyChecksRequestBuilder struct { type ItemPolicyChecksRequestBuilderGetQueryParameters struct { // Return only the specified fields for policy-checks resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldspolicyChecks []string "uriparametername:\"fields%5Bpolicy%2Dchecks%5D\"" + // Optionally side-load the specified relationships. + Include []i4db4cf7b5a07810edb2a5fa006b808d202c22af20e9a6995c619346cc628aaa6.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemPolicyChecksRequestBuilderGetQueryParameters struct { // NewItemPolicyChecksRequestBuilderInternal instantiates a new ItemPolicyChecksRequestBuilder and sets the default values. func NewItemPolicyChecksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPolicyChecksRequestBuilder) { m := &ItemPolicyChecksRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/runs/{%2Did}/policy-checks{?fields%5Bpolicy%2Dchecks%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/runs/{%2Did}/policy-checks{?fields%5Bpolicy%2Dchecks%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/runs/item_task_stages_get_response.go b/v2/api/runs/item_task_stages_get_response.go index 3ad4db972..86f1417ca 100644 --- a/v2/api/runs/item_task_stages_get_response.go +++ b/v2/api/runs/item_task_stages_get_response.go @@ -4,6 +4,7 @@ package runs import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,172 @@ type ItemTaskStagesGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable + // The included property + included []ItemTaskStagesGetResponse_TaskStagesGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemTaskStagesGetResponse_metaable } +// ItemTaskStagesGetResponse_TaskStagesGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemTaskStagesGetResponse_TaskStagesGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + costEstimates i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable + policyEvaluations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable + taskResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemTaskStagesGetResponse_TaskStagesGetResponse_included instantiates a new ItemTaskStagesGetResponse_TaskStagesGetResponse_included and sets the default values. +func NewItemTaskStagesGetResponse_TaskStagesGetResponse_included()(*ItemTaskStagesGetResponse_TaskStagesGetResponse_included) { + m := &ItemTaskStagesGetResponse_TaskStagesGetResponse_included{ + } + return m +} +// CreateItemTaskStagesGetResponse_TaskStagesGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTaskStagesGetResponse_TaskStagesGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemTaskStagesGetResponse_TaskStagesGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { + result.SetCostEstimates(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCostEstimates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policy-evaluations") { + result.SetPolicyEvaluations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPolicyEvaluations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-results") { + result.SetTaskResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetCostEstimates gets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable +// returns a CostEstimatesable when successful +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) { + return m.costEstimates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetCostEstimates() != nil { + return m.GetCostEstimates().GetFieldDeserializers() + } else if m.GetPolicyEvaluations() != nil { + return m.GetPolicyEvaluations().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetTaskResults() != nil { + return m.GetTaskResults().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetPolicyEvaluations gets the policyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable +// returns a PolicyEvaluationsable when successful +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) GetPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable) { + return m.policyEvaluations +} +// GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +// returns a Runsable when successful +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + return m.runs +} +// GetTaskResults gets the taskResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable +// returns a TaskResultsable when successful +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) GetTaskResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable) { + return m.taskResults +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCostEstimates() != nil { + err := writer.WriteObjectValue("", m.GetCostEstimates()) + if err != nil { + return err + } + } else if m.GetPolicyEvaluations() != nil { + err := writer.WriteObjectValue("", m.GetPolicyEvaluations()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetTaskResults() != nil { + err := writer.WriteObjectValue("", m.GetTaskResults()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetCostEstimates sets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() { + m.costEstimates = value +} +// SetPolicyEvaluations sets the policyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) SetPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable)() { + m.policyEvaluations = value +} +// SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { + m.runs = value +} +// SetTaskResults sets the taskResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) SetTaskResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable)() { + m.taskResults = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemTaskStagesGetResponse_TaskStagesGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemTaskStagesGetResponse_TaskStagesGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) + GetPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable) + GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetTaskResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() + SetPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable)() + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetTaskResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemTaskStagesGetResponse instantiates a new ItemTaskStagesGetResponse and sets the default values. func NewItemTaskStagesGetResponse()(*ItemTaskStagesGetResponse) { m := &ItemTaskStagesGetResponse{ @@ -60,6 +222,22 @@ func (m *ItemTaskStagesGetResponse) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemTaskStagesGetResponse_TaskStagesGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemTaskStagesGetResponse_TaskStagesGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemTaskStagesGetResponse_TaskStagesGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +260,11 @@ func (m *ItemTaskStagesGetResponse) GetFieldDeserializers()(map[string]func(i878 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemTaskStagesGetResponse_TaskStagesGetResponse_includedable when successful +func (m *ItemTaskStagesGetResponse) GetIncluded()([]ItemTaskStagesGetResponse_TaskStagesGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemTaskStagesGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +289,18 @@ func (m *ItemTaskStagesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +329,10 @@ func (m *ItemTaskStagesGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemTaskStagesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemTaskStagesGetResponse) SetIncluded(value []ItemTaskStagesGetResponse_TaskStagesGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemTaskStagesGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +345,11 @@ type ItemTaskStagesGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable) + GetIncluded()([]ItemTaskStagesGetResponse_TaskStagesGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemTaskStagesGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable)() + SetIncluded(value []ItemTaskStagesGetResponse_TaskStagesGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemTaskStagesGetResponse_metaable)() } diff --git a/v2/api/runs/item_task_stages_request_builder.go b/v2/api/runs/item_task_stages_request_builder.go index b227ff420..c22a8136f 100644 --- a/v2/api/runs/item_task_stages_request_builder.go +++ b/v2/api/runs/item_task_stages_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i57a73f2081d3be5768a7fe86e7d617ad6cc446a591b46a62d3c56585394cffcb "github.com/hashicorp/go-tfe/v2/api/runs/item/taskstages" ) // ItemTaskStagesRequestBuilder builds and executes requests for operations under \runs\{-id}\task-stages @@ -17,6 +18,8 @@ type ItemTaskStagesRequestBuilder struct { type ItemTaskStagesRequestBuilderGetQueryParameters struct { // Return only the specified fields for task-stages resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldstaskStages []string "uriparametername:\"fields%5Btask%2Dstages%5D\"" + // Optionally side-load the specified relationships. + Include []i57a73f2081d3be5768a7fe86e7d617ad6cc446a591b46a62d3c56585394cffcb.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemTaskStagesRequestBuilderGetQueryParameters struct { // NewItemTaskStagesRequestBuilderInternal instantiates a new ItemTaskStagesRequestBuilder and sets the default values. func NewItemTaskStagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTaskStagesRequestBuilder) { m := &ItemTaskStagesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/runs/{%2Did}/task-stages{?fields%5Btask%2Dstages%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/runs/{%2Did}/task-stages{?fields%5Btask%2Dstages%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/runtriggers/item/get_include_query_parameter_type.go b/v2/api/runtriggers/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..f4d5c32c5 --- /dev/null +++ b/v2/api/runtriggers/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + SOURCEABLE_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"workspace", "sourceable"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "workspace": + result = WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + case "sourceable": + result = SOURCEABLE_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/runtriggers/run_triggers_item_request_builder.go b/v2/api/runtriggers/run_triggers_item_request_builder.go index 9bb21cee5..ca6845aad 100644 --- a/v2/api/runtriggers/run_triggers_item_request_builder.go +++ b/v2/api/runtriggers/run_triggers_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ib87e5297f588c487e7dab82f953b3ce5d91ed26846b5aa96724ae879cf729643 "github.com/hashicorp/go-tfe/v2/api/runtriggers/item" ) // RunTriggersItemRequestBuilder builds and executes requests for operations under \run-triggers\{id} @@ -17,11 +18,13 @@ type RunTriggersItemRequestBuilder struct { type RunTriggersItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for run-triggers resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsrunTriggers []string "uriparametername:\"fields%5Brun%2Dtriggers%5D\"" + // Optionally side-load the specified relationships. + Include []ib87e5297f588c487e7dab82f953b3ce5d91ed26846b5aa96724ae879cf729643.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewRunTriggersItemRequestBuilderInternal instantiates a new RunTriggersItemRequestBuilder and sets the default values. func NewRunTriggersItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RunTriggersItemRequestBuilder) { m := &RunTriggersItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/run-triggers/{id}{?fields%5Brun%2Dtriggers%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/run-triggers/{id}{?fields%5Brun%2Dtriggers%5D,include}", pathParameters), } return m } diff --git a/v2/api/stackapprovals/item/get_include_query_parameter_type.go b/v2/api/stackapprovals/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..4b91ad056 --- /dev/null +++ b/v2/api/stackapprovals/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + USER_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"user"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := USER_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "user": + result = USER_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stackapprovals/with_stack_escaped_approval_escaped_item_request_builder.go b/v2/api/stackapprovals/with_stack_escaped_approval_escaped_item_request_builder.go index 987b44349..ed4f5781f 100644 --- a/v2/api/stackapprovals/with_stack_escaped_approval_escaped_item_request_builder.go +++ b/v2/api/stackapprovals/with_stack_escaped_approval_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i2263dd689a4779d3f681a64fd5bc86fd03e09b38ad342eb5cef72849bf1b4e70 "github.com/hashicorp/go-tfe/v2/api/stackapprovals/item" ) // WithStack_approval_ItemRequestBuilder builds and executes requests for operations under \stack-approvals\{stack_approval_id} @@ -17,11 +18,13 @@ type WithStack_approval_ItemRequestBuilder struct { type WithStack_approval_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-approvals resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackApprovals []string "uriparametername:\"fields%5Bstack%2Dapprovals%5D\"" + // Optionally side-load the specified relationships. + Include []i2263dd689a4779d3f681a64fd5bc86fd03e09b38ad342eb5cef72849bf1b4e70.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithStack_approval_ItemRequestBuilderInternal instantiates a new WithStack_approval_ItemRequestBuilder and sets the default values. func NewWithStack_approval_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithStack_approval_ItemRequestBuilder) { m := &WithStack_approval_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-approvals/{stack_approval_id}{?fields%5Bstack%2Dapprovals%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-approvals/{stack_approval_id}{?fields%5Bstack%2Dapprovals%5D,include}", pathParameters), } return m } diff --git a/v2/api/stackconfigurations/4c7f5c1e38251d0ccfb3e8a50c69d737e023aec758e4a6e3d71ac8991ad9025a.go b/v2/api/stackconfigurations/4c7f5c1e38251d0ccfb3e8a50c69d737e023aec758e4a6e3d71ac8991ad9025a.go index eb300e273..80890c45f 100644 --- a/v2/api/stackconfigurations/4c7f5c1e38251d0ccfb3e8a50c69d737e023aec758e4a6e3d71ac8991ad9025a.go +++ b/v2/api/stackconfigurations/4c7f5c1e38251d0ccfb3e8a50c69d737e023aec758e4a6e3d71ac8991ad9025a.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i892f91a310807574e56842afee79c5a5198d6ed2e22969790ed01128180c466b "github.com/hashicorp/go-tfe/v2/api/stackconfigurations/item/stackdeploymentgroups/item" ) // ItemStackDeploymentGroupsWithStack_deployment_group_nameItemRequestBuilder builds and executes requests for operations under \stack-configurations\{stack_configuration_id}\stack-deployment-groups\{stack_deployment_group_name} @@ -17,11 +18,13 @@ type ItemStackDeploymentGroupsWithStack_deployment_group_nameItemRequestBuilder type ItemStackDeploymentGroupsWithStack_deployment_group_nameItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-deployment-groups resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackDeploymentGroups []string "uriparametername:\"fields%5Bstack%2Ddeployment%2Dgroups%5D\"" + // Optionally side-load the specified relationships. + Include []i892f91a310807574e56842afee79c5a5198d6ed2e22969790ed01128180c466b.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewItemStackDeploymentGroupsWithStack_deployment_group_nameItemRequestBuilderInternal instantiates a new ItemStackDeploymentGroupsWithStack_deployment_group_nameItemRequestBuilder and sets the default values. func NewItemStackDeploymentGroupsWithStack_deployment_group_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStackDeploymentGroupsWithStack_deployment_group_nameItemRequestBuilder) { m := &ItemStackDeploymentGroupsWithStack_deployment_group_nameItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-configurations/{stack_configuration_id}/stack-deployment-groups/{stack_deployment_group_name}{?fields%5Bstack%2Ddeployment%2Dgroups%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-configurations/{stack_configuration_id}/stack-deployment-groups/{stack_deployment_group_name}{?fields%5Bstack%2Ddeployment%2Dgroups%5D,include}", pathParameters), } return m } diff --git a/v2/api/stackconfigurations/item/stackdeploymentgroups/get_include_query_parameter_type.go b/v2/api/stackconfigurations/item/stackdeploymentgroups/get_include_query_parameter_type.go index 5032bed14..b03d75d36 100644 --- a/v2/api/stackconfigurations/item/stackdeploymentgroups/get_include_query_parameter_type.go +++ b/v2/api/stackconfigurations/item/stackdeploymentgroups/get_include_query_parameter_type.go @@ -5,17 +5,20 @@ package stackdeploymentgroups type GetIncludeQueryParameterType int const ( - STACKDEPLOYMENTGROUPSUMMARY_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + STACK_DEPLOYMENT_GROUP_SUMMARY_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + RUN_STATUS_SUMMARIES_GETINCLUDEQUERYPARAMETERTYPE ) func (i GetIncludeQueryParameterType) String() string { - return []string{"stack-deployment-group-summary"}[i] + return []string{"stack_deployment_group_summary", "run_status_summaries"}[i] } func ParseGetIncludeQueryParameterType(v string) (any, error) { - result := STACKDEPLOYMENTGROUPSUMMARY_GETINCLUDEQUERYPARAMETERTYPE + result := STACK_DEPLOYMENT_GROUP_SUMMARY_GETINCLUDEQUERYPARAMETERTYPE switch v { - case "stack-deployment-group-summary": - result = STACKDEPLOYMENTGROUPSUMMARY_GETINCLUDEQUERYPARAMETERTYPE + case "stack_deployment_group_summary": + result = STACK_DEPLOYMENT_GROUP_SUMMARY_GETINCLUDEQUERYPARAMETERTYPE + case "run_status_summaries": + result = RUN_STATUS_SUMMARIES_GETINCLUDEQUERYPARAMETERTYPE default: return nil, nil } diff --git a/v2/api/stackconfigurations/item/stackdeploymentgroups/item/get_include_query_parameter_type.go b/v2/api/stackconfigurations/item/stackdeploymentgroups/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..17074e811 --- /dev/null +++ b/v2/api/stackconfigurations/item/stackdeploymentgroups/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + STACK_DEPLOYMENT_GROUP_SUMMARY_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + RUN_STATUS_SUMMARIES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_deployment_group_summary", "run_status_summaries"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_DEPLOYMENT_GROUP_SUMMARY_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_deployment_group_summary": + result = STACK_DEPLOYMENT_GROUP_SUMMARY_GETINCLUDEQUERYPARAMETERTYPE + case "run_status_summaries": + result = RUN_STATUS_SUMMARIES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stackconfigurations/item/stackdeploymentruns/get_include_query_parameter_type.go b/v2/api/stackconfigurations/item/stackdeploymentruns/get_include_query_parameter_type.go new file mode 100644 index 000000000..1654b02d6 --- /dev/null +++ b/v2/api/stackconfigurations/item/stackdeploymentruns/get_include_query_parameter_type.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackdeploymentruns +type GetIncludeQueryParameterType int + +const ( + STACK_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + CURRENT_STEP_GETINCLUDEQUERYPARAMETERTYPE + DESTROY_STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_deployment_group", "stack_approval", "current_step", "destroy_stack_configuration"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_deployment_group": + result = STACK_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE + case "stack_approval": + result = STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + case "current_step": + result = CURRENT_STEP_GETINCLUDEQUERYPARAMETERTYPE + case "destroy_stack_configuration": + result = DESTROY_STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stackconfigurations/item_stack_deployment_runs_get_response.go b/v2/api/stackconfigurations/item_stack_deployment_runs_get_response.go index 2fbe4444b..f6835c8da 100644 --- a/v2/api/stackconfigurations/item_stack_deployment_runs_get_response.go +++ b/v2/api/stackconfigurations/item_stack_deployment_runs_get_response.go @@ -4,6 +4,7 @@ package stackconfigurations import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,150 @@ type ItemStackDeploymentRunsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable + // The included property + included []ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemStackDeploymentRunsGetResponse_metaable } +// ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +type ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable + stackApprovals i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + stackConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable + stackDeploymentGroups i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable + stackDeploymentSteps i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +} +// NewItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included instantiates a new ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included and sets the default values. +func NewItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included()(*ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) { + m := &ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included{ + } + return m +} +// CreateItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-approvals") { + result.SetStackApprovals(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackApprovals()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configurations") { + result.SetStackConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-deployment-groups") { + result.SetStackDeploymentGroups(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDeploymentGroups()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-deployment-steps") { + result.SetStackDeploymentSteps(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDeploymentSteps()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetStackApprovals() != nil { + return m.GetStackApprovals().GetFieldDeserializers() + } else if m.GetStackConfigurations() != nil { + return m.GetStackConfigurations().GetFieldDeserializers() + } else if m.GetStackDeploymentGroups() != nil { + return m.GetStackDeploymentGroups().GetFieldDeserializers() + } else if m.GetStackDeploymentSteps() != nil { + return m.GetStackDeploymentSteps().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetStackApprovals gets the stackApprovals property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable +// returns a StackApprovalsable when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackApprovals()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable) { + return m.stackApprovals +} +// GetStackConfigurations gets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +// returns a StackConfigurationsable when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) { + return m.stackConfigurations +} +// GetStackDeploymentGroups gets the stackDeploymentGroups property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable +// returns a StackDeploymentGroupsable when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackDeploymentGroups()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable) { + return m.stackDeploymentGroups +} +// GetStackDeploymentSteps gets the stackDeploymentSteps property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +// returns a StackDeploymentStepsable when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackDeploymentSteps()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable) { + return m.stackDeploymentSteps +} +// Serialize serializes information the current object +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStackApprovals() != nil { + err := writer.WriteObjectValue("", m.GetStackApprovals()) + if err != nil { + return err + } + } else if m.GetStackConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurations()) + if err != nil { + return err + } + } else if m.GetStackDeploymentGroups() != nil { + err := writer.WriteObjectValue("", m.GetStackDeploymentGroups()) + if err != nil { + return err + } + } else if m.GetStackDeploymentSteps() != nil { + err := writer.WriteObjectValue("", m.GetStackDeploymentSteps()) + if err != nil { + return err + } + } + return nil +} +// SetStackApprovals sets the stackApprovals property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackApprovals(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable)() { + m.stackApprovals = value +} +// SetStackConfigurations sets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() { + m.stackConfigurations = value +} +// SetStackDeploymentGroups sets the stackDeploymentGroups property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackDeploymentGroups(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable)() { + m.stackDeploymentGroups = value +} +// SetStackDeploymentSteps sets the stackDeploymentSteps property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackDeploymentSteps(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable)() { + m.stackDeploymentSteps = value +} +type ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackApprovals()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable) + GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + GetStackDeploymentGroups()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable) + GetStackDeploymentSteps()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable) + SetStackApprovals(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable)() + SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() + SetStackDeploymentGroups(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable)() + SetStackDeploymentSteps(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable)() +} // NewItemStackDeploymentRunsGetResponse instantiates a new ItemStackDeploymentRunsGetResponse and sets the default values. func NewItemStackDeploymentRunsGetResponse()(*ItemStackDeploymentRunsGetResponse) { m := &ItemStackDeploymentRunsGetResponse{ @@ -60,6 +200,22 @@ func (m *ItemStackDeploymentRunsGetResponse) GetFieldDeserializers()(map[string] } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +238,11 @@ func (m *ItemStackDeploymentRunsGetResponse) GetFieldDeserializers()(map[string] } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable when successful +func (m *ItemStackDeploymentRunsGetResponse) GetIncluded()([]ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemStackDeploymentRunsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +267,18 @@ func (m *ItemStackDeploymentRunsGetResponse) Serialize(writer i878a80d2330e89d26 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +307,10 @@ func (m *ItemStackDeploymentRunsGetResponse) SetAdditionalData(value map[string] func (m *ItemStackDeploymentRunsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemStackDeploymentRunsGetResponse) SetIncluded(value []ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemStackDeploymentRunsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +323,11 @@ type ItemStackDeploymentRunsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable) + GetIncluded()([]ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStackDeploymentRunsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable)() + SetIncluded(value []ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStackDeploymentRunsGetResponse_metaable)() } diff --git a/v2/api/stackconfigurations/item_stack_deployment_runs_request_builder.go b/v2/api/stackconfigurations/item_stack_deployment_runs_request_builder.go index 0fa8caf5e..fa82b1bf9 100644 --- a/v2/api/stackconfigurations/item_stack_deployment_runs_request_builder.go +++ b/v2/api/stackconfigurations/item_stack_deployment_runs_request_builder.go @@ -20,6 +20,8 @@ type ItemStackDeploymentRunsRequestBuilderGetQueryParameters struct { FieldsstackDeploymentRuns []string "uriparametername:\"fields%5Bstack%2Ddeployment%2Druns%5D\"" // Filter by deployment run status. Accepts a comma-separated list of statuses. Some statuses match multiple underlying run states: pending matches pending, acquiring-lock, and pending-capacity; running matches pre-deploying and deploying; pending-operator matches pre-deploying-pending-operator and deploying-pending-operator. Filterstatus []i659f6db4a432f375cd96a19e91399d0a812f03cf49fdbed35accd9f99ab356b4.GetFilterStatusQueryParameterType "uriparametername:\"filter%5Bstatus%5D\"" + // Optionally side-load the specified relationships. + Include []i659f6db4a432f375cd96a19e91399d0a812f03cf49fdbed35accd9f99ab356b4.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -32,7 +34,7 @@ type ItemStackDeploymentRunsRequestBuilderGetQueryParameters struct { // NewItemStackDeploymentRunsRequestBuilderInternal instantiates a new ItemStackDeploymentRunsRequestBuilder and sets the default values. func NewItemStackDeploymentRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStackDeploymentRunsRequestBuilder) { m := &ItemStackDeploymentRunsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-configurations/{stack_configuration_id}/stack-deployment-runs{?fields%5Bstack%2Ddeployment%2Druns%5D,filter%5Bstatus%5D,page%5Bnumber%5D*,page%5Bsize%5D*,q*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-configurations/{stack_configuration_id}/stack-deployment-runs{?fields%5Bstack%2Ddeployment%2Druns%5D,filter%5Bstatus%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*,q*,sort*}", pathParameters), } return m } diff --git a/v2/api/stackconfigurations/item_with_stack_escaped_configuration_escaped_get_response.go b/v2/api/stackconfigurations/item_with_stack_escaped_configuration_escaped_get_response.go index 7b05f17ba..d7551e57f 100644 --- a/v2/api/stackconfigurations/item_with_stack_escaped_configuration_escaped_get_response.go +++ b/v2/api/stackconfigurations/item_with_stack_escaped_configuration_escaped_get_response.go @@ -4,219 +4,239 @@ package stackconfigurations import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemWithStack_configuration_GetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelope - // The included property - included []ItemWithStack_configuration_GetResponse_WithStack_configuration_able + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelope + // The included property + included []ItemWithStack_configuration_GetResponse_WithStack_configuration_able } + // ItemWithStack_configuration_GetResponse_WithStack_configuration_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable type ItemWithStack_configuration_GetResponse_WithStack_configuration_ struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable - ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable - stackAggregateOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable - stackConfigurationSummaries i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable - stackDiagnostics i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable + stackAggregateOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable + stackConfigurationSummaries i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable + stackDiagnostics i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable } + // NewItemWithStack_configuration_GetResponse_WithStack_configuration_ instantiates a new ItemWithStack_configuration_GetResponse_WithStack_configuration_ and sets the default values. -func NewItemWithStack_configuration_GetResponse_WithStack_configuration_()(*ItemWithStack_configuration_GetResponse_WithStack_configuration_) { - m := &ItemWithStack_configuration_GetResponse_WithStack_configuration_{ - } - return m +func NewItemWithStack_configuration_GetResponse_WithStack_configuration_() *ItemWithStack_configuration_GetResponse_WithStack_configuration_ { + m := &ItemWithStack_configuration_GetResponse_WithStack_configuration_{} + return m } + // CreateItemWithStack_configuration_GetResponse_WithStack_configuration_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithStack_configuration_GetResponse_WithStack_configuration_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWithStack_configuration_GetResponse_WithStack_configuration_() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { - result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-aggregate-outputs") { - result.SetStackAggregateOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackAggregateOutputs()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configuration-summaries") { - result.SetStackConfigurationSummaries(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurationSummaries()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-diagnostics") { - result.SetStackDiagnostics(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDiagnostics()) - } - } - } - } - return result, nil +func CreateItemWithStack_configuration_GetResponse_WithStack_configuration_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithStack_configuration_GetResponse_WithStack_configuration_() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-aggregate-outputs") { + result.SetStackAggregateOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackAggregateOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configuration-summaries") { + result.SetStackConfigurationSummaries(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurationSummaries()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-diagnostics") { + result.SetStackDiagnostics(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDiagnostics()) + } + } + } + } + return result, nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetIngressAttributes() != nil { - return m.GetIngressAttributes().GetFieldDeserializers() - } else if m.GetStackAggregateOutputs() != nil { - return m.GetStackAggregateOutputs().GetFieldDeserializers() - } else if m.GetStackConfigurationSummaries() != nil { - return m.GetStackConfigurationSummaries().GetFieldDeserializers() - } else if m.GetStackDiagnostics() != nil { - return m.GetStackDiagnostics().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetStackAggregateOutputs() != nil { + return m.GetStackAggregateOutputs().GetFieldDeserializers() + } else if m.GetStackConfigurationSummaries() != nil { + return m.GetStackConfigurationSummaries().GetFieldDeserializers() + } else if m.GetStackDiagnostics() != nil { + return m.GetStackDiagnostics().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable // returns a IngressAttributesable when successful -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { - return m.ingressAttributes +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetIngressAttributes() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable { + return m.ingressAttributes } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetIsComposedType()(bool) { - return true +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetIsComposedType() bool { + return true } + // GetStackAggregateOutputs gets the stackAggregateOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable // returns a StackAggregateOutputsable when successful -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetStackAggregateOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) { - return m.stackAggregateOutputs +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetStackAggregateOutputs() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable { + return m.stackAggregateOutputs } + // GetStackConfigurationSummaries gets the stackConfigurationSummaries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable // returns a StackConfigurationSummariesable when successful -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetStackConfigurationSummaries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) { - return m.stackConfigurationSummaries +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetStackConfigurationSummaries() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable { + return m.stackConfigurationSummaries } + // GetStackDiagnostics gets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable // returns a StackDiagnosticsable when successful -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) { - return m.stackDiagnostics +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) GetStackDiagnostics() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable { + return m.stackDiagnostics } + // Serialize serializes information the current object -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetIngressAttributes() != nil { - err := writer.WriteObjectValue("", m.GetIngressAttributes()) - if err != nil { - return err - } - } else if m.GetStackAggregateOutputs() != nil { - err := writer.WriteObjectValue("", m.GetStackAggregateOutputs()) - if err != nil { - return err - } - } else if m.GetStackConfigurationSummaries() != nil { - err := writer.WriteObjectValue("", m.GetStackConfigurationSummaries()) - if err != nil { - return err - } - } else if m.GetStackDiagnostics() != nil { - err := writer.WriteObjectValue("", m.GetStackDiagnostics()) - if err != nil { - return err - } - } - return nil +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetStackAggregateOutputs() != nil { + err := writer.WriteObjectValue("", m.GetStackAggregateOutputs()) + if err != nil { + return err + } + } else if m.GetStackConfigurationSummaries() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurationSummaries()) + if err != nil { + return err + } + } else if m.GetStackDiagnostics() != nil { + err := writer.WriteObjectValue("", m.GetStackDiagnostics()) + if err != nil { + return err + } + } + return nil } + // SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { - m.ingressAttributes = value +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + m.ingressAttributes = value } + // SetStackAggregateOutputs sets the stackAggregateOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable)() { - m.stackAggregateOutputs = value +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) { + m.stackAggregateOutputs = value } + // SetStackConfigurationSummaries sets the stackConfigurationSummaries property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() { - m.stackConfigurationSummaries = value +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) { + m.stackConfigurationSummaries = value } + // SetStackDiagnostics sets the stackDiagnostics property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable -func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() { - m.stackDiagnostics = value +func (m *ItemWithStack_configuration_GetResponse_WithStack_configuration_) SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) { + m.stackDiagnostics = value } + type ItemWithStack_configuration_GetResponse_WithStack_configuration_able interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) - GetStackAggregateOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) - GetStackConfigurationSummaries()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) - GetStackDiagnostics()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) - SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() - SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable)() - SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() - SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIngressAttributes() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + GetStackAggregateOutputs() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable + GetStackConfigurationSummaries() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable + GetStackDiagnostics() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + SetStackAggregateOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackAggregateOutputsable) + SetStackConfigurationSummaries(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) + SetStackDiagnostics(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) } + // NewItemWithStack_configuration_GetResponse instantiates a new ItemWithStack_configuration_GetResponse and sets the default values. -func NewItemWithStack_configuration_GetResponse()(*ItemWithStack_configuration_GetResponse) { - m := &ItemWithStack_configuration_GetResponse{ - StackConfigurationsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurationsEnvelope(), - } - return m +func NewItemWithStack_configuration_GetResponse() *ItemWithStack_configuration_GetResponse { + m := &ItemWithStack_configuration_GetResponse{ + StackConfigurationsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurationsEnvelope(), + } + return m } + // CreateItemWithStack_configuration_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithStack_configuration_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemWithStack_configuration_GetResponse(), nil +func CreateItemWithStack_configuration_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithStack_configuration_GetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithStack_configuration_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.StackConfigurationsEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWithStack_configuration_GetResponse_WithStack_configuration_FromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemWithStack_configuration_GetResponse_WithStack_configuration_able, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemWithStack_configuration_GetResponse_WithStack_configuration_able) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemWithStack_configuration_GetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.StackConfigurationsEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithStack_configuration_GetResponse_WithStack_configuration_FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithStack_configuration_GetResponse_WithStack_configuration_able, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithStack_configuration_GetResponse_WithStack_configuration_able) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemWithStack_configuration_GetResponse_WithStack_configuration_able when successful -func (m *ItemWithStack_configuration_GetResponse) GetIncluded()([]ItemWithStack_configuration_GetResponse_WithStack_configuration_able) { - return m.included +func (m *ItemWithStack_configuration_GetResponse) GetIncluded() []ItemWithStack_configuration_GetResponse_WithStack_configuration_able { + return m.included } + // Serialize serializes information the current object -func (m *ItemWithStack_configuration_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.StackConfigurationsEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemWithStack_configuration_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.StackConfigurationsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemWithStack_configuration_GetResponse) SetIncluded(value []ItemWithStack_configuration_GetResponse_WithStack_configuration_able)() { - m.included = value +func (m *ItemWithStack_configuration_GetResponse) SetIncluded(value []ItemWithStack_configuration_GetResponse_WithStack_configuration_able) { + m.included = value } + type ItemWithStack_configuration_GetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelopeable - GetIncluded()([]ItemWithStack_configuration_GetResponse_WithStack_configuration_able) - SetIncluded(value []ItemWithStack_configuration_GetResponse_WithStack_configuration_able)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsEnvelopeable } diff --git a/v2/api/stackdeploymentgroups/item/get_include_query_parameter_type.go b/v2/api/stackdeploymentgroups/item/get_include_query_parameter_type.go index 8b0cc8634..17074e811 100644 --- a/v2/api/stackdeploymentgroups/item/get_include_query_parameter_type.go +++ b/v2/api/stackdeploymentgroups/item/get_include_query_parameter_type.go @@ -5,17 +5,20 @@ package item type GetIncludeQueryParameterType int const ( - STACKDEPLOYMENTGROUPSUMMARY_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + STACK_DEPLOYMENT_GROUP_SUMMARY_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + RUN_STATUS_SUMMARIES_GETINCLUDEQUERYPARAMETERTYPE ) func (i GetIncludeQueryParameterType) String() string { - return []string{"stack-deployment-group-summary"}[i] + return []string{"stack_deployment_group_summary", "run_status_summaries"}[i] } func ParseGetIncludeQueryParameterType(v string) (any, error) { - result := STACKDEPLOYMENTGROUPSUMMARY_GETINCLUDEQUERYPARAMETERTYPE + result := STACK_DEPLOYMENT_GROUP_SUMMARY_GETINCLUDEQUERYPARAMETERTYPE switch v { - case "stack-deployment-group-summary": - result = STACKDEPLOYMENTGROUPSUMMARY_GETINCLUDEQUERYPARAMETERTYPE + case "stack_deployment_group_summary": + result = STACK_DEPLOYMENT_GROUP_SUMMARY_GETINCLUDEQUERYPARAMETERTYPE + case "run_status_summaries": + result = RUN_STATUS_SUMMARIES_GETINCLUDEQUERYPARAMETERTYPE default: return nil, nil } diff --git a/v2/api/stackdeploymentgroups/item/stackdeploymentruns/get_include_query_parameter_type.go b/v2/api/stackdeploymentgroups/item/stackdeploymentruns/get_include_query_parameter_type.go new file mode 100644 index 000000000..32fc1a35d --- /dev/null +++ b/v2/api/stackdeploymentgroups/item/stackdeploymentruns/get_include_query_parameter_type.go @@ -0,0 +1,45 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackdeploymentruns +type GetIncludeQueryParameterType int + +const ( + STACK_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + CURRENT_STEP_GETINCLUDEQUERYPARAMETERTYPE + DESTROY_STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + BLOCKED_BY_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_deployment_group", "stack_approval", "current_step", "destroy_stack_configuration", "blocked_by_deployment_group"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_deployment_group": + result = STACK_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE + case "stack_approval": + result = STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + case "current_step": + result = CURRENT_STEP_GETINCLUDEQUERYPARAMETERTYPE + case "destroy_stack_configuration": + result = DESTROY_STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + case "blocked_by_deployment_group": + result = BLOCKED_BY_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stackdeploymentgroups/item_stack_deployment_runs_get_response.go b/v2/api/stackdeploymentgroups/item_stack_deployment_runs_get_response.go index b4141fb5b..06976922f 100644 --- a/v2/api/stackdeploymentgroups/item_stack_deployment_runs_get_response.go +++ b/v2/api/stackdeploymentgroups/item_stack_deployment_runs_get_response.go @@ -4,6 +4,7 @@ package stackdeploymentgroups import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,150 @@ type ItemStackDeploymentRunsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable + // The included property + included []ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemStackDeploymentRunsGetResponse_metaable } +// ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +type ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable + stackApprovals i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + stackConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable + stackDeploymentGroups i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable + stackDeploymentSteps i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +} +// NewItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included instantiates a new ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included and sets the default values. +func NewItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included()(*ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) { + m := &ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included{ + } + return m +} +// CreateItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-approvals") { + result.SetStackApprovals(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackApprovals()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configurations") { + result.SetStackConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-deployment-groups") { + result.SetStackDeploymentGroups(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDeploymentGroups()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-deployment-steps") { + result.SetStackDeploymentSteps(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDeploymentSteps()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetStackApprovals() != nil { + return m.GetStackApprovals().GetFieldDeserializers() + } else if m.GetStackConfigurations() != nil { + return m.GetStackConfigurations().GetFieldDeserializers() + } else if m.GetStackDeploymentGroups() != nil { + return m.GetStackDeploymentGroups().GetFieldDeserializers() + } else if m.GetStackDeploymentSteps() != nil { + return m.GetStackDeploymentSteps().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetStackApprovals gets the stackApprovals property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable +// returns a StackApprovalsable when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackApprovals()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable) { + return m.stackApprovals +} +// GetStackConfigurations gets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +// returns a StackConfigurationsable when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) { + return m.stackConfigurations +} +// GetStackDeploymentGroups gets the stackDeploymentGroups property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable +// returns a StackDeploymentGroupsable when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackDeploymentGroups()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable) { + return m.stackDeploymentGroups +} +// GetStackDeploymentSteps gets the stackDeploymentSteps property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +// returns a StackDeploymentStepsable when successful +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackDeploymentSteps()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable) { + return m.stackDeploymentSteps +} +// Serialize serializes information the current object +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStackApprovals() != nil { + err := writer.WriteObjectValue("", m.GetStackApprovals()) + if err != nil { + return err + } + } else if m.GetStackConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurations()) + if err != nil { + return err + } + } else if m.GetStackDeploymentGroups() != nil { + err := writer.WriteObjectValue("", m.GetStackDeploymentGroups()) + if err != nil { + return err + } + } else if m.GetStackDeploymentSteps() != nil { + err := writer.WriteObjectValue("", m.GetStackDeploymentSteps()) + if err != nil { + return err + } + } + return nil +} +// SetStackApprovals sets the stackApprovals property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackApprovals(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable)() { + m.stackApprovals = value +} +// SetStackConfigurations sets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() { + m.stackConfigurations = value +} +// SetStackDeploymentGroups sets the stackDeploymentGroups property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackDeploymentGroups(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable)() { + m.stackDeploymentGroups = value +} +// SetStackDeploymentSteps sets the stackDeploymentSteps property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +func (m *ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackDeploymentSteps(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable)() { + m.stackDeploymentSteps = value +} +type ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackApprovals()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable) + GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + GetStackDeploymentGroups()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable) + GetStackDeploymentSteps()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable) + SetStackApprovals(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackApprovalsable)() + SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() + SetStackDeploymentGroups(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentGroupsable)() + SetStackDeploymentSteps(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable)() +} // NewItemStackDeploymentRunsGetResponse instantiates a new ItemStackDeploymentRunsGetResponse and sets the default values. func NewItemStackDeploymentRunsGetResponse()(*ItemStackDeploymentRunsGetResponse) { m := &ItemStackDeploymentRunsGetResponse{ @@ -60,6 +200,22 @@ func (m *ItemStackDeploymentRunsGetResponse) GetFieldDeserializers()(map[string] } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +238,11 @@ func (m *ItemStackDeploymentRunsGetResponse) GetFieldDeserializers()(map[string] } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable when successful +func (m *ItemStackDeploymentRunsGetResponse) GetIncluded()([]ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemStackDeploymentRunsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +267,18 @@ func (m *ItemStackDeploymentRunsGetResponse) Serialize(writer i878a80d2330e89d26 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +307,10 @@ func (m *ItemStackDeploymentRunsGetResponse) SetAdditionalData(value map[string] func (m *ItemStackDeploymentRunsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemStackDeploymentRunsGetResponse) SetIncluded(value []ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemStackDeploymentRunsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +323,11 @@ type ItemStackDeploymentRunsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable) + GetIncluded()([]ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStackDeploymentRunsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable)() + SetIncluded(value []ItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStackDeploymentRunsGetResponse_metaable)() } diff --git a/v2/api/stackdeploymentgroups/item_stack_deployment_runs_request_builder.go b/v2/api/stackdeploymentgroups/item_stack_deployment_runs_request_builder.go index eb80aebe3..1dac177c1 100644 --- a/v2/api/stackdeploymentgroups/item_stack_deployment_runs_request_builder.go +++ b/v2/api/stackdeploymentgroups/item_stack_deployment_runs_request_builder.go @@ -22,6 +22,8 @@ type ItemStackDeploymentRunsRequestBuilderGetQueryParameters struct { Filterlatest_only *ic5468d8c4eb8d0735677d258cf5e97b2f6ac566d1ab10d998dc8b477a5c97310.GetFilterLatest_onlyQueryParameterType "uriparametername:\"filter%5Blatest_only%5D\"" // Filter by run status. Accepts a comma-separated list of the logical statuses: failed, pending-operator (pre-deploying and deploying awaiting operator input), running (pre-deploying and deploying), pending (pending, acquiring-lock and pending-capacity), abandoned, succeeded. Filterstatus *string "uriparametername:\"filter%5Bstatus%5D\"" + // Optionally side-load the specified relationships. + Include []ic5468d8c4eb8d0735677d258cf5e97b2f6ac566d1ab10d998dc8b477a5c97310.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -34,7 +36,7 @@ type ItemStackDeploymentRunsRequestBuilderGetQueryParameters struct { // NewItemStackDeploymentRunsRequestBuilderInternal instantiates a new ItemStackDeploymentRunsRequestBuilder and sets the default values. func NewItemStackDeploymentRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStackDeploymentRunsRequestBuilder) { m := &ItemStackDeploymentRunsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-deployment-groups/{stack_deployment_group_id}/stack-deployment-runs{?fields%5Bstack%2Ddeployment%2Druns%5D,filter%5Blatest_only%5D*,filter%5Bstatus%5D*,page%5Bnumber%5D*,page%5Bsize%5D*,q*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-deployment-groups/{stack_deployment_group_id}/stack-deployment-runs{?fields%5Bstack%2Ddeployment%2Druns%5D,filter%5Blatest_only%5D*,filter%5Bstatus%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*,q*,sort*}", pathParameters), } return m } diff --git a/v2/api/stackdeploymentruns/item/get_include_query_parameter_type.go b/v2/api/stackdeploymentruns/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..c0334a33a --- /dev/null +++ b/v2/api/stackdeploymentruns/item/get_include_query_parameter_type.go @@ -0,0 +1,54 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + STACK_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + STACK_APPROVALUSER_GETINCLUDEQUERYPARAMETERTYPE + CURRENT_STEP_GETINCLUDEQUERYPARAMETERTYPE + DESTROY_STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + BLOCKED_BY_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE + LATEST_DEPLOYMENT_RUN_FOR_DEPLOYMENT_GETINCLUDEQUERYPARAMETERTYPE + ROLLBACKED_STATE_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_deployment_group", "stack_approval", "stack_approval.user", "current_step", "destroy_stack_configuration", "blocked_by_deployment_group", "latest_deployment_run_for_deployment", "rollbacked_state"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_deployment_group": + result = STACK_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE + case "stack_approval": + result = STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + case "stack_approval.user": + result = STACK_APPROVALUSER_GETINCLUDEQUERYPARAMETERTYPE + case "current_step": + result = CURRENT_STEP_GETINCLUDEQUERYPARAMETERTYPE + case "destroy_stack_configuration": + result = DESTROY_STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + case "blocked_by_deployment_group": + result = BLOCKED_BY_DEPLOYMENT_GROUP_GETINCLUDEQUERYPARAMETERTYPE + case "latest_deployment_run_for_deployment": + result = LATEST_DEPLOYMENT_RUN_FOR_DEPLOYMENT_GETINCLUDEQUERYPARAMETERTYPE + case "rollbacked_state": + result = ROLLBACKED_STATE_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stackdeploymentruns/item/stackdeploymentsteps/get_include_query_parameter_type.go b/v2/api/stackdeploymentruns/item/stackdeploymentsteps/get_include_query_parameter_type.go new file mode 100644 index 000000000..2cafeec97 --- /dev/null +++ b/v2/api/stackdeploymentruns/item/stackdeploymentsteps/get_include_query_parameter_type.go @@ -0,0 +1,45 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackdeploymentsteps +type GetIncludeQueryParameterType int + +const ( + STACK_OPERATION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + STACK_OPERATIONPOLICY_EVALUATION_GETINCLUDEQUERYPARAMETERTYPE + STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + STACK_APPROVALUSER_GETINCLUDEQUERYPARAMETERTYPE + STACK_STATE_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_operation", "stack_operation.policy_evaluation", "stack_approval", "stack_approval.user", "stack_state"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_OPERATION_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_operation": + result = STACK_OPERATION_GETINCLUDEQUERYPARAMETERTYPE + case "stack_operation.policy_evaluation": + result = STACK_OPERATIONPOLICY_EVALUATION_GETINCLUDEQUERYPARAMETERTYPE + case "stack_approval": + result = STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + case "stack_approval.user": + result = STACK_APPROVALUSER_GETINCLUDEQUERYPARAMETERTYPE + case "stack_state": + result = STACK_STATE_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stackdeploymentruns/item_stack_deployment_steps_get_response.go b/v2/api/stackdeploymentruns/item_stack_deployment_steps_get_response.go index 57f4b1fb0..d3a4f8d37 100644 --- a/v2/api/stackdeploymentruns/item_stack_deployment_steps_get_response.go +++ b/v2/api/stackdeploymentruns/item_stack_deployment_steps_get_response.go @@ -4,6 +4,7 @@ package stackdeploymentruns import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,172 @@ type ItemStackDeploymentStepsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable + // The included property + included []ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemStackDeploymentStepsGetResponse_metaable } +// ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAllowImportsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAppliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationImportStatesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationPlansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsable +type ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAllowImportsable + stackOperationAllowImports i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAllowImportsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAppliesable + stackOperationApplies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAppliesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationImportStatesable + stackOperationImportStates i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationImportStatesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationPlansable + stackOperationPlans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationPlansable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsable + stackPolicyEvaluations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsable +} +// NewItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included instantiates a new ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included and sets the default values. +func NewItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included()(*ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) { + m := &ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included{ + } + return m +} +// CreateItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-operation-allow-imports") { + result.SetStackOperationAllowImports(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackOperationAllowImports()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-operation-applies") { + result.SetStackOperationApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackOperationApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-operation-import-states") { + result.SetStackOperationImportStates(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackOperationImportStates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-operation-plans") { + result.SetStackOperationPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackOperationPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-policy-evaluations") { + result.SetStackPolicyEvaluations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackPolicyEvaluations()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetStackOperationAllowImports() != nil { + return m.GetStackOperationAllowImports().GetFieldDeserializers() + } else if m.GetStackOperationApplies() != nil { + return m.GetStackOperationApplies().GetFieldDeserializers() + } else if m.GetStackOperationImportStates() != nil { + return m.GetStackOperationImportStates().GetFieldDeserializers() + } else if m.GetStackOperationPlans() != nil { + return m.GetStackOperationPlans().GetFieldDeserializers() + } else if m.GetStackPolicyEvaluations() != nil { + return m.GetStackPolicyEvaluations().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetStackOperationAllowImports gets the stackOperationAllowImports property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAllowImportsable +// returns a StackOperationAllowImportsable when successful +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) GetStackOperationAllowImports()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAllowImportsable) { + return m.stackOperationAllowImports +} +// GetStackOperationApplies gets the stackOperationApplies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAppliesable +// returns a StackOperationAppliesable when successful +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) GetStackOperationApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAppliesable) { + return m.stackOperationApplies +} +// GetStackOperationImportStates gets the stackOperationImportStates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationImportStatesable +// returns a StackOperationImportStatesable when successful +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) GetStackOperationImportStates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationImportStatesable) { + return m.stackOperationImportStates +} +// GetStackOperationPlans gets the stackOperationPlans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationPlansable +// returns a StackOperationPlansable when successful +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) GetStackOperationPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationPlansable) { + return m.stackOperationPlans +} +// GetStackPolicyEvaluations gets the stackPolicyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsable +// returns a StackPolicyEvaluationsable when successful +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) GetStackPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsable) { + return m.stackPolicyEvaluations +} +// Serialize serializes information the current object +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStackOperationAllowImports() != nil { + err := writer.WriteObjectValue("", m.GetStackOperationAllowImports()) + if err != nil { + return err + } + } else if m.GetStackOperationApplies() != nil { + err := writer.WriteObjectValue("", m.GetStackOperationApplies()) + if err != nil { + return err + } + } else if m.GetStackOperationImportStates() != nil { + err := writer.WriteObjectValue("", m.GetStackOperationImportStates()) + if err != nil { + return err + } + } else if m.GetStackOperationPlans() != nil { + err := writer.WriteObjectValue("", m.GetStackOperationPlans()) + if err != nil { + return err + } + } else if m.GetStackPolicyEvaluations() != nil { + err := writer.WriteObjectValue("", m.GetStackPolicyEvaluations()) + if err != nil { + return err + } + } + return nil +} +// SetStackOperationAllowImports sets the stackOperationAllowImports property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAllowImportsable +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) SetStackOperationAllowImports(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAllowImportsable)() { + m.stackOperationAllowImports = value +} +// SetStackOperationApplies sets the stackOperationApplies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAppliesable +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) SetStackOperationApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAppliesable)() { + m.stackOperationApplies = value +} +// SetStackOperationImportStates sets the stackOperationImportStates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationImportStatesable +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) SetStackOperationImportStates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationImportStatesable)() { + m.stackOperationImportStates = value +} +// SetStackOperationPlans sets the stackOperationPlans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationPlansable +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) SetStackOperationPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationPlansable)() { + m.stackOperationPlans = value +} +// SetStackPolicyEvaluations sets the stackPolicyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsable +func (m *ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_included) SetStackPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsable)() { + m.stackPolicyEvaluations = value +} +type ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackOperationAllowImports()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAllowImportsable) + GetStackOperationApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAppliesable) + GetStackOperationImportStates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationImportStatesable) + GetStackOperationPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationPlansable) + GetStackPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsable) + SetStackOperationAllowImports(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAllowImportsable)() + SetStackOperationApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationAppliesable)() + SetStackOperationImportStates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationImportStatesable)() + SetStackOperationPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackOperationPlansable)() + SetStackPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsable)() +} // NewItemStackDeploymentStepsGetResponse instantiates a new ItemStackDeploymentStepsGetResponse and sets the default values. func NewItemStackDeploymentStepsGetResponse()(*ItemStackDeploymentStepsGetResponse) { m := &ItemStackDeploymentStepsGetResponse{ @@ -60,6 +222,22 @@ func (m *ItemStackDeploymentStepsGetResponse) GetFieldDeserializers()(map[string } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +260,11 @@ func (m *ItemStackDeploymentStepsGetResponse) GetFieldDeserializers()(map[string } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedable when successful +func (m *ItemStackDeploymentStepsGetResponse) GetIncluded()([]ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemStackDeploymentStepsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +289,18 @@ func (m *ItemStackDeploymentStepsGetResponse) Serialize(writer i878a80d2330e89d2 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +329,10 @@ func (m *ItemStackDeploymentStepsGetResponse) SetAdditionalData(value map[string func (m *ItemStackDeploymentStepsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemStackDeploymentStepsGetResponse) SetIncluded(value []ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemStackDeploymentStepsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +345,11 @@ type ItemStackDeploymentStepsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable) + GetIncluded()([]ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStackDeploymentStepsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable)() + SetIncluded(value []ItemStackDeploymentStepsGetResponse_StackDeploymentStepsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStackDeploymentStepsGetResponse_metaable)() } diff --git a/v2/api/stackdeploymentruns/item_stack_deployment_steps_request_builder.go b/v2/api/stackdeploymentruns/item_stack_deployment_steps_request_builder.go index b98b4df73..44167bf10 100644 --- a/v2/api/stackdeploymentruns/item_stack_deployment_steps_request_builder.go +++ b/v2/api/stackdeploymentruns/item_stack_deployment_steps_request_builder.go @@ -18,6 +18,8 @@ type ItemStackDeploymentStepsRequestBuilder struct { type ItemStackDeploymentStepsRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-deployment-steps resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackDeploymentSteps []string "uriparametername:\"fields%5Bstack%2Ddeployment%2Dsteps%5D\"" + // Allows including related resource data. Comma-separated list of relationship names to side-load. + Include []idbe22abb89d7c5b16d148c1dbbd82224cd25acf5a676090bae1420464d5fc2ba.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -28,7 +30,7 @@ type ItemStackDeploymentStepsRequestBuilderGetQueryParameters struct { // NewItemStackDeploymentStepsRequestBuilderInternal instantiates a new ItemStackDeploymentStepsRequestBuilder and sets the default values. func NewItemStackDeploymentStepsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStackDeploymentStepsRequestBuilder) { m := &ItemStackDeploymentStepsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-deployment-runs/{stack_deployment_run_id}/stack-deployment-steps{?fields%5Bstack%2Ddeployment%2Dsteps%5D,page%5Bnumber%5D*,page%5Bsize%5D*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-deployment-runs/{stack_deployment_run_id}/stack-deployment-steps{?fields%5Bstack%2Ddeployment%2Dsteps%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*,sort*}", pathParameters), } return m } diff --git a/v2/api/stackdeploymentruns/with_stack_escaped_deployment_escaped_run_escaped_item_request_builder.go b/v2/api/stackdeploymentruns/with_stack_escaped_deployment_escaped_run_escaped_item_request_builder.go index 009cfa996..0cff23926 100644 --- a/v2/api/stackdeploymentruns/with_stack_escaped_deployment_escaped_run_escaped_item_request_builder.go +++ b/v2/api/stackdeploymentruns/with_stack_escaped_deployment_escaped_run_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i8a422263b0a62c92be45a1765d7f2fa63967cb728ac2720dcd1866b25ee2a4eb "github.com/hashicorp/go-tfe/v2/api/stackdeploymentruns/item" ) // WithStack_deployment_run_ItemRequestBuilder builds and executes requests for operations under \stack-deployment-runs\{stack_deployment_run_id} @@ -17,6 +18,8 @@ type WithStack_deployment_run_ItemRequestBuilder struct { type WithStack_deployment_run_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-deployment-runs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackDeploymentRuns []string "uriparametername:\"fields%5Bstack%2Ddeployment%2Druns%5D\"" + // Optionally side-load the specified relationships. + Include []i8a422263b0a62c92be45a1765d7f2fa63967cb728ac2720dcd1866b25ee2a4eb.GetIncludeQueryParameterType "uriparametername:\"include\"" } // ApproveAllPlans the approveAllPlans property // returns a *ItemApproveAllPlansRequestBuilder when successful @@ -31,7 +34,7 @@ func (m *WithStack_deployment_run_ItemRequestBuilder) Cancel()(*ItemCancelReques // NewWithStack_deployment_run_ItemRequestBuilderInternal instantiates a new WithStack_deployment_run_ItemRequestBuilder and sets the default values. func NewWithStack_deployment_run_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithStack_deployment_run_ItemRequestBuilder) { m := &WithStack_deployment_run_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-deployment-runs/{stack_deployment_run_id}{?fields%5Bstack%2Ddeployment%2Druns%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-deployment-runs/{stack_deployment_run_id}{?fields%5Bstack%2Ddeployment%2Druns%5D,include}", pathParameters), } return m } diff --git a/v2/api/stackdeploymentsteps/item/get_include_query_parameter_type.go b/v2/api/stackdeploymentsteps/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..97a609913 --- /dev/null +++ b/v2/api/stackdeploymentsteps/item/get_include_query_parameter_type.go @@ -0,0 +1,45 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + STACK_OPERATION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + STACK_OPERATIONPOLICY_EVALUATION_GETINCLUDEQUERYPARAMETERTYPE + STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + STACK_APPROVALUSER_GETINCLUDEQUERYPARAMETERTYPE + STACK_STATE_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_operation", "stack_operation.policy_evaluation", "stack_approval", "stack_approval.user", "stack_state"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_OPERATION_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_operation": + result = STACK_OPERATION_GETINCLUDEQUERYPARAMETERTYPE + case "stack_operation.policy_evaluation": + result = STACK_OPERATIONPOLICY_EVALUATION_GETINCLUDEQUERYPARAMETERTYPE + case "stack_approval": + result = STACK_APPROVAL_GETINCLUDEQUERYPARAMETERTYPE + case "stack_approval.user": + result = STACK_APPROVALUSER_GETINCLUDEQUERYPARAMETERTYPE + case "stack_state": + result = STACK_STATE_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stackdeploymentsteps/with_stack_escaped_deployment_escaped_step_escaped_item_request_builder.go b/v2/api/stackdeploymentsteps/with_stack_escaped_deployment_escaped_step_escaped_item_request_builder.go index aaac91544..13875b7f4 100644 --- a/v2/api/stackdeploymentsteps/with_stack_escaped_deployment_escaped_step_escaped_item_request_builder.go +++ b/v2/api/stackdeploymentsteps/with_stack_escaped_deployment_escaped_step_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i93dfd83c9f4c1f3f18212938d7ee755cce579e462bcca2a20fc647e01bf167b6 "github.com/hashicorp/go-tfe/v2/api/stackdeploymentsteps/item" ) // WithStack_deployment_step_ItemRequestBuilder builds and executes requests for operations under \stack-deployment-steps\{stack_deployment_step_id} @@ -17,6 +18,8 @@ type WithStack_deployment_step_ItemRequestBuilder struct { type WithStack_deployment_step_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-deployment-steps resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackDeploymentSteps []string "uriparametername:\"fields%5Bstack%2Ddeployment%2Dsteps%5D\"" + // Allows including related resource data. Comma-separated list of relationship names to side-load. + Include []i93dfd83c9f4c1f3f18212938d7ee755cce579e462bcca2a20fc647e01bf167b6.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Advance the advance property // returns a *ItemAdvanceRequestBuilder when successful @@ -31,7 +34,7 @@ func (m *WithStack_deployment_step_ItemRequestBuilder) Artifacts()(*ItemArtifact // NewWithStack_deployment_step_ItemRequestBuilderInternal instantiates a new WithStack_deployment_step_ItemRequestBuilder and sets the default values. func NewWithStack_deployment_step_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithStack_deployment_step_ItemRequestBuilder) { m := &WithStack_deployment_step_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-deployment-steps/{stack_deployment_step_id}{?fields%5Bstack%2Ddeployment%2Dsteps%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-deployment-steps/{stack_deployment_step_id}{?fields%5Bstack%2Ddeployment%2Dsteps%5D,include}", pathParameters), } return m } diff --git a/v2/api/stackdiagnostics/item/get_include_query_parameter_type.go b/v2/api/stackdiagnostics/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..d36b15bc5 --- /dev/null +++ b/v2/api/stackdiagnostics/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_configuration"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_configuration": + result = STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stackdiagnostics/item_with_stack_escaped_diagnostic_escaped_get_response.go b/v2/api/stackdiagnostics/item_with_stack_escaped_diagnostic_escaped_get_response.go index ec490ba9c..d002f2aa6 100644 --- a/v2/api/stackdiagnostics/item_with_stack_escaped_diagnostic_escaped_get_response.go +++ b/v2/api/stackdiagnostics/item_with_stack_escaped_diagnostic_escaped_get_response.go @@ -13,6 +13,8 @@ type ItemWithStack_diagnostic_GetResponse struct { additionalData map[string]any // The data property data i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable } // NewItemWithStack_diagnostic_GetResponse instantiates a new ItemWithStack_diagnostic_GetResponse and sets the default values. func NewItemWithStack_diagnostic_GetResponse()(*ItemWithStack_diagnostic_GetResponse) { @@ -50,8 +52,29 @@ func (m *ItemWithStack_diagnostic_GetResponse) GetFieldDeserializers()(map[strin } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackConfigurationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []StackConfigurationsable when successful +func (m *ItemWithStack_diagnostic_GetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) { + return m.included +} // Serialize serializes information the current object func (m *ItemWithStack_diagnostic_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -60,6 +83,18 @@ func (m *ItemWithStack_diagnostic_GetResponse) Serialize(writer i878a80d2330e89d return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -76,9 +111,15 @@ func (m *ItemWithStack_diagnostic_GetResponse) SetAdditionalData(value map[strin func (m *ItemWithStack_diagnostic_GetResponse) SetData(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemWithStack_diagnostic_GetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() { + m.included = value +} type ItemWithStack_diagnostic_GetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) SetData(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDiagnosticsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() } diff --git a/v2/api/stackdiagnostics/with_stack_escaped_diagnostic_escaped_item_request_builder.go b/v2/api/stackdiagnostics/with_stack_escaped_diagnostic_escaped_item_request_builder.go index 823782367..a80c7bbf7 100644 --- a/v2/api/stackdiagnostics/with_stack_escaped_diagnostic_escaped_item_request_builder.go +++ b/v2/api/stackdiagnostics/with_stack_escaped_diagnostic_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ic209666d2a6b13f66f896c5983ac64b3892bd66819471323b4dcb66bb118ccc1 "github.com/hashicorp/go-tfe/v2/api/stackdiagnostics/item" ) // WithStack_diagnostic_ItemRequestBuilder builds and executes requests for operations under \stack-diagnostics\{stack_diagnostic_id} @@ -17,11 +18,13 @@ type WithStack_diagnostic_ItemRequestBuilder struct { type WithStack_diagnostic_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-diagnostics resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackDiagnostics []string "uriparametername:\"fields%5Bstack%2Ddiagnostics%5D\"" + // Optionally side-load the specified relationships. + Include []ic209666d2a6b13f66f896c5983ac64b3892bd66819471323b4dcb66bb118ccc1.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithStack_diagnostic_ItemRequestBuilderInternal instantiates a new WithStack_diagnostic_ItemRequestBuilder and sets the default values. func NewWithStack_diagnostic_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithStack_diagnostic_ItemRequestBuilder) { m := &WithStack_diagnostic_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-diagnostics/{stack_diagnostic_id}{?fields%5Bstack%2Ddiagnostics%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-diagnostics/{stack_diagnostic_id}{?fields%5Bstack%2Ddiagnostics%5D,include}", pathParameters), } return m } diff --git a/v2/api/stackpolicyevaluations/item/get_include_query_parameter_type.go b/v2/api/stackpolicyevaluations/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..c16dc2369 --- /dev/null +++ b/v2/api/stackpolicyevaluations/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + STACK_POLICY_SET_OUTCOMES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_policy_set_outcomes"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_POLICY_SET_OUTCOMES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_policy_set_outcomes": + result = STACK_POLICY_SET_OUTCOMES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stackpolicyevaluations/item_request_builder.go b/v2/api/stackpolicyevaluations/item_request_builder.go new file mode 100644 index 000000000..01a6dcde3 --- /dev/null +++ b/v2/api/stackpolicyevaluations/item_request_builder.go @@ -0,0 +1,74 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackpolicyevaluations + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ifee20a37fc79b151e938ec575e7432f6651ef6fa8c1fe5fba7f0d59c0cf93b1f "github.com/hashicorp/go-tfe/v2/api/stackpolicyevaluations/item" +) + +// ItemRequestBuilder builds and executes requests for operations under \stack-policy-evaluations\{-id} +type ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemRequestBuilderGetQueryParameters get details about a specific stack policy evaluation.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +type ItemRequestBuilderGetQueryParameters struct { + // Return only the specified fields for stack-policy-evaluations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. + FieldsstackPolicyEvaluations []string "uriparametername:\"fields%5Bstack%2Dpolicy%2Devaluations%5D\"" + // Optionally side-load the specified relationships. + Include []ifee20a37fc79b151e938ec575e7432f6651ef6fa8c1fe5fba7f0d59c0cf93b1f.GetIncludeQueryParameterType "uriparametername:\"include\"" +} +// NewItemRequestBuilderInternal instantiates a new ItemRequestBuilder and sets the default values. +func NewItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRequestBuilder) { + m := &ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-policy-evaluations/{%2Did}{?fields%5Bstack%2Dpolicy%2Devaluations%5D,include}", pathParameters), + } + return m +} +// NewItemRequestBuilder instantiates a new ItemRequestBuilder and sets the default values. +func NewItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get details about a specific stack policy evaluation.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a StackPolicyEvaluationsEnvelopeable when successful +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRequestBuilderGetQueryParameters])(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsEnvelopeable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackPolicyEvaluationsEnvelopeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicyEvaluationsEnvelopeable), nil +} +// StackPolicySetOutcomes the stackPolicySetOutcomes property +// returns a *ItemStackPolicySetOutcomesRequestBuilder when successful +func (m *ItemRequestBuilder) StackPolicySetOutcomes()(*ItemStackPolicySetOutcomesRequestBuilder) { + return NewItemStackPolicySetOutcomesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation get details about a specific stack policy evaluation.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRequestBuilder when successful +func (m *ItemRequestBuilder) WithUrl(rawUrl string)(*ItemRequestBuilder) { + return NewItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_get_response.go b/v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_get_response.go new file mode 100644 index 000000000..b4c46f390 --- /dev/null +++ b/v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_get_response.go @@ -0,0 +1,154 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackpolicyevaluations + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemStackPolicySetOutcomesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The data property + data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicySetOutcomesable + // The links property + links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable + // The meta property + meta ItemStackPolicySetOutcomesGetResponse_metaable +} +// NewItemStackPolicySetOutcomesGetResponse instantiates a new ItemStackPolicySetOutcomesGetResponse and sets the default values. +func NewItemStackPolicySetOutcomesGetResponse()(*ItemStackPolicySetOutcomesGetResponse) { + m := &ItemStackPolicySetOutcomesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemStackPolicySetOutcomesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStackPolicySetOutcomesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemStackPolicySetOutcomesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemStackPolicySetOutcomesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetData gets the data property value. The data property +// returns a []StackPolicySetOutcomesable when successful +func (m *ItemStackPolicySetOutcomesGetResponse) GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicySetOutcomesable) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStackPolicySetOutcomesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackPolicySetOutcomesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicySetOutcomesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicySetOutcomesable) + } + } + m.SetData(res) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)) + } + return nil + } + res["meta"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemStackPolicySetOutcomesGetResponse_metaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeta(val.(ItemStackPolicySetOutcomesGetResponse_metaable)) + } + return nil + } + return res +} +// GetLinks gets the links property value. The links property +// returns a SelfWithPaginationable when successful +func (m *ItemStackPolicySetOutcomesGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { + return m.links +} +// GetMeta gets the meta property value. The meta property +// returns a ItemStackPolicySetOutcomesGetResponse_metaable when successful +func (m *ItemStackPolicySetOutcomesGetResponse) GetMeta()(ItemStackPolicySetOutcomesGetResponse_metaable) { + return m.meta +} +// Serialize serializes information the current object +func (m *ItemStackPolicySetOutcomesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetData())) + for i, v := range m.GetData() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("data", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("meta", m.GetMeta()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemStackPolicySetOutcomesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetData sets the data property value. The data property +func (m *ItemStackPolicySetOutcomesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicySetOutcomesable)() { + m.data = value +} +// SetLinks sets the links property value. The links property +func (m *ItemStackPolicySetOutcomesGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { + m.links = value +} +// SetMeta sets the meta property value. The meta property +func (m *ItemStackPolicySetOutcomesGetResponse) SetMeta(value ItemStackPolicySetOutcomesGetResponse_metaable)() { + m.meta = value +} +type ItemStackPolicySetOutcomesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicySetOutcomesable) + GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) + GetMeta()(ItemStackPolicySetOutcomesGetResponse_metaable) + SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackPolicySetOutcomesable)() + SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() + SetMeta(value ItemStackPolicySetOutcomesGetResponse_metaable)() +} diff --git a/v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_get_response_escaped_meta.go b/v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_get_response_escaped_meta.go new file mode 100644 index 000000000..5d48a3ab9 --- /dev/null +++ b/v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_get_response_escaped_meta.go @@ -0,0 +1,84 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackpolicyevaluations + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +type ItemStackPolicySetOutcomesGetResponse_meta struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The pagination property + pagination i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Paginationable +} +// NewItemStackPolicySetOutcomesGetResponse_meta instantiates a new ItemStackPolicySetOutcomesGetResponse_meta and sets the default values. +func NewItemStackPolicySetOutcomesGetResponse_meta()(*ItemStackPolicySetOutcomesGetResponse_meta) { + m := &ItemStackPolicySetOutcomesGetResponse_meta{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemStackPolicySetOutcomesGetResponse_metaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStackPolicySetOutcomesGetResponse_metaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemStackPolicySetOutcomesGetResponse_meta(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemStackPolicySetOutcomesGetResponse_meta) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStackPolicySetOutcomesGetResponse_meta) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pagination"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreatePaginationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPagination(val.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Paginationable)) + } + return nil + } + return res +} +// GetPagination gets the pagination property value. The pagination property +// returns a Paginationable when successful +func (m *ItemStackPolicySetOutcomesGetResponse_meta) GetPagination()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Paginationable) { + return m.pagination +} +// Serialize serializes information the current object +func (m *ItemStackPolicySetOutcomesGetResponse_meta) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("pagination", m.GetPagination()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemStackPolicySetOutcomesGetResponse_meta) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPagination sets the pagination property value. The pagination property +func (m *ItemStackPolicySetOutcomesGetResponse_meta) SetPagination(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Paginationable)() { + m.pagination = value +} +type ItemStackPolicySetOutcomesGetResponse_metaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPagination()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Paginationable) + SetPagination(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Paginationable)() +} diff --git a/v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_request_builder.go b/v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_request_builder.go new file mode 100644 index 000000000..3734503bc --- /dev/null +++ b/v2/api/stackpolicyevaluations/item_stack_policy_set_outcomes_request_builder.go @@ -0,0 +1,74 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackpolicyevaluations + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" +) + +// ItemStackPolicySetOutcomesRequestBuilder builds and executes requests for operations under \stack-policy-evaluations\{-id}\stack-policy-set-outcomes +type ItemStackPolicySetOutcomesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemStackPolicySetOutcomesRequestBuilderGetQueryParameters list the stack policy set outcomes associated with a stack policy evaluation. Supports filtering via the `filter` parameter.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +type ItemStackPolicySetOutcomesRequestBuilderGetQueryParameters struct { + // Return only the specified fields for stack-policy-set-outcomes resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. + FieldsstackPolicySetOutcomes []string "uriparametername:\"fields%5Bstack%2Dpolicy%2Dset%2Doutcomes%5D\"" + // Filter outcomes using OR-grouped AND conditions. Each numeric index definesan independent AND-condition group; groups are combined with OR.Example — return outcomes that are errored OR (failed + mandatory):```filter[0][status]=errored&filter[1][status]=failed&filter[1][enforcement_level]=mandatory``` + Filter []string "uriparametername:\"filter\"" + // The page number to retrieve. + Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" + // The number of items to retrieve per page. Defaults to 20. + Pagesize *int32 "uriparametername:\"page%5Bsize%5D\"" +} +// NewItemStackPolicySetOutcomesRequestBuilderInternal instantiates a new ItemStackPolicySetOutcomesRequestBuilder and sets the default values. +func NewItemStackPolicySetOutcomesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStackPolicySetOutcomesRequestBuilder) { + m := &ItemStackPolicySetOutcomesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-policy-evaluations/{%2Did}/stack-policy-set-outcomes{?fields%5Bstack%2Dpolicy%2Dset%2Doutcomes%5D,filter*,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + } + return m +} +// NewItemStackPolicySetOutcomesRequestBuilder instantiates a new ItemStackPolicySetOutcomesRequestBuilder and sets the default values. +func NewItemStackPolicySetOutcomesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStackPolicySetOutcomesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemStackPolicySetOutcomesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the stack policy set outcomes associated with a stack policy evaluation. Supports filtering via the `filter` parameter.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a ItemStackPolicySetOutcomesGetResponseable when successful +// returns a Errors error when the service returns a 400 status code +// returns a Errors error when the service returns a 4XX or 5XX status code +func (m *ItemStackPolicySetOutcomesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemStackPolicySetOutcomesRequestBuilderGetQueryParameters])(ItemStackPolicySetOutcomesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + "XXX": i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateErrorsFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemStackPolicySetOutcomesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemStackPolicySetOutcomesGetResponseable), nil +} +// ToGetRequestInformation list the stack policy set outcomes associated with a stack policy evaluation. Supports filtering via the `filter` parameter.This operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users. +// returns a *RequestInformation when successful +func (m *ItemStackPolicySetOutcomesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemStackPolicySetOutcomesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemStackPolicySetOutcomesRequestBuilder when successful +func (m *ItemStackPolicySetOutcomesRequestBuilder) WithUrl(rawUrl string)(*ItemStackPolicySetOutcomesRequestBuilder) { + return NewItemStackPolicySetOutcomesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/v2/api/stackpolicyevaluations/stack_policy_evaluations_request_builder.go b/v2/api/stackpolicyevaluations/stack_policy_evaluations_request_builder.go new file mode 100644 index 000000000..88f560a07 --- /dev/null +++ b/v2/api/stackpolicyevaluations/stack_policy_evaluations_request_builder.go @@ -0,0 +1,38 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackpolicyevaluations + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// StackPolicyEvaluationsRequestBuilder builds and executes requests for operations under \stack-policy-evaluations +type StackPolicyEvaluationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ById gets an item from the github.com/hashicorp/go-tfe/v2/api.stackPolicyEvaluations.item collection +// returns a *ItemRequestBuilder when successful +func (m *StackPolicyEvaluationsRequestBuilder) ById(id string)(*ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if id != "" { + urlTplParams["%2Did"] = id + } + return NewItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewStackPolicyEvaluationsRequestBuilderInternal instantiates a new StackPolicyEvaluationsRequestBuilder and sets the default values. +func NewStackPolicyEvaluationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StackPolicyEvaluationsRequestBuilder) { + m := &StackPolicyEvaluationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stack-policy-evaluations", pathParameters), + } + return m +} +// NewStackPolicyEvaluationsRequestBuilder instantiates a new StackPolicyEvaluationsRequestBuilder and sets the default values. +func NewStackPolicyEvaluationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StackPolicyEvaluationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStackPolicyEvaluationsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/v2/api/stacks/item/get_include_query_parameter_type.go b/v2/api/stacks/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..7d00634f5 --- /dev/null +++ b/v2/api/stacks/item/get_include_query_parameter_type.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + LATEST_STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + LATEST_STACK_CONFIGURATIONSTACK_DIAGNOSTICS_GETINCLUDEQUERYPARAMETERTYPE + ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE + PROJECT_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"latest_stack_configuration", "latest_stack_configuration.stack_diagnostics", "organization", "project"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := LATEST_STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "latest_stack_configuration": + result = LATEST_STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + case "latest_stack_configuration.stack_diagnostics": + result = LATEST_STACK_CONFIGURATIONSTACK_DIAGNOSTICS_GETINCLUDEQUERYPARAMETERTYPE + case "organization": + result = ORGANIZATION_GETINCLUDEQUERYPARAMETERTYPE + case "project": + result = PROJECT_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stacks/item/stackconfigurationsummaries/get_include_query_parameter_type.go b/v2/api/stacks/item/stackconfigurationsummaries/get_include_query_parameter_type.go new file mode 100644 index 000000000..d678695fe --- /dev/null +++ b/v2/api/stacks/item/stackconfigurationsummaries/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackconfigurationsummaries +type GetIncludeQueryParameterType int + +const ( + STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_configuration"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_configuration": + result = STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stacks/item/stackdeployments/get_include_query_parameter_type.go b/v2/api/stacks/item/stackdeployments/get_include_query_parameter_type.go new file mode 100644 index 000000000..aec652b11 --- /dev/null +++ b/v2/api/stacks/item/stackdeployments/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackdeployments +type GetIncludeQueryParameterType int + +const ( + LATEST_DEPLOYMENT_RUN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + LATEST_DEPLOYMENT_RUNSTACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"latest_deployment_run", "latest_deployment_run.stack_configuration"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := LATEST_DEPLOYMENT_RUN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "latest_deployment_run": + result = LATEST_DEPLOYMENT_RUN_GETINCLUDEQUERYPARAMETERTYPE + case "latest_deployment_run.stack_configuration": + result = LATEST_DEPLOYMENT_RUNSTACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stacks/item/stackdeployments/item/stackdeploymentruns/get_include_query_parameter_type.go b/v2/api/stacks/item/stackdeployments/item/stackdeploymentruns/get_include_query_parameter_type.go new file mode 100644 index 000000000..e6fb8fb45 --- /dev/null +++ b/v2/api/stacks/item/stackdeployments/item/stackdeploymentruns/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stackdeploymentruns +type GetIncludeQueryParameterType int + +const ( + STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + CURRENT_STEP_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"stack_configuration", "current_step"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "stack_configuration": + result = STACK_CONFIGURATION_GETINCLUDEQUERYPARAMETERTYPE + case "current_step": + result = CURRENT_STEP_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stacks/item_stack_configuration_summaries_get_response.go b/v2/api/stacks/item_stack_configuration_summaries_get_response.go index f5081680c..446827cb3 100644 --- a/v2/api/stacks/item_stack_configuration_summaries_get_response.go +++ b/v2/api/stacks/item_stack_configuration_summaries_get_response.go @@ -13,6 +13,8 @@ type ItemStackConfigurationSummariesGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemStackConfigurationSummariesGetResponse) GetFieldDeserializers()(map } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateStackConfigurationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemStackConfigurationSummariesGetResponse) GetFieldDeserializers()(map } return res } +// GetIncluded gets the included property value. The included property +// returns a []StackConfigurationsable when successful +func (m *ItemStackConfigurationSummariesGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemStackConfigurationSummariesGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemStackConfigurationSummariesGetResponse) Serialize(writer i878a80d23 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemStackConfigurationSummariesGetResponse) SetAdditionalData(value map func (m *ItemStackConfigurationSummariesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemStackConfigurationSummariesGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemStackConfigurationSummariesGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemStackConfigurationSummariesGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStackConfigurationSummariesGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationSummariesable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStackConfigurationSummariesGetResponse_metaable)() } diff --git a/v2/api/stacks/item_stack_configuration_summaries_request_builder.go b/v2/api/stacks/item_stack_configuration_summaries_request_builder.go index de2092c99..b43b0543d 100644 --- a/v2/api/stacks/item_stack_configuration_summaries_request_builder.go +++ b/v2/api/stacks/item_stack_configuration_summaries_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i75b2fe7d6f50236aad38270f92ceaec0279b063f96466d5f6ae8414fec335a4f "github.com/hashicorp/go-tfe/v2/api/stacks/item/stackconfigurationsummaries" ) // ItemStackConfigurationSummariesRequestBuilder builds and executes requests for operations under \stacks\{stack_id}\stack-configuration-summaries @@ -17,6 +18,8 @@ type ItemStackConfigurationSummariesRequestBuilder struct { type ItemStackConfigurationSummariesRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-configuration-summaries resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackConfigurationSummaries []string "uriparametername:\"fields%5Bstack%2Dconfiguration%2Dsummaries%5D\"" + // Optionally side-load the specified relationships. + Include []i75b2fe7d6f50236aad38270f92ceaec0279b063f96466d5f6ae8414fec335a4f.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemStackConfigurationSummariesRequestBuilderGetQueryParameters struct { // NewItemStackConfigurationSummariesRequestBuilderInternal instantiates a new ItemStackConfigurationSummariesRequestBuilder and sets the default values. func NewItemStackConfigurationSummariesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStackConfigurationSummariesRequestBuilder) { m := &ItemStackConfigurationSummariesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stacks/{stack_id}/stack-configuration-summaries{?fields%5Bstack%2Dconfiguration%2Dsummaries%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stacks/{stack_id}/stack-configuration-summaries{?fields%5Bstack%2Dconfiguration%2Dsummaries%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/stacks/item_stack_deployments_get_response.go b/v2/api/stacks/item_stack_deployments_get_response.go index 9f88fa700..16d88d1be 100644 --- a/v2/api/stacks/item_stack_deployments_get_response.go +++ b/v2/api/stacks/item_stack_deployments_get_response.go @@ -4,6 +4,7 @@ package stacks import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,106 @@ type ItemStackDeploymentsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentsable + // The included property + included []ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemStackDeploymentsGetResponse_metaable } +// ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable +type ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + stackConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable + stackDeploymentRuns i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable +} +// NewItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included instantiates a new ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included and sets the default values. +func NewItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included()(*ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included) { + m := &ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included{ + } + return m +} +// CreateItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configurations") { + result.SetStackConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-deployment-runs") { + result.SetStackDeploymentRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDeploymentRuns()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetStackConfigurations() != nil { + return m.GetStackConfigurations().GetFieldDeserializers() + } else if m.GetStackDeploymentRuns() != nil { + return m.GetStackDeploymentRuns().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetStackConfigurations gets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +// returns a StackConfigurationsable when successful +func (m *ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included) GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) { + return m.stackConfigurations +} +// GetStackDeploymentRuns gets the stackDeploymentRuns property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable +// returns a StackDeploymentRunsable when successful +func (m *ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included) GetStackDeploymentRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable) { + return m.stackDeploymentRuns +} +// Serialize serializes information the current object +func (m *ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStackConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurations()) + if err != nil { + return err + } + } else if m.GetStackDeploymentRuns() != nil { + err := writer.WriteObjectValue("", m.GetStackDeploymentRuns()) + if err != nil { + return err + } + } + return nil +} +// SetStackConfigurations sets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +func (m *ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included) SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() { + m.stackConfigurations = value +} +// SetStackDeploymentRuns sets the stackDeploymentRuns property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable +func (m *ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_included) SetStackDeploymentRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable)() { + m.stackDeploymentRuns = value +} +type ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + GetStackDeploymentRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable) + SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() + SetStackDeploymentRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable)() +} // NewItemStackDeploymentsGetResponse instantiates a new ItemStackDeploymentsGetResponse and sets the default values. func NewItemStackDeploymentsGetResponse()(*ItemStackDeploymentsGetResponse) { m := &ItemStackDeploymentsGetResponse{ @@ -60,6 +156,22 @@ func (m *ItemStackDeploymentsGetResponse) GetFieldDeserializers()(map[string]fun } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +194,11 @@ func (m *ItemStackDeploymentsGetResponse) GetFieldDeserializers()(map[string]fun } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedable when successful +func (m *ItemStackDeploymentsGetResponse) GetIncluded()([]ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemStackDeploymentsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +223,18 @@ func (m *ItemStackDeploymentsGetResponse) Serialize(writer i878a80d2330e89d26896 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +263,10 @@ func (m *ItemStackDeploymentsGetResponse) SetAdditionalData(value map[string]any func (m *ItemStackDeploymentsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemStackDeploymentsGetResponse) SetIncluded(value []ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemStackDeploymentsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +279,11 @@ type ItemStackDeploymentsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentsable) + GetIncluded()([]ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStackDeploymentsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentsable)() + SetIncluded(value []ItemStackDeploymentsGetResponse_StackDeploymentsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStackDeploymentsGetResponse_metaable)() } diff --git a/v2/api/stacks/item_stack_deployments_item_stack_deployment_runs_get_response.go b/v2/api/stacks/item_stack_deployments_item_stack_deployment_runs_get_response.go index 064af470d..cea56499b 100644 --- a/v2/api/stacks/item_stack_deployments_item_stack_deployment_runs_get_response.go +++ b/v2/api/stacks/item_stack_deployments_item_stack_deployment_runs_get_response.go @@ -4,6 +4,7 @@ package stacks import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,106 @@ type ItemStackDeploymentsItemStackDeploymentRunsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable + // The included property + included []ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemStackDeploymentsItemStackDeploymentRunsGetResponse_metaable } +// ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +type ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + stackConfigurations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable + stackDeploymentSteps i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +} +// NewItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included instantiates a new ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included and sets the default values. +func NewItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included()(*ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) { + m := &ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included{ + } + return m +} +// CreateItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-configurations") { + result.SetStackConfigurations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackConfigurations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stack-deployment-steps") { + result.SetStackDeploymentSteps(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStackDeploymentSteps()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetStackConfigurations() != nil { + return m.GetStackConfigurations().GetFieldDeserializers() + } else if m.GetStackDeploymentSteps() != nil { + return m.GetStackDeploymentSteps().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetStackConfigurations gets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +// returns a StackConfigurationsable when successful +func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) { + return m.stackConfigurations +} +// GetStackDeploymentSteps gets the stackDeploymentSteps property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +// returns a StackDeploymentStepsable when successful +func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) GetStackDeploymentSteps()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable) { + return m.stackDeploymentSteps +} +// Serialize serializes information the current object +func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStackConfigurations() != nil { + err := writer.WriteObjectValue("", m.GetStackConfigurations()) + if err != nil { + return err + } + } else if m.GetStackDeploymentSteps() != nil { + err := writer.WriteObjectValue("", m.GetStackDeploymentSteps()) + if err != nil { + return err + } + } + return nil +} +// SetStackConfigurations sets the stackConfigurations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable +func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() { + m.stackConfigurations = value +} +// SetStackDeploymentSteps sets the stackDeploymentSteps property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable +func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_included) SetStackDeploymentSteps(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable)() { + m.stackDeploymentSteps = value +} +type ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStackConfigurations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable) + GetStackDeploymentSteps()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable) + SetStackConfigurations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackConfigurationsable)() + SetStackDeploymentSteps(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentStepsable)() +} // NewItemStackDeploymentsItemStackDeploymentRunsGetResponse instantiates a new ItemStackDeploymentsItemStackDeploymentRunsGetResponse and sets the default values. func NewItemStackDeploymentsItemStackDeploymentRunsGetResponse()(*ItemStackDeploymentsItemStackDeploymentRunsGetResponse) { m := &ItemStackDeploymentsItemStackDeploymentRunsGetResponse{ @@ -60,6 +156,22 @@ func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse) GetFieldDeseria } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +194,11 @@ func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse) GetFieldDeseria } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable when successful +func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse) GetIncluded()([]ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +223,18 @@ func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse) Serialize(write return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +263,10 @@ func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse) SetAdditionalDa func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse) SetIncluded(value []ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemStackDeploymentsItemStackDeploymentRunsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +279,11 @@ type ItemStackDeploymentsItemStackDeploymentRunsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable) + GetIncluded()([]ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemStackDeploymentsItemStackDeploymentRunsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StackDeploymentRunsable)() + SetIncluded(value []ItemStackDeploymentsItemStackDeploymentRunsGetResponse_StackDeploymentRunsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemStackDeploymentsItemStackDeploymentRunsGetResponse_metaable)() } diff --git a/v2/api/stacks/item_stack_deployments_item_stack_deployment_runs_request_builder.go b/v2/api/stacks/item_stack_deployments_item_stack_deployment_runs_request_builder.go index 822c27175..cc7e61902 100644 --- a/v2/api/stacks/item_stack_deployments_item_stack_deployment_runs_request_builder.go +++ b/v2/api/stacks/item_stack_deployments_item_stack_deployment_runs_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i9ce01d9dd9a265a05a53f07ce662f5dd38c39ed32bf5de6ccf047ac5d3187d34 "github.com/hashicorp/go-tfe/v2/api/stacks/item/stackdeployments/item/stackdeploymentruns" ) // ItemStackDeploymentsItemStackDeploymentRunsRequestBuilder builds and executes requests for operations under \stacks\{stack_id}\stack-deployments\{deployment}\stack-deployment-runs @@ -17,6 +18,8 @@ type ItemStackDeploymentsItemStackDeploymentRunsRequestBuilder struct { type ItemStackDeploymentsItemStackDeploymentRunsRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-deployment-runs resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackDeploymentRuns []string "uriparametername:\"fields%5Bstack%2Ddeployment%2Druns%5D\"" + // Optionally side-load the specified relationships. + Include []i9ce01d9dd9a265a05a53f07ce662f5dd38c39ed32bf5de6ccf047ac5d3187d34.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemStackDeploymentsItemStackDeploymentRunsRequestBuilderGetQueryParameters // NewItemStackDeploymentsItemStackDeploymentRunsRequestBuilderInternal instantiates a new ItemStackDeploymentsItemStackDeploymentRunsRequestBuilder and sets the default values. func NewItemStackDeploymentsItemStackDeploymentRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStackDeploymentsItemStackDeploymentRunsRequestBuilder) { m := &ItemStackDeploymentsItemStackDeploymentRunsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stacks/{stack_id}/stack-deployments/{deployment}/stack-deployment-runs{?fields%5Bstack%2Ddeployment%2Druns%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stacks/{stack_id}/stack-deployments/{deployment}/stack-deployment-runs{?fields%5Bstack%2Ddeployment%2Druns%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/stacks/item_stack_deployments_request_builder.go b/v2/api/stacks/item_stack_deployments_request_builder.go index 0d3bbf88a..97de08ea3 100644 --- a/v2/api/stacks/item_stack_deployments_request_builder.go +++ b/v2/api/stacks/item_stack_deployments_request_builder.go @@ -18,6 +18,8 @@ type ItemStackDeploymentsRequestBuilder struct { type ItemStackDeploymentsRequestBuilderGetQueryParameters struct { // Return only the specified fields for stack-deployments resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstackDeployments []string "uriparametername:\"fields%5Bstack%2Ddeployments%5D\"" + // Optionally side-load the specified relationships. + Include []i0e1ebaf4b591e989c712afb4c3ccef15e3a61b3d849df70fe209a17e6dc03441.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -42,7 +44,7 @@ func (m *ItemStackDeploymentsRequestBuilder) ByDeployment(deployment string)(*It // NewItemStackDeploymentsRequestBuilderInternal instantiates a new ItemStackDeploymentsRequestBuilder and sets the default values. func NewItemStackDeploymentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStackDeploymentsRequestBuilder) { m := &ItemStackDeploymentsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stacks/{stack_id}/stack-deployments{?fields%5Bstack%2Ddeployments%5D,page%5Bnumber%5D*,page%5Bsize%5D*,q*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stacks/{stack_id}/stack-deployments{?fields%5Bstack%2Ddeployments%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*,q*,sort*}", pathParameters), } return m } diff --git a/v2/api/stacks/with_stack_escaped_item_request_builder.go b/v2/api/stacks/with_stack_escaped_item_request_builder.go index 848f2e08a..46fbe10f0 100644 --- a/v2/api/stacks/with_stack_escaped_item_request_builder.go +++ b/v2/api/stacks/with_stack_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ifad88f4154e8a023e16c4f6a2e766977e9c0d0578f0f5da65f83139f1ef5e8da "github.com/hashicorp/go-tfe/v2/api/stacks/item" ) // WithStack_ItemRequestBuilder builds and executes requests for operations under \stacks\{stack_id} @@ -22,11 +23,13 @@ type WithStack_ItemRequestBuilderDeleteQueryParameters struct { type WithStack_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for stacks resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsstacks []string "uriparametername:\"fields%5Bstacks%5D\"" + // Optionally side-load the specified relationships. + Include []ifad88f4154e8a023e16c4f6a2e766977e9c0d0578f0f5da65f83139f1ef5e8da.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithStack_ItemRequestBuilderInternal instantiates a new WithStack_ItemRequestBuilder and sets the default values. func NewWithStack_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithStack_ItemRequestBuilder) { m := &WithStack_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stacks/{stack_id}{?fields%5Bstacks%5D,force*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/stacks/{stack_id}{?fields%5Bstacks%5D,force*,include}", pathParameters), } return m } diff --git a/v2/api/stateversions/get_include_query_parameter_type.go b/v2/api/stateversions/get_include_query_parameter_type.go new file mode 100644 index 000000000..58a529c0d --- /dev/null +++ b/v2/api/stateversions/get_include_query_parameter_type.go @@ -0,0 +1,51 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package stateversions +type GetIncludeQueryParameterType int + +const ( + CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + RUN_GETINCLUDEQUERYPARAMETERTYPE + RUNCREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + RUNCONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + OUTPUTS_GETINCLUDEQUERYPARAMETERTYPE + HYOK_ENCRYPTED_DATA_KEY_GETINCLUDEQUERYPARAMETERTYPE + HYOK_ENCRYPTED_DATA_KEYHYOK_CUSTOMER_KEY_VERSION_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"created_by", "run", "run.created_by", "run.configuration_version", "outputs", "hyok_encrypted_data_key", "hyok_encrypted_data_key.hyok_customer_key_version"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "created_by": + result = CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + case "run": + result = RUN_GETINCLUDEQUERYPARAMETERTYPE + case "run.created_by": + result = RUNCREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + case "run.configuration_version": + result = RUNCONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "outputs": + result = OUTPUTS_GETINCLUDEQUERYPARAMETERTYPE + case "hyok_encrypted_data_key": + result = HYOK_ENCRYPTED_DATA_KEY_GETINCLUDEQUERYPARAMETERTYPE + case "hyok_encrypted_data_key.hyok_customer_key_version": + result = HYOK_ENCRYPTED_DATA_KEYHYOK_CUSTOMER_KEY_VERSION_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stateversions/item/get_include_query_parameter_type.go b/v2/api/stateversions/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..797288430 --- /dev/null +++ b/v2/api/stateversions/item/get_include_query_parameter_type.go @@ -0,0 +1,51 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + RUN_GETINCLUDEQUERYPARAMETERTYPE + RUNCREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + RUNCONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + OUTPUTS_GETINCLUDEQUERYPARAMETERTYPE + HYOK_ENCRYPTED_DATA_KEY_GETINCLUDEQUERYPARAMETERTYPE + HYOK_ENCRYPTED_DATA_KEYHYOK_CUSTOMER_KEY_VERSION_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"created_by", "run", "run.created_by", "run.configuration_version", "outputs", "hyok_encrypted_data_key", "hyok_encrypted_data_key.hyok_customer_key_version"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "created_by": + result = CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + case "run": + result = RUN_GETINCLUDEQUERYPARAMETERTYPE + case "run.created_by": + result = RUNCREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + case "run.configuration_version": + result = RUNCONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "outputs": + result = OUTPUTS_GETINCLUDEQUERYPARAMETERTYPE + case "hyok_encrypted_data_key": + result = HYOK_ENCRYPTED_DATA_KEY_GETINCLUDEQUERYPARAMETERTYPE + case "hyok_encrypted_data_key.hyok_customer_key_version": + result = HYOK_ENCRYPTED_DATA_KEYHYOK_CUSTOMER_KEY_VERSION_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/stateversions/state_versions_get_response.go b/v2/api/stateversions/state_versions_get_response.go index 722d10262..228fb3bf7 100644 --- a/v2/api/stateversions/state_versions_get_response.go +++ b/v2/api/stateversions/state_versions_get_response.go @@ -4,6 +4,7 @@ package stateversions import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,194 @@ type StateVersionsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + // The included property + included []StateVersionsGetResponse_StateVersionsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta StateVersionsGetResponse_metaable } +// StateVersionsGetResponse_StateVersionsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokEncryptedDataKeysable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +type StateVersionsGetResponse_StateVersionsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable + hyokCustomerKeyVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokEncryptedDataKeysable + hyokEncryptedDataKeys i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokEncryptedDataKeysable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionOutputsable + stateVersionOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionOutputsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +} +// NewStateVersionsGetResponse_StateVersionsGetResponse_included instantiates a new StateVersionsGetResponse_StateVersionsGetResponse_included and sets the default values. +func NewStateVersionsGetResponse_StateVersionsGetResponse_included()(*StateVersionsGetResponse_StateVersionsGetResponse_included) { + m := &StateVersionsGetResponse_StateVersionsGetResponse_included{ + } + return m +} +// CreateStateVersionsGetResponse_StateVersionsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStateVersionsGetResponse_StateVersionsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewStateVersionsGetResponse_StateVersionsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "hyok-customer-key-versions") { + result.SetHyokCustomerKeyVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewHyokCustomerKeyVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "hyok-encrypted-data-keys") { + result.SetHyokEncryptedDataKeys(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewHyokEncryptedDataKeys()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-version-outputs") { + result.SetStateVersionOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStateVersionOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } + } + } + } + return result, nil +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + return m.configurationVersions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetHyokCustomerKeyVersions() != nil { + return m.GetHyokCustomerKeyVersions().GetFieldDeserializers() + } else if m.GetHyokEncryptedDataKeys() != nil { + return m.GetHyokEncryptedDataKeys().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetStateVersionOutputs() != nil { + return m.GetStateVersionOutputs().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetHyokCustomerKeyVersions gets the hyokCustomerKeyVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable +// returns a HyokCustomerKeyVersionsable when successful +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) GetHyokCustomerKeyVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable) { + return m.hyokCustomerKeyVersions +} +// GetHyokEncryptedDataKeys gets the hyokEncryptedDataKeys property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokEncryptedDataKeysable +// returns a HyokEncryptedDataKeysable when successful +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) GetHyokEncryptedDataKeys()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokEncryptedDataKeysable) { + return m.hyokEncryptedDataKeys +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +// returns a Runsable when successful +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + return m.runs +} +// GetStateVersionOutputs gets the stateVersionOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionOutputsable +// returns a StateVersionOutputsable when successful +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) GetStateVersionOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionOutputsable) { + return m.stateVersionOutputs +} +// GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// returns a Usersable when successful +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetHyokCustomerKeyVersions() != nil { + err := writer.WriteObjectValue("", m.GetHyokCustomerKeyVersions()) + if err != nil { + return err + } + } else if m.GetHyokEncryptedDataKeys() != nil { + err := writer.WriteObjectValue("", m.GetHyokEncryptedDataKeys()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetStateVersionOutputs() != nil { + err := writer.WriteObjectValue("", m.GetStateVersionOutputs()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetHyokCustomerKeyVersions sets the hyokCustomerKeyVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) SetHyokCustomerKeyVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable)() { + m.hyokCustomerKeyVersions = value +} +// SetHyokEncryptedDataKeys sets the hyokEncryptedDataKeys property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokEncryptedDataKeysable +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) SetHyokEncryptedDataKeys(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokEncryptedDataKeysable)() { + m.hyokEncryptedDataKeys = value +} +// SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { + m.runs = value +} +// SetStateVersionOutputs sets the stateVersionOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionOutputsable +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) SetStateVersionOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionOutputsable)() { + m.stateVersionOutputs = value +} +// SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +func (m *StateVersionsGetResponse_StateVersionsGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { + m.users = value +} +type StateVersionsGetResponse_StateVersionsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetHyokCustomerKeyVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable) + GetHyokEncryptedDataKeys()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokEncryptedDataKeysable) + GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetStateVersionOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionOutputsable) + GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetHyokCustomerKeyVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokCustomerKeyVersionsable)() + SetHyokEncryptedDataKeys(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.HyokEncryptedDataKeysable)() + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetStateVersionOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionOutputsable)() + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() +} // NewStateVersionsGetResponse instantiates a new StateVersionsGetResponse and sets the default values. func NewStateVersionsGetResponse()(*StateVersionsGetResponse) { m := &StateVersionsGetResponse{ @@ -60,6 +244,22 @@ func (m *StateVersionsGetResponse) GetFieldDeserializers()(map[string]func(i878a } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStateVersionsGetResponse_StateVersionsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StateVersionsGetResponse_StateVersionsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StateVersionsGetResponse_StateVersionsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +282,11 @@ func (m *StateVersionsGetResponse) GetFieldDeserializers()(map[string]func(i878a } return res } +// GetIncluded gets the included property value. The included property +// returns a []StateVersionsGetResponse_StateVersionsGetResponse_includedable when successful +func (m *StateVersionsGetResponse) GetIncluded()([]StateVersionsGetResponse_StateVersionsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *StateVersionsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +311,18 @@ func (m *StateVersionsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f4 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +351,10 @@ func (m *StateVersionsGetResponse) SetAdditionalData(value map[string]any)() { func (m *StateVersionsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *StateVersionsGetResponse) SetIncluded(value []StateVersionsGetResponse_StateVersionsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *StateVersionsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +367,11 @@ type StateVersionsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) + GetIncluded()([]StateVersionsGetResponse_StateVersionsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(StateVersionsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() + SetIncluded(value []StateVersionsGetResponse_StateVersionsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value StateVersionsGetResponse_metaable)() } diff --git a/v2/api/stateversions/state_versions_request_builder.go b/v2/api/stateversions/state_versions_request_builder.go index 38d3131dc..bd4aa4e07 100644 --- a/v2/api/stateversions/state_versions_request_builder.go +++ b/v2/api/stateversions/state_versions_request_builder.go @@ -23,6 +23,8 @@ type StateVersionsRequestBuilderGetQueryParameters struct { Filterstatus *string "uriparametername:\"filter%5Bstatus%5D\"" // The name of the workspace to list state versions for. Filterworkspacename *string "uriparametername:\"filter%5Bworkspace%5D%5Bname%5D\"" + // Optionally side-load the specified relationships. + Include []GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -43,7 +45,7 @@ func (m *StateVersionsRequestBuilder) ByState_version_id(state_version_id string // NewStateVersionsRequestBuilderInternal instantiates a new StateVersionsRequestBuilder and sets the default values. func NewStateVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StateVersionsRequestBuilder) { m := &StateVersionsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/state-versions?filter[organization][name]={filter%5Borganization%5D%5Bname%5D}&filter[workspace][name]={filter%5Bworkspace%5D%5Bname%5D}{&fields%5Bstate%2Dversions%5D,filter%5Bstatus%5D*,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/state-versions?filter[organization][name]={filter%5Borganization%5D%5Bname%5D}&filter[workspace][name]={filter%5Bworkspace%5D%5Bname%5D}{&fields%5Bstate%2Dversions%5D,filter%5Bstatus%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/stateversions/with_state_escaped_version_escaped_item_request_builder.go b/v2/api/stateversions/with_state_escaped_version_escaped_item_request_builder.go index 8e94d2458..44c8165c5 100644 --- a/v2/api/stateversions/with_state_escaped_version_escaped_item_request_builder.go +++ b/v2/api/stateversions/with_state_escaped_version_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ic517e29a0da61ffff18ac62402693bfe4eb68f5d4b10dbdddaa1b013638dcfa8 "github.com/hashicorp/go-tfe/v2/api/stateversions/item" ) // WithState_version_ItemRequestBuilder builds and executes requests for operations under \state-versions\{state_version_id} @@ -17,6 +18,8 @@ type WithState_version_ItemRequestBuilder struct { type WithState_version_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for state-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsstateVersions []string "uriparametername:\"fields%5Bstate%2Dversions%5D\"" + // Optionally side-load the specified relationships. + Include []ic517e29a0da61ffff18ac62402693bfe4eb68f5d4b10dbdddaa1b013638dcfa8.GetIncludeQueryParameterType "uriparametername:\"include\"" } // Actions the actions property // returns a *ItemActionsRequestBuilder when successful @@ -26,7 +29,7 @@ func (m *WithState_version_ItemRequestBuilder) Actions()(*ItemActionsRequestBuil // NewWithState_version_ItemRequestBuilderInternal instantiates a new WithState_version_ItemRequestBuilder and sets the default values. func NewWithState_version_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithState_version_ItemRequestBuilder) { m := &WithState_version_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/state-versions/{state_version_id}{?fields%5Bstate%2Dversions%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/state-versions/{state_version_id}{?fields%5Bstate%2Dversions%5D,include}", pathParameters), } return m } diff --git a/v2/api/subscriptions/item/get_include_query_parameter_type.go b/v2/api/subscriptions/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..611699f76 --- /dev/null +++ b/v2/api/subscriptions/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + FEATURE_SET_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"feature_set"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := FEATURE_SET_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "feature_set": + result = FEATURE_SET_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/subscriptions/subscriptions_item_request_builder.go b/v2/api/subscriptions/subscriptions_item_request_builder.go index a92846f1e..8a46a5367 100644 --- a/v2/api/subscriptions/subscriptions_item_request_builder.go +++ b/v2/api/subscriptions/subscriptions_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + id6ed32abbb0e0554d4e29d75d412197baada1a5d3c86d1f32373b7167199a571 "github.com/hashicorp/go-tfe/v2/api/subscriptions/item" ) // SubscriptionsItemRequestBuilder builds and executes requests for operations under \subscriptions\{id} @@ -17,11 +18,13 @@ type SubscriptionsItemRequestBuilder struct { type SubscriptionsItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for subscriptions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldssubscriptions []string "uriparametername:\"fields%5Bsubscriptions%5D\"" + // Optionally side-load the specified relationships. + Include []id6ed32abbb0e0554d4e29d75d412197baada1a5d3c86d1f32373b7167199a571.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewSubscriptionsItemRequestBuilderInternal instantiates a new SubscriptionsItemRequestBuilder and sets the default values. func NewSubscriptionsItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsItemRequestBuilder) { m := &SubscriptionsItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/subscriptions/{id}{?fields%5Bsubscriptions%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/subscriptions/{id}{?fields%5Bsubscriptions%5D,include}", pathParameters), } return m } diff --git a/v2/api/taskconfigs/item_with_external_escaped_get_response.go b/v2/api/taskconfigs/item_with_external_escaped_get_response.go index 1af35bc89..096d9ca6c 100644 --- a/v2/api/taskconfigs/item_with_external_escaped_get_response.go +++ b/v2/api/taskconfigs/item_with_external_escaped_get_response.go @@ -4,219 +4,239 @@ package taskconfigs import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemWithExternal_GetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelope - // The included property - included []ItemWithExternal_GetResponse_WithExternal_able + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelope + // The included property + included []ItemWithExternal_GetResponse_WithExternal_able } + // ItemWithExternal_GetResponse_WithExternal_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable type ItemWithExternal_GetResponse_WithExternal_ struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable - organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable - tasks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable + tasks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable } + // NewItemWithExternal_GetResponse_WithExternal_ instantiates a new ItemWithExternal_GetResponse_WithExternal_ and sets the default values. -func NewItemWithExternal_GetResponse_WithExternal_()(*ItemWithExternal_GetResponse_WithExternal_) { - m := &ItemWithExternal_GetResponse_WithExternal_{ - } - return m +func NewItemWithExternal_GetResponse_WithExternal_() *ItemWithExternal_GetResponse_WithExternal_ { + m := &ItemWithExternal_GetResponse_WithExternal_{} + return m } + // CreateItemWithExternal_GetResponse_WithExternal_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithExternal_GetResponse_WithExternal_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWithExternal_GetResponse_WithExternal_() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { - result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { - result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tasks") { - result.SetTasks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemTasksGetResponse_Tasks()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) - } - } - } - } - return result, nil +func CreateItemWithExternal_GetResponse_WithExternal_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithExternal_GetResponse_WithExternal_() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tasks") { + result.SetTasks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemTasksGetResponse_Tasks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithExternal_GetResponse_WithExternal_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetOrganizations() != nil { - return m.GetOrganizations().GetFieldDeserializers() - } else if m.GetProjects() != nil { - return m.GetProjects().GetFieldDeserializers() - } else if m.GetTasks() != nil { - return m.GetTasks().GetFieldDeserializers() - } else if m.GetWorkspaces() != nil { - return m.GetWorkspaces().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemWithExternal_GetResponse_WithExternal_) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetTasks() != nil { + return m.GetTasks().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWithExternal_GetResponse_WithExternal_) GetIsComposedType()(bool) { - return true +func (m *ItemWithExternal_GetResponse_WithExternal_) GetIsComposedType() bool { + return true } + // GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable // returns a OrganizationsGetResponse_Organizationsable when successful -func (m *ItemWithExternal_GetResponse_WithExternal_) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { - return m.organizations +func (m *ItemWithExternal_GetResponse_WithExternal_) GetOrganizations() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable { + return m.organizations } + // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemWithExternal_GetResponse_WithExternal_) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { - return m.projects +func (m *ItemWithExternal_GetResponse_WithExternal_) GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable { + return m.projects } + // GetTasks gets the tasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable // returns a ItemTasksGetResponse_Tasksable when successful -func (m *ItemWithExternal_GetResponse_WithExternal_) GetTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) { - return m.tasks +func (m *ItemWithExternal_GetResponse_WithExternal_) GetTasks() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable { + return m.tasks } + // GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable // returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemWithExternal_GetResponse_WithExternal_) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { - return m.workspaces +func (m *ItemWithExternal_GetResponse_WithExternal_) GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable { + return m.workspaces } + // Serialize serializes information the current object -func (m *ItemWithExternal_GetResponse_WithExternal_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetOrganizations() != nil { - err := writer.WriteObjectValue("", m.GetOrganizations()) - if err != nil { - return err - } - } else if m.GetProjects() != nil { - err := writer.WriteObjectValue("", m.GetProjects()) - if err != nil { - return err - } - } else if m.GetTasks() != nil { - err := writer.WriteObjectValue("", m.GetTasks()) - if err != nil { - return err - } - } else if m.GetWorkspaces() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaces()) - if err != nil { - return err - } - } - return nil +func (m *ItemWithExternal_GetResponse_WithExternal_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetTasks() != nil { + err := writer.WriteObjectValue("", m.GetTasks()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil } + // SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable -func (m *ItemWithExternal_GetResponse_WithExternal_) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { - m.organizations = value +func (m *ItemWithExternal_GetResponse_WithExternal_) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { + m.organizations = value } + // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemWithExternal_GetResponse_WithExternal_) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { - m.projects = value +func (m *ItemWithExternal_GetResponse_WithExternal_) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + m.projects = value } + // SetTasks sets the tasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable -func (m *ItemWithExternal_GetResponse_WithExternal_) SetTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable)() { - m.tasks = value +func (m *ItemWithExternal_GetResponse_WithExternal_) SetTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) { + m.tasks = value } + // SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -func (m *ItemWithExternal_GetResponse_WithExternal_) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { - m.workspaces = value +func (m *ItemWithExternal_GetResponse_WithExternal_) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + m.workspaces = value } + type ItemWithExternal_GetResponse_WithExternal_able interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) - GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) - GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) - SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() - SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable)() - SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizations() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + GetTasks() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable + GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + SetTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemTasksGetResponse_Tasksable) + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) } + // NewItemWithExternal_GetResponse instantiates a new ItemWithExternal_GetResponse and sets the default values. -func NewItemWithExternal_GetResponse()(*ItemWithExternal_GetResponse) { - m := &ItemWithExternal_GetResponse{ - TaskConfigsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskConfigsEnvelope(), - } - return m +func NewItemWithExternal_GetResponse() *ItemWithExternal_GetResponse { + m := &ItemWithExternal_GetResponse{ + TaskConfigsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskConfigsEnvelope(), + } + return m } + // CreateItemWithExternal_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithExternal_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemWithExternal_GetResponse(), nil +func CreateItemWithExternal_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithExternal_GetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithExternal_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.TaskConfigsEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWithExternal_GetResponse_WithExternal_FromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemWithExternal_GetResponse_WithExternal_able, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemWithExternal_GetResponse_WithExternal_able) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemWithExternal_GetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.TaskConfigsEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithExternal_GetResponse_WithExternal_FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithExternal_GetResponse_WithExternal_able, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithExternal_GetResponse_WithExternal_able) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemWithExternal_GetResponse_WithExternal_able when successful -func (m *ItemWithExternal_GetResponse) GetIncluded()([]ItemWithExternal_GetResponse_WithExternal_able) { - return m.included +func (m *ItemWithExternal_GetResponse) GetIncluded() []ItemWithExternal_GetResponse_WithExternal_able { + return m.included } + // Serialize serializes information the current object -func (m *ItemWithExternal_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.TaskConfigsEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemWithExternal_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.TaskConfigsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemWithExternal_GetResponse) SetIncluded(value []ItemWithExternal_GetResponse_WithExternal_able)() { - m.included = value +func (m *ItemWithExternal_GetResponse) SetIncluded(value []ItemWithExternal_GetResponse_WithExternal_able) { + m.included = value } + type ItemWithExternal_GetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelopeable - GetIncluded()([]ItemWithExternal_GetResponse_WithExternal_able) - SetIncluded(value []ItemWithExternal_GetResponse_WithExternal_able)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskConfigsEnvelopeable } diff --git a/v2/api/tasks/item/relationships/workspacetasks/get_include_query_parameter_type.go b/v2/api/tasks/item/relationships/workspacetasks/get_include_query_parameter_type.go new file mode 100644 index 000000000..4c1dc725f --- /dev/null +++ b/v2/api/tasks/item/relationships/workspacetasks/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package workspacetasks +type GetIncludeQueryParameterType int + +const ( + WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"workspace"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "workspace": + result = WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/tasks/item_relationships_workspace_tasks_get_response.go b/v2/api/tasks/item_relationships_workspace_tasks_get_response.go index 9c33fa617..5cf852832 100644 --- a/v2/api/tasks/item_relationships_workspace_tasks_get_response.go +++ b/v2/api/tasks/item_relationships_workspace_tasks_get_response.go @@ -13,6 +13,8 @@ type ItemRelationshipsWorkspaceTasksGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemRelationshipsWorkspaceTasksGetResponse) GetFieldDeserializers()(map } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspacesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemRelationshipsWorkspaceTasksGetResponse) GetFieldDeserializers()(map } return res } +// GetIncluded gets the included property value. The included property +// returns a []Workspacesable when successful +func (m *ItemRelationshipsWorkspaceTasksGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemRelationshipsWorkspaceTasksGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemRelationshipsWorkspaceTasksGetResponse) Serialize(writer i878a80d23 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemRelationshipsWorkspaceTasksGetResponse) SetAdditionalData(value map func (m *ItemRelationshipsWorkspaceTasksGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemRelationshipsWorkspaceTasksGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemRelationshipsWorkspaceTasksGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemRelationshipsWorkspaceTasksGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRelationshipsWorkspaceTasksGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRelationshipsWorkspaceTasksGetResponse_metaable)() } diff --git a/v2/api/tasks/item_relationships_workspace_tasks_request_builder.go b/v2/api/tasks/item_relationships_workspace_tasks_request_builder.go index ab7a7b2b9..265112906 100644 --- a/v2/api/tasks/item_relationships_workspace_tasks_request_builder.go +++ b/v2/api/tasks/item_relationships_workspace_tasks_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i89976ab7f4bed54f9029223f7ff1ed9eabadac8b416087f0b27901d9fd58af44 "github.com/hashicorp/go-tfe/v2/api/tasks/item/relationships/workspacetasks" ) // ItemRelationshipsWorkspaceTasksRequestBuilder builds and executes requests for operations under \tasks\{id}\relationships\workspace-tasks @@ -17,6 +18,8 @@ type ItemRelationshipsWorkspaceTasksRequestBuilder struct { type ItemRelationshipsWorkspaceTasksRequestBuilderGetQueryParameters struct { // Return only the specified fields for workspace-tasks resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsworkspaceTasks []string "uriparametername:\"fields%5Bworkspace%2Dtasks%5D\"" + // Optionally side-load the specified relationships. + Include []i89976ab7f4bed54f9029223f7ff1ed9eabadac8b416087f0b27901d9fd58af44.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemRelationshipsWorkspaceTasksRequestBuilderGetQueryParameters struct { // NewItemRelationshipsWorkspaceTasksRequestBuilderInternal instantiates a new ItemRelationshipsWorkspaceTasksRequestBuilder and sets the default values. func NewItemRelationshipsWorkspaceTasksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRelationshipsWorkspaceTasksRequestBuilder) { m := &ItemRelationshipsWorkspaceTasksRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/tasks/{id}/relationships/workspace-tasks{?fields%5Bworkspace%2Dtasks%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/tasks/{id}/relationships/workspace-tasks{?fields%5Bworkspace%2Dtasks%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/tasks/item_tasks_get_response.go b/v2/api/tasks/item_tasks_get_response.go index b24d1012e..9634fd3d1 100644 --- a/v2/api/tasks/item_tasks_get_response.go +++ b/v2/api/tasks/item_tasks_get_response.go @@ -4,175 +4,191 @@ package tasks import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemTasksGetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelope - // The included property - included []ItemTasksGetResponse_Tasksable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelope + // The included property + included []ItemTasksGetResponse_Tasksable } + // ItemTasksGetResponse_Tasks composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable type ItemTasksGetResponse_Tasks struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable - workspaceTasks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable + workspaceTasks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable } + // NewItemTasksGetResponse_Tasks instantiates a new ItemTasksGetResponse_Tasks and sets the default values. -func NewItemTasksGetResponse_Tasks()(*ItemTasksGetResponse_Tasks) { - m := &ItemTasksGetResponse_Tasks{ - } - return m +func NewItemTasksGetResponse_Tasks() *ItemTasksGetResponse_Tasks { + m := &ItemTasksGetResponse_Tasks{} + return m } + // CreateItemTasksGetResponse_TasksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemTasksGetResponse_TasksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemTasksGetResponse_Tasks() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-tasks") { - result.SetWorkspaceTasks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceTasks()) - } - } - } - } - return result, nil +func CreateItemTasksGetResponse_TasksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemTasksGetResponse_Tasks() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-tasks") { + result.SetWorkspaceTasks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceTasks()) + } + } + } + } + return result, nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemTasksGetResponse_Tasks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetWorkspaces() != nil { - return m.GetWorkspaces().GetFieldDeserializers() - } else if m.GetWorkspaceTasks() != nil { - return m.GetWorkspaceTasks().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemTasksGetResponse_Tasks) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } else if m.GetWorkspaceTasks() != nil { + return m.GetWorkspaceTasks().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemTasksGetResponse_Tasks) GetIsComposedType()(bool) { - return true +func (m *ItemTasksGetResponse_Tasks) GetIsComposedType() bool { + return true } + // GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable // returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemTasksGetResponse_Tasks) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { - return m.workspaces +func (m *ItemTasksGetResponse_Tasks) GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable { + return m.workspaces } + // GetWorkspaceTasks gets the workspaceTasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable // returns a WorkspaceTasksable when successful -func (m *ItemTasksGetResponse_Tasks) GetWorkspaceTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) { - return m.workspaceTasks +func (m *ItemTasksGetResponse_Tasks) GetWorkspaceTasks() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable { + return m.workspaceTasks } + // Serialize serializes information the current object -func (m *ItemTasksGetResponse_Tasks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetWorkspaces() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaces()) - if err != nil { - return err - } - } else if m.GetWorkspaceTasks() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaceTasks()) - if err != nil { - return err - } - } - return nil +func (m *ItemTasksGetResponse_Tasks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } else if m.GetWorkspaceTasks() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceTasks()) + if err != nil { + return err + } + } + return nil } + // SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -func (m *ItemTasksGetResponse_Tasks) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { - m.workspaces = value +func (m *ItemTasksGetResponse_Tasks) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + m.workspaces = value } + // SetWorkspaceTasks sets the workspaceTasks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable -func (m *ItemTasksGetResponse_Tasks) SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() { - m.workspaceTasks = value +func (m *ItemTasksGetResponse_Tasks) SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) { + m.workspaceTasks = value } + type ItemTasksGetResponse_Tasksable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) - GetWorkspaceTasks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) - SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() - SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + GetWorkspaceTasks() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) + SetWorkspaceTasks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTasksable) } + // NewItemTasksGetResponse instantiates a new ItemTasksGetResponse and sets the default values. -func NewItemTasksGetResponse()(*ItemTasksGetResponse) { - m := &ItemTasksGetResponse{ - TasksEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTasksEnvelope(), - } - return m +func NewItemTasksGetResponse() *ItemTasksGetResponse { + m := &ItemTasksGetResponse{ + TasksEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTasksEnvelope(), + } + return m } + // CreateItemTasksGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemTasksGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemTasksGetResponse(), nil +func CreateItemTasksGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTasksGetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemTasksGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.TasksEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemTasksGetResponse_TasksFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemTasksGetResponse_Tasksable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemTasksGetResponse_Tasksable) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemTasksGetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.TasksEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemTasksGetResponse_TasksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemTasksGetResponse_Tasksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemTasksGetResponse_Tasksable) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemTasksGetResponse_Tasksable when successful -func (m *ItemTasksGetResponse) GetIncluded()([]ItemTasksGetResponse_Tasksable) { - return m.included +func (m *ItemTasksGetResponse) GetIncluded() []ItemTasksGetResponse_Tasksable { + return m.included } + // Serialize serializes information the current object -func (m *ItemTasksGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.TasksEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemTasksGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.TasksEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemTasksGetResponse) SetIncluded(value []ItemTasksGetResponse_Tasksable)() { - m.included = value +func (m *ItemTasksGetResponse) SetIncluded(value []ItemTasksGetResponse_Tasksable) { + m.included = value } + type ItemTasksGetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelopeable - GetIncluded()([]ItemTasksGetResponse_Tasksable) - SetIncluded(value []ItemTasksGetResponse_Tasksable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TasksEnvelopeable } diff --git a/v2/api/taskstages/item_with_task_escaped_stage_escaped_get_response.go b/v2/api/taskstages/item_with_task_escaped_stage_escaped_get_response.go index 57e4dc33a..51ca2f367 100644 --- a/v2/api/taskstages/item_with_task_escaped_stage_escaped_get_response.go +++ b/v2/api/taskstages/item_with_task_escaped_stage_escaped_get_response.go @@ -4,241 +4,263 @@ package taskstages import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemWithTask_stage_GetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelope - // The included property - included []ItemWithTask_stage_GetResponse_WithTask_stage_able + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelope + // The included property + included []ItemWithTask_stage_GetResponse_WithTask_stage_able } + // ItemWithTask_stage_GetResponse_WithTask_stage_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable type ItemWithTask_stage_GetResponse_WithTask_stage_ struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable - costEstimates i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable - policyEvaluations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable - runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable - taskResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable - workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + costEstimates i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable + policyEvaluations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable + taskResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable } + // NewItemWithTask_stage_GetResponse_WithTask_stage_ instantiates a new ItemWithTask_stage_GetResponse_WithTask_stage_ and sets the default values. -func NewItemWithTask_stage_GetResponse_WithTask_stage_()(*ItemWithTask_stage_GetResponse_WithTask_stage_) { - m := &ItemWithTask_stage_GetResponse_WithTask_stage_{ - } - return m +func NewItemWithTask_stage_GetResponse_WithTask_stage_() *ItemWithTask_stage_GetResponse_WithTask_stage_ { + m := &ItemWithTask_stage_GetResponse_WithTask_stage_{} + return m } + // CreateItemWithTask_stage_GetResponse_WithTask_stage_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithTask_stage_GetResponse_WithTask_stage_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWithTask_stage_GetResponse_WithTask_stage_() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { - result.SetCostEstimates(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCostEstimates()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policy-evaluations") { - result.SetPolicyEvaluations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPolicyEvaluations()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { - result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-results") { - result.SetTaskResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskResults()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { - result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) - } - } - } - } - return result, nil +func CreateItemWithTask_stage_GetResponse_WithTask_stage_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithTask_stage_GetResponse_WithTask_stage_() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { + result.SetCostEstimates(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCostEstimates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "policy-evaluations") { + result.SetPolicyEvaluations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPolicyEvaluations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-results") { + result.SetTaskResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewItemWorkspacesGetResponse_Workspaces()) + } + } + } + } + return result, nil } + // GetCostEstimates gets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable // returns a CostEstimatesable when successful -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) { - return m.costEstimates +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetCostEstimates() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable { + return m.costEstimates } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetCostEstimates() != nil { - return m.GetCostEstimates().GetFieldDeserializers() - } else if m.GetPolicyEvaluations() != nil { - return m.GetPolicyEvaluations().GetFieldDeserializers() - } else if m.GetRuns() != nil { - return m.GetRuns().GetFieldDeserializers() - } else if m.GetTaskResults() != nil { - return m.GetTaskResults().GetFieldDeserializers() - } else if m.GetWorkspaces() != nil { - return m.GetWorkspaces().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetCostEstimates() != nil { + return m.GetCostEstimates().GetFieldDeserializers() + } else if m.GetPolicyEvaluations() != nil { + return m.GetPolicyEvaluations().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetTaskResults() != nil { + return m.GetTaskResults().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetIsComposedType()(bool) { - return true +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetIsComposedType() bool { + return true } + // GetPolicyEvaluations gets the policyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable // returns a PolicyEvaluationsable when successful -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable) { - return m.policyEvaluations +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetPolicyEvaluations() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable { + return m.policyEvaluations } + // GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable // returns a Runsable when successful -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { - return m.runs +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetRuns() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable { + return m.runs } + // GetTaskResults gets the taskResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable // returns a TaskResultsable when successful -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetTaskResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable) { - return m.taskResults +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetTaskResults() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable { + return m.taskResults } + // GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable // returns a ItemWorkspacesGetResponse_Workspacesable when successful -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { - return m.workspaces +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable { + return m.workspaces } + // Serialize serializes information the current object -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetCostEstimates() != nil { - err := writer.WriteObjectValue("", m.GetCostEstimates()) - if err != nil { - return err - } - } else if m.GetPolicyEvaluations() != nil { - err := writer.WriteObjectValue("", m.GetPolicyEvaluations()) - if err != nil { - return err - } - } else if m.GetRuns() != nil { - err := writer.WriteObjectValue("", m.GetRuns()) - if err != nil { - return err - } - } else if m.GetTaskResults() != nil { - err := writer.WriteObjectValue("", m.GetTaskResults()) - if err != nil { - return err - } - } else if m.GetWorkspaces() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaces()) - if err != nil { - return err - } - } - return nil +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetCostEstimates() != nil { + err := writer.WriteObjectValue("", m.GetCostEstimates()) + if err != nil { + return err + } + } else if m.GetPolicyEvaluations() != nil { + err := writer.WriteObjectValue("", m.GetPolicyEvaluations()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetTaskResults() != nil { + err := writer.WriteObjectValue("", m.GetTaskResults()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil } + // SetCostEstimates sets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() { - m.costEstimates = value +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) { + m.costEstimates = value } + // SetPolicyEvaluations sets the policyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable)() { - m.policyEvaluations = value +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable) { + m.policyEvaluations = value } + // SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { - m.runs = value +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + m.runs = value } + // SetTaskResults sets the taskResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetTaskResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable)() { - m.taskResults = value +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetTaskResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable) { + m.taskResults = value } + // SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable -func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() { - m.workspaces = value +func (m *ItemWithTask_stage_GetResponse_WithTask_stage_) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) { + m.workspaces = value } + type ItemWithTask_stage_GetResponse_WithTask_stage_able interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) - GetPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable) - GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) - GetTaskResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable) - GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) - SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() - SetPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable)() - SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() - SetTaskResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable)() - SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCostEstimates() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + GetPolicyEvaluations() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable + GetRuns() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + GetTaskResults() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable + GetWorkspaces() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable + SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) + SetPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.PolicyEvaluationsable) + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + SetTaskResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskResultsable) + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ItemWorkspacesGetResponse_Workspacesable) } + // NewItemWithTask_stage_GetResponse instantiates a new ItemWithTask_stage_GetResponse and sets the default values. -func NewItemWithTask_stage_GetResponse()(*ItemWithTask_stage_GetResponse) { - m := &ItemWithTask_stage_GetResponse{ - TaskStagesEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskStagesEnvelope(), - } - return m +func NewItemWithTask_stage_GetResponse() *ItemWithTask_stage_GetResponse { + m := &ItemWithTask_stage_GetResponse{ + TaskStagesEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskStagesEnvelope(), + } + return m } + // CreateItemWithTask_stage_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithTask_stage_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemWithTask_stage_GetResponse(), nil +func CreateItemWithTask_stage_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithTask_stage_GetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithTask_stage_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.TaskStagesEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWithTask_stage_GetResponse_WithTask_stage_FromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemWithTask_stage_GetResponse_WithTask_stage_able, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemWithTask_stage_GetResponse_WithTask_stage_able) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemWithTask_stage_GetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.TaskStagesEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithTask_stage_GetResponse_WithTask_stage_FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithTask_stage_GetResponse_WithTask_stage_able, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithTask_stage_GetResponse_WithTask_stage_able) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemWithTask_stage_GetResponse_WithTask_stage_able when successful -func (m *ItemWithTask_stage_GetResponse) GetIncluded()([]ItemWithTask_stage_GetResponse_WithTask_stage_able) { - return m.included +func (m *ItemWithTask_stage_GetResponse) GetIncluded() []ItemWithTask_stage_GetResponse_WithTask_stage_able { + return m.included } + // Serialize serializes information the current object -func (m *ItemWithTask_stage_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.TaskStagesEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemWithTask_stage_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.TaskStagesEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemWithTask_stage_GetResponse) SetIncluded(value []ItemWithTask_stage_GetResponse_WithTask_stage_able)() { - m.included = value +func (m *ItemWithTask_stage_GetResponse) SetIncluded(value []ItemWithTask_stage_GetResponse_WithTask_stage_able) { + m.included = value } + type ItemWithTask_stage_GetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelopeable - GetIncluded()([]ItemWithTask_stage_GetResponse_WithTask_stage_able) - SetIncluded(value []ItemWithTask_stage_GetResponse_WithTask_stage_able)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesEnvelopeable } diff --git a/v2/api/teamprojects/get_include_query_parameter_type.go b/v2/api/teamprojects/get_include_query_parameter_type.go new file mode 100644 index 000000000..776149f48 --- /dev/null +++ b/v2/api/teamprojects/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamprojects +type GetIncludeQueryParameterType int + +const ( + TEAM_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"team"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := TEAM_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "team": + result = TEAM_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/teamprojects/item/get_include_query_parameter_type.go b/v2/api/teamprojects/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..cc6c00bf5 --- /dev/null +++ b/v2/api/teamprojects/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + TEAM_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"team"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := TEAM_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "team": + result = TEAM_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/teamprojects/team_projects_get_response.go b/v2/api/teamprojects/team_projects_get_response.go index bf8a4513c..d563007ac 100644 --- a/v2/api/teamprojects/team_projects_get_response.go +++ b/v2/api/teamprojects/team_projects_get_response.go @@ -13,6 +13,8 @@ type TeamProjectsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamProjectsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *TeamProjectsGetResponse) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTeamsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *TeamProjectsGetResponse) GetFieldDeserializers()(map[string]func(i878a8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []Teamsable when successful +func (m *TeamProjectsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *TeamProjectsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *TeamProjectsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *TeamProjectsGetResponse) SetAdditionalData(value map[string]any)() { func (m *TeamProjectsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamProjectsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TeamProjectsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *TeamProjectsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type TeamProjectsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamProjectsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(TeamProjectsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamProjectsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value TeamProjectsGetResponse_metaable)() } diff --git a/v2/api/teamprojects/team_projects_request_builder.go b/v2/api/teamprojects/team_projects_request_builder.go index d99950c35..50fd64a74 100644 --- a/v2/api/teamprojects/team_projects_request_builder.go +++ b/v2/api/teamprojects/team_projects_request_builder.go @@ -21,6 +21,8 @@ type TeamProjectsRequestBuilderGetQueryParameters struct { Filterprojectid *string "uriparametername:\"filter%5Bproject%5D%5Bid%5D\"" // Optionally filter by team ID. Filterteamid *string "uriparametername:\"filter%5Bteam%5D%5Bid%5D\"" + // Optionally side-load the specified relationships. + Include []GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -41,7 +43,7 @@ func (m *TeamProjectsRequestBuilder) ByTeam_project_id(team_project_id string)(* // NewTeamProjectsRequestBuilderInternal instantiates a new TeamProjectsRequestBuilder and sets the default values. func NewTeamProjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamProjectsRequestBuilder) { m := &TeamProjectsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/team-projects?filter[project][id]={filter%5Bproject%5D%5Bid%5D}{&fields%5Bteam%2Dprojects%5D,filter%5Bteam%5D%5Bid%5D*,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/team-projects?filter[project][id]={filter%5Bproject%5D%5Bid%5D}{&fields%5Bteam%2Dprojects%5D,filter%5Bteam%5D%5Bid%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/teamprojects/with_team_escaped_project_escaped_item_request_builder.go b/v2/api/teamprojects/with_team_escaped_project_escaped_item_request_builder.go index 004a8d812..753c48e44 100644 --- a/v2/api/teamprojects/with_team_escaped_project_escaped_item_request_builder.go +++ b/v2/api/teamprojects/with_team_escaped_project_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i682ee9b1e776e21f760c6f4a8a8a12cf591b7906316db021fd6427c1ce45821b "github.com/hashicorp/go-tfe/v2/api/teamprojects/item" ) // WithTeam_project_ItemRequestBuilder builds and executes requests for operations under \team-projects\{team_project_id} @@ -17,11 +18,13 @@ type WithTeam_project_ItemRequestBuilder struct { type WithTeam_project_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for team-projects resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsteamProjects []string "uriparametername:\"fields%5Bteam%2Dprojects%5D\"" + // Optionally side-load the specified relationships. + Include []i682ee9b1e776e21f760c6f4a8a8a12cf591b7906316db021fd6427c1ce45821b.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithTeam_project_ItemRequestBuilderInternal instantiates a new WithTeam_project_ItemRequestBuilder and sets the default values. func NewWithTeam_project_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithTeam_project_ItemRequestBuilder) { m := &WithTeam_project_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/team-projects/{team_project_id}{?fields%5Bteam%2Dprojects%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/team-projects/{team_project_id}{?fields%5Bteam%2Dprojects%5D,include}", pathParameters), } return m } diff --git a/v2/api/teamworkspaces/get_include_query_parameter_type.go b/v2/api/teamworkspaces/get_include_query_parameter_type.go new file mode 100644 index 000000000..84f924660 --- /dev/null +++ b/v2/api/teamworkspaces/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamworkspaces +type GetIncludeQueryParameterType int + +const ( + TEAM_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"team"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := TEAM_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "team": + result = TEAM_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/teamworkspaces/item/get_include_query_parameter_type.go b/v2/api/teamworkspaces/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..cc6c00bf5 --- /dev/null +++ b/v2/api/teamworkspaces/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + TEAM_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"team"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := TEAM_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "team": + result = TEAM_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/teamworkspaces/team_workspaces_get_response.go b/v2/api/teamworkspaces/team_workspaces_get_response.go index db25ad979..ac8e71042 100644 --- a/v2/api/teamworkspaces/team_workspaces_get_response.go +++ b/v2/api/teamworkspaces/team_workspaces_get_response.go @@ -13,6 +13,8 @@ type TeamWorkspacesGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamWorkspacesable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *TeamWorkspacesGetResponse) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTeamsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *TeamWorkspacesGetResponse) GetFieldDeserializers()(map[string]func(i878 } return res } +// GetIncluded gets the included property value. The included property +// returns a []Teamsable when successful +func (m *TeamWorkspacesGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *TeamWorkspacesGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *TeamWorkspacesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *TeamWorkspacesGetResponse) SetAdditionalData(value map[string]any)() { func (m *TeamWorkspacesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamWorkspacesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *TeamWorkspacesGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *TeamWorkspacesGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type TeamWorkspacesGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamWorkspacesable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(TeamWorkspacesGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TeamWorkspacesable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value TeamWorkspacesGetResponse_metaable)() } diff --git a/v2/api/teamworkspaces/team_workspaces_request_builder.go b/v2/api/teamworkspaces/team_workspaces_request_builder.go index 6a3ad5d04..374389633 100644 --- a/v2/api/teamworkspaces/team_workspaces_request_builder.go +++ b/v2/api/teamworkspaces/team_workspaces_request_builder.go @@ -21,6 +21,8 @@ type TeamWorkspacesRequestBuilderGetQueryParameters struct { Filterteamid *string "uriparametername:\"filter%5Bteam%5D%5Bid%5D\"" // The workspace ID to list team access for. Filterworkspaceid *string "uriparametername:\"filter%5Bworkspace%5D%5Bid%5D\"" + // Optionally side-load the specified relationships. + Include []GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -41,7 +43,7 @@ func (m *TeamWorkspacesRequestBuilder) ByTeam_workspace_id(team_workspace_id str // NewTeamWorkspacesRequestBuilderInternal instantiates a new TeamWorkspacesRequestBuilder and sets the default values. func NewTeamWorkspacesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamWorkspacesRequestBuilder) { m := &TeamWorkspacesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/team-workspaces{?fields%5Bteam%2Dworkspaces%5D,filter%5Bteam%5D%5Bid%5D*,filter%5Bworkspace%5D%5Bid%5D*,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/team-workspaces{?fields%5Bteam%2Dworkspaces%5D,filter%5Bteam%5D%5Bid%5D*,filter%5Bworkspace%5D%5Bid%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/teamworkspaces/with_team_escaped_workspace_escaped_item_request_builder.go b/v2/api/teamworkspaces/with_team_escaped_workspace_escaped_item_request_builder.go index 6b63dc35b..417a7fd45 100644 --- a/v2/api/teamworkspaces/with_team_escaped_workspace_escaped_item_request_builder.go +++ b/v2/api/teamworkspaces/with_team_escaped_workspace_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ic161f0b7c7ef42e60f049bed1e987e36957ad4de3fd7984c33cd32a6b1f5c83b "github.com/hashicorp/go-tfe/v2/api/teamworkspaces/item" ) // WithTeam_workspace_ItemRequestBuilder builds and executes requests for operations under \team-workspaces\{team_workspace_id} @@ -17,11 +18,13 @@ type WithTeam_workspace_ItemRequestBuilder struct { type WithTeam_workspace_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for team-workspaces resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsteamWorkspaces []string "uriparametername:\"fields%5Bteam%2Dworkspaces%5D\"" + // Optionally side-load the specified relationships. + Include []ic161f0b7c7ef42e60f049bed1e987e36957ad4de3fd7984c33cd32a6b1f5c83b.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithTeam_workspace_ItemRequestBuilderInternal instantiates a new WithTeam_workspace_ItemRequestBuilder and sets the default values. func NewWithTeam_workspace_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithTeam_workspace_ItemRequestBuilder) { m := &WithTeam_workspace_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/team-workspaces/{team_workspace_id}{?fields%5Bteam%2Dworkspaces%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/team-workspaces/{team_workspace_id}{?fields%5Bteam%2Dworkspaces%5D,include}", pathParameters), } return m } diff --git a/v2/api/tfpolicyevaluations/item_get_response.go b/v2/api/tfpolicyevaluations/item_get_response.go index 1fef93648..dafdb9e40 100644 --- a/v2/api/tfpolicyevaluations/item_get_response.go +++ b/v2/api/tfpolicyevaluations/item_get_response.go @@ -4,81 +4,86 @@ package tfpolicyevaluations import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemGetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsEnvelope - // The included property - included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsEnvelope + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable } + // NewItemGetResponse instantiates a new ItemGetResponse and sets the default values. -func NewItemGetResponse()(*ItemGetResponse) { - m := &ItemGetResponse{ - TfPolicyEvaluationsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTfPolicyEvaluationsEnvelope(), - } - return m +func NewItemGetResponse() *ItemGetResponse { + m := &ItemGetResponse{ + TfPolicyEvaluationsEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTfPolicyEvaluationsEnvelope(), + } + return m } + // CreateItemGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemGetResponse(), nil +func CreateItemGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemGetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.TfPolicyEvaluationsEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTfPolicySetOutcomeFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemGetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.TfPolicyEvaluationsEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTfPolicySetOutcomeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []TfPolicySetOutcomeable when successful -func (m *ItemGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable) { - return m.included +func (m *ItemGetResponse) GetIncluded() []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable { + return m.included } + // Serialize serializes information the current object -func (m *ItemGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.TfPolicyEvaluationsEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.TfPolicyEvaluationsEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable)() { - m.included = value +func (m *ItemGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable) { + m.included = value } + type ItemGetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsEnvelopeable - GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable) - SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicySetOutcomeable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsEnvelopeable } diff --git a/v2/api/users/item/authenticationtokens/get_include_query_parameter_type.go b/v2/api/users/item/authenticationtokens/get_include_query_parameter_type.go new file mode 100644 index 000000000..e87ede95f --- /dev/null +++ b/v2/api/users/item/authenticationtokens/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package authenticationtokens +type GetIncludeQueryParameterType int + +const ( + TEAM_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"team"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := TEAM_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "team": + result = TEAM_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/users/item_authentication_tokens_get_response.go b/v2/api/users/item_authentication_tokens_get_response.go index 83859bd5f..b415d6a4d 100644 --- a/v2/api/users/item_authentication_tokens_get_response.go +++ b/v2/api/users/item_authentication_tokens_get_response.go @@ -13,6 +13,8 @@ type ItemAuthenticationTokensGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AuthenticationTokensable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemAuthenticationTokensGetResponse) GetFieldDeserializers()(map[string } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateTeamsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemAuthenticationTokensGetResponse) GetFieldDeserializers()(map[string } return res } +// GetIncluded gets the included property value. The included property +// returns a []Teamsable when successful +func (m *ItemAuthenticationTokensGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemAuthenticationTokensGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemAuthenticationTokensGetResponse) Serialize(writer i878a80d2330e89d2 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemAuthenticationTokensGetResponse) SetAdditionalData(value map[string func (m *ItemAuthenticationTokensGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AuthenticationTokensable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemAuthenticationTokensGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemAuthenticationTokensGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemAuthenticationTokensGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AuthenticationTokensable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemAuthenticationTokensGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AuthenticationTokensable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Teamsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemAuthenticationTokensGetResponse_metaable)() } diff --git a/v2/api/users/item_authentication_tokens_request_builder.go b/v2/api/users/item_authentication_tokens_request_builder.go index 81f7e4661..83b64445f 100644 --- a/v2/api/users/item_authentication_tokens_request_builder.go +++ b/v2/api/users/item_authentication_tokens_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i9549e026d226389cc87061507b27b964161bcb34412040389437ee91a99d0583 "github.com/hashicorp/go-tfe/v2/api/users/item/authenticationtokens" ) // ItemAuthenticationTokensRequestBuilder builds and executes requests for operations under \users\{user_id}\authentication-tokens @@ -17,6 +18,8 @@ type ItemAuthenticationTokensRequestBuilder struct { type ItemAuthenticationTokensRequestBuilderGetQueryParameters struct { // Return only the specified fields for authentication-tokens resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsauthenticationTokens []string "uriparametername:\"fields%5Bauthentication%2Dtokens%5D\"" + // Optionally side-load the specified relationships. + Include []i9549e026d226389cc87061507b27b964161bcb34412040389437ee91a99d0583.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemAuthenticationTokensRequestBuilderGetQueryParameters struct { // NewItemAuthenticationTokensRequestBuilderInternal instantiates a new ItemAuthenticationTokensRequestBuilder and sets the default values. func NewItemAuthenticationTokensRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuthenticationTokensRequestBuilder) { m := &ItemAuthenticationTokensRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user_id}/authentication-tokens{?fields%5Bauthentication%2Dtokens%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user_id}/authentication-tokens{?fields%5Bauthentication%2Dtokens%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/varsets/item/get_include_query_parameter_type.go b/v2/api/varsets/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..afdb52787 --- /dev/null +++ b/v2/api/varsets/item/get_include_query_parameter_type.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + VARS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + STACKS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"vars", "workspaces", "projects", "stacks"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := VARS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "vars": + result = VARS_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "stacks": + result = STACKS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/varsets/item/relationships/vars/get_include_query_parameter_type.go b/v2/api/varsets/item/relationships/vars/get_include_query_parameter_type.go new file mode 100644 index 000000000..740d7ab89 --- /dev/null +++ b/v2/api/varsets/item/relationships/vars/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package vars +type GetIncludeQueryParameterType int + +const ( + OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"overwritten", "overwriter"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "overwritten": + result = OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + case "overwriter": + result = OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/varsets/item/relationships/vars/item/get_include_query_parameter_type.go b/v2/api/varsets/item/relationships/vars/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..78361b215 --- /dev/null +++ b/v2/api/varsets/item/relationships/vars/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"overwritten", "overwriter"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "overwritten": + result = OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + case "overwriter": + result = OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/varsets/item_relationships_vars_get_response.go b/v2/api/varsets/item_relationships_vars_get_response.go index 47b00b084..32f5f0a35 100644 --- a/v2/api/varsets/item_relationships_vars_get_response.go +++ b/v2/api/varsets/item_relationships_vars_get_response.go @@ -13,6 +13,8 @@ type ItemRelationshipsVarsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemRelationshipsVarsGetResponse) GetFieldDeserializers()(map[string]fu } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateVarsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemRelationshipsVarsGetResponse) GetFieldDeserializers()(map[string]fu } return res } +// GetIncluded gets the included property value. The included property +// returns a []Varsable when successful +func (m *ItemRelationshipsVarsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemRelationshipsVarsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemRelationshipsVarsGetResponse) Serialize(writer i878a80d2330e89d2689 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemRelationshipsVarsGetResponse) SetAdditionalData(value map[string]an func (m *ItemRelationshipsVarsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemRelationshipsVarsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemRelationshipsVarsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemRelationshipsVarsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRelationshipsVarsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRelationshipsVarsGetResponse_metaable)() } diff --git a/v2/api/varsets/item_relationships_vars_request_builder.go b/v2/api/varsets/item_relationships_vars_request_builder.go index 522578c1a..5248b7bf8 100644 --- a/v2/api/varsets/item_relationships_vars_request_builder.go +++ b/v2/api/varsets/item_relationships_vars_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i932396d2f2f1e812dfdf5c6e0c737eb7f67fafda75600efb3420318ad2b01214 "github.com/hashicorp/go-tfe/v2/api/varsets/item/relationships/vars" ) // ItemRelationshipsVarsRequestBuilder builds and executes requests for operations under \varsets\{varset_id}\relationships\vars @@ -17,6 +18,8 @@ type ItemRelationshipsVarsRequestBuilder struct { type ItemRelationshipsVarsRequestBuilderGetQueryParameters struct { // Return only the specified fields for vars resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvars []string "uriparametername:\"fields%5Bvars%5D\"" + // Optionally side-load the specified relationships. + Include []i932396d2f2f1e812dfdf5c6e0c737eb7f67fafda75600efb3420318ad2b01214.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -37,7 +40,7 @@ func (m *ItemRelationshipsVarsRequestBuilder) ById(id string)(*ItemRelationships // NewItemRelationshipsVarsRequestBuilderInternal instantiates a new ItemRelationshipsVarsRequestBuilder and sets the default values. func NewItemRelationshipsVarsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRelationshipsVarsRequestBuilder) { m := &ItemRelationshipsVarsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/varsets/{varset_id}/relationships/vars{?fields%5Bvars%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/varsets/{varset_id}/relationships/vars{?fields%5Bvars%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/varsets/item_relationships_vars_vars_item_request_builder.go b/v2/api/varsets/item_relationships_vars_vars_item_request_builder.go index dde03a7f5..c8bed0dcd 100644 --- a/v2/api/varsets/item_relationships_vars_vars_item_request_builder.go +++ b/v2/api/varsets/item_relationships_vars_vars_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie5e97c4185c25b084c12bf610546f86a8c7f630924aaa459ad553965eb6057fa "github.com/hashicorp/go-tfe/v2/api/varsets/item/relationships/vars/item" ) // ItemRelationshipsVarsVarsItemRequestBuilder builds and executes requests for operations under \varsets\{varset_id}\relationships\vars\{id} @@ -17,11 +18,13 @@ type ItemRelationshipsVarsVarsItemRequestBuilder struct { type ItemRelationshipsVarsVarsItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for vars resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvars []string "uriparametername:\"fields%5Bvars%5D\"" + // Optionally side-load the specified relationships. + Include []ie5e97c4185c25b084c12bf610546f86a8c7f630924aaa459ad553965eb6057fa.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewItemRelationshipsVarsVarsItemRequestBuilderInternal instantiates a new ItemRelationshipsVarsVarsItemRequestBuilder and sets the default values. func NewItemRelationshipsVarsVarsItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRelationshipsVarsVarsItemRequestBuilder) { m := &ItemRelationshipsVarsVarsItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/varsets/{varset_id}/relationships/vars/{id}{?fields%5Bvars%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/varsets/{varset_id}/relationships/vars/{id}{?fields%5Bvars%5D,include}", pathParameters), } return m } diff --git a/v2/api/varsets/with_varset_escaped_item_request_builder.go b/v2/api/varsets/with_varset_escaped_item_request_builder.go index 5353a4c6e..723baf4e5 100644 --- a/v2/api/varsets/with_varset_escaped_item_request_builder.go +++ b/v2/api/varsets/with_varset_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + if3b729d95cad95eec0e69339cb36debb31f915f0bc5e605f6b7bdf426e317d9c "github.com/hashicorp/go-tfe/v2/api/varsets/item" ) // WithVarset_ItemRequestBuilder builds and executes requests for operations under \varsets\{varset_id} @@ -17,11 +18,13 @@ type WithVarset_ItemRequestBuilder struct { type WithVarset_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for varsets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvarsets []string "uriparametername:\"fields%5Bvarsets%5D\"" + // Optionally side-load the specified relationships. + Include []if3b729d95cad95eec0e69339cb36debb31f915f0bc5e605f6b7bdf426e317d9c.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewWithVarset_ItemRequestBuilderInternal instantiates a new WithVarset_ItemRequestBuilder and sets the default values. func NewWithVarset_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithVarset_ItemRequestBuilder) { m := &WithVarset_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/varsets/{varset_id}{?fields%5Bvarsets%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/varsets/{varset_id}{?fields%5Bvarsets%5D,include}", pathParameters), } return m } diff --git a/v2/api/workspaces/item/allvars/get_include_query_parameter_type.go b/v2/api/workspaces/item/allvars/get_include_query_parameter_type.go new file mode 100644 index 000000000..14441a095 --- /dev/null +++ b/v2/api/workspaces/item/allvars/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package allvars +type GetIncludeQueryParameterType int + +const ( + OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"overwritten", "overwriter"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "overwritten": + result = OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + case "overwriter": + result = OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/configurationversions/get_include_query_parameter_type.go b/v2/api/workspaces/item/configurationversions/get_include_query_parameter_type.go new file mode 100644 index 000000000..021c4a46a --- /dev/null +++ b/v2/api/workspaces/item/configurationversions/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package configurationversions +type GetIncludeQueryParameterType int + +const ( + INGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"ingress_attributes"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := INGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "ingress_attributes": + result = INGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/providersets/get_include_query_parameter_type.go b/v2/api/workspaces/item/providersets/get_include_query_parameter_type.go new file mode 100644 index 000000000..1c3c74a9b --- /dev/null +++ b/v2/api/workspaces/item/providersets/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package providersets +type GetIncludeQueryParameterType int + +const ( + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"workspaces", "projects"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/queries/get_include_query_parameter_type.go b/v2/api/workspaces/item/queries/get_include_query_parameter_type.go new file mode 100644 index 000000000..bfdd40a9c --- /dev/null +++ b/v2/api/workspaces/item/queries/get_include_query_parameter_type.go @@ -0,0 +1,39 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package queries +type GetIncludeQueryParameterType int + +const ( + CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"configuration_version", "created_by", "configuration_version.ingress_attributes"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "configuration_version": + result = CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "created_by": + result = CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + case "configuration_version.ingress_attributes": + result = CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/runs/get_include_query_parameter_type.go b/v2/api/workspaces/item/runs/get_include_query_parameter_type.go new file mode 100644 index 000000000..15445adef --- /dev/null +++ b/v2/api/workspaces/item/runs/get_include_query_parameter_type.go @@ -0,0 +1,57 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package runs +type GetIncludeQueryParameterType int + +const ( + PLAN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + APPLY_GETINCLUDEQUERYPARAMETERTYPE + CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + COST_ESTIMATE_GETINCLUDEQUERYPARAMETERTYPE + WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + TASK_STAGES_GETINCLUDEQUERYPARAMETERTYPE + TF_POLICY_EVALUATIONS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"plan", "apply", "created_by", "configuration_version", "configuration_version.ingress_attributes", "cost_estimate", "workspace", "task_stages", "tf_policy_evaluations"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := PLAN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "plan": + result = PLAN_GETINCLUDEQUERYPARAMETERTYPE + case "apply": + result = APPLY_GETINCLUDEQUERYPARAMETERTYPE + case "created_by": + result = CREATED_BY_GETINCLUDEQUERYPARAMETERTYPE + case "configuration_version": + result = CONFIGURATION_VERSION_GETINCLUDEQUERYPARAMETERTYPE + case "configuration_version.ingress_attributes": + result = CONFIGURATION_VERSIONINGRESS_ATTRIBUTES_GETINCLUDEQUERYPARAMETERTYPE + case "cost_estimate": + result = COST_ESTIMATE_GETINCLUDEQUERYPARAMETERTYPE + case "workspace": + result = WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + case "task_stages": + result = TASK_STAGES_GETINCLUDEQUERYPARAMETERTYPE + case "tf_policy_evaluations": + result = TF_POLICY_EVALUATIONS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/runtriggers/get_include_query_parameter_type.go b/v2/api/workspaces/item/runtriggers/get_include_query_parameter_type.go new file mode 100644 index 000000000..88a82852c --- /dev/null +++ b/v2/api/workspaces/item/runtriggers/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package runtriggers +type GetIncludeQueryParameterType int + +const ( + WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + SOURCEABLE_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"workspace", "sourceable"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "workspace": + result = WORKSPACE_GETINCLUDEQUERYPARAMETERTYPE + case "sourceable": + result = SOURCEABLE_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/vars/get_include_query_parameter_type.go b/v2/api/workspaces/item/vars/get_include_query_parameter_type.go new file mode 100644 index 000000000..740d7ab89 --- /dev/null +++ b/v2/api/workspaces/item/vars/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package vars +type GetIncludeQueryParameterType int + +const ( + OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"overwritten", "overwriter"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "overwritten": + result = OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + case "overwriter": + result = OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/vars/item/get_include_query_parameter_type.go b/v2/api/workspaces/item/vars/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..78361b215 --- /dev/null +++ b/v2/api/workspaces/item/vars/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"overwritten", "overwriter"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "overwritten": + result = OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + case "overwriter": + result = OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/varsets/get_include_query_parameter_type.go b/v2/api/workspaces/item/varsets/get_include_query_parameter_type.go new file mode 100644 index 000000000..cec1e0008 --- /dev/null +++ b/v2/api/workspaces/item/varsets/get_include_query_parameter_type.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package varsets +type GetIncludeQueryParameterType int + +const ( + VARS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + STACKS_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"vars", "workspaces", "projects", "stacks"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := VARS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "vars": + result = VARS_GETINCLUDEQUERYPARAMETERTYPE + case "workspaces": + result = WORKSPACES_GETINCLUDEQUERYPARAMETERTYPE + case "projects": + result = PROJECTS_GETINCLUDEQUERYPARAMETERTYPE + case "stacks": + result = STACKS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/varsets/item/relationships/vars/get_include_query_parameter_type.go b/v2/api/workspaces/item/varsets/item/relationships/vars/get_include_query_parameter_type.go new file mode 100644 index 000000000..740d7ab89 --- /dev/null +++ b/v2/api/workspaces/item/varsets/item/relationships/vars/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package vars +type GetIncludeQueryParameterType int + +const ( + OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"overwritten", "overwriter"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "overwritten": + result = OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + case "overwriter": + result = OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item/varsets/item/relationships/vars/item/get_include_query_parameter_type.go b/v2/api/workspaces/item/varsets/item/relationships/vars/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..78361b215 --- /dev/null +++ b/v2/api/workspaces/item/varsets/item/relationships/vars/item/get_include_query_parameter_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"overwritten", "overwriter"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "overwritten": + result = OVERWRITTEN_GETINCLUDEQUERYPARAMETERTYPE + case "overwriter": + result = OVERWRITER_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspaces/item_all_vars_get_response.go b/v2/api/workspaces/item_all_vars_get_response.go index b80d24614..9480d517f 100644 --- a/v2/api/workspaces/item_all_vars_get_response.go +++ b/v2/api/workspaces/item_all_vars_get_response.go @@ -13,6 +13,8 @@ type ItemAllVarsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable } // NewItemAllVarsGetResponse instantiates a new ItemAllVarsGetResponse and sets the default values. func NewItemAllVarsGetResponse()(*ItemAllVarsGetResponse) { @@ -56,8 +58,29 @@ func (m *ItemAllVarsGetResponse) GetFieldDeserializers()(map[string]func(i878a80 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateVarsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []Varsable when successful +func (m *ItemAllVarsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.included +} // Serialize serializes information the current object func (m *ItemAllVarsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetData() != nil { @@ -72,6 +95,18 @@ func (m *ItemAllVarsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -88,9 +123,15 @@ func (m *ItemAllVarsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemAllVarsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemAllVarsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.included = value +} type ItemAllVarsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() } diff --git a/v2/api/workspaces/item_all_vars_request_builder.go b/v2/api/workspaces/item_all_vars_request_builder.go index c815abfba..9d7168911 100644 --- a/v2/api/workspaces/item_all_vars_request_builder.go +++ b/v2/api/workspaces/item_all_vars_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i441cc2be729e559048a1e0368e3971f1f7c0c435a048216bfaa55ae045bcc4fe "github.com/hashicorp/go-tfe/v2/api/workspaces/item/allvars" ) // ItemAllVarsRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\all-vars @@ -17,11 +18,13 @@ type ItemAllVarsRequestBuilder struct { type ItemAllVarsRequestBuilderGetQueryParameters struct { // Return only the specified fields for vars resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvars []string "uriparametername:\"fields%5Bvars%5D\"" + // Optionally side-load the specified relationships. + Include []i441cc2be729e559048a1e0368e3971f1f7c0c435a048216bfaa55ae045bcc4fe.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewItemAllVarsRequestBuilderInternal instantiates a new ItemAllVarsRequestBuilder and sets the default values. func NewItemAllVarsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAllVarsRequestBuilder) { m := &ItemAllVarsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/all-vars{?fields%5Bvars%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/all-vars{?fields%5Bvars%5D,include}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_configuration_versions_get_response.go b/v2/api/workspaces/item_configuration_versions_get_response.go index dff7da391..c07a9e284 100644 --- a/v2/api/workspaces/item_configuration_versions_get_response.go +++ b/v2/api/workspaces/item_configuration_versions_get_response.go @@ -13,6 +13,8 @@ type ItemConfigurationVersionsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemConfigurationVersionsGetResponse) GetFieldDeserializers()(map[strin } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateIngressAttributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemConfigurationVersionsGetResponse) GetFieldDeserializers()(map[strin } return res } +// GetIncluded gets the included property value. The included property +// returns a []IngressAttributesable when successful +func (m *ItemConfigurationVersionsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemConfigurationVersionsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemConfigurationVersionsGetResponse) Serialize(writer i878a80d2330e89d return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemConfigurationVersionsGetResponse) SetAdditionalData(value map[strin func (m *ItemConfigurationVersionsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemConfigurationVersionsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemConfigurationVersionsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemConfigurationVersionsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemConfigurationVersionsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemConfigurationVersionsGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_configuration_versions_request_builder.go b/v2/api/workspaces/item_configuration_versions_request_builder.go index 731e90ff3..d10c5ec55 100644 --- a/v2/api/workspaces/item_configuration_versions_request_builder.go +++ b/v2/api/workspaces/item_configuration_versions_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + if988d149f389336cc59bb983e40abf3016f7fdffc64e571fe834b16fe920fa6e "github.com/hashicorp/go-tfe/v2/api/workspaces/item/configurationversions" ) // ItemConfigurationVersionsRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\configuration-versions @@ -17,6 +18,8 @@ type ItemConfigurationVersionsRequestBuilder struct { type ItemConfigurationVersionsRequestBuilderGetQueryParameters struct { // Return only the specified fields for configuration-versions resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsconfigurationVersions []string "uriparametername:\"fields%5Bconfiguration%2Dversions%5D\"" + // Optionally side-load the specified relationships. + Include []if988d149f389336cc59bb983e40abf3016f7fdffc64e571fe834b16fe920fa6e.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemConfigurationVersionsRequestBuilderGetQueryParameters struct { // NewItemConfigurationVersionsRequestBuilderInternal instantiates a new ItemConfigurationVersionsRequestBuilder and sets the default values. func NewItemConfigurationVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemConfigurationVersionsRequestBuilder) { m := &ItemConfigurationVersionsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/configuration-versions{?fields%5Bconfiguration%2Dversions%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/configuration-versions{?fields%5Bconfiguration%2Dversions%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_provider_sets_get_response.go b/v2/api/workspaces/item_provider_sets_get_response.go index e05649fcc..3a6730f8e 100644 --- a/v2/api/workspaces/item_provider_sets_get_response.go +++ b/v2/api/workspaces/item_provider_sets_get_response.go @@ -4,6 +4,7 @@ package workspaces import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,106 @@ type ItemProviderSetsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable + // The included property + included []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemProviderSetsGetResponse_metaable } +// ItemProviderSetsGetResponse_ProviderSetsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemProviderSetsGetResponse_ProviderSetsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemProviderSetsGetResponse_ProviderSetsGetResponse_included instantiates a new ItemProviderSetsGetResponse_ProviderSetsGetResponse_included and sets the default values. +func NewItemProviderSetsGetResponse_ProviderSetsGetResponse_included()(*ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) { + m := &ItemProviderSetsGetResponse_ProviderSetsGetResponse_included{ + } + return m +} +// CreateItemProviderSetsGetResponse_ProviderSetsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProviderSetsGetResponse_ProviderSetsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemProviderSetsGetResponse_ProviderSetsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemProviderSetsGetResponse_ProviderSetsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemProviderSetsGetResponse instantiates a new ItemProviderSetsGetResponse and sets the default values. func NewItemProviderSetsGetResponse()(*ItemProviderSetsGetResponse) { m := &ItemProviderSetsGetResponse{ @@ -60,6 +156,22 @@ func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemProviderSetsGetResponse_ProviderSetsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +194,11 @@ func (m *ItemProviderSetsGetResponse) GetFieldDeserializers()(map[string]func(i8 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable when successful +func (m *ItemProviderSetsGetResponse) GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemProviderSetsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +223,18 @@ func (m *ItemProviderSetsGetResponse) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +263,10 @@ func (m *ItemProviderSetsGetResponse) SetAdditionalData(value map[string]any)() func (m *ItemProviderSetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemProviderSetsGetResponse) SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemProviderSetsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +279,11 @@ type ItemProviderSetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable) + GetIncluded()([]ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemProviderSetsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ProviderSetsable)() + SetIncluded(value []ItemProviderSetsGetResponse_ProviderSetsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemProviderSetsGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_provider_sets_request_builder.go b/v2/api/workspaces/item_provider_sets_request_builder.go index e1a5f39f3..7569d8207 100644 --- a/v2/api/workspaces/item_provider_sets_request_builder.go +++ b/v2/api/workspaces/item_provider_sets_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i230e77b4a373cec19ea694591a8585f83038115e0f387be0f57aeebbe5f4af63 "github.com/hashicorp/go-tfe/v2/api/workspaces/item/providersets" ) // ItemProviderSetsRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\provider-sets @@ -17,6 +18,8 @@ type ItemProviderSetsRequestBuilder struct { type ItemProviderSetsRequestBuilderGetQueryParameters struct { // Return only the specified fields for provider-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsproviderSets []string "uriparametername:\"fields%5Bprovider%2Dsets%5D\"" + // Optionally side-load the specified relationships. + Include []i230e77b4a373cec19ea694591a8585f83038115e0f387be0f57aeebbe5f4af63.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemProviderSetsRequestBuilderGetQueryParameters struct { // NewItemProviderSetsRequestBuilderInternal instantiates a new ItemProviderSetsRequestBuilder and sets the default values. func NewItemProviderSetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProviderSetsRequestBuilder) { m := &ItemProviderSetsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/provider-sets{?fields%5Bprovider%2Dsets%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/provider-sets{?fields%5Bprovider%2Dsets%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_queries_get_response.go b/v2/api/workspaces/item_queries_get_response.go index 7ff7a5ef3..7e2b52997 100644 --- a/v2/api/workspaces/item_queries_get_response.go +++ b/v2/api/workspaces/item_queries_get_response.go @@ -4,6 +4,7 @@ package workspaces import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,128 @@ type ItemQueriesGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Queriesable + // The included property + included []ItemQueriesGetResponse_QueriesGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemQueriesGetResponse_metaable } +// ItemQueriesGetResponse_QueriesGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +type ItemQueriesGetResponse_QueriesGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +} +// NewItemQueriesGetResponse_QueriesGetResponse_included instantiates a new ItemQueriesGetResponse_QueriesGetResponse_included and sets the default values. +func NewItemQueriesGetResponse_QueriesGetResponse_included()(*ItemQueriesGetResponse_QueriesGetResponse_included) { + m := &ItemQueriesGetResponse_QueriesGetResponse_included{ + } + return m +} +// CreateItemQueriesGetResponse_QueriesGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemQueriesGetResponse_QueriesGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemQueriesGetResponse_QueriesGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } + } + } + } + return result, nil +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *ItemQueriesGetResponse_QueriesGetResponse_included) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + return m.configurationVersions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemQueriesGetResponse_QueriesGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *ItemQueriesGetResponse_QueriesGetResponse_included) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemQueriesGetResponse_QueriesGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// returns a Usersable when successful +func (m *ItemQueriesGetResponse_QueriesGetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemQueriesGetResponse_QueriesGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +func (m *ItemQueriesGetResponse_QueriesGetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *ItemQueriesGetResponse_QueriesGetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} +// SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +func (m *ItemQueriesGetResponse_QueriesGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { + m.users = value +} +type ItemQueriesGetResponse_QueriesGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() +} // NewItemQueriesGetResponse instantiates a new ItemQueriesGetResponse and sets the default values. func NewItemQueriesGetResponse()(*ItemQueriesGetResponse) { m := &ItemQueriesGetResponse{ @@ -60,6 +178,22 @@ func (m *ItemQueriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemQueriesGetResponse_QueriesGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemQueriesGetResponse_QueriesGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemQueriesGetResponse_QueriesGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +216,11 @@ func (m *ItemQueriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemQueriesGetResponse_QueriesGetResponse_includedable when successful +func (m *ItemQueriesGetResponse) GetIncluded()([]ItemQueriesGetResponse_QueriesGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemQueriesGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +245,18 @@ func (m *ItemQueriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +285,10 @@ func (m *ItemQueriesGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemQueriesGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Queriesable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemQueriesGetResponse) SetIncluded(value []ItemQueriesGetResponse_QueriesGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemQueriesGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +301,11 @@ type ItemQueriesGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Queriesable) + GetIncluded()([]ItemQueriesGetResponse_QueriesGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemQueriesGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Queriesable)() + SetIncluded(value []ItemQueriesGetResponse_QueriesGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemQueriesGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_queries_request_builder.go b/v2/api/workspaces/item_queries_request_builder.go index c482707c6..7bb782a90 100644 --- a/v2/api/workspaces/item_queries_request_builder.go +++ b/v2/api/workspaces/item_queries_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ida3883442216d45bd76f5fa2fa3ac592a5fb381a6af6b1b5fc2da437600cb717 "github.com/hashicorp/go-tfe/v2/api/workspaces/item/queries" ) // ItemQueriesRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\queries @@ -17,6 +18,8 @@ type ItemQueriesRequestBuilder struct { type ItemQueriesRequestBuilderGetQueryParameters struct { // Return only the specified fields for queries resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsqueries []string "uriparametername:\"fields%5Bqueries%5D\"" + // Optionally side-load the specified relationships. + Include []ida3883442216d45bd76f5fa2fa3ac592a5fb381a6af6b1b5fc2da437600cb717.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -25,7 +28,7 @@ type ItemQueriesRequestBuilderGetQueryParameters struct { // NewItemQueriesRequestBuilderInternal instantiates a new ItemQueriesRequestBuilder and sets the default values. func NewItemQueriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemQueriesRequestBuilder) { m := &ItemQueriesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/queries{?fields%5Bqueries%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/queries{?fields%5Bqueries%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_run_triggers_get_response.go b/v2/api/workspaces/item_run_triggers_get_response.go index af1143624..b3c76a54c 100644 --- a/v2/api/workspaces/item_run_triggers_get_response.go +++ b/v2/api/workspaces/item_run_triggers_get_response.go @@ -13,6 +13,8 @@ type ItemRunTriggersGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RunTriggersable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemRunTriggersGetResponse) GetFieldDeserializers()(map[string]func(i87 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspacesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemRunTriggersGetResponse) GetFieldDeserializers()(map[string]func(i87 } return res } +// GetIncluded gets the included property value. The included property +// returns a []Workspacesable when successful +func (m *ItemRunTriggersGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemRunTriggersGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemRunTriggersGetResponse) Serialize(writer i878a80d2330e89d26896388a3 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemRunTriggersGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemRunTriggersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RunTriggersable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemRunTriggersGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemRunTriggersGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemRunTriggersGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RunTriggersable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRunTriggersGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.RunTriggersable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRunTriggersGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_run_triggers_request_builder.go b/v2/api/workspaces/item_run_triggers_request_builder.go index efb452954..c6105f640 100644 --- a/v2/api/workspaces/item_run_triggers_request_builder.go +++ b/v2/api/workspaces/item_run_triggers_request_builder.go @@ -20,6 +20,8 @@ type ItemRunTriggersRequestBuilderGetQueryParameters struct { FieldsrunTriggers []string "uriparametername:\"fields%5Brun%2Dtriggers%5D\"" // Filter by run trigger type (inbound or outbound) FilterrunTriggertype *ic38f326f4d812cb9ab62309ba491d5f8a4049c6eb3a658e68f9fd98877773a08.GetFilterRunTriggerTypeQueryParameterType "uriparametername:\"filter%5Brun%2Dtrigger%5D%5Btype%5D\"" + // Optionally side-load the specified relationships. + Include []ic38f326f4d812cb9ab62309ba491d5f8a4049c6eb3a658e68f9fd98877773a08.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -28,7 +30,7 @@ type ItemRunTriggersRequestBuilderGetQueryParameters struct { // NewItemRunTriggersRequestBuilderInternal instantiates a new ItemRunTriggersRequestBuilder and sets the default values. func NewItemRunTriggersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRunTriggersRequestBuilder) { m := &ItemRunTriggersRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/run-triggers?filter[run-trigger][type]={filter%5Brun%2Dtrigger%5D%5Btype%5D}{&fields%5Brun%2Dtriggers%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/run-triggers?filter[run-trigger][type]={filter%5Brun%2Dtrigger%5D%5Btype%5D}{&fields%5Brun%2Dtriggers%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_runs_get_response.go b/v2/api/workspaces/item_runs_get_response.go index ac8413772..c0c76822d 100644 --- a/v2/api/workspaces/item_runs_get_response.go +++ b/v2/api/workspaces/item_runs_get_response.go @@ -4,6 +4,7 @@ package workspaces import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,260 @@ type ItemRunsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // The included property + included []ItemRunsGetResponse_RunsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemRunsGetResponse_metaable } +// ItemRunsGetResponse_RunsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemRunsGetResponse_RunsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + costEstimates i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable + taskStages i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable + tfPolicyEvaluations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemRunsGetResponse_RunsGetResponse_included instantiates a new ItemRunsGetResponse_RunsGetResponse_included and sets the default values. +func NewItemRunsGetResponse_RunsGetResponse_included()(*ItemRunsGetResponse_RunsGetResponse_included) { + m := &ItemRunsGetResponse_RunsGetResponse_included{ + } + return m +} +// CreateItemRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemRunsGetResponse_RunsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "cost-estimates") { + result.SetCostEstimates(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewCostEstimates()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "task-stages") { + result.SetTaskStages(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTaskStages()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "tf-policy-evaluations") { + result.SetTfPolicyEvaluations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewTfPolicyEvaluations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetApplies gets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +// returns a Appliesable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { + return m.applies +} +// GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +// returns a ConfigurationVersionsable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + return m.configurationVersions +} +// GetCostEstimates gets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable +// returns a CostEstimatesable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) { + return m.costEstimates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetCostEstimates() != nil { + return m.GetCostEstimates().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetTaskStages() != nil { + return m.GetTaskStages().GetFieldDeserializers() + } else if m.GetTfPolicyEvaluations() != nil { + return m.GetTfPolicyEvaluations().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +// returns a IngressAttributesable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + return m.ingressAttributes +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetPlans gets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +// returns a Plansable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { + return m.plans +} +// GetTaskStages gets the taskStages property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable +// returns a TaskStagesable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetTaskStages()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable) { + return m.taskStages +} +// GetTfPolicyEvaluations gets the tfPolicyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable +// returns a TfPolicyEvaluationsable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetTfPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable) { + return m.tfPolicyEvaluations +} +// GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +// returns a Usersable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + return m.users +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemRunsGetResponse_RunsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemRunsGetResponse_RunsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetCostEstimates() != nil { + err := writer.WriteObjectValue("", m.GetCostEstimates()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetTaskStages() != nil { + err := writer.WriteObjectValue("", m.GetTaskStages()) + if err != nil { + return err + } + } else if m.GetTfPolicyEvaluations() != nil { + err := writer.WriteObjectValue("", m.GetTfPolicyEvaluations()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetApplies sets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() { + m.applies = value +} +// SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { + m.configurationVersions = value +} +// SetCostEstimates sets the costEstimates property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() { + m.costEstimates = value +} +// SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { + m.ingressAttributes = value +} +// SetPlans sets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() { + m.plans = value +} +// SetTaskStages sets the taskStages property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetTaskStages(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable)() { + m.taskStages = value +} +// SetTfPolicyEvaluations sets the tfPolicyEvaluations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetTfPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable)() { + m.tfPolicyEvaluations = value +} +// SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { + m.users = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemRunsGetResponse_RunsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemRunsGetResponse_RunsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) + GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + GetCostEstimates()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable) + GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) + GetTaskStages()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable) + GetTfPolicyEvaluations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable) + GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() + SetCostEstimates(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CostEstimatesable)() + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() + SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() + SetTaskStages(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TaskStagesable)() + SetTfPolicyEvaluations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.TfPolicyEvaluationsable)() + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemRunsGetResponse instantiates a new ItemRunsGetResponse and sets the default values. func NewItemRunsGetResponse()(*ItemRunsGetResponse) { m := &ItemRunsGetResponse{ @@ -60,6 +310,22 @@ func (m *ItemRunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemRunsGetResponse_RunsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemRunsGetResponse_RunsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemRunsGetResponse_RunsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +348,11 @@ func (m *ItemRunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d23 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemRunsGetResponse_RunsGetResponse_includedable when successful +func (m *ItemRunsGetResponse) GetIncluded()([]ItemRunsGetResponse_RunsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemRunsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +377,18 @@ func (m *ItemRunsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +417,10 @@ func (m *ItemRunsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemRunsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemRunsGetResponse) SetIncluded(value []ItemRunsGetResponse_RunsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemRunsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +433,11 @@ type ItemRunsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + GetIncluded()([]ItemRunsGetResponse_RunsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemRunsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() + SetIncluded(value []ItemRunsGetResponse_RunsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemRunsGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_runs_request_builder.go b/v2/api/workspaces/item_runs_request_builder.go index e1fdb2bb3..bc71ec5c9 100644 --- a/v2/api/workspaces/item_runs_request_builder.go +++ b/v2/api/workspaces/item_runs_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + id27fc5e47ea78cfd46ade8ece5933044803aa0d8f22546d43a8382590e8ba4a3 "github.com/hashicorp/go-tfe/v2/api/workspaces/item/runs" ) // ItemRunsRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\runs @@ -21,6 +22,8 @@ type ItemRunsRequestBuilderGetQueryParameters struct { Filteroperation *string "uriparametername:\"filter%5Boperation%5D\"" // Filter by run status. Filterstatus *string "uriparametername:\"filter%5Bstatus%5D\"" + // Optionally side-load the specified relationships. + Include []id27fc5e47ea78cfd46ade8ece5933044803aa0d8f22546d43a8382590e8ba4a3.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -29,7 +32,7 @@ type ItemRunsRequestBuilderGetQueryParameters struct { // NewItemRunsRequestBuilderInternal instantiates a new ItemRunsRequestBuilder and sets the default values. func NewItemRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRunsRequestBuilder) { m := &ItemRunsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/runs{?fields%5Bruns%5D,filter%5Boperation%5D*,filter%5Bstatus%5D*,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/runs{?fields%5Bruns%5D,filter%5Boperation%5D*,filter%5Bstatus%5D*,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_vars_get_response.go b/v2/api/workspaces/item_vars_get_response.go index 2a32dae08..c7828f3a9 100644 --- a/v2/api/workspaces/item_vars_get_response.go +++ b/v2/api/workspaces/item_vars_get_response.go @@ -13,6 +13,8 @@ type ItemVarsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable } // NewItemVarsGetResponse instantiates a new ItemVarsGetResponse and sets the default values. func NewItemVarsGetResponse()(*ItemVarsGetResponse) { @@ -56,8 +58,29 @@ func (m *ItemVarsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateVarsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []Varsable when successful +func (m *ItemVarsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.included +} // Serialize serializes information the current object func (m *ItemVarsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetData() != nil { @@ -72,6 +95,18 @@ func (m *ItemVarsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -88,9 +123,15 @@ func (m *ItemVarsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemVarsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemVarsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.included = value +} type ItemVarsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() } diff --git a/v2/api/workspaces/item_vars_request_builder.go b/v2/api/workspaces/item_vars_request_builder.go index 0950c6770..ca4dc00cf 100644 --- a/v2/api/workspaces/item_vars_request_builder.go +++ b/v2/api/workspaces/item_vars_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i056b8b3d6cb785b3f4ba678b3e091d4cf51b20e3ea9fcecb89cd0fa7b4805258 "github.com/hashicorp/go-tfe/v2/api/workspaces/item/vars" ) // ItemVarsRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\vars @@ -17,6 +18,8 @@ type ItemVarsRequestBuilder struct { type ItemVarsRequestBuilderGetQueryParameters struct { // Return only the specified fields for vars resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvars []string "uriparametername:\"fields%5Bvars%5D\"" + // Optionally side-load the specified relationships. + Include []i056b8b3d6cb785b3f4ba678b3e091d4cf51b20e3ea9fcecb89cd0fa7b4805258.GetIncludeQueryParameterType "uriparametername:\"include\"" } // ById gets an item from the github.com/hashicorp/go-tfe/v2/api.workspaces.item.vars.item collection // returns a *ItemVarsVarsItemRequestBuilder when successful @@ -33,7 +36,7 @@ func (m *ItemVarsRequestBuilder) ById(id string)(*ItemVarsVarsItemRequestBuilder // NewItemVarsRequestBuilderInternal instantiates a new ItemVarsRequestBuilder and sets the default values. func NewItemVarsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemVarsRequestBuilder) { m := &ItemVarsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/vars{?fields%5Bvars%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/vars{?fields%5Bvars%5D,include}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_vars_vars_item_request_builder.go b/v2/api/workspaces/item_vars_vars_item_request_builder.go index 5060da741..132634ba7 100644 --- a/v2/api/workspaces/item_vars_vars_item_request_builder.go +++ b/v2/api/workspaces/item_vars_vars_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ida315265317703238f498ac169d729724fa7d895c5c9482f4a1edefe1a7c040d "github.com/hashicorp/go-tfe/v2/api/workspaces/item/vars/item" ) // ItemVarsVarsItemRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\vars\{id} @@ -17,11 +18,13 @@ type ItemVarsVarsItemRequestBuilder struct { type ItemVarsVarsItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for vars resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvars []string "uriparametername:\"fields%5Bvars%5D\"" + // Optionally side-load the specified relationships. + Include []ida315265317703238f498ac169d729724fa7d895c5c9482f4a1edefe1a7c040d.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewItemVarsVarsItemRequestBuilderInternal instantiates a new ItemVarsVarsItemRequestBuilder and sets the default values. func NewItemVarsVarsItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemVarsVarsItemRequestBuilder) { m := &ItemVarsVarsItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/vars/{id}{?fields%5Bvars%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/vars/{id}{?fields%5Bvars%5D,include}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_varsets_get_response.go b/v2/api/workspaces/item_varsets_get_response.go index 5b35744bf..3a6cd86a8 100644 --- a/v2/api/workspaces/item_varsets_get_response.go +++ b/v2/api/workspaces/item_varsets_get_response.go @@ -4,6 +4,7 @@ package workspaces import ( + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" ) @@ -13,11 +14,150 @@ type ItemVarsetsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable + // The included property + included []ItemVarsetsGetResponse_VarsetsGetResponse_includedable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property meta ItemVarsetsGetResponse_metaable } +// ItemVarsetsGetResponse_VarsetsGetResponse_included composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +type ItemVarsetsGetResponse_VarsetsGetResponse_included struct { + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + stacks i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable + workspaces i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +} +// NewItemVarsetsGetResponse_VarsetsGetResponse_included instantiates a new ItemVarsetsGetResponse_VarsetsGetResponse_included and sets the default values. +func NewItemVarsetsGetResponse_VarsetsGetResponse_included()(*ItemVarsetsGetResponse_VarsetsGetResponse_included) { + m := &ItemVarsetsGetResponse_VarsetsGetResponse_included{ + } + return m +} +// CreateItemVarsetsGetResponse_VarsetsGetResponse_includedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemVarsetsGetResponse_VarsetsGetResponse_includedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemVarsetsGetResponse_VarsetsGetResponse_included() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "stacks") { + result.SetStacks(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStacks()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspaces") { + result.SetWorkspaces(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaces()) + } + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetStacks() != nil { + return m.GetStacks().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaces() != nil { + return m.GetWorkspaces().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetIsComposedType()(bool) { + return true +} +// GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +// returns a Projectsable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + return m.projects +} +// GetStacks gets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +// returns a Stacksable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) { + return m.stacks +} +// GetVars gets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +// returns a Varsable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.vars +} +// GetWorkspaces gets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +// returns a Workspacesable when successful +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetStacks() != nil { + err := writer.WriteObjectValue("", m.GetStacks()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } + } else if m.GetWorkspaces() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaces()) + if err != nil { + return err + } + } + return nil +} +// SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { + m.projects = value +} +// SetStacks sets the stacks property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() { + m.stacks = value +} +// SetVars sets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.vars = value +} +// SetWorkspaces sets the workspaces property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable +func (m *ItemVarsetsGetResponse_VarsetsGetResponse_included) SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() { + m.workspaces = value +} +type ItemVarsetsGetResponse_VarsetsGetResponse_includedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + GetStacks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable) + GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + GetWorkspaces()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() + SetStacks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Stacksable)() + SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() + SetWorkspaces(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Workspacesable)() +} // NewItemVarsetsGetResponse instantiates a new ItemVarsetsGetResponse and sets the default values. func NewItemVarsetsGetResponse()(*ItemVarsetsGetResponse) { m := &ItemVarsetsGetResponse{ @@ -60,6 +200,22 @@ func (m *ItemVarsetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemVarsetsGetResponse_VarsetsGetResponse_includedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemVarsetsGetResponse_VarsetsGetResponse_includedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemVarsetsGetResponse_VarsetsGetResponse_includedable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +238,11 @@ func (m *ItemVarsetsGetResponse) GetFieldDeserializers()(map[string]func(i878a80 } return res } +// GetIncluded gets the included property value. The included property +// returns a []ItemVarsetsGetResponse_VarsetsGetResponse_includedable when successful +func (m *ItemVarsetsGetResponse) GetIncluded()([]ItemVarsetsGetResponse_VarsetsGetResponse_includedable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemVarsetsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +267,18 @@ func (m *ItemVarsetsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +307,10 @@ func (m *ItemVarsetsGetResponse) SetAdditionalData(value map[string]any)() { func (m *ItemVarsetsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemVarsetsGetResponse) SetIncluded(value []ItemVarsetsGetResponse_VarsetsGetResponse_includedable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemVarsetsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +323,11 @@ type ItemVarsetsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable) + GetIncluded()([]ItemVarsetsGetResponse_VarsetsGetResponse_includedable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemVarsetsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsetsable)() + SetIncluded(value []ItemVarsetsGetResponse_VarsetsGetResponse_includedable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemVarsetsGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_varsets_item_relationships_vars_get_response.go b/v2/api/workspaces/item_varsets_item_relationships_vars_get_response.go index 9e326a4df..be155c634 100644 --- a/v2/api/workspaces/item_varsets_item_relationships_vars_get_response.go +++ b/v2/api/workspaces/item_varsets_item_relationships_vars_get_response.go @@ -13,6 +13,8 @@ type ItemVarsetsItemRelationshipsVarsGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *ItemVarsetsItemRelationshipsVarsGetResponse) GetFieldDeserializers()(ma } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateVarsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *ItemVarsetsItemRelationshipsVarsGetResponse) GetFieldDeserializers()(ma } return res } +// GetIncluded gets the included property value. The included property +// returns a []Varsable when successful +func (m *ItemVarsetsItemRelationshipsVarsGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *ItemVarsetsItemRelationshipsVarsGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *ItemVarsetsItemRelationshipsVarsGetResponse) Serialize(writer i878a80d2 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *ItemVarsetsItemRelationshipsVarsGetResponse) SetAdditionalData(value ma func (m *ItemVarsetsItemRelationshipsVarsGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *ItemVarsetsItemRelationshipsVarsGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *ItemVarsetsItemRelationshipsVarsGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type ItemVarsetsItemRelationshipsVarsGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(ItemVarsetsItemRelationshipsVarsGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value ItemVarsetsItemRelationshipsVarsGetResponse_metaable)() } diff --git a/v2/api/workspaces/item_varsets_item_relationships_vars_request_builder.go b/v2/api/workspaces/item_varsets_item_relationships_vars_request_builder.go index c51c3960e..97d81364c 100644 --- a/v2/api/workspaces/item_varsets_item_relationships_vars_request_builder.go +++ b/v2/api/workspaces/item_varsets_item_relationships_vars_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i98970d8cd1af8c5e19ed4a9a0d738276a9a152a97183eddf935ac6127938b609 "github.com/hashicorp/go-tfe/v2/api/workspaces/item/varsets/item/relationships/vars" ) // ItemVarsetsItemRelationshipsVarsRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\varsets\{varset_id}\relationships\vars @@ -17,6 +18,8 @@ type ItemVarsetsItemRelationshipsVarsRequestBuilder struct { type ItemVarsetsItemRelationshipsVarsRequestBuilderGetQueryParameters struct { // Return only the specified fields for vars resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvars []string "uriparametername:\"fields%5Bvars%5D\"" + // Optionally side-load the specified relationships. + Include []i98970d8cd1af8c5e19ed4a9a0d738276a9a152a97183eddf935ac6127938b609.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -37,7 +40,7 @@ func (m *ItemVarsetsItemRelationshipsVarsRequestBuilder) ById(id string)(*ItemVa // NewItemVarsetsItemRelationshipsVarsRequestBuilderInternal instantiates a new ItemVarsetsItemRelationshipsVarsRequestBuilder and sets the default values. func NewItemVarsetsItemRelationshipsVarsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemVarsetsItemRelationshipsVarsRequestBuilder) { m := &ItemVarsetsItemRelationshipsVarsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/varsets/{varset_id}/relationships/vars{?fields%5Bvars%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/varsets/{varset_id}/relationships/vars{?fields%5Bvars%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_varsets_item_relationships_vars_vars_item_request_builder.go b/v2/api/workspaces/item_varsets_item_relationships_vars_vars_item_request_builder.go index f68fd758d..eb92d872c 100644 --- a/v2/api/workspaces/item_varsets_item_relationships_vars_vars_item_request_builder.go +++ b/v2/api/workspaces/item_varsets_item_relationships_vars_vars_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i89da2f0ff713ed4cbca17ac7a81ba5ee56b322f80d1d4c368fffb0206bf45962 "github.com/hashicorp/go-tfe/v2/api/workspaces/item/varsets/item/relationships/vars/item" ) // ItemVarsetsItemRelationshipsVarsVarsItemRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\varsets\{varset_id}\relationships\vars\{id} @@ -17,11 +18,13 @@ type ItemVarsetsItemRelationshipsVarsVarsItemRequestBuilder struct { type ItemVarsetsItemRelationshipsVarsVarsItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for vars resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvars []string "uriparametername:\"fields%5Bvars%5D\"" + // Optionally side-load the specified relationships. + Include []i89da2f0ff713ed4cbca17ac7a81ba5ee56b322f80d1d4c368fffb0206bf45962.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewItemVarsetsItemRelationshipsVarsVarsItemRequestBuilderInternal instantiates a new ItemVarsetsItemRelationshipsVarsVarsItemRequestBuilder and sets the default values. func NewItemVarsetsItemRelationshipsVarsVarsItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemVarsetsItemRelationshipsVarsVarsItemRequestBuilder) { m := &ItemVarsetsItemRelationshipsVarsVarsItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/varsets/{varset_id}/relationships/vars/{id}{?fields%5Bvars%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/varsets/{varset_id}/relationships/vars/{id}{?fields%5Bvars%5D,include}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_varsets_request_builder.go b/v2/api/workspaces/item_varsets_request_builder.go index eee22e2fe..9e93c9469 100644 --- a/v2/api/workspaces/item_varsets_request_builder.go +++ b/v2/api/workspaces/item_varsets_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i97800ffaca3013dbbf68f976b77c75cbeaef7f082ebd6843803419fab82bc7e0 "github.com/hashicorp/go-tfe/v2/api/workspaces/item/varsets" ) // ItemVarsetsRequestBuilder builds and executes requests for operations under \workspaces\{workspace_id}\varsets @@ -17,6 +18,8 @@ type ItemVarsetsRequestBuilder struct { type ItemVarsetsRequestBuilderGetQueryParameters struct { // Return only the specified fields for varsets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. Fieldsvarsets []string "uriparametername:\"fields%5Bvarsets%5D\"" + // Optionally side-load the specified relationships. + Include []i97800ffaca3013dbbf68f976b77c75cbeaef7f082ebd6843803419fab82bc7e0.GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -39,7 +42,7 @@ func (m *ItemVarsetsRequestBuilder) ByVarset_id(varset_id string)(*ItemVarsetsWi // NewItemVarsetsRequestBuilderInternal instantiates a new ItemVarsetsRequestBuilder and sets the default values. func NewItemVarsetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemVarsetsRequestBuilder) { m := &ItemVarsetsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/varsets{?fields%5Bvarsets%5D,page%5Bnumber%5D*,page%5Bsize%5D*,q*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspaces/{workspace_id}/varsets{?fields%5Bvarsets%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*,q*}", pathParameters), } return m } diff --git a/v2/api/workspaces/item_with_workspace_escaped_get_response.go b/v2/api/workspaces/item_with_workspace_escaped_get_response.go index 27c352b95..329246721 100644 --- a/v2/api/workspaces/item_with_workspace_escaped_get_response.go +++ b/v2/api/workspaces/item_with_workspace_escaped_get_response.go @@ -4,505 +4,551 @@ package workspaces import ( - ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" + + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type ItemWithWorkspace_GetResponse struct { - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelope - // The included property - included []ItemWithWorkspace_GetResponse_WithWorkspace_able + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelope + // The included property + included []ItemWithWorkspace_GetResponse_WithWorkspace_able } + // ItemWithWorkspace_GetResponse_WithWorkspace_ composed type wrapper for classes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable, i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable type ItemWithWorkspace_GetResponse_WithWorkspace_ struct { - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable - agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable - applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable - assessmentResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable - configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable - effectiveTagBindings i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable - ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable - noCodeModules i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable - noCodeModuleVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable - organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable - plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable - runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable - stateVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable - users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable - vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable - workspaceOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable - // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable - workspaceReadme i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + agentPools i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + applies i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + assessmentResults i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + configurationVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + effectiveTagBindings i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + ingressAttributes i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable + noCodeModules i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable + noCodeModuleVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + organizations i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + plans i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + projects i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + runs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + stateVersions i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + users i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + vars i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable + workspaceOutputs i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable + // Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable + workspaceReadme i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable } + // NewItemWithWorkspace_GetResponse_WithWorkspace_ instantiates a new ItemWithWorkspace_GetResponse_WithWorkspace_ and sets the default values. -func NewItemWithWorkspace_GetResponse_WithWorkspace_()(*ItemWithWorkspace_GetResponse_WithWorkspace_) { - m := &ItemWithWorkspace_GetResponse_WithWorkspace_{ - } - return m +func NewItemWithWorkspace_GetResponse_WithWorkspace_() *ItemWithWorkspace_GetResponse_WithWorkspace_ { + m := &ItemWithWorkspace_GetResponse_WithWorkspace_{} + return m } + // CreateItemWithWorkspace_GetResponse_WithWorkspace_FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithWorkspace_GetResponse_WithWorkspace_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemWithWorkspace_GetResponse_WithWorkspace_() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("type") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { - result.SetAgentPools(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAgentPools()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { - result.SetApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewApplies()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "assessment-results") { - result.SetAssessmentResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAssessmentResults()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { - result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "effective-tag-bindings") { - result.SetEffectiveTagBindings(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEffectiveTagBindings()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { - result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-modules") { - result.SetNoCodeModules(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModules()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-module-versions") { - result.SetNoCodeModuleVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModuleVersions()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { - result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { - result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { - result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { - result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-versions") { - result.SetStateVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStateVersions()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { - result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { - result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-outputs") { - result.SetWorkspaceOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceOutputs()) - } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-readme") { - result.SetWorkspaceReadme(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceReadme()) - } - } - } - } - return result, nil +func CreateItemWithWorkspace_GetResponse_WithWorkspace_FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemWithWorkspace_GetResponse_WithWorkspace_() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "agent-pools") { + result.SetAgentPools(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAgentPools()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "applies") { + result.SetApplies(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewApplies()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "assessment-results") { + result.SetAssessmentResults(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewAssessmentResults()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "configuration-versions") { + result.SetConfigurationVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewConfigurationVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "effective-tag-bindings") { + result.SetEffectiveTagBindings(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewEffectiveTagBindings()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "ingress-attributes") { + result.SetIngressAttributes(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewIngressAttributes()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-modules") { + result.SetNoCodeModules(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModules()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "no-code-module-versions") { + result.SetNoCodeModuleVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewNoCodeModuleVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "organizations") { + result.SetOrganizations(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewOrganizationsGetResponse_Organizations()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "plans") { + result.SetPlans(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewPlans()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "projects") { + result.SetProjects(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewProjects()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "runs") { + result.SetRuns(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewRuns()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "state-versions") { + result.SetStateVersions(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewStateVersions()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "users") { + result.SetUsers(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewUsers()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "vars") { + result.SetVars(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewVars()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-outputs") { + result.SetWorkspaceOutputs(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceOutputs()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "workspace-readme") { + result.SetWorkspaceReadme(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspaceReadme()) + } + } + } + } + return result, nil } + // GetAgentPools gets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable // returns a AgentPoolsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { - return m.agentPools +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetAgentPools() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable { + return m.agentPools } + // GetApplies gets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable // returns a Appliesable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { - return m.applies +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetApplies() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable { + return m.applies } + // GetAssessmentResults gets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable // returns a AssessmentResultsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) { - return m.assessmentResults +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetAssessmentResults() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable { + return m.assessmentResults } + // GetConfigurationVersions gets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable // returns a ConfigurationVersionsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { - return m.configurationVersions +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetConfigurationVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable { + return m.configurationVersions } + // GetEffectiveTagBindings gets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable // returns a EffectiveTagBindingsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { - return m.effectiveTagBindings +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetEffectiveTagBindings() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable { + return m.effectiveTagBindings } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - if m.GetAgentPools() != nil { - return m.GetAgentPools().GetFieldDeserializers() - } else if m.GetApplies() != nil { - return m.GetApplies().GetFieldDeserializers() - } else if m.GetAssessmentResults() != nil { - return m.GetAssessmentResults().GetFieldDeserializers() - } else if m.GetConfigurationVersions() != nil { - return m.GetConfigurationVersions().GetFieldDeserializers() - } else if m.GetEffectiveTagBindings() != nil { - return m.GetEffectiveTagBindings().GetFieldDeserializers() - } else if m.GetIngressAttributes() != nil { - return m.GetIngressAttributes().GetFieldDeserializers() - } else if m.GetNoCodeModules() != nil { - return m.GetNoCodeModules().GetFieldDeserializers() - } else if m.GetNoCodeModuleVersions() != nil { - return m.GetNoCodeModuleVersions().GetFieldDeserializers() - } else if m.GetOrganizations() != nil { - return m.GetOrganizations().GetFieldDeserializers() - } else if m.GetPlans() != nil { - return m.GetPlans().GetFieldDeserializers() - } else if m.GetProjects() != nil { - return m.GetProjects().GetFieldDeserializers() - } else if m.GetRuns() != nil { - return m.GetRuns().GetFieldDeserializers() - } else if m.GetStateVersions() != nil { - return m.GetStateVersions().GetFieldDeserializers() - } else if m.GetUsers() != nil { - return m.GetUsers().GetFieldDeserializers() - } else if m.GetVars() != nil { - return m.GetVars().GetFieldDeserializers() - } else if m.GetWorkspaceOutputs() != nil { - return m.GetWorkspaceOutputs().GetFieldDeserializers() - } else if m.GetWorkspaceReadme() != nil { - return m.GetWorkspaceReadme().GetFieldDeserializers() - } - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + if m.GetAgentPools() != nil { + return m.GetAgentPools().GetFieldDeserializers() + } else if m.GetApplies() != nil { + return m.GetApplies().GetFieldDeserializers() + } else if m.GetAssessmentResults() != nil { + return m.GetAssessmentResults().GetFieldDeserializers() + } else if m.GetConfigurationVersions() != nil { + return m.GetConfigurationVersions().GetFieldDeserializers() + } else if m.GetEffectiveTagBindings() != nil { + return m.GetEffectiveTagBindings().GetFieldDeserializers() + } else if m.GetIngressAttributes() != nil { + return m.GetIngressAttributes().GetFieldDeserializers() + } else if m.GetNoCodeModules() != nil { + return m.GetNoCodeModules().GetFieldDeserializers() + } else if m.GetNoCodeModuleVersions() != nil { + return m.GetNoCodeModuleVersions().GetFieldDeserializers() + } else if m.GetOrganizations() != nil { + return m.GetOrganizations().GetFieldDeserializers() + } else if m.GetPlans() != nil { + return m.GetPlans().GetFieldDeserializers() + } else if m.GetProjects() != nil { + return m.GetProjects().GetFieldDeserializers() + } else if m.GetRuns() != nil { + return m.GetRuns().GetFieldDeserializers() + } else if m.GetStateVersions() != nil { + return m.GetStateVersions().GetFieldDeserializers() + } else if m.GetUsers() != nil { + return m.GetUsers().GetFieldDeserializers() + } else if m.GetVars() != nil { + return m.GetVars().GetFieldDeserializers() + } else if m.GetWorkspaceOutputs() != nil { + return m.GetWorkspaceOutputs().GetFieldDeserializers() + } else if m.GetWorkspaceReadme() != nil { + return m.GetWorkspaceReadme().GetFieldDeserializers() + } + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) } + // GetIngressAttributes gets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable // returns a IngressAttributesable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { - return m.ingressAttributes +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetIngressAttributes() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable { + return m.ingressAttributes } + // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetIsComposedType()(bool) { - return true +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetIsComposedType() bool { + return true } + // GetNoCodeModules gets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable // returns a NoCodeModulesable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { - return m.noCodeModules +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetNoCodeModules() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable { + return m.noCodeModules } + // GetNoCodeModuleVersions gets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable // returns a NoCodeModuleVersionsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { - return m.noCodeModuleVersions +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetNoCodeModuleVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable { + return m.noCodeModuleVersions } + // GetOrganizations gets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable // returns a OrganizationsGetResponse_Organizationsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { - return m.organizations +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetOrganizations() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable { + return m.organizations } + // GetPlans gets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable // returns a Plansable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { - return m.plans +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetPlans() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable { + return m.plans } + // GetProjects gets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable // returns a Projectsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { - return m.projects +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable { + return m.projects } + // GetRuns gets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable // returns a Runsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { - return m.runs +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetRuns() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable { + return m.runs } + // GetStateVersions gets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable // returns a StateVersionsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) { - return m.stateVersions +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetStateVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable { + return m.stateVersions } + // GetUsers gets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable // returns a Usersable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { - return m.users +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetUsers() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable { + return m.users } + // GetVars gets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable // returns a Varsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { - return m.vars +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetVars() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable { + return m.vars } + // GetWorkspaceOutputs gets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable // returns a WorkspaceOutputsable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { - return m.workspaceOutputs +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetWorkspaceOutputs() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable { + return m.workspaceOutputs } + // GetWorkspaceReadme gets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable // returns a WorkspaceReadmeable when successful -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { - return m.workspaceReadme +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) GetWorkspaceReadme() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable { + return m.workspaceReadme } + // Serialize serializes information the current object -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetAgentPools() != nil { - err := writer.WriteObjectValue("", m.GetAgentPools()) - if err != nil { - return err - } - } else if m.GetApplies() != nil { - err := writer.WriteObjectValue("", m.GetApplies()) - if err != nil { - return err - } - } else if m.GetAssessmentResults() != nil { - err := writer.WriteObjectValue("", m.GetAssessmentResults()) - if err != nil { - return err - } - } else if m.GetConfigurationVersions() != nil { - err := writer.WriteObjectValue("", m.GetConfigurationVersions()) - if err != nil { - return err - } - } else if m.GetEffectiveTagBindings() != nil { - err := writer.WriteObjectValue("", m.GetEffectiveTagBindings()) - if err != nil { - return err - } - } else if m.GetIngressAttributes() != nil { - err := writer.WriteObjectValue("", m.GetIngressAttributes()) - if err != nil { - return err - } - } else if m.GetNoCodeModules() != nil { - err := writer.WriteObjectValue("", m.GetNoCodeModules()) - if err != nil { - return err - } - } else if m.GetNoCodeModuleVersions() != nil { - err := writer.WriteObjectValue("", m.GetNoCodeModuleVersions()) - if err != nil { - return err - } - } else if m.GetOrganizations() != nil { - err := writer.WriteObjectValue("", m.GetOrganizations()) - if err != nil { - return err - } - } else if m.GetPlans() != nil { - err := writer.WriteObjectValue("", m.GetPlans()) - if err != nil { - return err - } - } else if m.GetProjects() != nil { - err := writer.WriteObjectValue("", m.GetProjects()) - if err != nil { - return err - } - } else if m.GetRuns() != nil { - err := writer.WriteObjectValue("", m.GetRuns()) - if err != nil { - return err - } - } else if m.GetStateVersions() != nil { - err := writer.WriteObjectValue("", m.GetStateVersions()) - if err != nil { - return err - } - } else if m.GetUsers() != nil { - err := writer.WriteObjectValue("", m.GetUsers()) - if err != nil { - return err - } - } else if m.GetVars() != nil { - err := writer.WriteObjectValue("", m.GetVars()) - if err != nil { - return err - } - } else if m.GetWorkspaceOutputs() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaceOutputs()) - if err != nil { - return err - } - } else if m.GetWorkspaceReadme() != nil { - err := writer.WriteObjectValue("", m.GetWorkspaceReadme()) - if err != nil { - return err - } - } - return nil +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + if m.GetAgentPools() != nil { + err := writer.WriteObjectValue("", m.GetAgentPools()) + if err != nil { + return err + } + } else if m.GetApplies() != nil { + err := writer.WriteObjectValue("", m.GetApplies()) + if err != nil { + return err + } + } else if m.GetAssessmentResults() != nil { + err := writer.WriteObjectValue("", m.GetAssessmentResults()) + if err != nil { + return err + } + } else if m.GetConfigurationVersions() != nil { + err := writer.WriteObjectValue("", m.GetConfigurationVersions()) + if err != nil { + return err + } + } else if m.GetEffectiveTagBindings() != nil { + err := writer.WriteObjectValue("", m.GetEffectiveTagBindings()) + if err != nil { + return err + } + } else if m.GetIngressAttributes() != nil { + err := writer.WriteObjectValue("", m.GetIngressAttributes()) + if err != nil { + return err + } + } else if m.GetNoCodeModules() != nil { + err := writer.WriteObjectValue("", m.GetNoCodeModules()) + if err != nil { + return err + } + } else if m.GetNoCodeModuleVersions() != nil { + err := writer.WriteObjectValue("", m.GetNoCodeModuleVersions()) + if err != nil { + return err + } + } else if m.GetOrganizations() != nil { + err := writer.WriteObjectValue("", m.GetOrganizations()) + if err != nil { + return err + } + } else if m.GetPlans() != nil { + err := writer.WriteObjectValue("", m.GetPlans()) + if err != nil { + return err + } + } else if m.GetProjects() != nil { + err := writer.WriteObjectValue("", m.GetProjects()) + if err != nil { + return err + } + } else if m.GetRuns() != nil { + err := writer.WriteObjectValue("", m.GetRuns()) + if err != nil { + return err + } + } else if m.GetStateVersions() != nil { + err := writer.WriteObjectValue("", m.GetStateVersions()) + if err != nil { + return err + } + } else if m.GetUsers() != nil { + err := writer.WriteObjectValue("", m.GetUsers()) + if err != nil { + return err + } + } else if m.GetVars() != nil { + err := writer.WriteObjectValue("", m.GetVars()) + if err != nil { + return err + } + } else if m.GetWorkspaceOutputs() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceOutputs()) + if err != nil { + return err + } + } else if m.GetWorkspaceReadme() != nil { + err := writer.WriteObjectValue("", m.GetWorkspaceReadme()) + if err != nil { + return err + } + } + return nil } + // SetAgentPools sets the agentPools property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() { - m.agentPools = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) { + m.agentPools = value } + // SetApplies sets the applies property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() { - m.applies = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) { + m.applies = value } + // SetAssessmentResults sets the assessmentResults property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() { - m.assessmentResults = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) { + m.assessmentResults = value } + // SetConfigurationVersions sets the configurationVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() { - m.configurationVersions = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) { + m.configurationVersions = value } + // SetEffectiveTagBindings sets the effectiveTagBindings property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() { - m.effectiveTagBindings = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) { + m.effectiveTagBindings = value } + // SetIngressAttributes sets the ingressAttributes property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() { - m.ingressAttributes = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) { + m.ingressAttributes = value } + // SetNoCodeModules sets the noCodeModules property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() { - m.noCodeModules = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) { + m.noCodeModules = value } + // SetNoCodeModuleVersions sets the noCodeModuleVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() { - m.noCodeModuleVersions = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) { + m.noCodeModuleVersions = value } + // SetOrganizations sets the organizations property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() { - m.organizations = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) { + m.organizations = value } + // SetPlans sets the plans property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() { - m.plans = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) { + m.plans = value } + // SetProjects sets the projects property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() { - m.projects = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) { + m.projects = value } + // SetRuns sets the runs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() { - m.runs = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) { + m.runs = value } + // SetStateVersions sets the stateVersions property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() { - m.stateVersions = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) { + m.stateVersions = value } + // SetUsers sets the users property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() { - m.users = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) { + m.users = value } + // SetVars sets the vars property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() { - m.vars = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) { + m.vars = value } + // SetWorkspaceOutputs sets the workspaceOutputs property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() { - m.workspaceOutputs = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) { + m.workspaceOutputs = value } + // SetWorkspaceReadme sets the workspaceReadme property value. Composed type representation for type i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable -func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() { - m.workspaceReadme = value +func (m *ItemWithWorkspace_GetResponse_WithWorkspace_) SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) { + m.workspaceReadme = value } + type ItemWithWorkspace_GetResponse_WithWorkspace_able interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAgentPools()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) - GetApplies()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) - GetAssessmentResults()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) - GetConfigurationVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) - GetEffectiveTagBindings()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) - GetIngressAttributes()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) - GetNoCodeModules()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) - GetNoCodeModuleVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) - GetOrganizations()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) - GetPlans()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) - GetProjects()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) - GetRuns()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) - GetStateVersions()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) - GetUsers()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) - GetVars()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) - GetWorkspaceOutputs()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) - GetWorkspaceReadme()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) - SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable)() - SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable)() - SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable)() - SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable)() - SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable)() - SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable)() - SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable)() - SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable)() - SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable)() - SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable)() - SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable)() - SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable)() - SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable)() - SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable)() - SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable)() - SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable)() - SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentPools() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable + GetApplies() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable + GetAssessmentResults() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable + GetConfigurationVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable + GetEffectiveTagBindings() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable + GetIngressAttributes() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable + GetNoCodeModules() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable + GetNoCodeModuleVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable + GetOrganizations() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable + GetPlans() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable + GetProjects() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable + GetRuns() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable + GetStateVersions() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable + GetUsers() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable + GetVars() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable + GetWorkspaceOutputs() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable + GetWorkspaceReadme() i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable + SetAgentPools(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AgentPoolsable) + SetApplies(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Appliesable) + SetAssessmentResults(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.AssessmentResultsable) + SetConfigurationVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.ConfigurationVersionsable) + SetEffectiveTagBindings(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.EffectiveTagBindingsable) + SetIngressAttributes(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.IngressAttributesable) + SetNoCodeModules(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModulesable) + SetNoCodeModuleVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NoCodeModuleVersionsable) + SetOrganizations(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.OrganizationsGetResponse_Organizationsable) + SetPlans(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Plansable) + SetProjects(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Projectsable) + SetRuns(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Runsable) + SetStateVersions(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.StateVersionsable) + SetUsers(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Usersable) + SetVars(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.Varsable) + SetWorkspaceOutputs(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceOutputsable) + SetWorkspaceReadme(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceReadmeable) } + // NewItemWithWorkspace_GetResponse instantiates a new ItemWithWorkspace_GetResponse and sets the default values. -func NewItemWithWorkspace_GetResponse()(*ItemWithWorkspace_GetResponse) { - m := &ItemWithWorkspace_GetResponse{ - WorkspacesEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspacesEnvelope(), - } - return m +func NewItemWithWorkspace_GetResponse() *ItemWithWorkspace_GetResponse { + m := &ItemWithWorkspace_GetResponse{ + WorkspacesEnvelope: *i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.NewWorkspacesEnvelope(), + } + return m } + // CreateItemWithWorkspace_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemWithWorkspace_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemWithWorkspace_GetResponse(), nil +func CreateItemWithWorkspace_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithWorkspace_GetResponse(), nil } + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemWithWorkspace_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.WorkspacesEnvelope.GetFieldDeserializers() - res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateItemWithWorkspace_GetResponse_WithWorkspace_FromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ItemWithWorkspace_GetResponse_WithWorkspace_able, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ItemWithWorkspace_GetResponse_WithWorkspace_able) - } - } - m.SetIncluded(res) - } - return nil - } - return res +func (m *ItemWithWorkspace_GetResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.WorkspacesEnvelope.GetFieldDeserializers() + res["included"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemWithWorkspace_GetResponse_WithWorkspace_FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemWithWorkspace_GetResponse_WithWorkspace_able, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemWithWorkspace_GetResponse_WithWorkspace_able) + } + } + m.SetIncluded(res) + } + return nil + } + return res } + // GetIncluded gets the included property value. The included property // returns a []ItemWithWorkspace_GetResponse_WithWorkspace_able when successful -func (m *ItemWithWorkspace_GetResponse) GetIncluded()([]ItemWithWorkspace_GetResponse_WithWorkspace_able) { - return m.included +func (m *ItemWithWorkspace_GetResponse) GetIncluded() []ItemWithWorkspace_GetResponse_WithWorkspace_able { + return m.included } + // Serialize serializes information the current object -func (m *ItemWithWorkspace_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.WorkspacesEnvelope.Serialize(writer) - if err != nil { - return err - } - if m.GetIncluded() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) - for i, v := range m.GetIncluded() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("included", cast) - if err != nil { - return err - } - } - return nil +func (m *ItemWithWorkspace_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.WorkspacesEnvelope.Serialize(writer) + if err != nil { + return err + } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } + return nil } + // SetIncluded sets the included property value. The included property -func (m *ItemWithWorkspace_GetResponse) SetIncluded(value []ItemWithWorkspace_GetResponse_WithWorkspace_able)() { - m.included = value +func (m *ItemWithWorkspace_GetResponse) SetIncluded(value []ItemWithWorkspace_GetResponse_WithWorkspace_able) { + m.included = value } + type ItemWithWorkspace_GetResponseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelopeable - GetIncluded()([]ItemWithWorkspace_GetResponse_WithWorkspace_able) - SetIncluded(value []ItemWithWorkspace_GetResponse_WithWorkspace_able)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspacesEnvelopeable } diff --git a/v2/api/workspacetransfers/get_include_query_parameter_type.go b/v2/api/workspacetransfers/get_include_query_parameter_type.go new file mode 100644 index 000000000..fabe2d9e8 --- /dev/null +++ b/v2/api/workspacetransfers/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package workspacetransfers +type GetIncludeQueryParameterType int + +const ( + EVENTS_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"events"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := EVENTS_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "events": + result = EVENTS_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/workspacetransfers/workspace_transfers_get_response.go b/v2/api/workspacetransfers/workspace_transfers_get_response.go index e466c4000..57404e414 100644 --- a/v2/api/workspacetransfers/workspace_transfers_get_response.go +++ b/v2/api/workspacetransfers/workspace_transfers_get_response.go @@ -13,6 +13,8 @@ type WorkspaceTransfersGetResponse struct { additionalData map[string]any // The data property data []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersable + // The included property + included []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable // The links property links i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable // The meta property @@ -60,6 +62,22 @@ func (m *WorkspaceTransfersGetResponse) GetFieldDeserializers()(map[string]func( } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateWorkspaceTransferEventsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable) + } + } + m.SetIncluded(res) + } + return nil + } res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.CreateSelfWithPaginationFromDiscriminatorValue) if err != nil { @@ -82,6 +100,11 @@ func (m *WorkspaceTransfersGetResponse) GetFieldDeserializers()(map[string]func( } return res } +// GetIncluded gets the included property value. The included property +// returns a []WorkspaceTransferEventsable when successful +func (m *WorkspaceTransfersGetResponse) GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable) { + return m.included +} // GetLinks gets the links property value. The links property // returns a SelfWithPaginationable when successful func (m *WorkspaceTransfersGetResponse) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) { @@ -106,6 +129,18 @@ func (m *WorkspaceTransfersGetResponse) Serialize(writer i878a80d2330e89d2689638 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("links", m.GetLinks()) if err != nil { @@ -134,6 +169,10 @@ func (m *WorkspaceTransfersGetResponse) SetAdditionalData(value map[string]any)( func (m *WorkspaceTransfersGetResponse) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *WorkspaceTransfersGetResponse) SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable)() { + m.included = value +} // SetLinks sets the links property value. The links property func (m *WorkspaceTransfersGetResponse) SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() { m.links = value @@ -146,9 +185,11 @@ type WorkspaceTransfersGetResponseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersable) + GetIncluded()([]i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable) GetLinks()(i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable) GetMeta()(WorkspaceTransfersGetResponse_metaable) SetData(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransfersable)() + SetIncluded(value []i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.WorkspaceTransferEventsable)() SetLinks(value i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16.SelfWithPaginationable)() SetMeta(value WorkspaceTransfersGetResponse_metaable)() } diff --git a/v2/api/workspacetransfers/workspace_transfers_request_builder.go b/v2/api/workspacetransfers/workspace_transfers_request_builder.go index 8a5fe0656..0a07229aa 100644 --- a/v2/api/workspacetransfers/workspace_transfers_request_builder.go +++ b/v2/api/workspacetransfers/workspace_transfers_request_builder.go @@ -17,6 +17,8 @@ type WorkspaceTransfersRequestBuilder struct { type WorkspaceTransfersRequestBuilderGetQueryParameters struct { // Return only the specified fields for workspace-transfers resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldsworkspaceTransfers []string "uriparametername:\"fields%5Bworkspace%2Dtransfers%5D\"" + // Optionally side-load the specified relationships. + Include []GetIncludeQueryParameterType "uriparametername:\"include\"" // The page number to retrieve. Pagenumber *int32 "uriparametername:\"page%5Bnumber%5D\"" // The number of items to retrieve per page. Defaults to 20. @@ -37,7 +39,7 @@ func (m *WorkspaceTransfersRequestBuilder) ByWorkspace_transfer_id(workspace_tra // NewWorkspaceTransfersRequestBuilderInternal instantiates a new WorkspaceTransfersRequestBuilder and sets the default values. func NewWorkspaceTransfersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WorkspaceTransfersRequestBuilder) { m := &WorkspaceTransfersRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspace-transfers{?fields%5Bworkspace%2Dtransfers%5D,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/workspace-transfers{?fields%5Bworkspace%2Dtransfers%5D,include,page%5Bnumber%5D*,page%5Bsize%5D*}", pathParameters), } return m } diff --git a/v2/openapi/spec.json b/v2/openapi/spec.json index 33130acef..75eaf0fec 100644 --- a/v2/openapi/spec.json +++ b/v2/openapi/spec.json @@ -13,6 +13,11 @@ "url": "https://developer.hashicorp.com/terraform/cloud-docs/api-docs" } }, + "servers": [ + { + "url": "https://app.terraform.io" + } + ], "security": [ { "bearerAuth": [] @@ -494,9 +499,9 @@ { "name": "admin-tfpolicy-versions", "x-vis": [ - "public-beta", "tfe" ], + "x-tfe-min-version": "2.1.0", "x-displayName": "Admin TFPolicy Versions", "description": "Management of TFPolicy tool versions available for use by site administrators." }, @@ -1626,13 +1631,13 @@ }, "/admin/tfpolicy-versions": { "x-vis": [ - "public-beta", "tfe" ], + "x-tfe-min-version": "2.1.0", "get": { "operationId": "listAdminTfpolicyVersions", "summary": "List TFPolicy Versions (Admin)", - "description": "Lists the TFPolicy versions registered on this installation. Requires administrator access.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "description": "Lists the TFPolicy versions registered on this installation. Requires administrator access.\n\n\nThis operation is only available in Terraform Enterprise version 2.1.0 or later.", "tags": [ "admin-tfpolicy-versions" ], @@ -1724,7 +1729,7 @@ "post": { "operationId": "createAdminTfpolicyVersion", "summary": "Create TFPolicy Version (Admin)", - "description": "Registers a new TFPolicy version. Requires administrator access. Provide at least one entry in `archs`, or both top-level `url` and `sha` fields. We recommend using `archs` to specify binary URLs and SHA-256 checksums. If both forms are given and include a linux/amd64 architecture, their `url`/`sha` values must match exactly or the request returns 422 Unprocessable Content. Omitting both `archs` and `url`/`sha` returns 400 Bad Request.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "description": "Registers a new TFPolicy version. Requires administrator access. Provide at least one entry in `archs`, or both top-level `url` and `sha` fields. We recommend using `archs` to specify binary URLs and SHA-256 checksums. If both forms are given and include a linux/amd64 architecture, their `url`/`sha` values must match exactly or the request returns 422 Unprocessable Content. Omitting both `archs` and `url`/`sha` returns 400 Bad Request.\n\n\nThis operation is only available in Terraform Enterprise version 2.1.0 or later.", "tags": [ "admin-tfpolicy-versions" ], @@ -1784,13 +1789,13 @@ }, "/admin/tfpolicy-versions/{id}": { "x-vis": [ - "public-beta", "tfe" ], + "x-tfe-min-version": "2.1.0", "get": { "operationId": "getAdminTfpolicyVersion", "summary": "Show TFPolicy Version (Admin)", - "description": "Returns a single TFPolicy version by its external ID. Requires administrator access.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "description": "Returns a single TFPolicy version by its external ID. Requires administrator access.\n\n\nThis operation is only available in Terraform Enterprise version 2.1.0 or later.", "tags": [ "admin-tfpolicy-versions" ], @@ -1854,7 +1859,7 @@ "patch": { "operationId": "updateAdminTfpolicyVersion", "summary": "Update TFPolicy Version (Admin)", - "description": "Partially updates an existing TFPolicy version. Only attributes present in the request body are modified. Requires administrator access. Setting `enabled` to `false` while the version is in use returns 409 Conflict. Providing `archs` as an empty array returns 422 Unprocessable Content, since a TFPolicy version must always have at least one architecture; omitting `archs` leaves existing architectures unchanged.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "description": "Partially updates an existing TFPolicy version. Only attributes present in the request body are modified. Requires administrator access. Setting `enabled` to `false` while the version is in use returns 409 Conflict. Providing `archs` as an empty array returns 422 Unprocessable Content, since a TFPolicy version must always have at least one architecture; omitting `archs` leaves existing architectures unchanged.\n\n\nThis operation is only available in Terraform Enterprise version 2.1.0 or later.", "tags": [ "admin-tfpolicy-versions" ], @@ -1935,7 +1940,7 @@ "delete": { "operationId": "deleteAdminTfpolicyVersion", "summary": "Delete TFPolicy Version (Admin)", - "description": "Deletes a TFPolicy version. Official or in-use versions cannot be destroyed. Requires administrator access. Returns 204 No Content on success.\n\n\nThis operation is only available in Terraform Enterprise.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "description": "Deletes a TFPolicy version. Official or in-use versions cannot be destroyed. Requires administrator access. Returns 204 No Content on success.\n\n\nThis operation is only available in Terraform Enterprise version 2.1.0 or later.", "tags": [ "admin-tfpolicy-versions" ], @@ -2104,9 +2109,14 @@ } }, "schema": { - "properties": {}, - "$ref": "#/components/schemas/users-envelope", - "description": "User resource representing the account details of the authenticated user.\nFor internal reasons, HCP Terraform associates team and organization tokens\nwith a synthetic user account called service user.\n" + "allOf": [ + { + "$ref": "#/components/schemas/users-envelope" + }, + { + "description": "User resource representing the account details of the authenticated user.\nFor internal reasons, HCP Terraform associates team and organization tokens\nwith a synthetic user account called service user.\n" + } + ] } } } @@ -2540,6 +2550,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "feature_set" + ] + } + } } ], "responses": { @@ -2767,6 +2794,37 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "oauth_clients", + "hyok_configurations", + "projects", + "stacks", + "workspaces", + "allowed_projects", + "allowed_stacks", + "allowed_workspaces", + "excluded_stacks", + "excluded_workspaces", + "modules", + "allowed_modules", + "excluded_modules", + "cidr_range_lists", + "cidr_ranges" + ] + } + } } ], "responses": { @@ -2796,6 +2854,50 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/oauth-clients" + }, + { + "$ref": "#/components/schemas/hyok-configurations" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/stacks" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/registry-modules" + }, + { + "$ref": "#/components/schemas/cidr-range-lists" + }, + { + "$ref": "#/components/schemas/cidr-ranges" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "oauth-clients": "#/components/schemas/oauth-clients", + "hyok-configurations": "#/components/schemas/hyok-configurations", + "projects": "#/components/schemas/projects", + "stacks": "#/components/schemas/stacks", + "workspaces": "#/components/schemas/workspaces", + "registry-modules": "#/components/schemas/registry-modules", + "cidr-range-lists": "#/components/schemas/cidr-range-lists", + "cidr-ranges": "#/components/schemas/cidr-ranges" + } + } + } } } } @@ -2845,6 +2947,37 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "oauth_clients", + "hyok_configurations", + "projects", + "stacks", + "workspaces", + "allowed_projects", + "allowed_stacks", + "allowed_workspaces", + "excluded_stacks", + "excluded_workspaces", + "modules", + "allowed_modules", + "excluded_modules", + "cidr_range_lists", + "cidr_ranges" + ] + } + } } ], "responses": { @@ -3179,6 +3312,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "cidr_ranges", + "agent_pools" + ] + } + } } ], "responses": { @@ -4084,6 +4235,26 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "latest_stack_configuration", + "latest_stack_configuration.stack_diagnostics", + "organization", + "project" + ] + } + } } ], "responses": { @@ -4240,6 +4411,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_configuration" + ] + } + } } ], "responses": { @@ -4269,6 +4457,22 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-configurations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-configurations": "#/components/schemas/stack-configurations" + } + } + } } } } @@ -4623,37 +4827,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/stack-configurations-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ingress-attributes" - }, - { - "$ref": "#/components/schemas/stack-configuration-summaries" - }, - { - "$ref": "#/components/schemas/stack-diagnostics" - }, - { - "$ref": "#/components/schemas/stack-aggregate-outputs" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "ingress-attributes": "#/components/schemas/ingress-attributes", - "stack-configuration-summaries": "#/components/schemas/stack-configuration-summaries", - "stack-diagnostics": "#/components/schemas/stack-diagnostics", - "stack-aggregate-outputs": "#/components/schemas/stack-aggregate-outputs" - } - } - } - } - } + "$ref": "#/components/schemas/stack-configurations-envelope" } } } @@ -4729,6 +4903,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "latest_deployment_run", + "latest_deployment_run.stack_configuration" + ] + } + } } ], "responses": { @@ -4758,6 +4950,26 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-deployment-runs" + }, + { + "$ref": "#/components/schemas/stack-configurations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-deployment-runs": "#/components/schemas/stack-deployment-runs", + "stack-configurations": "#/components/schemas/stack-configurations" + } + } + } } } } @@ -4822,6 +5034,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_configuration", + "current_step" + ] + } + } } ], "responses": { @@ -4851,6 +5081,26 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-configurations" + }, + { + "$ref": "#/components/schemas/stack-deployment-steps" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-configurations": "#/components/schemas/stack-configurations", + "stack-deployment-steps": "#/components/schemas/stack-deployment-steps" + } + } + } } } } @@ -5360,6 +5610,26 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_deployment_group", + "stack_approval", + "current_step", + "destroy_stack_configuration" + ] + } + } } ], "responses": { @@ -5389,6 +5659,34 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-deployment-groups" + }, + { + "$ref": "#/components/schemas/stack-approvals" + }, + { + "$ref": "#/components/schemas/stack-deployment-steps" + }, + { + "$ref": "#/components/schemas/stack-configurations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-deployment-groups": "#/components/schemas/stack-deployment-groups", + "stack-approvals": "#/components/schemas/stack-approvals", + "stack-deployment-steps": "#/components/schemas/stack-deployment-steps", + "stack-configurations": "#/components/schemas/stack-configurations" + } + } + } } } } @@ -5606,6 +5904,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_configuration" + ] + } + } } ], "responses": { @@ -5621,6 +5936,22 @@ "properties": { "data": { "$ref": "#/components/schemas/stack-diagnostics" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-configurations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-configurations": "#/components/schemas/stack-configurations" + } + } + } } } } @@ -5866,7 +6197,8 @@ "items": { "type": "string", "enum": [ - "stack-deployment-group-summary" + "stack_deployment_group_summary", + "run_status_summaries" ] } } @@ -5973,6 +6305,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_deployment_group_summary", + "run_status_summaries" + ] + } + } } ], "responses": { @@ -6042,7 +6392,8 @@ "items": { "type": "string", "enum": [ - "stack-deployment-group-summary" + "stack_deployment_group_summary", + "run_status_summaries" ] } } @@ -6054,25 +6405,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/stack-deployment-groups-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/stack-deployment-group-summaries" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "stack-deployment-group-summaries": "#/components/schemas/stack-deployment-group-summaries" - } - } - } - } - } + "$ref": "#/components/schemas/stack-deployment-groups-envelope" } } } @@ -6285,6 +6618,27 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_deployment_group", + "stack_approval", + "current_step", + "destroy_stack_configuration", + "blocked_by_deployment_group" + ] + } + } } ], "responses": { @@ -6314,6 +6668,34 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-deployment-groups" + }, + { + "$ref": "#/components/schemas/stack-approvals" + }, + { + "$ref": "#/components/schemas/stack-deployment-steps" + }, + { + "$ref": "#/components/schemas/stack-configurations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-deployment-groups": "#/components/schemas/stack-deployment-groups", + "stack-approvals": "#/components/schemas/stack-approvals", + "stack-deployment-steps": "#/components/schemas/stack-deployment-steps", + "stack-configurations": "#/components/schemas/stack-configurations" + } + } + } } } } @@ -6363,6 +6745,30 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_deployment_group", + "stack_approval", + "stack_approval.user", + "current_step", + "destroy_stack_configuration", + "blocked_by_deployment_group", + "latest_deployment_run_for_deployment", + "rollbacked_state" + ] + } + } } ], "responses": { @@ -6517,6 +6923,30 @@ { "$ref": "#/components/parameters/page_size" }, + { + "in": "query", + "name": "include", + "x-vis": [ + "public-beta" + ], + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_operation", + "stack_operation.policy_evaluation", + "stack_approval", + "stack_approval.user", + "stack_state" + ] + } + }, + "required": false, + "description": "Allows including related resource data. Comma-separated list of relationship names to side-load.\n" + }, { "in": "query", "name": "fields[stack-deployment-steps]", @@ -6548,6 +6978,41 @@ "$ref": "#/components/schemas/stack-deployment-steps" } }, + "included": { + "x-vis": [ + "public-beta" + ], + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-operation-plans" + }, + { + "$ref": "#/components/schemas/stack-operation-applies" + }, + { + "$ref": "#/components/schemas/stack-operation-import-states" + }, + { + "$ref": "#/components/schemas/stack-operation-allow-imports" + }, + { + "$ref": "#/components/schemas/stack-policy-evaluations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-operation-plans": "#/components/schemas/stack-operation-plans", + "stack-operation-applies": "#/components/schemas/stack-operation-applies", + "stack-operation-import-states": "#/components/schemas/stack-operation-import-states", + "stack-operation-allow-imports": "#/components/schemas/stack-operation-allow-imports", + "stack-policy-evaluations": "#/components/schemas/stack-policy-evaluations" + } + } + } + }, "meta": { "type": "object", "properties": { @@ -6595,6 +7060,30 @@ "required": true, "description": "Stack deployment step ID" }, + { + "in": "query", + "name": "include", + "x-vis": [ + "public-beta" + ], + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_operation", + "stack_operation.policy_evaluation", + "stack_approval", + "stack_approval.user", + "stack_state" + ] + } + }, + "required": false, + "description": "Allows including related resource data. Comma-separated list of relationship names to side-load.\n" + }, { "in": "query", "name": "fields[stack-deployment-steps]", @@ -6616,6 +7105,137 @@ "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/stack-deployment-steps-envelope" + }, + "examples": { + "planStepWithStackOperation": { + "x-vis": [ + "public-beta" + ], + "summary": "Plan step retrieved with ?include=stack-operation", + "value": { + "data": { + "type": "stack-deployment-steps", + "id": "sds-A7hK3mQ9pR4xYz2N", + "attributes": { + "status": "completed", + "operation-type": "plan", + "requires-state-lock": false + }, + "relationships": { + "stack-deployment-run": { + "data": { + "type": "stack-deployment-runs", + "id": "sdr-B8jL4nP6qS9tW3yZ" + } + }, + "stack-operation": { + "data": { + "type": "stack-operation-plans", + "id": "stoplan-D3eG6hJ8kM2nP5rT" + } + } + }, + "links": { + "self": "/api/v2/stack-deployment-steps/sds-A7hK3mQ9pR4xYz2N" + } + }, + "included": [ + { + "type": "stack-operation-plans", + "id": "stoplan-D3eG6hJ8kM2nP5rT", + "attributes": { + "change-summary": { + "add": 3, + "change": 1, + "remove": 2, + "total": 6 + } + }, + "links": { + "plan-description": "/api/v2/stack-deployment-steps/sds-A7hK3mQ9pR4xYz2N/artifacts?name=plan-description", + "plan-debug-log": "/api/v2/stack-deployment-steps/sds-A7hK3mQ9pR4xYz2N/artifacts?name=plan-debug-log" + } + } + ] + } + }, + "planStepWithPolicyEvaluation": { + "x-vis": [ + "public-beta" + ], + "summary": "Plan step retrieved with ?include=stack_operation.policy_evaluation", + "value": { + "data": { + "type": "stack-deployment-steps", + "id": "sds-A7hK3mQ9pR4xYz2N", + "attributes": { + "status": "completed", + "operation-type": "plan", + "requires-state-lock": false + }, + "relationships": { + "stack-operation": { + "data": { + "type": "stack-operation-plans", + "id": "stoplan-D3eG6hJ8kM2nP5rT" + } + } + }, + "links": { + "self": "/api/v2/stack-deployment-steps/sds-A7hK3mQ9pR4xYz2N" + } + }, + "included": [ + { + "type": "stack-operation-plans", + "id": "stoplan-D3eG6hJ8kM2nP5rT", + "attributes": { + "change-summary": { + "add": 3, + "change": 1, + "remove": 2, + "total": 6 + } + }, + "relationships": { + "policy-evaluation": { + "data": { + "type": "stack-policy-evaluations", + "id": "speval-F4gH7jK9mN2pQ5sV" + } + } + } + }, + { + "type": "stack-policy-evaluations", + "id": "speval-F4gH7jK9mN2pQ5sV", + "attributes": { + "status": "passed", + "policy-attachable-id": "stoplan-D3eG6hJ8kM2nP5rT", + "policy-attachable-type": "plan", + "result-count": { + "advisory-failed": 0, + "mandatory-failed": 0, + "mandatory-overridable-failed": 0, + "passed": 2, + "errored": 0, + "unknown": 0 + }, + "error": null + }, + "relationships": { + "stack-policy-set-outcomes": { + "meta": {} + } + }, + "links": { + "self": "/api/v2/stack-policy-evaluations/speval-F4gH7jK9mN2pQ5sV", + "stack-policy-set-outcomes": "/api/v2/stack-policy-evaluations/speval-F4gH7jK9mN2pQ5sV/stack-policy-set-outcomes" + } + } + ] + } + } } } } @@ -6926,6 +7546,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user" + ] + } + } } ], "responses": { @@ -6952,6 +7589,211 @@ } } }, + "/stack-policy-evaluations/{id}": { + "x-vis": [ + "public-beta" + ], + "get": { + "operationId": "getStackPolicyEvaluation", + "summary": "Show a Stack Policy Evaluation", + "description": "Get details about a specific stack policy evaluation.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "tags": [ + "stacks" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string" + }, + "required": true, + "description": "The ID of the stack policy evaluation to show." + }, + { + "in": "query", + "name": "fields[stack-policy-evaluations]", + "description": "Return only the specified fields for stack-policy-evaluations resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "stack_policy_set_outcomes" + ] + } + } + } + ], + "responses": { + "200": { + "description": "Stack policy evaluation details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/stack-policy-evaluations-envelope" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + } + }, + "/stack-policy-evaluations/{stack_policy_evaluation_id}/stack-policy-set-outcomes": { + "x-vis": [ + "public-beta" + ], + "get": { + "operationId": "listStackPolicyEvaluationStackPolicySetOutcomes", + "summary": "List Stack Policy Set Outcomes for a Stack Policy Evaluation", + "description": "List the stack policy set outcomes associated with a stack policy evaluation. Supports filtering via the `filter` parameter.\n\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "tags": [ + "stacks" + ], + "parameters": [ + { + "in": "path", + "name": "stack_policy_evaluation_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "The ID of the stack policy evaluation to list outcomes for." + }, + { + "in": "query", + "name": "filter", + "style": "deepObject", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "passed", + "failed", + "errored", + "unknown" + ], + "description": "Filter outcomes by status." + }, + "enforcement_level": { + "type": "string", + "enum": [ + "advisory", + "mandatory", + "mandatory_overridable" + ], + "description": "Filter outcomes by enforcement level." + } + } + } + }, + "description": "Filter outcomes using OR-grouped AND conditions. Each numeric index defines\nan independent AND-condition group; groups are combined with OR.\n\nExample — return outcomes that are errored OR (failed + mandatory):\n```\nfilter[0][status]=errored\n&filter[1][status]=failed&filter[1][enforcement_level]=mandatory\n```\n" + }, + { + "$ref": "#/components/parameters/page_number" + }, + { + "$ref": "#/components/parameters/page_size" + }, + { + "in": "query", + "name": "fields[stack-policy-set-outcomes]", + "description": "Return only the specified fields for stack-policy-set-outcomes resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "List of stack policy set outcomes", + "content": { + "application/vnd.api+json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/stack-policy-set-outcomes" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/pagination" + } + } + }, + "links": { + "$ref": "#/components/schemas/self-with-pagination" + } + } + } + } + } + }, + "400": { + "description": "Invalid filter provided", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + } + }, "/organizations": { "get": { "operationId": "listOrganizations", @@ -7021,7 +7863,8 @@ "enum": [ "subscription", "default_project", - "entitlement_set" + "entitlement_set", + "current_onboarding_task_list" ] } } @@ -7067,6 +7910,9 @@ }, { "$ref": "#/components/schemas/entitlement-sets" + }, + { + "$ref": "#/components/schemas/onboarding-task-lists" } ], "discriminator": { @@ -7074,7 +7920,8 @@ "mapping": { "subscriptions": "#/components/schemas/subscriptions", "projects": "#/components/schemas/projects", - "entitlement-sets": "#/components/schemas/entitlement-sets" + "entitlement-sets": "#/components/schemas/entitlement-sets", + "onboarding-task-lists": "#/components/schemas/onboarding-task-lists" } } } @@ -7182,7 +8029,8 @@ "enum": [ "subscription", "default_project", - "entitlement_set" + "entitlement_set", + "current_onboarding_task_list" ] } } @@ -7194,33 +8042,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/organizations-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/subscriptions" - }, - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/entitlement-sets" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "subscriptions": "#/components/schemas/subscriptions", - "projects": "#/components/schemas/projects", - "entitlement-sets": "#/components/schemas/entitlement-sets" - } - } - } - } - } + "$ref": "#/components/schemas/organizations-envelope" } } } @@ -7362,6 +8184,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "cidr_ranges", + "agent_pools" + ] + } + } } ], "responses": { @@ -7388,6 +8228,26 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/cidr-ranges" + }, + { + "$ref": "#/components/schemas/agent-pools" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "cidr-ranges": "#/components/schemas/cidr-ranges", + "agent-pools": "#/components/schemas/agent-pools" + } + } + } } } } @@ -7908,7 +8768,8 @@ "type": "string", "enum": [ "user", - "teams" + "teams", + "organization" ] } } @@ -7920,29 +8781,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/organization-memberships-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/teams" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "users": "#/components/schemas/users", - "teams": "#/components/schemas/teams" - } - } - } - } - } + "$ref": "#/components/schemas/organization-memberships-envelope" } } } @@ -8757,6 +9596,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "effective_tag_bindings" + ] + } + } } ], "responses": { @@ -8783,6 +9639,22 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/effective-tag-bindings" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" + } + } + } } } } @@ -9084,6 +9956,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "effective_tag_bindings" + ] + } + } } ], "responses": { @@ -9969,89 +10858,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/workspaces-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/agent-pools" - }, - { - "$ref": "#/components/schemas/assessment-results" - }, - { - "$ref": "#/components/schemas/configuration-versions" - }, - { - "$ref": "#/components/schemas/ingress-attributes" - }, - { - "$ref": "#/components/schemas/runs" - }, - { - "$ref": "#/components/schemas/applies" - }, - { - "$ref": "#/components/schemas/plans" - }, - { - "$ref": "#/components/schemas/state-versions" - }, - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/no-code-module-versions" - }, - { - "$ref": "#/components/schemas/no-code-modules" - }, - { - "$ref": "#/components/schemas/organizations" - }, - { - "$ref": "#/components/schemas/workspace-outputs" - }, - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/workspace-readme" - }, - { - "$ref": "#/components/schemas/vars" - }, - { - "$ref": "#/components/schemas/effective-tag-bindings" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "agent-pools": "#/components/schemas/agent-pools", - "assessment-results": "#/components/schemas/assessment-results", - "configuration-versions": "#/components/schemas/configuration-versions", - "ingress-attributes": "#/components/schemas/ingress-attributes", - "runs": "#/components/schemas/runs", - "applies": "#/components/schemas/applies", - "plans": "#/components/schemas/plans", - "state-versions": "#/components/schemas/state-versions", - "users": "#/components/schemas/users", - "no-code-module-versions": "#/components/schemas/no-code-module-versions", - "no-code-modules": "#/components/schemas/no-code-modules", - "organizations": "#/components/schemas/organizations", - "workspace-outputs": "#/components/schemas/workspace-outputs", - "projects": "#/components/schemas/projects", - "workspace-readme": "#/components/schemas/workspace-readme", - "vars": "#/components/schemas/vars", - "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" - } - } - } - } - } + "$ref": "#/components/schemas/workspaces-envelope" } } } @@ -11255,6 +12062,25 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "configuration_version", + "created_by", + "configuration_version.ingress_attributes" + ] + } + } } ], "responses": { @@ -11263,31 +12089,63 @@ "content": { "application/vnd.api+json": { "schema": { - "properties": { - "data": { + "allOf": [ + { + "$ref": "#/components/schemas/queries-envelope" + }, + { "type": "object", "properties": { - "attributes": { + "data": { "type": "object", - "required": [ - "list-completions" - ], "properties": { - "list-completions": { - "type": "array", - "readOnly": true, - "description": "A summary of each list completion returned by the query run.", - "items": { - "$ref": "#/components/schemas/query-completion-summary" + "attributes": { + "type": "object", + "required": [ + "list-completions" + ], + "properties": { + "list-completions": { + "type": "array", + "readOnly": true, + "description": "A summary of each list completion returned by the query run.", + "items": { + "$ref": "#/components/schemas/query-completion-summary" + } + } } } } } } } - }, - "$ref": "#/components/schemas/queries-envelope", - "type": "object" + ], + "properties": { + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "configuration-versions": "#/components/schemas/configuration-versions", + "users": "#/components/schemas/users", + "ingress-attributes": "#/components/schemas/ingress-attributes" + } + } + } + } + } } } } @@ -11407,6 +12265,25 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "configuration_version", + "created_by", + "configuration_version.ingress_attributes" + ] + } + } } ], "responses": { @@ -11433,6 +12310,30 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "configuration-versions": "#/components/schemas/configuration-versions", + "users": "#/components/schemas/users", + "ingress-attributes": "#/components/schemas/ingress-attributes" + } + } + } } } } @@ -11596,6 +12497,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "overwritten", + "overwriter" + ] + } + } } ], "responses": { @@ -11614,6 +12533,22 @@ "items": { "$ref": "#/components/schemas/vars" } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/vars" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "vars": "#/components/schemas/vars" + } + } + } } } } @@ -11663,6 +12598,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "overwritten", + "overwriter" + ] + } + } } ], "responses": { @@ -11681,6 +12634,22 @@ "items": { "$ref": "#/components/schemas/vars" } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/vars" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "vars": "#/components/schemas/vars" + } + } + } } } } @@ -11790,6 +12759,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "overwritten", + "overwriter" + ] + } + } } ], "responses": { @@ -11978,29 +12965,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/provider-sets-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/workspaces" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "projects": "#/components/schemas/projects", - "workspaces": "#/components/schemas/workspaces" - } - } - } - } - } + "$ref": "#/components/schemas/provider-sets-envelope" } } } @@ -12593,29 +13558,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/provider-sets-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/workspaces" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "projects": "#/components/schemas/projects", - "workspaces": "#/components/schemas/workspaces" - } - } - } - } - } + "$ref": "#/components/schemas/provider-sets-envelope" } } } @@ -12672,6 +13615,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "workspaces", + "projects" + ] + } + } } ], "responses": { @@ -12698,6 +13659,26 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects" + } + } + } } } } @@ -12756,6 +13737,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "workspaces", + "projects" + ] + } + } } ], "responses": { @@ -12782,6 +13781,26 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects" + } + } + } } } } @@ -12831,6 +13850,26 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "vars", + "workspaces", + "projects", + "stacks" + ] + } + } } ], "responses": { @@ -13059,6 +14098,26 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "vars", + "workspaces", + "projects", + "stacks" + ] + } + } } ], "responses": { @@ -13085,6 +14144,34 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/stacks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "vars": "#/components/schemas/vars", + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects", + "stacks": "#/components/schemas/stacks" + } + } + } } } } @@ -13191,6 +14278,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "overwritten", + "overwriter" + ] + } + } } ], "responses": { @@ -13220,6 +14325,22 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/vars" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "vars": "#/components/schemas/vars" + } + } + } } } } @@ -13329,6 +14450,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "overwritten", + "overwriter" + ] + } + } } ], "responses": { @@ -13506,6 +14645,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "overwritten", + "overwriter" + ] + } + } } ], "responses": { @@ -13577,6 +14734,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "overwritten", + "overwriter" + ] + } + } } ], "responses": { @@ -13606,6 +14781,22 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/vars" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "vars": "#/components/schemas/vars" + } + } + } } } } @@ -13955,6 +15146,26 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "vars", + "workspaces", + "projects", + "stacks" + ] + } + } } ], "responses": { @@ -13981,6 +15192,34 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/stacks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "vars": "#/components/schemas/vars", + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects", + "stacks": "#/components/schemas/stacks" + } + } + } } } } @@ -14045,6 +15284,26 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "vars", + "workspaces", + "projects", + "stacks" + ] + } + } } ], "responses": { @@ -14071,6 +15330,34 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/stacks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "vars": "#/components/schemas/vars", + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects", + "stacks": "#/components/schemas/stacks" + } + } + } } } } @@ -14292,89 +15579,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/workspaces-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/agent-pools" - }, - { - "$ref": "#/components/schemas/assessment-results" - }, - { - "$ref": "#/components/schemas/configuration-versions" - }, - { - "$ref": "#/components/schemas/ingress-attributes" - }, - { - "$ref": "#/components/schemas/runs" - }, - { - "$ref": "#/components/schemas/applies" - }, - { - "$ref": "#/components/schemas/plans" - }, - { - "$ref": "#/components/schemas/state-versions" - }, - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/no-code-module-versions" - }, - { - "$ref": "#/components/schemas/no-code-modules" - }, - { - "$ref": "#/components/schemas/organizations" - }, - { - "$ref": "#/components/schemas/workspace-outputs" - }, - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/workspace-readme" - }, - { - "$ref": "#/components/schemas/vars" - }, - { - "$ref": "#/components/schemas/effective-tag-bindings" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "agent-pools": "#/components/schemas/agent-pools", - "assessment-results": "#/components/schemas/assessment-results", - "configuration-versions": "#/components/schemas/configuration-versions", - "ingress-attributes": "#/components/schemas/ingress-attributes", - "runs": "#/components/schemas/runs", - "applies": "#/components/schemas/applies", - "plans": "#/components/schemas/plans", - "state-versions": "#/components/schemas/state-versions", - "users": "#/components/schemas/users", - "no-code-module-versions": "#/components/schemas/no-code-module-versions", - "no-code-modules": "#/components/schemas/no-code-modules", - "organizations": "#/components/schemas/organizations", - "workspace-outputs": "#/components/schemas/workspace-outputs", - "projects": "#/components/schemas/projects", - "workspace-readme": "#/components/schemas/workspace-readme", - "vars": "#/components/schemas/vars", - "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" - } - } - } - } - } + "$ref": "#/components/schemas/workspaces-envelope" } } } @@ -15928,25 +17133,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/current-state-version-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/state-version-outputs" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "state-version-outputs": "#/components/schemas/state-version-outputs" - } - } - } - } - } + "$ref": "#/components/schemas/current-state-version-envelope" } } } @@ -16562,57 +17749,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/runs-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/plans" - }, - { - "$ref": "#/components/schemas/applies" - }, - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/configuration-versions" - }, - { - "$ref": "#/components/schemas/ingress-attributes" - }, - { - "$ref": "#/components/schemas/cost-estimates" - }, - { - "$ref": "#/components/schemas/workspaces" - }, - { - "$ref": "#/components/schemas/task-stages" - }, - { - "$ref": "#/components/schemas/tf-policy-evaluations" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "plans": "#/components/schemas/plans", - "applies": "#/components/schemas/applies", - "users": "#/components/schemas/users", - "configuration-versions": "#/components/schemas/configuration-versions", - "ingress-attributes": "#/components/schemas/ingress-attributes", - "cost-estimates": "#/components/schemas/cost-estimates", - "workspaces": "#/components/schemas/workspaces", - "task-stages": "#/components/schemas/task-stages", - "tf-policy-evaluations": "#/components/schemas/tf-policy-evaluations" - } - } - } - } - } + "$ref": "#/components/schemas/runs-envelope" } } } @@ -17028,6 +18165,31 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "plan", + "apply", + "created_by", + "configuration_version", + "configuration_version.ingress_attributes", + "cost_estimate", + "workspace", + "task_stages", + "tf_policy_evaluations" + ] + } + } } ], "responses": { @@ -17054,6 +18216,54 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/cost-estimates" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/task-stages" + }, + { + "$ref": "#/components/schemas/tf-policy-evaluations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "plans": "#/components/schemas/plans", + "applies": "#/components/schemas/applies", + "users": "#/components/schemas/users", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "cost-estimates": "#/components/schemas/cost-estimates", + "workspaces": "#/components/schemas/workspaces", + "task-stages": "#/components/schemas/task-stages", + "tf-policy-evaluations": "#/components/schemas/tf-policy-evaluations" + } + } + } } } } @@ -17122,6 +18332,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "workspace", + "sourceable" + ] + } + } } ], "responses": { @@ -17148,6 +18376,22 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspaces": "#/components/schemas/workspaces" + } + } + } } } } @@ -17248,6 +18492,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "workspace", + "sourceable" + ] + } + } } ], "responses": { @@ -17372,6 +18634,26 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "workspace", + "workspace.project", + "configuration_version", + "configuration_version.ingress_attributes" + ] + } + } } ], "responses": { @@ -17398,6 +18680,34 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes" + } + } + } } } } @@ -17988,6 +19298,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "policy_sets" + ] + } + } } ], "responses": { @@ -18169,6 +19496,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "policy_sets" + ] + } + } } ], "responses": { @@ -18195,6 +19539,22 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/policy-sets" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "policy-sets": "#/components/schemas/policy-sets" + } + } + } } } } @@ -18397,6 +19757,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "run", + "run.workspace" + ] + } + } } ], "responses": { @@ -18566,6 +19944,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "run", + "run.workspace" + ] + } + } } ], "responses": { @@ -18592,6 +19988,26 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runs": "#/components/schemas/runs", + "workspaces": "#/components/schemas/workspaces" + } + } + } } } } @@ -18753,25 +20169,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/tf-policy-evaluations-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/tf-policy-set-outcomes" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "tf-policy-set-outcomes": "#/components/schemas/tf-policy-set-outcomes" - } - } - } - } - } + "$ref": "#/components/schemas/tf-policy-evaluations-envelope" } } } @@ -19371,6 +20769,224 @@ "required": true, "description": "The ID of the policy set." }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "policies", + "workspaces", + "workspace_exclusions", + "stacks", + "stack_exclusions", + "projects", + "project_exclusions", + "current_version", + "newest_version", + "policies.ootb_policy", + "policies.ootb_policy.ootb_policy_libraries" + ] + } + }, + "required": false, + "description": "Available side-load related resources. Multiple values can be comma-separated.\nProject exclusion, stack, and stack exclusion relationship data is only\nreturned when included.\n\nAvailable includes:\n- `policies` - The policies in this policy set\n- `workspaces` - The workspaces this policy set is attached to\n- `workspace_exclusions` - The workspaces excluded from this policy set\n- `stacks` - The stacks this policy set is attached to (`tfpolicy` policy sets only) *(public-beta)*\n- `stack_exclusions` - The stacks excluded from this policy set (`tfpolicy` policy sets only) *(public-beta)*\n- `projects` - The projects this policy set is attached to\n- `project_exclusions` - The projects excluded from this policy set\n- `current_version` - The current policy set version\n- `newest_version` - The newest policy set version\n- `policies.ootb_policy` - The OOTB policy for each policy *(public-beta)*\n- `policies.ootb_policy.ootb_policy_libraries` - The OOTB policy libraries for each OOTB policy *(public-beta)*\n" + }, + { + "in": "query", + "name": "fields[policy-sets]", + "description": "Return only the specified fields for policy-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Policy set details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/policy-sets-envelope" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + }, + "patch": { + "operationId": "updatePolicySet", + "summary": "Update a Policy Set", + "description": "Update an existing policy set.", + "tags": [ + "policy-sets" + ], + "parameters": [ + { + "in": "path", + "name": "policy_set_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "The ID of the policy set." + } + ], + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/policy-sets-envelope" + } + } + } + }, + "responses": { + "200": { + "description": "Policy set updated", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/policy-sets-envelope" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + }, + "delete": { + "operationId": "deletePolicySet", + "summary": "Delete a Policy Set", + "description": "Delete a policy set. Deleting a policy set does not delete the policies it contains.", + "tags": [ + "policy-sets" + ], + "parameters": [ + { + "in": "path", + "name": "policy_set_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "The ID of the policy set." + } + ], + "responses": { + "204": { + "description": "Policy set deleted" + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + } + }, + "/organizations/{organization_name}/policy-sets": { + "get": { + "operationId": "listPolicySets", + "summary": "List Policy Sets", + "description": "List all policy sets in an organization.", + "tags": [ + "policy-sets" + ], + "parameters": [ + { + "in": "path", + "name": "organization_name", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the organization." + }, + { + "in": "query", + "name": "filter[versioned]", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "If true, only return versioned policy sets. If false, only return non-versioned policy sets." + }, + { + "in": "query", + "name": "filter[kind]", + "schema": { + "type": "string", + "enum": [ + "sentinel", + "opa", + "tfpolicy" + ] + }, + "required": false, + "description": "Filter policy sets by kind.\n\n**Note:** The following kind values are in public-beta:\n- `tfpolicy` - Terraform Policy enforcement\n" + }, + { + "in": "query", + "name": "filter[ootb-policy]", + "schema": { + "type": "string" + }, + "required": false, + "description": "Restrict results to policy sets currently connected to the OOTB policy identified by this external ID. Only available in HCP Terraform when the OOTB policy feature is enabled for the organization (404 otherwise). Returns 400 if the given ID is not a string, is blank, is malformed, or does not identify an existing OOTB policy.", + "x-vis": [ + "hcpt" + ] + }, + { + "in": "query", + "name": "search[name]", + "schema": { + "type": "string" + }, + "required": false, + "description": "Filter policy sets by name." + }, + { + "$ref": "#/components/parameters/page_number" + }, + { + "$ref": "#/components/parameters/page_size" + }, { "in": "query", "name": "fields[policy-sets]", @@ -19397,14 +21013,16 @@ "type": "string", "enum": [ "policies", + "policies.ootb_policy", + "policies.ootb_policy.ootb_policy_libraries", "workspaces", + "workspace_exclusions", "projects", - "current-version", - "newest-version", - "workspace-exclusions", - "project-exclusions", + "current_version", + "newest_version", + "project_exclusions", "stacks", - "stack-exclusions" + "stack_exclusions" ] } } @@ -19412,12 +21030,29 @@ ], "responses": { "200": { - "description": "Policy set details", + "description": "List of policy sets", "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/policy-sets-envelope", + "type": "object", "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/policy-sets" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/pagination" + } + } + }, + "links": { + "$ref": "#/components/schemas/self-with-pagination" + }, "included": { "type": "array", "items": { @@ -19425,6 +21060,12 @@ { "$ref": "#/components/schemas/policies" }, + { + "$ref": "#/components/schemas/ootb-policies" + }, + { + "$ref": "#/components/schemas/ootb-policy-libraries" + }, { "$ref": "#/components/schemas/workspaces" }, @@ -19442,6 +21083,8 @@ "propertyName": "type", "mapping": { "policies": "#/components/schemas/policies", + "ootb-policies": "#/components/schemas/ootb-policies", + "ootb-policy-libraries": "#/components/schemas/ootb-policy-libraries", "workspaces": "#/components/schemas/workspaces", "projects": "#/components/schemas/projects", "policy-set-versions": "#/components/schemas/policy-set-versions", @@ -19467,22 +21110,22 @@ } } }, - "patch": { - "operationId": "updatePolicySet", - "summary": "Update a Policy Set", - "description": "Update an existing policy set.", + "post": { + "operationId": "createPolicySet", + "summary": "Create a Policy Set", + "description": "Create a new policy set in an organization.", "tags": [ "policy-sets" ], "parameters": [ { "in": "path", - "name": "policy_set_id", + "name": "organization_name", "schema": { "type": "string" }, "required": true, - "description": "The ID of the policy set." + "description": "The name of the organization." } ], "requestBody": { @@ -19496,8 +21139,8 @@ } }, "responses": { - "200": { - "description": "Policy set updated", + "201": { + "description": "Policy set created", "content": { "application/vnd.api+json": { "schema": { @@ -19517,11 +21160,13 @@ } } } - }, - "delete": { - "operationId": "deletePolicySet", - "summary": "Delete a Policy Set", - "description": "Delete a policy set. Deleting a policy set does not delete the policies it contains.", + } + }, + "/policy-sets/{policy_set_id}/relationships/workspaces": { + "post": { + "operationId": "addPolicySetWorkspaces", + "summary": "Add Workspaces to a Policy Set", + "description": "Add workspaces to a policy set. Relationships are additive; existing workspace memberships are preserved.", "tags": [ "policy-sets" ], @@ -19536,9 +21181,19 @@ "description": "The ID of the policy set." } ], + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/workspaces-identifier-array-document" + } + } + } + }, "responses": { "204": { - "description": "Policy set deleted" + "description": "Workspaces successfully added to policy set." }, "default": { "description": "Error details", @@ -19551,119 +21206,38 @@ } } } - } - }, - "/organizations/{organization_name}/policy-sets": { - "get": { - "operationId": "listPolicySets", - "summary": "List Policy Sets", - "description": "List all policy sets in an organization.", + }, + "delete": { + "operationId": "removePolicySetWorkspaces", + "summary": "Remove Workspaces from a Policy Set", + "description": "Remove workspaces from a policy set. Workspaces not currently in the set are ignored.", "tags": [ "policy-sets" ], "parameters": [ { "in": "path", - "name": "organization_name", + "name": "policy_set_id", "schema": { "type": "string" }, "required": true, - "description": "The name of the organization." - }, - { - "in": "query", - "name": "filter[versioned]", - "schema": { - "type": "boolean" - }, - "required": false, - "description": "If true, only return versioned policy sets. If false, only return non-versioned policy sets." - }, - { - "in": "query", - "name": "filter[kind]", - "schema": { - "type": "string", - "enum": [ - "sentinel", - "opa", - "tfpolicy" - ] - }, - "required": false, - "description": "Filter policy sets by kind.\n\n**Note:** The following kind values are in public-beta:\n- `tfpolicy` - Terraform Policy enforcement\n" - }, - { - "in": "query", - "name": "filter[ootb-policy]", - "schema": { - "type": "string" - }, - "required": false, - "description": "Restrict results to policy sets currently connected to the OOTB policy identified by this external ID. Only available in HCP Terraform when the OOTB policy feature is enabled for the organization (404 otherwise). Returns 400 if the given ID is not a string, is blank, is malformed, or does not identify an existing OOTB policy.", - "x-vis": [ - "hcpt" - ] - }, - { - "in": "query", - "name": "search[name]", - "schema": { - "type": "string" - }, - "required": false, - "description": "Filter policy sets by name." - }, - { - "$ref": "#/components/parameters/page_number" - }, - { - "$ref": "#/components/parameters/page_size" - }, - { - "in": "query", - "name": "fields[policy-sets]", - "description": "Return only the specified fields for policy-sets resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } + "description": "The ID of the policy set." } ], - "responses": { - "200": { - "description": "List of policy sets", - "content": { - "application/vnd.api+json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/policy-sets" - } - }, - "meta": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/pagination" - } - } - }, - "links": { - "$ref": "#/components/schemas/self-with-pagination" - } - } - } + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/workspaces-identifier-array-document" } } + } + }, + "responses": { + "204": { + "description": "Workspaces successfully removed from policy set." }, "default": { "description": "Error details", @@ -19676,23 +21250,25 @@ } } } - }, + } + }, + "/policy-sets/{policy_set_id}/relationships/policies": { "post": { - "operationId": "createPolicySet", - "summary": "Create a Policy Set", - "description": "Create a new policy set in an organization.", + "operationId": "addPolicySetPolicies", + "summary": "Add Policies to a Policy Set", + "description": "Add policies to a policy set. Additive; existing memberships are preserved. Each `data` item references an existing policy by id; see the request schema for accepted shapes.", "tags": [ "policy-sets" ], "parameters": [ { "in": "path", - "name": "organization_name", + "name": "policy_set_id", "schema": { "type": "string" }, "required": true, - "description": "The name of the organization." + "description": "The ID of the policy set." } ], "requestBody": { @@ -19700,21 +21276,58 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/policy-sets-envelope" + "$ref": "#/components/schemas/policies-identifier-array-document" } } } }, "responses": { - "201": { - "description": "Policy set created", + "204": { + "description": "Policies successfully added to policy set." + }, + "default": { + "description": "Error details", "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/policy-sets-envelope" + "$ref": "#/components/schemas/errors" } } } + } + } + }, + "delete": { + "operationId": "removePolicySetPolicies", + "summary": "Remove Policies from a Policy Set", + "description": "Remove policies from a policy set. Policies not currently in the set are ignored.", + "tags": [ + "policy-sets" + ], + "parameters": [ + { + "in": "path", + "name": "policy_set_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "The ID of the policy set." + } + ], + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/policies-identifier-array-document" + } + } + } + }, + "responses": { + "204": { + "description": "Policies successfully removed from policy set." }, "default": { "description": "Error details", @@ -19729,11 +21342,11 @@ } } }, - "/policy-sets/{policy_set_id}/relationships/workspaces": { + "/policy-sets/{policy_set_id}/relationships/projects": { "post": { - "operationId": "addPolicySetWorkspaces", - "summary": "Add Workspaces to a Policy Set", - "description": "Add workspaces to a policy set. Relationships are additive; existing workspace memberships are preserved.", + "operationId": "addPolicySetProjects", + "summary": "Add Projects to a Policy Set", + "description": "Add projects to a policy set. Relationships are additive; existing project memberships are preserved.", "tags": [ "policy-sets" ], @@ -19753,14 +21366,14 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/workspaces-identifier-array-document" + "$ref": "#/components/schemas/projects-identifier-array-document" } } } }, "responses": { "204": { - "description": "Workspaces successfully added to policy set." + "description": "Projects successfully added to policy set." }, "default": { "description": "Error details", @@ -19775,9 +21388,9 @@ } }, "delete": { - "operationId": "removePolicySetWorkspaces", - "summary": "Remove Workspaces from a Policy Set", - "description": "Remove workspaces from a policy set. Workspaces not currently in the set are ignored.", + "operationId": "removePolicySetProjects", + "summary": "Remove Projects from a Policy Set", + "description": "Remove projects from a policy set. Projects not currently in the set are ignored.", "tags": [ "policy-sets" ], @@ -19797,14 +21410,14 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/workspaces-identifier-array-document" + "$ref": "#/components/schemas/projects-identifier-array-document" } } } }, "responses": { "204": { - "description": "Workspaces successfully removed from policy set." + "description": "Projects successfully removed from policy set." }, "default": { "description": "Error details", @@ -19819,11 +21432,11 @@ } } }, - "/policy-sets/{policy_set_id}/relationships/policies": { + "/policy-sets/{policy_set_id}/relationships/workspace-exclusions": { "post": { - "operationId": "addPolicySetPolicies", - "summary": "Add Policies to a Policy Set", - "description": "Add policies to a policy set. Additive; existing memberships are preserved. Each `data` item references an existing policy by id; see the request schema for accepted shapes.", + "operationId": "addPolicySetWorkspaceExclusions", + "summary": "Add Workspace Exclusions to a Policy Set", + "description": "Add workspace exclusions to a policy set. Excluded workspaces will not have the policy set applied to them even if the set is global.", "tags": [ "policy-sets" ], @@ -19843,14 +21456,14 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/policies-identifier-array-document" + "$ref": "#/components/schemas/workspaces-identifier-array-document" } } } }, "responses": { "204": { - "description": "Policies successfully added to policy set." + "description": "Workspace exclusions successfully added to policy set." }, "default": { "description": "Error details", @@ -19865,9 +21478,9 @@ } }, "delete": { - "operationId": "removePolicySetPolicies", - "summary": "Remove Policies from a Policy Set", - "description": "Remove policies from a policy set. Policies not currently in the set are ignored.", + "operationId": "removePolicySetWorkspaceExclusions", + "summary": "Remove Workspace Exclusions from a Policy Set", + "description": "Remove workspace exclusions from a policy set. Workspace exclusions not currently in the set are ignored.", "tags": [ "policy-sets" ], @@ -19887,14 +21500,14 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/policies-identifier-array-document" + "$ref": "#/components/schemas/workspaces-identifier-array-document" } } } }, "responses": { "204": { - "description": "Policies successfully removed from policy set." + "description": "Workspace exclusions successfully removed from policy set." }, "default": { "description": "Error details", @@ -19909,11 +21522,11 @@ } } }, - "/policy-sets/{policy_set_id}/relationships/projects": { + "/policy-sets/{policy_set_id}/relationships/project-exclusions": { "post": { - "operationId": "addPolicySetProjects", - "summary": "Add Projects to a Policy Set", - "description": "Add projects to a policy set. Relationships are additive; existing project memberships are preserved.", + "operationId": "addPolicySetProjectExclusions", + "summary": "Add Project Exclusions to a Policy Set", + "description": "Add project exclusions to a policy set. Excluded projects will not have the policy set applied to them even if the set is global.", "tags": [ "policy-sets" ], @@ -19940,7 +21553,7 @@ }, "responses": { "204": { - "description": "Projects successfully added to policy set." + "description": "Project exclusions successfully added to policy set." }, "default": { "description": "Error details", @@ -19955,9 +21568,9 @@ } }, "delete": { - "operationId": "removePolicySetProjects", - "summary": "Remove Projects from a Policy Set", - "description": "Remove projects from a policy set. Projects not currently in the set are ignored.", + "operationId": "removePolicySetProjectExclusions", + "summary": "Remove Project Exclusions from a Policy Set", + "description": "Remove project exclusions from a policy set. project exclusions not currently in the set are ignored.", "tags": [ "policy-sets" ], @@ -19984,7 +21597,7 @@ }, "responses": { "204": { - "description": "Projects successfully removed from policy set." + "description": "Project exclusions successfully removed from policy set." }, "default": { "description": "Error details", @@ -19999,11 +21612,14 @@ } } }, - "/policy-sets/{policy_set_id}/relationships/workspace-exclusions": { + "/policy-sets/{policy_set_id}/relationships/stacks": { + "x-vis": [ + "public-beta" + ], "post": { - "operationId": "addPolicySetWorkspaceExclusions", - "summary": "Add Workspace Exclusions to a Policy Set", - "description": "Add workspace exclusions to a policy set. Excluded workspaces will not have the policy set applied to them even if the set is global.", + "operationId": "addPolicySetStacks", + "summary": "Add Stacks to a Policy Set", + "description": "Add stacks to a policy set. Relationships are additive; existing stack memberships are preserved. Only supported for policy sets of kind tfpolicy.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", "tags": [ "policy-sets" ], @@ -20023,14 +21639,14 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/workspaces-identifier-array-document" + "$ref": "#/components/schemas/stacks-identifier-array-document" } } } }, "responses": { "204": { - "description": "Workspace exclusions successfully added to policy set." + "description": "Stacks successfully added to policy set." }, "default": { "description": "Error details", @@ -20045,9 +21661,9 @@ } }, "delete": { - "operationId": "removePolicySetWorkspaceExclusions", - "summary": "Remove Workspace Exclusions from a Policy Set", - "description": "Remove workspace exclusions from a policy set. Workspace exclusions not currently in the set are ignored.", + "operationId": "removePolicySetStacks", + "summary": "Remove Stacks from a Policy Set", + "description": "Remove stacks from a policy set. Stacks not currently in the set are ignored.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", "tags": [ "policy-sets" ], @@ -20067,14 +21683,14 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/workspaces-identifier-array-document" + "$ref": "#/components/schemas/stacks-identifier-array-document" } } } }, "responses": { "204": { - "description": "Workspace exclusions successfully removed from policy set." + "description": "Stacks successfully removed from policy set." }, "default": { "description": "Error details", @@ -20089,11 +21705,14 @@ } } }, - "/policy-sets/{policy_set_id}/relationships/project-exclusions": { + "/policy-sets/{policy_set_id}/relationships/stack-exclusions": { + "x-vis": [ + "public-beta" + ], "post": { - "operationId": "addPolicySetProjectExclusions", - "summary": "Add Project Exclusions to a Policy Set", - "description": "Add project exclusions to a policy set. Excluded projects will not have the policy set applied to them even if the set is global.", + "operationId": "addPolicySetStackExclusions", + "summary": "Add Stack Exclusions to a Policy Set", + "description": "Add stack exclusions to a policy set. Excluded stacks will not have the policy set applied to them even if the set is global.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", "tags": [ "policy-sets" ], @@ -20113,14 +21732,14 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/projects-identifier-array-document" + "$ref": "#/components/schemas/stacks-identifier-array-document" } } } }, "responses": { "204": { - "description": "Project exclusions successfully added to policy set." + "description": "Stack exclusions successfully added to policy set." }, "default": { "description": "Error details", @@ -20135,9 +21754,9 @@ } }, "delete": { - "operationId": "removePolicySetProjectExclusions", - "summary": "Remove Project Exclusions from a Policy Set", - "description": "Remove project exclusions from a policy set. project exclusions not currently in the set are ignored.", + "operationId": "removePolicySetStackExclusions", + "summary": "Remove Stack Exclusions from a Policy Set", + "description": "Remove stack exclusions from a policy set. Stack exclusions not currently in the set are ignored.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", "tags": [ "policy-sets" ], @@ -20157,14 +21776,14 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/projects-identifier-array-document" + "$ref": "#/components/schemas/stacks-identifier-array-document" } } } }, "responses": { "204": { - "description": "Project exclusions successfully removed from policy set." + "description": "Stack exclusions successfully removed from policy set." }, "default": { "description": "Error details", @@ -20180,13 +21799,10 @@ } }, "/policy-sets/{policy_set_id}/tag-selectors": { - "x-vis": [ - "public-beta" - ], "post": { "operationId": "addPolicySetTagSelectors", "summary": "Add Tag Selectors to a Policy Set", - "description": "Add tag selectors to a policy set. Tag selectors define tag-based scoping rules for the policy set.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "description": "Add tag selectors to a policy set. Tag selectors define tag-based scoping rules for the policy set.\n\nThe policy set must have `tag-selector-matching-logic` set before adding tag selectors.\n", "tags": [ "policy-sets" ], @@ -20254,7 +21870,7 @@ } }, "422": { - "description": "Validation error, e.g. tag-based scoping conflicts with explicit associations.", + "description": "Validation error, e.g. `tag-selector-matching-logic` is not set on the policy set, or tag-based scoping conflicts with explicit associations.", "content": { "application/vnd.api+json": { "schema": { @@ -20278,7 +21894,7 @@ "delete": { "operationId": "removePolicySetTagSelectors", "summary": "Remove Tag Selectors from a Policy Set", - "description": "Remove tag selectors from a policy set by their tag key and value.\n\nThis operation is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "description": "Remove tag selectors from a policy set by their tag key and value.", "tags": [ "policy-sets" ], @@ -20394,6 +22010,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "policy_set" + ] + } + } } ], "responses": { @@ -20420,6 +22053,22 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/policy-sets" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "policy-sets": "#/components/schemas/policy-sets" + } + } + } } } } @@ -20510,6 +22159,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "policy_set" + ] + } + } } ], "responses": { @@ -21726,6 +23392,29 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "created_by", + "run", + "run.created_by", + "run.configuration_version", + "outputs", + "hyok_encrypted_data_key", + "hyok_encrypted_data_key.hyok_customer_key_version" + ] + } + } } ], "responses": { @@ -21752,6 +23441,42 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/state-version-outputs" + }, + { + "$ref": "#/components/schemas/hyok-encrypted-data-keys" + }, + { + "$ref": "#/components/schemas/hyok-customer-key-versions" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "users": "#/components/schemas/users", + "runs": "#/components/schemas/runs", + "configuration-versions": "#/components/schemas/configuration-versions", + "state-version-outputs": "#/components/schemas/state-version-outputs", + "hyok-encrypted-data-keys": "#/components/schemas/hyok-encrypted-data-keys", + "hyok-customer-key-versions": "#/components/schemas/hyok-customer-key-versions" + } + } + } } } } @@ -21801,6 +23526,29 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "created_by", + "run", + "run.created_by", + "run.configuration_version", + "outputs", + "hyok_encrypted_data_key", + "hyok_encrypted_data_key.hyok_customer_key_version" + ] + } + } } ], "responses": { @@ -22298,6 +24046,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "hyok_customer_key_versions", + "oidc_configuration" + ] + } + } } ], "responses": { @@ -22324,6 +24090,38 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/hyok-customer-key-versions" + }, + { + "$ref": "#/components/schemas/aws-oidc-configurations" + }, + { + "$ref": "#/components/schemas/gcp-oidc-configurations" + }, + { + "$ref": "#/components/schemas/azure-oidc-configurations" + }, + { + "$ref": "#/components/schemas/vault-oidc-configurations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "hyok-customer-key-versions": "#/components/schemas/hyok-customer-key-versions", + "aws-oidc-configurations": "#/components/schemas/aws-oidc-configurations", + "gcp-oidc-configurations": "#/components/schemas/gcp-oidc-configurations", + "azure-oidc-configurations": "#/components/schemas/azure-oidc-configurations", + "vault-oidc-configurations": "#/components/schemas/vault-oidc-configurations" + } + } + } } } } @@ -22567,6 +24365,24 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "hyok_customer_key_versions", + "oidc_configuration" + ] + } + } } ], "responses": { @@ -23286,6 +25102,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "team" + ] + } + } } ], "responses": { @@ -23519,6 +25352,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "team" + ] + } + } } ], "responses": { @@ -23545,6 +25395,22 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/teams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "teams": "#/components/schemas/teams" + } + } + } } } } @@ -24334,6 +26200,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "team" + ] + } + } } ], "responses": { @@ -24360,6 +26243,22 @@ "$ref": "#/components/schemas/pagination" } } + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/teams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "teams": "#/components/schemas/teams" + } + } + } } } } @@ -24741,29 +26640,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/teams-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/users" - }, - { - "$ref": "#/components/schemas/organization-memberships" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "users": "#/components/schemas/users", - "organization-memberships": "#/components/schemas/organization-memberships" - } - } - } - } - } + "$ref": "#/components/schemas/teams-envelope" } } } @@ -25413,6 +27290,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "team" + ] + } + } } ], "responses": { @@ -25439,6 +27333,22 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/teams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "teams": "#/components/schemas/teams" + } + } + } } } } @@ -25558,6 +27468,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "team" + ] + } + } } ], "responses": { @@ -25754,6 +27681,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "team" + ] + } + } } ], "responses": { @@ -25780,6 +27724,22 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/teams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "teams": "#/components/schemas/teams" + } + } + } } } } @@ -25899,6 +27859,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "team" + ] + } + } } ], "responses": { @@ -26202,6 +28179,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ingress_attributes" + ] + } + } } ], "responses": { @@ -26231,6 +28225,22 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ingress-attributes" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ingress-attributes": "#/components/schemas/ingress-attributes" + } + } + } } } } @@ -26331,6 +28341,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ingress_attributes" + ] + } + } } ], "responses": { @@ -27144,6 +29171,25 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "no_code_modules", + "latest_test_run", + "latest_test_run.most_recent_test_run_cleanup" + ] + } + } } ], "responses": { @@ -27967,6 +30013,25 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "oauth_tokens", + "projects", + "agent_pool" + ] + } + } } ], "responses": { @@ -28165,6 +30230,25 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "oauth_tokens", + "projects", + "agent_pool" + ] + } + } } ], "responses": { @@ -28191,6 +30275,30 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/oauth-tokens" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/agent-pools" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "oauth-tokens": "#/components/schemas/oauth-tokens", + "projects": "#/components/schemas/projects", + "agent-pools": "#/components/schemas/agent-pools" + } + } + } } } } @@ -29578,29 +31686,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/tasks-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/workspace-tasks" - }, - { - "$ref": "#/components/schemas/workspaces" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "workspace-tasks": "#/components/schemas/workspace-tasks", - "workspaces": "#/components/schemas/workspaces" - } - } - } - } - } + "$ref": "#/components/schemas/tasks-envelope" } } } @@ -29909,6 +31995,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "workspace" + ] + } + } } ], "responses": { @@ -29935,6 +32038,22 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspaces": "#/components/schemas/workspaces" + } + } + } } } } @@ -30013,37 +32132,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/task-configs-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/projects" - }, - { - "$ref": "#/components/schemas/tasks" - }, - { - "$ref": "#/components/schemas/organizations" - }, - { - "$ref": "#/components/schemas/workspaces" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "projects": "#/components/schemas/projects", - "tasks": "#/components/schemas/tasks", - "organizations": "#/components/schemas/organizations", - "workspaces": "#/components/schemas/workspaces" - } - } - } - } - } + "$ref": "#/components/schemas/task-configs-envelope" } } } @@ -30183,6 +32272,27 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "projects", + "owner", + "task", + "organization", + "workspaces" + ] + } + } } ], "responses": { @@ -30209,6 +32319,34 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/tasks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "organizations": "#/components/schemas/organizations", + "workspaces": "#/components/schemas/workspaces", + "tasks": "#/components/schemas/tasks" + } + } + } } } } @@ -30339,6 +32477,27 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "projects", + "owner", + "task", + "organization", + "workspaces" + ] + } + } } ], "responses": { @@ -30724,41 +32883,7 @@ "content": { "application/vnd.api+json": { "schema": { - "$ref": "#/components/schemas/task-stages-envelope", - "properties": { - "included": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/runs" - }, - { - "$ref": "#/components/schemas/workspaces" - }, - { - "$ref": "#/components/schemas/task-results" - }, - { - "$ref": "#/components/schemas/policy-evaluations" - }, - { - "$ref": "#/components/schemas/cost-estimates" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "runs": "#/components/schemas/runs", - "workspaces": "#/components/schemas/workspaces", - "task-results": "#/components/schemas/task-results", - "policy-evaluations": "#/components/schemas/policy-evaluations", - "cost-estimates": "#/components/schemas/cost-estimates" - } - } - } - } - } + "$ref": "#/components/schemas/task-stages-envelope" } } } @@ -30865,6 +32990,27 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "run", + "run.workspace", + "task_results", + "policy_evaluations", + "cost_estimate" + ] + } + } } ], "responses": { @@ -30891,6 +33037,38 @@ }, "links": { "$ref": "#/components/schemas/self-with-pagination" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/task-results" + }, + { + "$ref": "#/components/schemas/policy-evaluations" + }, + { + "$ref": "#/components/schemas/cost-estimates" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runs": "#/components/schemas/runs", + "workspaces": "#/components/schemas/workspaces", + "task-results": "#/components/schemas/task-results", + "policy-evaluations": "#/components/schemas/policy-evaluations", + "cost-estimates": "#/components/schemas/cost-estimates" + } + } + } } } } @@ -31279,6 +33457,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "events" + ] + } + } } ], "responses": { @@ -31305,132 +33500,7 @@ "$ref": "#/components/schemas/pagination" } } - } - } - } - } - } - }, - "default": { - "description": "Error details", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errors" - } - } - } - } - } - }, - "post": { - "operationId": "createWorkspaceTransfer", - "summary": "Create a Workspace Transfer", - "description": "Queue a new workspace transfer across organizations.", - "tags": [ - "workspace-transfers" - ], - "requestBody": { - "required": true, - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/workspace-transfers-envelope" - } - } - } - }, - "responses": { - "201": { - "description": "Workspace transfer created", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/workspace-transfers-envelope" - } - } - } - }, - "422": { - "description": "Validation error", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errors" - } - } - } - }, - "default": { - "description": "Error details", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errors" - } - } - } - } - } - } - }, - "/workspace-transfers/{workspace_transfer_id}": { - "get": { - "operationId": "getWorkspaceTransfer", - "summary": "Get Workspace Transfer details", - "description": "Get details about a workspace transfer.", - "tags": [ - "workspace-transfers" - ], - "parameters": [ - { - "in": "path", - "name": "workspace_transfer_id", - "schema": { - "type": "string" - }, - "required": true, - "description": "Workspace Transfer ID" - }, - { - "in": "query", - "name": "fields[workspace-transfers]", - "description": "Return only the specified fields for workspace-transfers resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "in": "query", - "name": "include", - "style": "form", - "explode": false, - "required": false, - "description": "Optionally side-load the specified relationships.", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "events" - ] - } - } - } - ], - "responses": { - "200": { - "description": "Workspace transfer details", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/workspace-transfers-envelope", - "properties": { + }, "included": { "type": "array", "items": { @@ -31452,6 +33522,129 @@ } } }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + }, + "post": { + "operationId": "createWorkspaceTransfer", + "summary": "Create a Workspace Transfer", + "description": "Queue a new workspace transfer across organizations.", + "tags": [ + "workspace-transfers" + ], + "requestBody": { + "required": true, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/workspace-transfers-envelope" + } + } + } + }, + "responses": { + "201": { + "description": "Workspace transfer created", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/workspace-transfers-envelope" + } + } + } + }, + "422": { + "description": "Validation error", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + }, + "default": { + "description": "Error details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + } + } + } + } + }, + "/workspace-transfers/{workspace_transfer_id}": { + "get": { + "operationId": "getWorkspaceTransfer", + "summary": "Get Workspace Transfer details", + "description": "Get details about a workspace transfer.", + "tags": [ + "workspace-transfers" + ], + "parameters": [ + { + "in": "path", + "name": "workspace_transfer_id", + "schema": { + "type": "string" + }, + "required": true, + "description": "Workspace Transfer ID" + }, + { + "in": "query", + "name": "fields[workspace-transfers]", + "description": "Return only the specified fields for workspace-transfers resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "events" + ] + } + } + } + ], + "responses": { + "200": { + "description": "Workspace transfer details", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/workspace-transfers-envelope" + } + } + } + }, "404": { "description": "Workspace transfer not found", "content": { @@ -33047,8 +35240,122 @@ }, "components": { "schemas": { + "cidr-range-lists": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "cidr-range-lists" + ] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enforcement-scope": { + "type": "string", + "enum": [ + "organization", + "all_agent_pools", + "selected_agent_pools" + ] + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "agent-pools": { + "$ref": "#/components/schemas/agent-pools-has-many" + }, + "cidr-ranges": { + "$ref": "#/components/schemas/cidr-ranges-envelope-many" + } + } + } + } + }, + "cidr-ranges": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "cidr-ranges" + ] + }, + "attributes": { + "type": "object", + "required": [ + "range", + "enabled" + ], + "properties": { + "range": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "enabled": { + "type": "boolean" + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + }, + "cidr-range-list": { + "$ref": "#/components/schemas/cidr-range-lists-has-one" + } + } + } + } + }, "entitlement-sets": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { "type": "string" @@ -33170,9 +35477,142 @@ } } }, + "onboarding-task-lists": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "onboarding-task-lists" + ] + }, + "attributes": { + "type": "object", + "properties": { + "total-task-count": { + "type": "integer" + }, + "incomplete-task-count": { + "type": "integer" + }, + "expired": { + "type": "boolean" + } + } + }, + "relationships": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/components/schemas/organizations-has-one" + } + } + } + } + }, + "ootb-policies": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "The external ID of the OOTB policy.", + "example": "ootbpol-xxxxxxxxxxxxxxxx" + }, + "type": { + "type": "string", + "enum": [ + "ootb-policies" + ] + }, + "attributes": { + "type": "object", + "properties": { + "control-source": { + "type": "string", + "nullable": true, + "description": "Source location (docs/repository URL) for this policy, taken from the latest version's library policy. Null when no active library release is available." + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Catalog record creation time (not policy release/publication time)." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Policy description." + }, + "governed-resources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of Terraform resource types this policy governs." + }, + "kind": { + "type": "string", + "enum": [ + "sentinel", + "tfpolicy" + ], + "description": "The policy engine type." + }, + "name": { + "type": "string", + "description": "The name of the policy." + }, + "provider": { + "type": "string", + "description": "Cloud provider the policy targets, stored lower-cased (e.g. `aws`, `azure`, `gcp`). Use as the value of `filter[provider]` on the list endpoint; matching is case-insensitive. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.providers`." + }, + "service": { + "type": "string", + "description": "Cloud service the policy targets (e.g. `s3`, `iam`, `compute`). Use as the value of `filter[service]` on the list endpoint. Available values are returned by the `getOotbPolicyFilterOptions` endpoint under `data.attributes.services`." + }, + "slug": { + "type": "string", + "description": "URL-friendly unique identifier for the policy." + } + } + }, + "relationships": { + "type": "object", + "properties": { + "ootb-policy-libraries": { + "$ref": "#/components/schemas/ootb-policy-libraries-has-many" + } + } + }, + "links": { + "type": "object", + "properties": { + "download": { + "type": "string", + "nullable": true, + "description": "URL to download the latest version of this policy's source content." + } + } + } + } + }, "ootb-policy-libraries": { "type": "object", "description": "A slim reference to an OOTB policy library, returned in the `included` array when ?include=ootb-policy-libraries is passed. Contains only the name attribute.", + "required": [ + "type" + ], "properties": { "id": { "type": "string", @@ -33321,7 +35761,7 @@ }, "tf-policy-evaluations": { "type": "object", - "description": "Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Setup or Plan or Apply) in the run lifecycle.", + "description": "Represents a Terraform Policy evaluation for a run. Coordinates the evaluation of multiple policy sets and aggregates their results. Each evaluation is associated with a specific stage (Init or Plan or Apply) in the run lifecycle.", "required": [ "type", "attributes" @@ -33358,7 +35798,12 @@ }, "stage-type": { "type": "string", - "description": "The type of stage this evaluation is associated with (e.g., 'Plan', 'Apply', 'Init')" + "description": "The type of stage this evaluation is associated with.", + "enum": [ + "Init", + "Plan", + "Apply" + ] }, "status-timestamps": { "type": "object", @@ -33446,7 +35891,7 @@ }, "mandatory-overridable-failed": { "type": "integer", - "description": "Policies with mandatory-overridable enforcement level that failed" + "description": "Policies with `mandatory_overridable` enforcement level that failed.\n" }, "passed": { "type": "integer", @@ -33471,7 +35916,9 @@ "type": "string", "enum": [ "setup_error", - "incompatible_agent_version" + "tool_version_error", + "incompatible_agent_version", + "incompatible_terraform_version_error" ], "description": "Error type identifier indicating the category of failure" }, @@ -33535,6 +35982,122 @@ } } }, + "test-runs": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "test-runs" + ] + }, + "attributes": { + "type": "object", + "properties": { + "status": { + "type": "string", + "readOnly": true + }, + "status-timestamps": { + "type": "object", + "readOnly": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "test-configurable-type": { + "type": "string", + "readOnly": true + }, + "test-configurable-id": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string" + }, + "source": { + "type": "string", + "readOnly": true + }, + "verbose": { + "type": "boolean" + }, + "parallelism": { + "type": "integer" + }, + "test-directory": { + "type": "string", + "nullable": true + }, + "test-status": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "tests-passed": { + "type": "integer", + "nullable": true, + "readOnly": true + }, + "tests-failed": { + "type": "integer", + "nullable": true, + "readOnly": true + }, + "tests-errored": { + "type": "integer", + "nullable": true, + "readOnly": true + }, + "tests-skipped": { + "type": "integer", + "nullable": true, + "readOnly": true + }, + "variables": { + "type": "array", + "items": { + "type": "object" + } + }, + "filters": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + }, + "relationships": { + "type": "object", + "properties": { + "configuration-version": { + "$ref": "#/components/schemas/configuration-versions-has-one" + }, + "created-by": { + "$ref": "#/components/schemas/users-has-one" + } + } + } + } + }, "workspace-outputs": { "type": "object", "description": "Workspace outputs are Terraform output values associated with a workspace.\nThey include the name of the output and a sensitive boolean. There is an\nadditional attribute, \"value\", that can be any JSON type, including null when\nthe output is sensitive; it is intentionally omitted from this schema (same\npattern as state-version-outputs) because OpenAPI cannot express a nullable\nany-type under the project's nullable-type-sibling lint rule.\n", @@ -35075,6 +37638,10 @@ }, "feature-sets": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { "type": "string", @@ -35296,12 +37863,7 @@ } } } - }, - "required": [ - "id", - "type", - "attributes" - ] + } }, "organizations-identifier": { "type": "object", @@ -35542,6 +38104,22 @@ "properties": { "data": { "$ref": "#/components/schemas/subscriptions" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/feature-sets" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "feature-sets": "#/components/schemas/feature-sets" + } + } + } } } }, @@ -35673,11 +38251,59 @@ "properties": { "data": { "$ref": "#/components/schemas/agent-pools" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/oauth-clients" + }, + { + "$ref": "#/components/schemas/hyok-configurations" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/stacks" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/registry-modules" + }, + { + "$ref": "#/components/schemas/cidr-range-lists" + }, + { + "$ref": "#/components/schemas/cidr-ranges" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "oauth-clients": "#/components/schemas/oauth-clients", + "hyok-configurations": "#/components/schemas/hyok-configurations", + "projects": "#/components/schemas/projects", + "stacks": "#/components/schemas/stacks", + "workspaces": "#/components/schemas/workspaces", + "registry-modules": "#/components/schemas/registry-modules", + "cidr-range-lists": "#/components/schemas/cidr-range-lists", + "cidr-ranges": "#/components/schemas/cidr-ranges" + } + } + } } } }, "agents": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { "type": "string", @@ -35793,59 +38419,6 @@ } } }, - "cidr-ranges": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "cidr-ranges" - ] - }, - "attributes": { - "type": "object", - "required": [ - "range", - "enabled" - ], - "properties": { - "range": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "enabled": { - "type": "boolean" - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "cidr-range-list": { - "$ref": "#/components/schemas/cidr-range-lists-has-one" - } - } - } - } - }, "cidr-ranges-envelope-many": { "type": "object", "nullable": true, @@ -35858,63 +38431,6 @@ } } }, - "cidr-range-lists": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "cidr-range-lists" - ] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "enforcement-scope": { - "type": "string", - "enum": [ - "organization", - "all_agent_pools", - "selected_agent_pools" - ] - }, - "updated-at": { - "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, - "relationships": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/components/schemas/organizations-has-one" - }, - "agent-pools": { - "$ref": "#/components/schemas/agent-pools-has-many" - }, - "cidr-ranges": { - "$ref": "#/components/schemas/cidr-ranges-envelope-many" - } - } - } - } - }, "cidr-range-list-envelope": { "type": "object", "required": [ @@ -35923,6 +38439,26 @@ "properties": { "data": { "$ref": "#/components/schemas/cidr-range-lists" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/cidr-ranges" + }, + { + "$ref": "#/components/schemas/agent-pools" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "cidr-ranges": "#/components/schemas/cidr-ranges", + "agent-pools": "#/components/schemas/agent-pools" + } + } + } } } }, @@ -36122,6 +38658,11 @@ "type": "boolean", "readOnly": true }, + "resource-count": { + "type": "integer", + "readOnly": true, + "nullable": true + }, "speculative-enabled": { "type": "boolean", "default": false @@ -36245,6 +38786,34 @@ "properties": { "data": { "$ref": "#/components/schemas/stacks" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-configurations" + }, + { + "$ref": "#/components/schemas/stack-diagnostics" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/projects" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-configurations": "#/components/schemas/stack-configurations", + "stack-diagnostics": "#/components/schemas/stack-diagnostics", + "organizations": "#/components/schemas/organizations", + "projects": "#/components/schemas/projects" + } + } + } } } }, @@ -36596,6 +39165,34 @@ "properties": { "data": { "$ref": "#/components/schemas/stack-configurations" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/stack-configuration-summaries" + }, + { + "$ref": "#/components/schemas/stack-diagnostics" + }, + { + "$ref": "#/components/schemas/stack-aggregate-outputs" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ingress-attributes": "#/components/schemas/ingress-attributes", + "stack-configuration-summaries": "#/components/schemas/stack-configuration-summaries", + "stack-diagnostics": "#/components/schemas/stack-diagnostics", + "stack-aggregate-outputs": "#/components/schemas/stack-aggregate-outputs" + } + } + } } } }, @@ -37547,6 +40144,22 @@ "properties": { "data": { "$ref": "#/components/schemas/stack-deployment-groups" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-deployment-group-summaries" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-deployment-group-summaries": "#/components/schemas/stack-deployment-group-summaries" + } + } + } } } }, @@ -37568,6 +40181,46 @@ "properties": { "data": { "$ref": "#/components/schemas/stack-deployment-runs" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-deployment-groups" + }, + { + "$ref": "#/components/schemas/stack-approvals" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/stack-deployment-steps" + }, + { + "$ref": "#/components/schemas/stack-configurations" + }, + { + "$ref": "#/components/schemas/stack-deployment-runs" + }, + { + "$ref": "#/components/schemas/stack-states" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-deployment-groups": "#/components/schemas/stack-deployment-groups", + "stack-approvals": "#/components/schemas/stack-approvals", + "users": "#/components/schemas/users", + "stack-deployment-steps": "#/components/schemas/stack-deployment-steps", + "stack-configurations": "#/components/schemas/stack-configurations", + "stack-deployment-runs": "#/components/schemas/stack-deployment-runs", + "stack-states": "#/components/schemas/stack-states" + } + } + } } } }, @@ -37600,6 +40253,38 @@ } } }, + "stack-operation-identifier": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-operation-plans", + "stack-operation-applies", + "stack-operation-import-states", + "stack-operation-allow-imports" + ] + } + } + }, + "stack-operation-has-one": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/stack-operation-identifier" + }, + "links": { + "$ref": "#/components/schemas/related" + } + } + }, "stack-deployment-steps": { "type": "object", "required": [ @@ -37745,6 +40430,420 @@ }, "stack-approval": { "$ref": "#/components/schemas/stack-approvals-has-one" + }, + "stack-operation": { + "x-vis": [ + "public-beta" + ], + "$ref": "#/components/schemas/stack-operation-has-one" + } + } + } + } + }, + "stack-policy-evaluations-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-policy-evaluations" + ] + } + } + }, + "stack-policy-evaluations-has-one": { + "type": "object", + "properties": { + "data": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/stack-policy-evaluations-identifier" + } + ], + "nullable": true + }, + "meta": { + "type": "object" + } + } + }, + "stack-operation-plans": { + "type": "object", + "x-vis": [ + "public-beta" + ], + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-operation-plans" + ] + }, + "attributes": { + "type": "object", + "properties": { + "change-summary": { + "type": "object", + "nullable": true, + "readOnly": true, + "description": "Summary of the resource changes detected by the plan operation.\n", + "properties": { + "add": { + "type": "integer", + "readOnly": true + }, + "change": { + "type": "integer", + "readOnly": true + }, + "remove": { + "type": "integer", + "readOnly": true + }, + "total": { + "type": "integer", + "readOnly": true + } + } + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "relationships": { + "type": "object", + "x-vis": [ + "public-beta" + ], + "properties": { + "policy-evaluation": { + "description": "Stack policy evaluation associated with this plan operation", + "$ref": "#/components/schemas/stack-policy-evaluations-has-one" + } + } + }, + "links": { + "type": "object", + "properties": { + "plan-description": { + "type": "string" + }, + "plan-debug-log": { + "type": "string" + } + } + } + } + }, + "stack-operation-applies": { + "type": "object", + "x-vis": [ + "public-beta" + ], + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-operation-applies" + ] + }, + "attributes": { + "type": "object", + "properties": { + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "links": { + "type": "object", + "properties": { + "apply-description": { + "type": "string" + }, + "apply-debug-log": { + "type": "string" + } + } + } + } + }, + "stack-operation-import-states": { + "type": "object", + "x-vis": [ + "public-beta" + ], + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-operation-import-states" + ] + }, + "attributes": { + "type": "object", + "properties": { + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "links": { + "type": "object", + "properties": { + "upload-url": { + "type": "string" + } + } + } + } + }, + "stack-operation-allow-imports": { + "type": "object", + "x-vis": [ + "public-beta" + ], + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "enum": [ + "stack-operation-allow-imports" + ] + }, + "attributes": { + "type": "object", + "properties": { + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + } + } + }, + "stack-policy-set-outcomes-identifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "stack-policy-set-outcomes" + ] + } + } + }, + "stack-policy-set-outcomes-has-many": { + "type": "object", + "nullable": true, + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/stack-policy-set-outcomes-identifier" + } + }, + "meta": { + "type": "object" + } + } + }, + "stack-policy-evaluations": { + "type": "object", + "x-vis": [ + "public-beta" + ], + "description": "Represents a Terraform Policy evaluation for a Stacks plan operation.", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "stack-policy-evaluations" + ] + }, + "attributes": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Current status of the stack policy evaluation. Status values:\n- `pending`: Initial state, not yet evaluated\n- `passed`: All policies passed (final state)\n- `failed`: Failed with mandatory policies (final state)\n- `errored`: System error during processing (final state)\n- `unknown`: Unknown evaluation state\n", + "enum": [ + "pending", + "passed", + "failed", + "errored", + "unknown" + ] + }, + "policy-attachable-id": { + "type": "string", + "description": "External ID of the attachable resource (typically a stack plan operation)", + "readOnly": true + }, + "policy-attachable-type": { + "type": "string", + "description": "Type of the attachable resource. Currently only stack plan operations (`plan`) are supported.", + "enum": [ + "plan" + ], + "readOnly": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated-at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "result-count": { + "type": "object", + "description": "Aggregated counts of policy results across all policy sets in this evaluation", + "properties": { + "advisory-failed": { + "type": "integer" + }, + "mandatory-failed": { + "type": "integer" + }, + "mandatory-overridable-failed": { + "type": "integer" + }, + "passed": { + "type": "integer" + }, + "errored": { + "type": "integer" + }, + "unknown": { + "type": "integer" + } + } + }, + "error": { + "type": "object", + "nullable": true, + "description": "Error information if the entire evaluation failed", + "properties": { + "type": { + "type": "string", + "enum": [ + "setup_error", + "tool_version_error", + "incompatible_agent_version", + "incompatible_terraform_version_error", + "missing_stack_configuration" + ], + "description": "Error type identifier" + }, + "summary": { + "type": "string" + }, + "detail": { + "type": "string" + } + } + } + } + }, + "relationships": { + "type": "object", + "properties": { + "stack-policy-set-outcomes": { + "description": "Policy set outcomes that are part of this evaluation", + "$ref": "#/components/schemas/stack-policy-set-outcomes-has-many" + } + } + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "string" + }, + "stack-policy-set-outcomes": { + "type": "string" } } } @@ -37758,6 +40857,41 @@ "properties": { "data": { "$ref": "#/components/schemas/stack-deployment-steps" + }, + "included": { + "x-vis": [ + "public-beta" + ], + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-operation-plans" + }, + { + "$ref": "#/components/schemas/stack-operation-applies" + }, + { + "$ref": "#/components/schemas/stack-operation-import-states" + }, + { + "$ref": "#/components/schemas/stack-operation-allow-imports" + }, + { + "$ref": "#/components/schemas/stack-policy-evaluations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-operation-plans": "#/components/schemas/stack-operation-plans", + "stack-operation-applies": "#/components/schemas/stack-operation-applies", + "stack-operation-import-states": "#/components/schemas/stack-operation-import-states", + "stack-operation-allow-imports": "#/components/schemas/stack-operation-allow-imports", + "stack-policy-evaluations": "#/components/schemas/stack-policy-evaluations" + } + } + } } } }, @@ -37878,6 +41012,126 @@ "properties": { "data": { "$ref": "#/components/schemas/stack-approvals" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/users" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "users": "#/components/schemas/users" + } + } + } + } + } + }, + "stack-policy-evaluations-envelope": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/stack-policy-evaluations" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/stack-policy-set-outcomes" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stack-policy-set-outcomes": "#/components/schemas/stack-policy-set-outcomes" + } + } + } + } + } + }, + "stack-policy-set-outcomes": { + "type": "object", + "x-vis": [ + "public-beta" + ], + "description": "Represents the outcome of evaluating a Terraform Policy set against a Stacks plan.", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "stack-policy-set-outcomes" + ] + }, + "attributes": { + "type": "object", + "properties": { + "policy-set-name": { + "type": "string", + "description": "Name of the policy set that was evaluated", + "readOnly": true + }, + "policy-set-description": { + "type": "string", + "nullable": true, + "description": "Description of the policy set that was evaluated", + "readOnly": true + }, + "policy-set-result-url": { + "type": "string", + "description": "Temporary download URL for the detailed policy set result artifact", + "readOnly": true + }, + "result-count": { + "type": "object", + "description": "Aggregated counts of policy results for this policy set", + "properties": { + "advisory-failed": { + "type": "integer" + }, + "mandatory-failed": { + "type": "integer" + }, + "mandatory-overridable-failed": { + "type": "integer" + }, + "passed": { + "type": "integer" + }, + "errored": { + "type": "integer" + }, + "unknown": { + "type": "integer" + } + } + } + } + }, + "relationships": { + "type": "object", + "properties": { + "stack-policy-evaluation": { + "description": "The stack policy evaluation this outcome belongs to", + "$ref": "#/components/schemas/stack-policy-evaluations-has-one" + } + } } } }, @@ -38409,6 +41663,34 @@ "properties": { "data": { "$ref": "#/components/schemas/organizations" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/subscriptions" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/entitlement-sets" + }, + { + "$ref": "#/components/schemas/onboarding-task-lists" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "subscriptions": "#/components/schemas/subscriptions", + "projects": "#/components/schemas/projects", + "entitlement-sets": "#/components/schemas/entitlement-sets", + "onboarding-task-lists": "#/components/schemas/onboarding-task-lists" + } + } + } } } }, @@ -38613,6 +41895,30 @@ "properties": { "data": { "$ref": "#/components/schemas/organization-memberships" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/teams" + }, + { + "$ref": "#/components/schemas/organizations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "users": "#/components/schemas/users", + "teams": "#/components/schemas/teams", + "organizations": "#/components/schemas/organizations" + } + } + } } } }, @@ -39030,6 +42336,22 @@ "properties": { "data": { "$ref": "#/components/schemas/projects" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/effective-tag-bindings" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" + } + } + } } } }, @@ -40070,6 +43392,86 @@ "properties": { "data": { "$ref": "#/components/schemas/workspaces" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/agent-pools" + }, + { + "$ref": "#/components/schemas/assessment-results" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/state-versions" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/no-code-module-versions" + }, + { + "$ref": "#/components/schemas/no-code-modules" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/workspace-outputs" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspace-readme" + }, + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/effective-tag-bindings" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "agent-pools": "#/components/schemas/agent-pools", + "assessment-results": "#/components/schemas/assessment-results", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "runs": "#/components/schemas/runs", + "applies": "#/components/schemas/applies", + "plans": "#/components/schemas/plans", + "state-versions": "#/components/schemas/state-versions", + "users": "#/components/schemas/users", + "no-code-module-versions": "#/components/schemas/no-code-module-versions", + "no-code-modules": "#/components/schemas/no-code-modules", + "organizations": "#/components/schemas/organizations", + "workspace-outputs": "#/components/schemas/workspace-outputs", + "projects": "#/components/schemas/projects", + "workspace-readme": "#/components/schemas/workspace-readme", + "vars": "#/components/schemas/vars", + "effective-tag-bindings": "#/components/schemas/effective-tag-bindings" + } + } + } } } }, @@ -40901,6 +44303,22 @@ "properties": { "data": { "$ref": "#/components/schemas/vars" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/vars" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "vars": "#/components/schemas/vars" + } + } + } } } }, @@ -40979,6 +44397,26 @@ "properties": { "data": { "$ref": "#/components/schemas/provider-sets" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "workspaces": "#/components/schemas/workspaces" + } + } + } } } }, @@ -41188,6 +44626,34 @@ "properties": { "data": { "$ref": "#/components/schemas/varsets" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/vars" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/stacks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "vars": "#/components/schemas/vars", + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects", + "stacks": "#/components/schemas/stacks" + } + } + } } } }, @@ -41725,6 +45191,22 @@ "properties": { "data": { "$ref": "#/components/schemas/state-versions" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/state-version-outputs" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "state-version-outputs": "#/components/schemas/state-version-outputs" + } + } + } } } }, @@ -42342,7 +45824,7 @@ }, "status": { "type": "string", - "description": "The current status of the run.\n\n**Note:** The following status values are in public-beta:\n- `tf_policy_checked` - Terraform Policy evaluation completed at plan stage\n- `tf_policy_override` - Terraform Policy evaluation was overridden at plan stage\n", + "description": "The current status of the run.\n\nTerraform Policy evaluation status values at plan stage:\n- `tf_policy_checked` - Terraform Policy evaluation completed\n- `tf_policy_override` - Terraform Policy evaluation was overridden\n", "enum": [ "pending", "fetching", @@ -42406,6 +45888,7 @@ }, "policy-paths": { "type": "array", + "deprecated": true, "items": { "type": "string" }, @@ -42531,6 +46014,54 @@ "properties": { "data": { "$ref": "#/components/schemas/runs" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/plans" + }, + { + "$ref": "#/components/schemas/applies" + }, + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/ingress-attributes" + }, + { + "$ref": "#/components/schemas/cost-estimates" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/task-stages" + }, + { + "$ref": "#/components/schemas/tf-policy-evaluations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "plans": "#/components/schemas/plans", + "applies": "#/components/schemas/applies", + "users": "#/components/schemas/users", + "configuration-versions": "#/components/schemas/configuration-versions", + "ingress-attributes": "#/components/schemas/ingress-attributes", + "cost-estimates": "#/components/schemas/cost-estimates", + "workspaces": "#/components/schemas/workspaces", + "task-stages": "#/components/schemas/task-stages", + "tf-policy-evaluations": "#/components/schemas/tf-policy-evaluations" + } + } + } } } }, @@ -42663,6 +46194,22 @@ "properties": { "data": { "$ref": "#/components/schemas/configuration-versions" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ingress-attributes" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ingress-attributes": "#/components/schemas/ingress-attributes" + } + } + } } } }, @@ -42789,6 +46336,22 @@ "properties": { "data": { "$ref": "#/components/schemas/run-triggers" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspaces": "#/components/schemas/workspaces" + } + } + } } } }, @@ -43250,6 +46813,22 @@ "properties": { "data": { "$ref": "#/components/schemas/policies" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/policy-sets" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "policy-sets": "#/components/schemas/policy-sets" + } + } + } } } }, @@ -43415,6 +46994,26 @@ "properties": { "data": { "$ref": "#/components/schemas/policy-checks" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runs": "#/components/schemas/runs", + "workspaces": "#/components/schemas/workspaces" + } + } + } } } }, @@ -43452,6 +47051,22 @@ "properties": { "data": { "$ref": "#/components/schemas/tf-policy-evaluations" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/tf-policy-set-outcomes" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "tf-policy-set-outcomes": "#/components/schemas/tf-policy-set-outcomes" + } + } + } } } }, @@ -43641,9 +47256,15 @@ } } }, + "error": { + "type": "string", + "nullable": true, + "deprecated": true + }, "overridable": { "type": "boolean", - "description": "Indicates if the policy set outcome can be overridden when policies fail" + "deprecated": true, + "description": "This field is deprecated and has no effect. Whether a run can be overridden is decided by the plan-stage Terraform Policy evaluation, based on the enforcement level of failed policies." }, "policy-set-name": { "type": "string", @@ -43656,6 +47277,7 @@ }, "result-count": { "type": "object", + "description": "Counts of policy results for this policy set", "properties": { "advisory-failed": { "type": "integer", @@ -43667,7 +47289,7 @@ }, "mandatory-overridable-failed": { "type": "integer", - "description": "Policies with mandatory-overridable enforcement level that failed" + "description": "Policies with `mandatory_overridable` enforcement level that failed.\n" }, "passed": { "type": "integer", @@ -43827,6 +47449,14 @@ "type": "integer", "readOnly": true }, + "stack-count": { + "type": "integer", + "x-vis": [ + "public-beta" + ], + "readOnly": true, + "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." + }, "versioned": { "type": "boolean", "readOnly": true @@ -43845,7 +47475,8 @@ }, "policy-tool-version": { "type": "string", - "nullable": true + "nullable": true, + "description": "The version of the policy tool used to evaluate this policy set. Accepts a\nversion or version constraint. Only applies to `opa`, `tfpolicy`, and\nagent-enabled `sentinel` policy sets; for other policy sets it is ignored in\nrequests and omitted from responses.\n\nFor `tfpolicy` policy sets, the following special values are also supported:\n- `latest` - Always use the latest available Terraform Policy version. This is\n the default when no value is provided.\n- `managed` - The Terraform Policy version is managed by the policy set's\n configuration. Only supported for versioned policy sets whose policies come\n from a VCS connection or an API upload; it cannot be used with individually\n managed policies. While set, the policy set's `kind` cannot be changed.\n" }, "overridable": { "type": "boolean", @@ -43907,9 +47538,6 @@ }, "tag-selectors": { "type": "array", - "x-vis": [ - "public-beta" - ], "items": { "type": "object", "required": [ @@ -43929,16 +47557,12 @@ "type": "boolean" } } - }, - "description": "This attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users." + } }, "tag-selector-matching-logic": { "type": "string", - "x-vis": [ - "public-beta" - ], "nullable": true, - "description": "Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.\n\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "description": "Matching logic for tag selectors. `any` means any selector may match (OR). `all` means every selector must match (AND). `null` means the policy set is explicitly scoped, so tag matching does not apply. Under `all`, exclusion selectors must also fully match.\n\nMust be set explicitly when using tag-based scoping.\n", "enum": [ "any", "all" @@ -43946,10 +47570,7 @@ }, "scoping-type": { "type": "string", - "x-vis": [ - "public-beta" - ], - "description": "Scoping mode for the policy set. \"tag\" is dynamic tag-based scoping. \"explicit\" uses explicit workspace/project associations.\n\nThis attribute is considered BETA, is SUBJECT TO CHANGE, and may be unavailable to some users.", + "description": "Scoping mode for the policy set. \"tag\" is dynamic tag-based scoping. \"explicit\" uses explicit workspace/project associations.", "enum": [ "tag", "explicit" @@ -43993,6 +47614,18 @@ }, "project-exclusions": { "$ref": "#/components/schemas/projects-has-many" + }, + "stacks": { + "x-vis": [ + "public-beta" + ], + "$ref": "#/components/schemas/stacks-has-many" + }, + "stack-exclusions": { + "x-vis": [ + "public-beta" + ], + "$ref": "#/components/schemas/stacks-has-many" } } }, @@ -44014,6 +47647,46 @@ "properties": { "data": { "$ref": "#/components/schemas/policy-sets" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/policies" + }, + { + "$ref": "#/components/schemas/ootb-policies" + }, + { + "$ref": "#/components/schemas/ootb-policy-libraries" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/policy-set-versions" + }, + { + "$ref": "#/components/schemas/stacks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "policies": "#/components/schemas/policies", + "ootb-policies": "#/components/schemas/ootb-policies", + "ootb-policy-libraries": "#/components/schemas/ootb-policy-libraries", + "workspaces": "#/components/schemas/workspaces", + "projects": "#/components/schemas/projects", + "policy-set-versions": "#/components/schemas/policy-set-versions", + "stacks": "#/components/schemas/stacks" + } + } + } } } }, @@ -44051,6 +47724,35 @@ } } }, + "stacks-identifier-array-document": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "stacks" + ] + }, + "id": { + "type": "string" + } + } + } + } + } + }, "policy-sets-has-one": { "type": "object", "properties": { @@ -44190,6 +47892,22 @@ "properties": { "data": { "$ref": "#/components/schemas/policy-set-versions" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/policy-sets" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "policy-sets": "#/components/schemas/policy-sets" + } + } + } } } }, @@ -44630,6 +48348,10 @@ }, "applies": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { "type": "string" @@ -44934,12 +48656,51 @@ "properties": { "data": { "$ref": "#/components/schemas/state-versions" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/configuration-versions" + }, + { + "$ref": "#/components/schemas/state-version-outputs" + }, + { + "$ref": "#/components/schemas/hyok-encrypted-data-keys" + }, + { + "$ref": "#/components/schemas/hyok-customer-key-versions" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "users": "#/components/schemas/users", + "runs": "#/components/schemas/runs", + "configuration-versions": "#/components/schemas/configuration-versions", + "state-version-outputs": "#/components/schemas/state-version-outputs", + "hyok-encrypted-data-keys": "#/components/schemas/hyok-encrypted-data-keys", + "hyok-customer-key-versions": "#/components/schemas/hyok-customer-key-versions" + } + } + } } } }, "state-version-outputs": { "type": "object", "description": "State version outputs are the output values from a Terraform state file for a workspace. They include the name and value of the output, as well as a sensitive boolean if the value should be hidden by default in UIs. There is an additional attribute, \"value\" that can be any type, including null if the value is sensitive and part of a list response.", + "required": [ + "type" + ], "properties": { "id": { "type": "string", @@ -45152,6 +48913,38 @@ "properties": { "data": { "$ref": "#/components/schemas/hyok-configurations" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/hyok-customer-key-versions" + }, + { + "$ref": "#/components/schemas/aws-oidc-configurations" + }, + { + "$ref": "#/components/schemas/gcp-oidc-configurations" + }, + { + "$ref": "#/components/schemas/azure-oidc-configurations" + }, + { + "$ref": "#/components/schemas/vault-oidc-configurations" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "hyok-customer-key-versions": "#/components/schemas/hyok-customer-key-versions", + "aws-oidc-configurations": "#/components/schemas/aws-oidc-configurations", + "gcp-oidc-configurations": "#/components/schemas/gcp-oidc-configurations", + "azure-oidc-configurations": "#/components/schemas/azure-oidc-configurations", + "vault-oidc-configurations": "#/components/schemas/vault-oidc-configurations" + } + } + } } } }, @@ -45627,6 +49420,22 @@ "properties": { "data": { "$ref": "#/components/schemas/authentication-tokens" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/teams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "teams": "#/components/schemas/teams" + } + } + } } } }, @@ -45961,6 +49770,26 @@ "properties": { "data": { "$ref": "#/components/schemas/teams" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/users" + }, + { + "$ref": "#/components/schemas/organization-memberships" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "users": "#/components/schemas/users", + "organization-memberships": "#/components/schemas/organization-memberships" + } + } + } } } }, @@ -46193,6 +50022,22 @@ "properties": { "data": { "$ref": "#/components/schemas/team-projects" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/teams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "teams": "#/components/schemas/teams" + } + } + } } } }, @@ -46304,6 +50149,22 @@ "properties": { "data": { "$ref": "#/components/schemas/team-workspaces" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/teams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "teams": "#/components/schemas/teams" + } + } + } } } }, @@ -46919,6 +50780,30 @@ "properties": { "data": { "$ref": "#/components/schemas/registry-modules" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/no-code-modules" + }, + { + "$ref": "#/components/schemas/test-runs" + }, + { + "$ref": "#/components/schemas/test-run-cleanups" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "no-code-modules": "#/components/schemas/no-code-modules", + "test-runs": "#/components/schemas/test-runs", + "test-run-cleanups": "#/components/schemas/test-run-cleanups" + } + } + } } } }, @@ -47337,6 +51222,30 @@ "properties": { "data": { "$ref": "#/components/schemas/oauth-clients" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/oauth-tokens" + }, + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/agent-pools" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "oauth-tokens": "#/components/schemas/oauth-tokens", + "projects": "#/components/schemas/projects", + "agent-pools": "#/components/schemas/agent-pools" + } + } + } } } }, @@ -47746,6 +51655,26 @@ "properties": { "data": { "$ref": "#/components/schemas/tasks" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspace-tasks" + }, + { + "$ref": "#/components/schemas/workspaces" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspace-tasks": "#/components/schemas/workspace-tasks", + "workspaces": "#/components/schemas/workspaces" + } + } + } } } }, @@ -47938,6 +51867,34 @@ "properties": { "data": { "$ref": "#/components/schemas/task-configs" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/projects" + }, + { + "$ref": "#/components/schemas/organizations" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/tasks" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "projects": "#/components/schemas/projects", + "organizations": "#/components/schemas/organizations", + "workspaces": "#/components/schemas/workspaces", + "tasks": "#/components/schemas/tasks" + } + } + } } } }, @@ -47992,6 +51949,10 @@ }, "task-stages": { "type": "object", + "required": [ + "type", + "attributes" + ], "properties": { "id": { "type": "string", @@ -48098,6 +52059,38 @@ "properties": { "data": { "$ref": "#/components/schemas/task-stages" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/runs" + }, + { + "$ref": "#/components/schemas/workspaces" + }, + { + "$ref": "#/components/schemas/task-results" + }, + { + "$ref": "#/components/schemas/policy-evaluations" + }, + { + "$ref": "#/components/schemas/cost-estimates" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runs": "#/components/schemas/runs", + "workspaces": "#/components/schemas/workspaces", + "task-results": "#/components/schemas/task-results", + "policy-evaluations": "#/components/schemas/policy-evaluations", + "cost-estimates": "#/components/schemas/cost-estimates" + } + } + } } } }, @@ -48564,6 +52557,22 @@ "properties": { "data": { "$ref": "#/components/schemas/workspace-transfers" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/workspace-transfer-events" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "workspace-transfer-events": "#/components/schemas/workspace-transfer-events" + } + } + } } } }, @@ -49376,6 +53385,33 @@ "$ref": "#/components/schemas/related" } } + }, + "ootb-policy-libraries-identifier": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ootb-policy-libraries" + ] + }, + "id": { + "type": "string", + "description": "The slug of the library." + } + } + }, + "ootb-policy-libraries-has-many": { + "type": "object", + "description": "Libraries this policy belongs to. Only present when ?include=ootb-policy-libraries is passed on the list endpoint.", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ootb-policy-libraries-identifier" + } + } + } } }, "securitySchemes": { From 07b62d2b2a75cbf894d497a12cbe5bfe970f8008 Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Fri, 2 Oct 2026 14:46:19 -0600 Subject: [PATCH 5/6] make api --- ...ganization_escaped_item_request_builder.go | 5 +- .../item/get_include_query_parameter_type.go | 33 +++++ v2/api/api_client.go | 2 +- v2/api/kiota-lock.json | 2 +- v2/api/models/hcp_billing_account.go | 21 ++-- .../hcp_billing_account_escaped_attributes.go | 45 +++++-- .../hcp_billing_account_escaped_type.go | 33 +++++ v2/api/models/hcp_organization_envelope.go | 41 +++++++ v2/openapi/spec.json | 114 +++++++++++++++++- 9 files changed, 271 insertions(+), 25 deletions(-) create mode 100644 v2/api/account/hcporganizations/item/get_include_query_parameter_type.go create mode 100644 v2/api/models/hcp_billing_account_escaped_type.go diff --git a/v2/api/account/hcp_organizations_with_hcp_escaped_organization_escaped_item_request_builder.go b/v2/api/account/hcp_organizations_with_hcp_escaped_organization_escaped_item_request_builder.go index e36074e9f..b60fb2fef 100644 --- a/v2/api/account/hcp_organizations_with_hcp_escaped_organization_escaped_item_request_builder.go +++ b/v2/api/account/hcp_organizations_with_hcp_escaped_organization_escaped_item_request_builder.go @@ -7,6 +7,7 @@ import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i05d5aa6b14db285c2e8df48c915f7a7082b77b17cca0def522e18528f80bec16 "github.com/hashicorp/go-tfe/v2/api/models" + i125aa0865a7fd9c5eecf52b99754bee7e2e6d28b66bc0a9987a53396fb9050b1 "github.com/hashicorp/go-tfe/v2/api/account/hcporganizations/item" ) // HcpOrganizationsWithHcp_organization_ItemRequestBuilder builds and executes requests for operations under \account\hcp-organizations\{hcp_organization_id} @@ -17,11 +18,13 @@ type HcpOrganizationsWithHcp_organization_ItemRequestBuilder struct { type HcpOrganizationsWithHcp_organization_ItemRequestBuilderGetQueryParameters struct { // Return only the specified fields for hcp-organization resource(s) in the response. Use underscores for identifiers that contain a dash: For example, auto_apply instead of auto-apply. An empty value indicates that no fields should be returned. FieldshcpOrganization []string "uriparametername:\"fields%5Bhcp%2Dorganization%5D\"" + // Optionally side-load the specified relationships. + Include []i125aa0865a7fd9c5eecf52b99754bee7e2e6d28b66bc0a9987a53396fb9050b1.GetIncludeQueryParameterType "uriparametername:\"include\"" } // NewHcpOrganizationsWithHcp_organization_ItemRequestBuilderInternal instantiates a new HcpOrganizationsWithHcp_organization_ItemRequestBuilder and sets the default values. func NewHcpOrganizationsWithHcp_organization_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HcpOrganizationsWithHcp_organization_ItemRequestBuilder) { m := &HcpOrganizationsWithHcp_organization_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/account/hcp-organizations/{hcp_organization_id}{?fields%5Bhcp%2Dorganization%5D}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/account/hcp-organizations/{hcp_organization_id}{?fields%5Bhcp%2Dorganization%5D,include}", pathParameters), } return m } diff --git a/v2/api/account/hcporganizations/item/get_include_query_parameter_type.go b/v2/api/account/hcporganizations/item/get_include_query_parameter_type.go new file mode 100644 index 000000000..09497d7cf --- /dev/null +++ b/v2/api/account/hcporganizations/item/get_include_query_parameter_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package item +type GetIncludeQueryParameterType int + +const ( + DEFAULT_ACCOUNT_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"default_account"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := DEFAULT_ACCOUNT_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "default_account": + result = DEFAULT_ACCOUNT_GETINCLUDEQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/v2/api/api_client.go b/v2/api/api_client.go index ad02ddbca..8a64c6565 100644 --- a/v2/api/api_client.go +++ b/v2/api/api_client.go @@ -171,7 +171,7 @@ func NewApiClient(requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa52901 i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i7294a22093d408fdca300f11b81a887d89c47b764af06c8b803e2323973fdb83.NewTextParseNodeFactory() }) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i4bcdc892e61ac17e2afc10b5e2b536b29f4fd6c1ad30f4a5a68df47495db3347.NewFormParseNodeFactory() }) if m.BaseRequestBuilder.RequestAdapter.GetBaseUrl() == "" { - m.BaseRequestBuilder.RequestAdapter.SetBaseUrl("https://app.terraform.io") + m.BaseRequestBuilder.RequestAdapter.SetBaseUrl("https://app.terraform.io/api/v2") } m.BaseRequestBuilder.PathParameters["baseurl"] = m.BaseRequestBuilder.RequestAdapter.GetBaseUrl() return m diff --git a/v2/api/kiota-lock.json b/v2/api/kiota-lock.json index 409c62b82..e46ab4339 100644 --- a/v2/api/kiota-lock.json +++ b/v2/api/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "66B55ECF9AA57CD25D739CF951A71377E797BAC17AFCBEC29CF9003E50529D58AACAF30CDCAE3A740C943B7A1A630CDF8035A2ABB5A018C1F71031450BD2BDEA", + "descriptionHash": "0DE34913FC9CFE89F6B7023D3A1A878F92E70FD899E5EF79ABF587678993389997486C4C8BD86B678A8C9AEAFFD8179B98D0E0401F46D7D9877630B8885E1E9F", "descriptionLocation": "../openapi/spec.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.31.1", diff --git a/v2/api/models/hcp_billing_account.go b/v2/api/models/hcp_billing_account.go index 2ff97688d..97f2e142a 100644 --- a/v2/api/models/hcp_billing_account.go +++ b/v2/api/models/hcp_billing_account.go @@ -15,7 +15,7 @@ type HcpBillingAccount struct { // The id property id *string // The type property - typeEscaped *string + typeEscaped *HcpBillingAccount_type } // NewHcpBillingAccount instantiates a new HcpBillingAccount and sets the default values. func NewHcpBillingAccount()(*HcpBillingAccount) { @@ -64,12 +64,12 @@ func (m *HcpBillingAccount) GetFieldDeserializers()(map[string]func(i878a80d2330 return nil } res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() + val, err := n.GetEnumValue(ParseHcpBillingAccount_type) if err != nil { return err } if val != nil { - m.SetTypeEscaped(val) + m.SetTypeEscaped(val.(*HcpBillingAccount_type)) } return nil } @@ -81,8 +81,8 @@ func (m *HcpBillingAccount) GetId()(*string) { return m.id } // GetTypeEscaped gets the type property value. The type property -// returns a *string when successful -func (m *HcpBillingAccount) GetTypeEscaped()(*string) { +// returns a *HcpBillingAccount_type when successful +func (m *HcpBillingAccount) GetTypeEscaped()(*HcpBillingAccount_type) { return m.typeEscaped } // Serialize serializes information the current object @@ -99,8 +99,9 @@ func (m *HcpBillingAccount) Serialize(writer i878a80d2330e89d26896388a3f487eef27 return err } } - { - err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) if err != nil { return err } @@ -126,7 +127,7 @@ func (m *HcpBillingAccount) SetId(value *string)() { m.id = value } // SetTypeEscaped sets the type property value. The type property -func (m *HcpBillingAccount) SetTypeEscaped(value *string)() { +func (m *HcpBillingAccount) SetTypeEscaped(value *HcpBillingAccount_type)() { m.typeEscaped = value } type HcpBillingAccountable interface { @@ -134,8 +135,8 @@ type HcpBillingAccountable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAttributes()(HcpBillingAccount_attributesable) GetId()(*string) - GetTypeEscaped()(*string) + GetTypeEscaped()(*HcpBillingAccount_type) SetAttributes(value HcpBillingAccount_attributesable)() SetId(value *string)() - SetTypeEscaped(value *string)() + SetTypeEscaped(value *HcpBillingAccount_type)() } diff --git a/v2/api/models/hcp_billing_account_escaped_attributes.go b/v2/api/models/hcp_billing_account_escaped_attributes.go index fa2fc653d..4e3356afd 100644 --- a/v2/api/models/hcp_billing_account_escaped_attributes.go +++ b/v2/api/models/hcp_billing_account_escaped_attributes.go @@ -13,7 +13,7 @@ type HcpBillingAccount_attributes struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The balance property - balance *float64 + balance *int32 // The cardBrand property cardBrand *string // The cardExpMonth property @@ -28,6 +28,8 @@ type HcpBillingAccount_attributes struct { hcpOrganizationId *string // The hcpOrganizationName property hcpOrganizationName *string + // The id property + id *string // The isPaymentMethodConfigured property isPaymentMethodConfigured *bool // The paymentProvider property @@ -60,8 +62,8 @@ func (m *HcpBillingAccount_attributes) GetAdditionalData()(map[string]any) { return m.additionalData } // GetBalance gets the balance property value. The balance property -// returns a *float64 when successful -func (m *HcpBillingAccount_attributes) GetBalance()(*float64) { +// returns a *int32 when successful +func (m *HcpBillingAccount_attributes) GetBalance()(*int32) { return m.balance } // GetCardBrand gets the card-brand property value. The cardBrand property @@ -99,7 +101,7 @@ func (m *HcpBillingAccount_attributes) GetFieldDeserializers()(map[string]func(i return nil } res["balance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetFloat64Value() + val, err := n.GetInt32Value() if err != nil { return err } @@ -178,6 +180,16 @@ func (m *HcpBillingAccount_attributes) GetFieldDeserializers()(map[string]func(i } return nil } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } res["is-payment-method-configured"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -235,6 +247,11 @@ func (m *HcpBillingAccount_attributes) GetHcpOrganizationId()(*string) { func (m *HcpBillingAccount_attributes) GetHcpOrganizationName()(*string) { return m.hcpOrganizationName } +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *HcpBillingAccount_attributes) GetId()(*string) { + return m.id +} // GetIsPaymentMethodConfigured gets the is-payment-method-configured property value. The isPaymentMethodConfigured property // returns a *bool when successful func (m *HcpBillingAccount_attributes) GetIsPaymentMethodConfigured()(*bool) { @@ -264,7 +281,7 @@ func (m *HcpBillingAccount_attributes) Serialize(writer i878a80d2330e89d26896388 } } { - err := writer.WriteFloat64Value("balance", m.GetBalance()) + err := writer.WriteInt32Value("balance", m.GetBalance()) if err != nil { return err } @@ -311,6 +328,12 @@ func (m *HcpBillingAccount_attributes) Serialize(writer i878a80d2330e89d26896388 return err } } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } { err := writer.WriteBoolValue("is-payment-method-configured", m.GetIsPaymentMethodConfigured()) if err != nil { @@ -352,7 +375,7 @@ func (m *HcpBillingAccount_attributes) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetBalance sets the balance property value. The balance property -func (m *HcpBillingAccount_attributes) SetBalance(value *float64)() { +func (m *HcpBillingAccount_attributes) SetBalance(value *int32)() { m.balance = value } // SetCardBrand sets the card-brand property value. The cardBrand property @@ -383,6 +406,10 @@ func (m *HcpBillingAccount_attributes) SetHcpOrganizationId(value *string)() { func (m *HcpBillingAccount_attributes) SetHcpOrganizationName(value *string)() { m.hcpOrganizationName = value } +// SetId sets the id property value. The id property +func (m *HcpBillingAccount_attributes) SetId(value *string)() { + m.id = value +} // SetIsPaymentMethodConfigured sets the is-payment-method-configured property value. The isPaymentMethodConfigured property func (m *HcpBillingAccount_attributes) SetIsPaymentMethodConfigured(value *bool)() { m.isPaymentMethodConfigured = value @@ -403,7 +430,7 @@ type HcpBillingAccount_attributesable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAccountType()(*string) - GetBalance()(*float64) + GetBalance()(*int32) GetCardBrand()(*string) GetCardExpMonth()(*int32) GetCardExpYear()(*int32) @@ -411,12 +438,13 @@ type HcpBillingAccount_attributesable interface { GetFlexVersion()(*string) GetHcpOrganizationId()(*string) GetHcpOrganizationName()(*string) + GetId()(*string) GetIsPaymentMethodConfigured()(*bool) GetPaymentProvider()(*string) GetProjectId()(*string) GetStatus()(*string) SetAccountType(value *string)() - SetBalance(value *float64)() + SetBalance(value *int32)() SetCardBrand(value *string)() SetCardExpMonth(value *int32)() SetCardExpYear(value *int32)() @@ -424,6 +452,7 @@ type HcpBillingAccount_attributesable interface { SetFlexVersion(value *string)() SetHcpOrganizationId(value *string)() SetHcpOrganizationName(value *string)() + SetId(value *string)() SetIsPaymentMethodConfigured(value *bool)() SetPaymentProvider(value *string)() SetProjectId(value *string)() diff --git a/v2/api/models/hcp_billing_account_escaped_type.go b/v2/api/models/hcp_billing_account_escaped_type.go new file mode 100644 index 000000000..61499e3b8 --- /dev/null +++ b/v2/api/models/hcp_billing_account_escaped_type.go @@ -0,0 +1,33 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type HcpBillingAccount_type int + +const ( + HCPBILLINGACCOUNT_HCPBILLINGACCOUNT_TYPE HcpBillingAccount_type = iota +) + +func (i HcpBillingAccount_type) String() string { + return []string{"hcp-billing-account"}[i] +} +func ParseHcpBillingAccount_type(v string) (any, error) { + result := HCPBILLINGACCOUNT_HCPBILLINGACCOUNT_TYPE + switch v { + case "hcp-billing-account": + result = HCPBILLINGACCOUNT_HCPBILLINGACCOUNT_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeHcpBillingAccount_type(values []HcpBillingAccount_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i HcpBillingAccount_type) isMultiValue() bool { + return false +} diff --git a/v2/api/models/hcp_organization_envelope.go b/v2/api/models/hcp_organization_envelope.go index 92de887fa..6d48fe274 100644 --- a/v2/api/models/hcp_organization_envelope.go +++ b/v2/api/models/hcp_organization_envelope.go @@ -12,6 +12,8 @@ type HcpOrganizationEnvelope struct { additionalData map[string]any // The data property data HcpOrganizationable + // The included property + included []HcpBillingAccountable } // NewHcpOrganizationEnvelope instantiates a new HcpOrganizationEnvelope and sets the default values. func NewHcpOrganizationEnvelope()(*HcpOrganizationEnvelope) { @@ -49,8 +51,29 @@ func (m *HcpOrganizationEnvelope) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["included"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHcpBillingAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HcpBillingAccountable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(HcpBillingAccountable) + } + } + m.SetIncluded(res) + } + return nil + } return res } +// GetIncluded gets the included property value. The included property +// returns a []HcpBillingAccountable when successful +func (m *HcpOrganizationEnvelope) GetIncluded()([]HcpBillingAccountable) { + return m.included +} // Serialize serializes information the current object func (m *HcpOrganizationEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -59,6 +82,18 @@ func (m *HcpOrganizationEnvelope) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + if m.GetIncluded() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncluded())) + for i, v := range m.GetIncluded() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("included", cast) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -75,9 +110,15 @@ func (m *HcpOrganizationEnvelope) SetAdditionalData(value map[string]any)() { func (m *HcpOrganizationEnvelope) SetData(value HcpOrganizationable)() { m.data = value } +// SetIncluded sets the included property value. The included property +func (m *HcpOrganizationEnvelope) SetIncluded(value []HcpBillingAccountable)() { + m.included = value +} type HcpOrganizationEnvelopeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetData()(HcpOrganizationable) + GetIncluded()([]HcpBillingAccountable) SetData(value HcpOrganizationable)() + SetIncluded(value []HcpBillingAccountable)() } diff --git a/v2/openapi/spec.json b/v2/openapi/spec.json index 75eaf0fec..58aecb22c 100644 --- a/v2/openapi/spec.json +++ b/v2/openapi/spec.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "development", + "version": "02a271d9", "title": "HCP Terraform/Terraform Enterprise API v2-Beta", "description": "OpenAPI Specification for the HCP Terraform/Terraform Enterprise API V2 Public Beta.", "license": { @@ -15,7 +15,7 @@ }, "servers": [ { - "url": "https://app.terraform.io" + "url": "https://app.terraform.io/api/v2" } ], "security": [ @@ -2302,6 +2302,23 @@ "type": "string" } } + }, + { + "in": "query", + "name": "include", + "style": "form", + "explode": false, + "required": false, + "description": "Optionally side-load the specified relationships.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "default_account" + ] + } + } } ], "responses": { @@ -35350,6 +35367,77 @@ } } }, + "hcp-billing-account": { + "type": "object", + "required": [ + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "hcp-billing-account" + ] + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "project-id": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "hcp-organization-id": { + "type": "string" + }, + "hcp-organization-name": { + "type": "string" + }, + "card-brand": { + "type": "string", + "nullable": true + }, + "card-last4": { + "type": "string", + "nullable": true + }, + "card-exp-month": { + "type": "integer", + "nullable": true + }, + "card-exp-year": { + "type": "integer", + "nullable": true + }, + "account-type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "flex-version": { + "type": "string", + "nullable": true + }, + "payment-provider": { + "type": "string", + "nullable": true + }, + "is-payment-method-configured": { + "type": "boolean" + } + } + } + } + }, "entitlement-sets": { "type": "object", "required": [ @@ -37633,6 +37721,22 @@ "properties": { "data": { "$ref": "#/components/schemas/hcp-organization" + }, + "included": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/hcp-billing-account" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "hcp-billing-account": "#/components/schemas/hcp-billing-account" + } + } + } } } }, @@ -49116,13 +49220,15 @@ "type": "string" }, "namespace": { - "type": "string" + "type": "string", + "nullable": true }, "auth-path": { "type": "string" }, "encoded-cacert": { - "type": "string" + "type": "string", + "nullable": true } } }, From 5ab248031bd1997ebef50bfb95ee11ab68e2dac1 Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Fri, 2 Oct 2026 14:48:37 -0600 Subject: [PATCH 6/6] updated CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec215778a..39ac66934 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# Unreleased + +* Bug Fix: GET responses now properly assign included property schemas when used in conjunction with include request parameters. +* Enhancement: Most available `include` query parameters are now enumerated in applicable GET requests. + # v2.12.0 * Enhancement: The latest API operations are available.