From f2bdce3e91b95dd1d08bfd8564db58b72b5d1f9e Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Mon, 11 Mar 2024 19:54:28 -0700 Subject: [PATCH] feat: Automated regeneration of AssuredWorkloads client (#10994) Auto-created at 2024-03-12 02:52:39 +0000 using the toys pull request generator. --- .../assured_workloads/v1/api/organizations.ex | 243 +++++++++++++++++- .../assured_workloads/v1/metadata.ex | 2 +- ...kloads_v1_acknowledge_violation_request.ex | 5 +- ...loads_v1_analyze_workload_move_response.ex | 64 +++++ ...assuredworkloads_v1_asset_move_analysis.ex | 65 +++++ ..._v1_enable_resource_monitoring_response.ex | 48 ++++ ...assuredworkloads_v1_move_analysis_group.ex | 62 +++++ ...ssuredworkloads_v1_move_analysis_result.ex | 65 +++++ ...e_cloud_assuredworkloads_v1_move_impact.ex | 51 ++++ ...s_v1_mutate_partner_permissions_request.ex | 66 +++++ ...gle_cloud_assuredworkloads_v1_violation.ex | 32 ++- ...orkloads_v1_violation_exception_context.ex | 57 ++++ ...ogle_cloud_assuredworkloads_v1_workload.ex | 31 ++- ...workloads_v1_workload_compliance_status.ex | 10 +- ...s_v1_workload_ekm_provisioning_response.ex | 59 +++++ ...suredworkloads_v1_workload_kms_settings.ex | 2 +- ...rkloads_v1_workload_partner_permissions.ex | 57 ++++ ...workloads_v1_workload_resource_settings.ex | 2 +- .../v1/model/google_longrunning_operation.ex | 2 +- 19 files changed, 909 insertions(+), 14 deletions(-) create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_analyze_workload_move_response.ex create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_asset_move_analysis.ex create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_enable_resource_monitoring_response.ex create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_analysis_group.ex create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_analysis_result.ex create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_impact.ex create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_mutate_partner_permissions_request.ex create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_violation_exception_context.ex create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_ekm_provisioning_response.ex create mode 100644 clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_partner_permissions.ex diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/api/organizations.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/api/organizations.ex index 8be2c04c74..b81e9cf5ec 100644 --- a/clients/assured_workloads/lib/google_api/assured_workloads/v1/api/organizations.ex +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/api/organizations.ex @@ -98,7 +98,7 @@ defmodule GoogleApi.AssuredWorkloads.V1.Api.Organizations do end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. ## Parameters @@ -176,6 +176,91 @@ defmodule GoogleApi.AssuredWorkloads.V1.Api.Organizations do ) end + @doc """ + Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive. + + ## Parameters + + * `connection` (*type:* `GoogleApi.AssuredWorkloads.V1.Connection.t`) - Connection to server + * `target` (*type:* `String.t`) - Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload's relative resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-2" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:assetTypes` (*type:* `list(String.t)`) - Optional. List of asset types to be analyzed, including and under the source resource. If empty, all assets are analyzed. The complete list of asset types is available [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + * `:pageSize` (*type:* `integer()`) - Optional. Page size. If a value is not specified, the default value of 10 is used. + * `:pageToken` (*type:* `String.t`) - Optional. The page token from the previous response. It needs to be passed in the second and following requests. + * `:project` (*type:* `String.t`) - The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse{}}` on success + * `{:error, info}` on failure + """ + @spec assuredworkloads_organizations_locations_workloads_analyze_workload_move( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def assuredworkloads_organizations_locations_workloads_analyze_workload_move( + connection, + target, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :assetTypes => :query, + :pageSize => :query, + :pageToken => :query, + :project => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+target}:analyzeWorkloadMove", %{ + "target" => URI.encode(target, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse{} + ] + ) + end + @doc """ Creates Assured Workload. @@ -253,7 +338,7 @@ defmodule GoogleApi.AssuredWorkloads.V1.Api.Organizations do end @doc """ - Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. + Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. In addition to assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set permission on the deleted folder to remove Assured Workloads OrgPolicies. ## Parameters @@ -326,13 +411,90 @@ defmodule GoogleApi.AssuredWorkloads.V1.Api.Organizations do ) end + @doc """ + Enable resource violation monitoring for a workload. + + ## Parameters + + * `connection` (*type:* `GoogleApi.AssuredWorkloads.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse{}}` on success + * `{:error, info}` on failure + """ + @spec assuredworkloads_organizations_locations_workloads_enable_resource_monitoring( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def assuredworkloads_organizations_locations_workloads_enable_resource_monitoring( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+name}:enableResourceMonitoring", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse{} + ] + ) + end + @doc """ Gets Assured Workload associated with a CRM Node ## Parameters * `connection` (*type:* `GoogleApi.AssuredWorkloads.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The resource name of the Workload to fetch. This is the workload's relative path in the API, formatted as "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". + * `name` (*type:* `String.t`) - Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -482,6 +644,81 @@ defmodule GoogleApi.AssuredWorkloads.V1.Api.Organizations do ) end + @doc """ + Update the permissions settings for an existing partner workload. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress. + + ## Parameters + + * `connection` (*type:* `GoogleApi.AssuredWorkloads.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workload{}}` on success + * `{:error, info}` on failure + """ + @spec assuredworkloads_organizations_locations_workloads_mutate_partner_permissions( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workload.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def assuredworkloads_organizations_locations_workloads_mutate_partner_permissions( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/{+name}:mutatePartnerPermissions", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [struct: %GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workload{}] + ) + end + @doc """ Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress. diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/metadata.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/metadata.ex index 04ff15e41a..eaf908f497 100644 --- a/clients/assured_workloads/lib/google_api/assured_workloads/v1/metadata.ex +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.AssuredWorkloads.V1 do API client metadata for GoogleApi.AssuredWorkloads.V1. """ - @discovery_revision "20221110" + @discovery_revision "20240229" def discovery_revision(), do: @discovery_revision end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_acknowledge_violation_request.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_acknowledge_violation_request.ex index 1b0adfdffc..601f195278 100644 --- a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_acknowledge_violation_request.ex +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_acknowledge_violation_request.ex @@ -17,10 +17,11 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest do @moduledoc """ - Request for acknowledging the violation Next Id: 4 + Request for acknowledging the violation ## Attributes + * `acknowledgeType` (*type:* `String.t`, *default:* `nil`) - Optional. Acknowledge type of specified violation. * `comment` (*type:* `String.t`, *default:* `nil`) - Required. Business justification explaining the need for violation acknowledgement * `nonCompliantOrgPolicy` (*type:* `String.t`, *default:* `nil`) - Optional. This field is deprecated and will be removed in future version of the API. Name of the OrgPolicy which was modified with non-compliant change and resulted in this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name} """ @@ -28,10 +29,12 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Ackno use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :acknowledgeType => String.t() | nil, :comment => String.t() | nil, :nonCompliantOrgPolicy => String.t() | nil } + field(:acknowledgeType) field(:comment) field(:nonCompliantOrgPolicy) end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_analyze_workload_move_response.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_analyze_workload_move_response.ex new file mode 100644 index 0000000000..e03cc6a3b6 --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_analyze_workload_move_response.ex @@ -0,0 +1,64 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse do + @moduledoc """ + Response containing the analysis results for the hypothetical resource move. + + ## Attributes + + * `assetMoveAnalyses` (*type:* `list(GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AssetMoveAnalysis.t)`, *default:* `nil`) - List of analysis results for each asset in scope. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next page token. Is empty if the last page is reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :assetMoveAnalyses => + list( + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AssetMoveAnalysis.t() + ) + | nil, + :nextPageToken => String.t() | nil + } + + field(:assetMoveAnalyses, + as: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AssetMoveAnalysis, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_asset_move_analysis.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_asset_move_analysis.ex new file mode 100644 index 0000000000..12fadf01a1 --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_asset_move_analysis.ex @@ -0,0 +1,65 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AssetMoveAnalysis do + @moduledoc """ + Represents move analysis results for an asset. + + ## Attributes + + * `analysisGroups` (*type:* `list(GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisGroup.t)`, *default:* `nil`) - List of eligible analyses performed for the asset. + * `asset` (*type:* `String.t`, *default:* `nil`) - The full resource name of the asset being analyzed. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1 + * `assetType` (*type:* `String.t`, *default:* `nil`) - Type of the asset being analyzed. Possible values will be among the ones listed [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :analysisGroups => + list( + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisGroup.t() + ) + | nil, + :asset => String.t() | nil, + :assetType => String.t() | nil + } + + field(:analysisGroups, + as: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisGroup, + type: :list + ) + + field(:asset) + field(:assetType) +end + +defimpl Poison.Decoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AssetMoveAnalysis do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AssetMoveAnalysis.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1AssetMoveAnalysis do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_enable_resource_monitoring_response.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_enable_resource_monitoring_response.ex new file mode 100644 index 0000000000..bbcc4a48c1 --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_enable_resource_monitoring_response.ex @@ -0,0 +1,48 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse do + @moduledoc """ + Response for EnableResourceMonitoring endpoint. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_analysis_group.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_analysis_group.ex new file mode 100644 index 0000000000..5db1b59df9 --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_analysis_group.ex @@ -0,0 +1,62 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisGroup do + @moduledoc """ + Represents a logical group of checks performed for an asset. If successful, the group contains the analysis result, otherwise it contains an error with the failure reason. + + ## Attributes + + * `analysisResult` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisResult.t`, *default:* `nil`) - Result of a successful analysis. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Name of the analysis group. + * `error` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleRpcStatus.t`, *default:* `nil`) - Error details for a failed analysis. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :analysisResult => + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisResult.t() + | nil, + :displayName => String.t() | nil, + :error => GoogleApi.AssuredWorkloads.V1.Model.GoogleRpcStatus.t() | nil + } + + field(:analysisResult, + as: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisResult + ) + + field(:displayName) + field(:error, as: GoogleApi.AssuredWorkloads.V1.Model.GoogleRpcStatus) +end + +defimpl Poison.Decoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisGroup do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisGroup.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisGroup do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_analysis_result.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_analysis_result.ex new file mode 100644 index 0000000000..02f2480c0c --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_analysis_result.ex @@ -0,0 +1,65 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisResult do + @moduledoc """ + Represents the successful move analysis results for a group. + + ## Attributes + + * `blockers` (*type:* `list(GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact.t)`, *default:* `nil`) - List of blockers. If not resolved, these will result in compliance violations in the target. + * `warnings` (*type:* `list(GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact.t)`, *default:* `nil`) - List of warnings. These are risks that may or may not result in compliance violations. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :blockers => + list(GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact.t()) + | nil, + :warnings => + list(GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact.t()) + | nil + } + + field(:blockers, + as: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact, + type: :list + ) + + field(:warnings, + as: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisResult do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisResult.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveAnalysisResult do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_impact.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_impact.ex new file mode 100644 index 0000000000..0243957b5c --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_move_impact.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact do + @moduledoc """ + Represents the impact of moving the asset to the target. + + ## Attributes + + * `detail` (*type:* `String.t`, *default:* `nil`) - Explanation of the impact. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :detail => String.t() | nil + } + + field(:detail) +end + +defimpl Poison.Decoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MoveImpact do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_mutate_partner_permissions_request.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_mutate_partner_permissions_request.ex new file mode 100644 index 0000000000..340bae8aa1 --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_mutate_partner_permissions_request.ex @@ -0,0 +1,66 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest do + @moduledoc """ + Request for updating permission settings for a partner workload. + + ## Attributes + + * `etag` (*type:* `String.t`, *default:* `nil`) - Optional. The etag of the workload. If this is provided, it must match the server's etag. + * `partnerPermissions` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions.t`, *default:* `nil`) - Required. The partner permissions to be updated. + * `updateMask` (*type:* `String.t`, *default:* `nil`) - Required. The list of fields to be updated. E.g. update_mask { paths: "partner_permissions.data_logs_viewer"} + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :etag => String.t() | nil, + :partnerPermissions => + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions.t() + | nil, + :updateMask => String.t() | nil + } + + field(:etag) + + field(:partnerPermissions, + as: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions + ) + + field(:updateMask) +end + +defimpl Poison.Decoder, + for: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_violation.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_violation.ex index c91c147db9..de6dfeab67 100644 --- a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_violation.ex +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_violation.ex @@ -22,19 +22,25 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Viola ## Attributes * `acknowledged` (*type:* `boolean()`, *default:* `nil`) - A boolean that indicates if the violation is acknowledged - * `acknowledgementTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Timestamp when this violation was acknowledged last. This will be absent when acknowledged field is marked as false. + * `acknowledgementTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Timestamp when this violation was acknowledged first. Check exception_contexts to find the last time the violation was acknowledged when there are more than one violations. This field will be absent when acknowledged field is marked as false. + * `associatedOrgPolicyViolationId` (*type:* `String.t`, *default:* `nil`) - Optional. Output only. Violation Id of the org-policy violation due to which the resource violation is caused. Empty for org-policy violations. * `auditLogLink` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. Audit Log Link for violated resource Format: https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder} * `beginTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time of the event which triggered the Violation. * `category` (*type:* `String.t`, *default:* `nil`) - Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc. * `description` (*type:* `String.t`, *default:* `nil`) - Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value. * `exceptionAuditLogLink` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. Audit Log link to find business justification provided for violation exception. Format: https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization} + * `exceptionContexts` (*type:* `list(GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationExceptionContext.t)`, *default:* `nil`) - Output only. List of all the exception detail added for the violation. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. Name of the Violation. Format: organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id} * `nonCompliantOrgPolicy` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name} * `orgPolicyConstraint` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation. + * `parentProjectNumber` (*type:* `String.t`, *default:* `nil`) - Optional. Output only. Parent project number where resource is present. Empty for org-policy violations. * `remediation` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationRemediation.t`, *default:* `nil`) - Output only. Compliance violation remediation * `resolveTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty. + * `resourceName` (*type:* `String.t`, *default:* `nil`) - Optional. Output only. Name of the resource like //storage.googleapis.com/myprojectxyz-testbucket. Empty for org-policy violations. + * `resourceType` (*type:* `String.t`, *default:* `nil`) - Optional. Output only. Type of the resource like compute.googleapis.com/Disk, etc. Empty for org-policy violations. * `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of the violation * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last time when the Violation record was updated. + * `violationType` (*type:* `String.t`, *default:* `nil`) - Output only. Type of the violation """ use GoogleApi.Gax.ModelBase @@ -42,40 +48,62 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Viola @type t :: %__MODULE__{ :acknowledged => boolean() | nil, :acknowledgementTime => DateTime.t() | nil, + :associatedOrgPolicyViolationId => String.t() | nil, :auditLogLink => String.t() | nil, :beginTime => DateTime.t() | nil, :category => String.t() | nil, :description => String.t() | nil, :exceptionAuditLogLink => String.t() | nil, + :exceptionContexts => + list( + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationExceptionContext.t() + ) + | nil, :name => String.t() | nil, :nonCompliantOrgPolicy => String.t() | nil, :orgPolicyConstraint => String.t() | nil, + :parentProjectNumber => String.t() | nil, :remediation => GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationRemediation.t() | nil, :resolveTime => DateTime.t() | nil, + :resourceName => String.t() | nil, + :resourceType => String.t() | nil, :state => String.t() | nil, - :updateTime => DateTime.t() | nil + :updateTime => DateTime.t() | nil, + :violationType => String.t() | nil } field(:acknowledged) field(:acknowledgementTime, as: DateTime) + field(:associatedOrgPolicyViolationId) field(:auditLogLink) field(:beginTime, as: DateTime) field(:category) field(:description) field(:exceptionAuditLogLink) + + field(:exceptionContexts, + as: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationExceptionContext, + type: :list + ) + field(:name) field(:nonCompliantOrgPolicy) field(:orgPolicyConstraint) + field(:parentProjectNumber) field(:remediation, as: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationRemediation ) field(:resolveTime, as: DateTime) + field(:resourceName) + field(:resourceType) field(:state) field(:updateTime, as: DateTime) + field(:violationType) end defimpl Poison.Decoder, diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_violation_exception_context.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_violation_exception_context.ex new file mode 100644 index 0000000000..004f0c49f7 --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_violation_exception_context.ex @@ -0,0 +1,57 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationExceptionContext do + @moduledoc """ + Violation exception detail. + + ## Attributes + + * `acknowledgementTime` (*type:* `DateTime.t`, *default:* `nil`) - Timestamp when the violation was acknowledged. + * `comment` (*type:* `String.t`, *default:* `nil`) - Business justification provided towards the acknowledgement of the violation. + * `userName` (*type:* `String.t`, *default:* `nil`) - Name of the user (or service account) who acknowledged the violation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :acknowledgementTime => DateTime.t() | nil, + :comment => String.t() | nil, + :userName => String.t() | nil + } + + field(:acknowledgementTime, as: DateTime) + field(:comment) + field(:userName) +end + +defimpl Poison.Decoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationExceptionContext do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationExceptionContext.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1ViolationExceptionContext do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload.ex index 85e172425f..f3bb3f7a9a 100644 --- a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload.ex +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload.ex @@ -24,9 +24,10 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl * `billingAccount` (*type:* `String.t`, *default:* `nil`) - Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`. * `complianceRegime` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. Compliance Regime associated with this workload. * `complianceStatus` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus.t`, *default:* `nil`) - Output only. Count of active Violations in the Workload. - * `compliantButDisallowedServices` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment." + * `compliantButDisallowedServices` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Immutable. The Workload creation timestamp. * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload + * `ekmProvisioningResponse` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse.t`, *default:* `nil`) - Output only. Represents the Ekm Provisioning State of the given workload. * `enableSovereignControls` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers. * `etag` (*type:* `String.t`, *default:* `nil`) - Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations. * `kajEnrollmentState` (*type:* `String.t`, *default:* `nil`) - Output only. Represents the KAJ enrollment state of the given workload. @@ -34,10 +35,13 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl * `labels` (*type:* `map()`, *default:* `nil`) - Optional. Labels applied to the workload. * `name` (*type:* `String.t`, *default:* `nil`) - Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only. * `partner` (*type:* `String.t`, *default:* `nil`) - Optional. Partner regime associated with this workload. + * `partnerPermissions` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions.t`, *default:* `nil`) - Optional. Permissions granted to the AW Partner SA account for the customer workload * `provisionedResourcesParent` (*type:* `String.t`, *default:* `nil`) - Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id} + * `resourceMonitoringEnabled` (*type:* `boolean()`, *default:* `nil`) - Output only. Indicates whether resource monitoring is enabled for workload or not. It is true when Resource feed is subscribed to AWM topic and AWM Service Agent Role is binded to AW Service Account for resource Assured workload. * `resourceSettings` (*type:* `list(GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadResourceSettings.t)`, *default:* `nil`) - Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional. * `resources` (*type:* `list(GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadResourceInfo.t)`, *default:* `nil`) - Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only. * `saaEnrollmentResponse` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse.t`, *default:* `nil`) - Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page. + * `violationNotificationsEnabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates whether the e-mail notification for a violation is enabled for a workload. This value will be by default True, and if not present will be considered as true. This should only be updated via updateWorkload call. Any Changes to this field during the createWorkload call will not be honored. This will always be true while creating the workload. """ use GoogleApi.Gax.ModelBase @@ -51,6 +55,9 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl :compliantButDisallowedServices => list(String.t()) | nil, :createTime => DateTime.t() | nil, :displayName => String.t() | nil, + :ekmProvisioningResponse => + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse.t() + | nil, :enableSovereignControls => boolean() | nil, :etag => String.t() | nil, :kajEnrollmentState => String.t() | nil, @@ -60,7 +67,11 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl :labels => map() | nil, :name => String.t() | nil, :partner => String.t() | nil, + :partnerPermissions => + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions.t() + | nil, :provisionedResourcesParent => String.t() | nil, + :resourceMonitoringEnabled => boolean() | nil, :resourceSettings => list( GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadResourceSettings.t() @@ -73,7 +84,8 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl | nil, :saaEnrollmentResponse => GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse.t() - | nil + | nil, + :violationNotificationsEnabled => boolean() | nil } field(:billingAccount) @@ -86,6 +98,12 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl field(:compliantButDisallowedServices, type: :list) field(:createTime, as: DateTime) field(:displayName) + + field(:ekmProvisioningResponse, + as: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse + ) + field(:enableSovereignControls) field(:etag) field(:kajEnrollmentState) @@ -97,7 +115,14 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl field(:labels, type: :map) field(:name) field(:partner) + + field(:partnerPermissions, + as: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions + ) + field(:provisionedResourcesParent) + field(:resourceMonitoringEnabled) field(:resourceSettings, as: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadResourceSettings, @@ -113,6 +138,8 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl as: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse ) + + field(:violationNotificationsEnabled) end defimpl Poison.Decoder, diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_compliance_status.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_compliance_status.ex index 010035a00d..817501d8c6 100644 --- a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_compliance_status.ex +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_compliance_status.ex @@ -21,18 +21,24 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl ## Attributes - * `acknowledgedViolationCount` (*type:* `integer()`, *default:* `nil`) - Count of active Violations which are acknowledged in the Workload. - * `activeViolationCount` (*type:* `integer()`, *default:* `nil`) - Count of active Violations which haven't been acknowledged. + * `acknowledgedResourceViolationCount` (*type:* `integer()`, *default:* `nil`) - Number of current resource violations which are not acknowledged. + * `acknowledgedViolationCount` (*type:* `integer()`, *default:* `nil`) - Number of current orgPolicy violations which are acknowledged. + * `activeResourceViolationCount` (*type:* `integer()`, *default:* `nil`) - Number of current resource violations which are acknowledged. + * `activeViolationCount` (*type:* `integer()`, *default:* `nil`) - Number of current orgPolicy violations which are not acknowledged. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :acknowledgedResourceViolationCount => integer() | nil, :acknowledgedViolationCount => integer() | nil, + :activeResourceViolationCount => integer() | nil, :activeViolationCount => integer() | nil } + field(:acknowledgedResourceViolationCount) field(:acknowledgedViolationCount) + field(:activeResourceViolationCount) field(:activeViolationCount) end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_ekm_provisioning_response.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_ekm_provisioning_response.ex new file mode 100644 index 0000000000..a3d909ff4e --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_ekm_provisioning_response.ex @@ -0,0 +1,59 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse do + @moduledoc """ + External key management systems(EKM) Provisioning response + + ## Attributes + + * `ekmProvisioningErrorDomain` (*type:* `String.t`, *default:* `nil`) - Indicates Ekm provisioning error if any. + * `ekmProvisioningErrorMapping` (*type:* `String.t`, *default:* `nil`) - Detailed error message if Ekm provisioning fails + * `ekmProvisioningState` (*type:* `String.t`, *default:* `nil`) - Indicates Ekm enrollment Provisioning of a given workload. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :ekmProvisioningErrorDomain => String.t() | nil, + :ekmProvisioningErrorMapping => String.t() | nil, + :ekmProvisioningState => String.t() | nil + } + + field(:ekmProvisioningErrorDomain) + field(:ekmProvisioningErrorMapping) + field(:ekmProvisioningState) +end + +defimpl Poison.Decoder, + for: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadEkmProvisioningResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_kms_settings.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_kms_settings.ex index b37e69d7ab..2f9216d592 100644 --- a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_kms_settings.ex +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_kms_settings.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadKMSSettings do @moduledoc """ - Settings specific to the Key Management Service. This message is deprecated. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + Settings specific to the Key Management Service. ## Attributes diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_partner_permissions.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_partner_permissions.ex new file mode 100644 index 0000000000..53b59d3508 --- /dev/null +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_partner_permissions.ex @@ -0,0 +1,57 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions do + @moduledoc """ + Permissions granted to the AW Partner SA account for the customer workload + + ## Attributes + + * `assuredWorkloadsMonitoring` (*type:* `boolean()`, *default:* `nil`) - Optional. Allow partner to view violation alerts. + * `dataLogsViewer` (*type:* `boolean()`, *default:* `nil`) - Allow the partner to view inspectability logs and monitoring violations. + * `serviceAccessApprover` (*type:* `boolean()`, *default:* `nil`) - Optional. Allow partner to view access approval logs. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :assuredWorkloadsMonitoring => boolean() | nil, + :dataLogsViewer => boolean() | nil, + :serviceAccessApprover => boolean() | nil + } + + field(:assuredWorkloadsMonitoring) + field(:dataLogsViewer) + field(:serviceAccessApprover) +end + +defimpl Poison.Decoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions do + def decode(value, options) do + GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_resource_settings.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_resource_settings.ex index b369372656..6e944301a1 100644 --- a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_resource_settings.ex +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_cloud_assuredworkloads_v1_workload_resource_settings.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleCloudAssuredworkloadsV1Workl * `displayName` (*type:* `String.t`, *default:* `nil`) - User-assigned resource display name. If not empty it will be used to create a resource with the specified name. * `resourceId` (*type:* `String.t`, *default:* `nil`) - Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google. - * `resourceType` (*type:* `String.t`, *default:* `nil`) - Indicates the type of resource. This field should be specified to correspond the id to the right resource type (CONSUMER_FOLDER or ENCRYPTION_KEYS_PROJECT) + * `resourceType` (*type:* `String.t`, *default:* `nil`) - Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) """ use GoogleApi.Gax.ModelBase diff --git a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_longrunning_operation.ex b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_longrunning_operation.ex index 4e82d739b8..b30faafb9e 100644 --- a/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_longrunning_operation.ex +++ b/clients/assured_workloads/lib/google_api/assured_workloads/v1/model/google_longrunning_operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.AssuredWorkloads.V1.Model.GoogleLongrunningOperation do * `error` (*type:* `GoogleApi.AssuredWorkloads.V1.Model.GoogleRpcStatus.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. - * `response` (*type:* `map()`, *default:* `nil`) - The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. """ use GoogleApi.Gax.ModelBase